Jump to content

function key 'face' included in img url


woolwit

Recommended Posts

This is in relation to a Wordpress plug-in called FeedWordPress.

Is it obvious to anyone why:

<?php

if (is_syndicated()) :

      $face = get_feed_meta('face');

      if (!is_null($face)) :

          ?><img src="<?php print $face; ?>"

          alt="img" width="48" height="48"style="padding-right: 10px" align="left" />

<?php

      endif;

endif;

?>

Would result in an url that looks like this:

<img src="face  http://a3.twimg.com/profile_images/858098029/twitter.jpg"

          alt="img" width="48" height="48"style="padding-right: 10px" align="left" />

i.e. Everything looks right except that the  function key 'face' is included in the url. Otherwise it would work!

Thanks.

 

 

Link to comment
https://forums.phpfreaks.com/topic/202231-function-key-face-included-in-img-url/
Share on other sites

Sorry, I'm so noobish I'm not sure what you're asking.

'face' is a custom key that I create in the plugin. I give it the img url value and the get_feed_meta function pulls it into each posted item.

The documentation from the plug-in's author for this is http:/feedwordpress.radgeek.com/wiki/getfeedmeta

(I tried writing him first).

I think this is the function:

function get_feed_meta ($key, $id = NULL) {

global $wpdb, $feedwordpress_linkcache;

$feed_id = get_syndication_feed_id($id);

 

$ret = NULL;

if (strlen($feed_id) > 0):

if (isset($feedwordpress_linkcache[$feed_id])) :

$link = $feedwordpress_linkcache[$feed_id];

else :

$link =& new SyndicatedLink($feed_id);

$feedwordpress_linkcache[$feed_id] = $link;

endif;

 

$ret = $link->settings[$key];

endif;

return $ret;

}

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.