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
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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.