Wie man den Text in einem eingebetteten Beitrag anpasst

Getting your embed URL to onebox is a separate issue. Use allowed embed classnames just to set the text excerpt as in my example.

Because you’ll be effectively re-inventing the wheel to try to circumvent what is really a TopicEmbed parsing issue. It’ll also open up a new set of issues, like what if your code does not execute in the order you expect, e.g. there’s a race condition or some other intervening exception. These kind of issues happen relatively often with a mixture of code on an external site with the WP Discourse plugin. In short, it’s not worth it.

You seem to know your way around a codebase :slight_smile: . You effectively need to make two simple changes to this class.

  1. Insert a conditional controlled by a site setting here
  1. insert another conditional controlled by a site setting here

You wouldn’t even need to build the discourse app. Just write two rspec tests first, then make the changes, then once you get them working make a PR :slight_smile:

1 „Gefällt mir“