Feed video embed
-
Hi Alex –
A video embeded into a feed nativly by viper video tags doesn’t seem to be possible by now afaik – you only provide the possibility to define the replacement text in the feed.
So i took a look into your code for hooks and actions:
You do offer a promising hook called “vvq_feedoutput” in your postlink-function, but unfortunately i don’t see a way to get hold on the according shortcode data or the video url itself in a registered filter function without introspection (veery slow).
Could it be possible that you provide the video url (or more info) to filters? That way one could embed an direct url to the video in the feed or embed an linked video icon, etc.
For example passing the video url would be very easy:
(1) You would have to alter the call to $this->postlink in your shorttag functions to something like this:
if (is_feed()) return $this->postlink($content);
($content would be the content of the shortcodes eg. the video urls)
(2) In the postlink-function you would have to pass the video url further to the filter call, so external plugins/themes use that url:
// Return a link to the post for use in the feed function postlink($video_url) { global $post; if ( empty($post->ID) ) return ''; // This should never happen (I hope) $text = ( !empty($this->settings['customfeedtext']) ) ? $this->settings['customfeedtext'] : $this->customfeedtext; return apply_filters( 'vvq_feedoutput', '<p><a>ID ) . '">' . $text . '</a></p>', $video_url ); }
Would be a hit ??
BR from Salzburg,
– Johannes
- The topic ‘Feed video embed’ is closed to new replies.