Custom Content Embed with individual text?
-
Hi there,
great Plugin, thanks a lot!I wrapped my twitter-timeline in a custom content function, following your example code from the faq – this works fine! But it uses only the plugin default text, not my individualized twitter text used for tweet embeds (which i individualized with your new settings-feature in the backend).
Is there a way to refer in custom functions to this managed text and image parts for all twitter embeds? Or: is there a possibility to inject individual text in this custom contenet function?
My function (twitter code is shortened):
function prefix_twitter_replace_content_with_overlay( $content ) { // check for Embed Privacy if ( ! class_exists( 'epiphyt\Embed_Privacy\Embed_Privacy' ) ) { return $content; } // get Embed Privacy instance $embed_privacy = epiphyt\Embed_Privacy\Embed_Privacy::get_instance(); // check if provider is always active; if so, just return the content if ( ! $embed_privacy->is_always_active_provider( 'twitter' ) ) { // replace the content with the overlay $content = $embed_privacy->get_output_template( 'Twitter', 'twitter', $content ); } return $content; } $twitter_content = '<div id="twitterbox"><a class="twitter-timeline" href="https://twitter.com/EXAMPLE" width="282" height="478" lang="DE" [ ... ] <script>!function [...] "twitter-wjs");</script></div>'; echo prefix_twitter_replace_content_with_overlay( $twitter_content );
Sch?ne Grü?e!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom Content Embed with individual text?’ is closed to new replies.