woolwit Posted May 19, 2010 Share Posted May 19, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/202231-function-key-face-included-in-img-url/ Share on other sites More sharing options...
greatstar00 Posted May 19, 2010 Share Posted May 19, 2010 wat code is inside get_feed_meta('face') Quote Link to comment https://forums.phpfreaks.com/topic/202231-function-key-face-included-in-img-url/#findComment-1060411 Share on other sites More sharing options...
woolwit Posted May 19, 2010 Author Share Posted May 19, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/202231-function-key-face-included-in-img-url/#findComment-1060419 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.