Ejemplo n.º 1
0
<?php

// Get the post user email
$user = get_post($post_id, $output)->post_author;
$useremail = get_userdata($user)->user_email;
// Check if icon has been uploaded
$icon = get_feed_meta('iconpath');
if (!is_null($icon) && file_exists($icon)) {
    $imgurl = home_url('/') . $icon;
} else {
    // Try gravatar
    // Specified email?
    $gravmail = get_feed_meta('email');
    // Try specified email, else default to blog email, else show default image
    $imgurl = get_gravatar($useremail, '60');
    //get_gravatar( $gravmail, '60', get_gravatar( $useremail, '60' ) );
    //echo $imgurl;
}
// Compute link
$target = is_syndicated() ? ' target="_blank"' : '';
$link = is_syndicated() ? get_syndication_permalink() : get_permalink();
$title = is_syndicated() ? get_syndication_source() : get_the_title();
?>
 
<div class="row">	
	<div class="span1">
		<a href="#"><img class="thumbnail" src="<?php 
echo $imgurl;
?>
" alt="<?php 
echo $title;
function feedwordpress_item_feed_data()
{
    // In a post context....
    if (is_syndicated()) {
        ?>
<source>
	<title><?php 
        print htmlspecialchars(get_syndication_source());
        ?>
</title>
	<link rel="alternate" type="text/html" href="<?php 
        print htmlspecialchars(get_syndication_source_link());
        ?>
" />
	<link rel="self" href="<?php 
        print htmlspecialchars(get_syndication_feed());
        ?>
" />
<?php 
        $id = get_syndication_feed_guid();
        if (strlen($id) > 0) {
            ?>
	<id><?php 
            print htmlspecialchars($id);
            ?>
</id>
<?php 
        }
        $updated = get_feed_meta('feed/updated');
        if (strlen($updated) > 0) {
            ?>
	<updated><?php 
            print $updated;
            ?>
</updated>
<?php 
        }
        ?>
</source>
<?php 
    }
}
 function source_setting($atts)
 {
     $param = shortcode_atts(array('key' => NULL), $atts);
     return get_feed_meta($param['key'], $this->id);
 }