本文整理汇总了PHP中wp_widget_rss_output函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_widget_rss_output函数的具体用法?PHP wp_widget_rss_output怎么用?PHP wp_widget_rss_output使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_widget_rss_output函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: widget
function widget($args, $instance)
{
if (isset($instance['error']) && $instance['error']) {
return;
}
extract($args, EXTR_SKIP);
$kexp_url = 'http://blog.kexp.org/feed/';
$kuow_url = 'http://feeds2.feedburner.com/KUOW';
$kexp = fetch_feed($kexp_url);
$kuow = fetch_feed($kuow_url);
$url = esc_url(strip_tags($kexp_url));
$title = "<ul id='radio-tab-nav' data-tabs='toggle'>\n <li class='selected'><a class='rsswidget' href='#tab-kexp' title='KEXP'>KEXP</a></li>\n <li><a class='rsswidget' href='#tab-kuow' title='KUOW'>KUOW</a></li>\n </ul>";
echo $before_widget;
echo '<div class="kexp-kuow">';
echo $title;
echo '<div class="radio-tab-content" id="tab-kexp"><span>';
wp_widget_rss_output($kexp, $instance);
echo "<a href='{$kexp_url}' class='more'>More</a>";
echo '</span></div>';
echo '<div class="radio-tab-content" id="tab-kuow" style="display:none;"><span>';
wp_widget_rss_output($kuow, $instance);
echo "<a href='{$kuow_url}' class='more'>More</a>";
echo '</span></div>';
echo '</div>';
echo $after_widget;
if (!is_wp_error($kexp)) {
$kexp->__destruct();
}
unset($kexp);
if (!is_wp_error($kuow)) {
$kuow->__destruct();
}
unset($kuow);
}
开发者ID:uw-sop,项目名称:htdocs,代码行数:34,代码来源:kexp-kuow.php
示例2: pronamic_client_dashboard
/**
* Render dashboard
*/
function pronamic_client_dashboard()
{
?>
<h3><?php
_e('Support', 'pronamic_client');
?>
</h3>
<p>
<?php
printf(__('E-mail: %s', 'pronamic_client'), sprintf('<a href="mailto:%1$s">%1$s</a>', __('[email protected]', 'pronamic_client')));
?>
<br />
<?php
printf(__('Website: %s', 'pronamic_client'), sprintf('<a href="%1$s">%1$s</a>', __('http://www.pronamic.eu/', 'pronamic_client')));
?>
</p>
<h3><?php
_e('News', 'pronamic_client');
?>
</h3>
<?php
wp_widget_rss_output('http://feeds.feedburner.com/pronamic', array('link' => __('http://pronamic.eu/', 'pronamic_client'), 'url' => 'http://feeds.feedburner.com/pronamic', 'title' => __('Pronamic News', 'pronamic_client'), 'items' => 5));
}
开发者ID:joffcrabtree,项目名称:wp-pronamic-client,代码行数:29,代码来源:dashboard.php
示例3: xpress_dashboard_rss_output
function xpress_dashboard_rss_output($widget_id)
{
$widgets = get_option('xpress_dashboard_widget_options');
echo "<div class='rss-widget'>";
wp_widget_rss_output($widgets[$widget_id]);
echo "</div>";
}
开发者ID:nouphet,项目名称:rata,代码行数:7,代码来源:dashboard_feed.php
示例4: __output
protected function __output()
{
$num = $this->property['num_posts'] ? $this->property['num_posts'] : 4;
$url = $this->property['url'];
while (stristr($url, 'http') != $url) {
$url = substr($url, 1);
}
if (empty($url)) {
return;
}
$rss = fetch_feed($url);
$desc = '';
$link = '';
if (!is_wp_error($rss)) {
$desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
if (empty($title)) {
$title = esc_html(strip_tags($rss->get_title()));
}
$link = esc_url(strip_tags($rss->get_permalink()));
while (stristr($link, 'http') != $link) {
$link = substr($link, 1);
}
}
$icon = includes_url('images/rss.png');
if ($title) {
$title = "<a class='rsswidget' href='{$url}' title='" . esc_attr__('Assinar feed', 'tnb') . "'><img style='border:0' width='14' height='14' src='{$icon}' alt='RSS' /></a> <a class='rsswidget' href='{$link}' title='{$desc}'>{$title}</a>";
}
echo $title;
$show_author = $this->property['exibir_autor'] == 1 ? 1 : 0;
$show_date = $this->property['exibir_data'] == 1 ? 1 : 0;
$show_summary = $this->property['exibir_resumo'] == 1 ? 1 : 0;
$items = $this->property['num_posts'] ? $this->property['num_posts'] : 5;
$default_args = array('show_author' => $show_author, 'show_date' => $show_date, 'show_summary' => $show_summary, 'items' => $items);
wp_widget_rss_output($rss, $default_args);
}
开发者ID:hacklabr,项目名称:toquenobrasil,代码行数:35,代码来源:_widget_rss.class.php
示例5: blogolife_dashboard_custom_feed_output
function blogolife_dashboard_custom_feed_output()
{
echo '<div class="rss-widget rss-swp" style="">';
echo '<div style="font-size: 15px; margin-bottom:5px;">Latest News</div>';
wp_widget_rss_output(array('url' => esc_url('https://stylishwp.com/feed/'), 'title' => __('StylishWP News', 'blogolife'), 'items' => 3, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 1));
echo '</div>';
}
开发者ID:jun200,项目名称:wordpress,代码行数:7,代码来源:toolbar-be.php
示例6: synved_connect_support_social_follow_render
function synved_connect_support_social_follow_render()
{
$uri = synved_connect_path_uri();
$out = null;
$out .= '<div class="synved-connect-notice" style="position:fixed; right:30px; top:60px; width:220px; background:#ececec; font-size:110%; color:#444; padding:16px 18px 16px 18px;">';
$out .= '<a href="#" style="font-size:8px; position:absolute; top:0px; right:0px; margin-right: 5px;" onclick="' . esc_attr('jQuery(this).parents(\'.synved-connect-notice\').find(\'.notice-extra\').slideToggle(\'slow\'); return false;') . '">' . __('toggle', 'synved-connect') . '</a>';
$out .= '<div style="padding:8px 10px; border:dotted 1px #bbb;">';
$out .= '<a style="display:block; line-height:32px; height:32px;" target="_blank" href="https://twitter.com/synved" title="' . __('Follow Us on Twitter!', 'synved-connect') . '"><img style="vertical-align:middle;" alt="twitter" src="' . esc_url($uri . '/image/twitter.png') . '" /><span style="line-height:normal; vertical-align:middle; margin-left:8px;">' . __('Follow Us on Twitter!', 'synved-connect') . '</span></a><div style="font-size:75%; color:#888; line-height:normal; text-align:center; margin-top:5px;">' . __('We only tweet relevant updates!', 'synved-connect') . '</div>';
$out .= '</div>';
$out .= '<div class="notice-extra" style="margin:8px 0 0 0; padding:8px 10px; border:dotted 1px #bbb;">';
$out .= '<a style="display:block; line-height:32px; height:32px;" target="_blank" href="http://synved.com/about/contact/?subject=Quote%20Request" title="' . __('Hire Us!', 'synved-connect') . '"><img style="vertical-align:middle;" alt="hire_us" src="' . esc_url($uri . '/image/hire.png') . '" /><span style="line-height:normal; vertical-align:middle; margin-left:8px;">' . __('Hire Us!', 'synved-connect') . '</span></a><div style="font-size:75%; color:#888; line-height:normal; text-align:center; margin-top:5px;">' . __('For any WordPress development', 'synved-connect') . '</div>';
$out .= '</div>';
$out .= '<div class="notice-extra notice-secondary">';
$out .= '<h4 style="margin:10px 0 -10px 0; padding:0;">News</h4>';
ob_start();
wp_widget_rss_output('http://feeds.feedburner.com/SynvedNews?format=xml', array('items' => 4, 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0));
$out .= ob_get_clean();
$out .= '</div>';
$sponsor_item = synved_connect_sponsor_item_pick(array('type' => 'intern|extern'));
if ($sponsor_item != null) {
$out .= '<div class="notice-extra notice-secondary" style="margin:10px 0 0 0; border:dotted 1px #bbb;">';
$out .= synved_connect_sponsor_content($sponsor_item);
$out .= '</div>';
}
$out .= '</div>';
return $out;
}
开发者ID:Kylemurray25,项目名称:wmlmusicguide,代码行数:27,代码来源:synved-connect-support.php
示例7: admin_page_contents
function admin_page_contents()
{
echo "<a href='http://www.seodesignsolutions.com'><img src='{$this->plugin->plugin_dir_url}plugin/images/sds-logo.png' alt='" . __('SEO Design Solutions', 'seo-ultimate') . "' id='sds-logo' /></a>";
echo "<p>" . __('The search engine optimization articles below are loaded from the website of SEO Design Solutions, the company behind the SEO Ultimate plugin. Click on an article’s title to read it.', 'seo-ultimate') . "</p>\n";
echo "<div class='rss-widget'>\n";
add_filter('http_headers_useragent', 'su_get_user_agent');
add_filter('esc_html', array(&$this, 'truncate_at_ellipsis'));
wp_widget_rss_output('http://feeds.seodesignsolutions.com/SeoDesignSolutionsBlog', array('show_summary' => 1, 'show_date' => 1));
remove_filter('esc_html', array(&$this, 'truncate_at_ellipsis'));
remove_filter('http_headers_useragent', 'su_get_user_agent');
echo "</div>\n";
$this->update_setting('lastread', time());
}
开发者ID:Bencheci,项目名称:blueRavenStudiosProject,代码行数:13,代码来源:sds-blog.php
示例8: widget
/**
* @param array $args
* @param array $instance
*/
public function widget($args, $instance)
{
if (isset($instance['error']) && $instance['error']) {
return;
}
$url = !empty($instance['url']) ? $instance['url'] : '';
while (stristr($url, 'http') != $url) {
$url = substr($url, 1);
}
if (empty($url)) {
return;
}
// self-url destruction sequence
if (in_array(untrailingslashit($url), array(site_url(), home_url()))) {
return;
}
$rss = fetch_feed($url);
$title = $instance['title'];
$desc = '';
$link = '';
if (!is_wp_error($rss)) {
$desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
if (empty($title)) {
$title = strip_tags($rss->get_title());
}
$link = strip_tags($rss->get_permalink());
while (stristr($link, 'http') != $link) {
$link = substr($link, 1);
}
}
if (empty($title)) {
$title = empty($desc) ? __('Unknown Feed') : $desc;
}
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
$title = apply_filters('widget_title', $title, $instance, $this->id_base);
$url = strip_tags($url);
$icon = includes_url('images/rss.png');
if ($title) {
$title = '<a class="rsswidget" href="' . esc_url($url) . '"><img style="border:0" width="14" height="14" src="' . esc_url($icon) . '" alt="RSS" /></a> <a class="rsswidget" href="' . esc_url($link) . '">"' . esc_html($title) . '"</a>';
}
echo $args['before_widget'];
if ($title) {
echo $args['before_title'] . $title . $args['after_title'];
}
wp_widget_rss_output($rss, $instance);
echo $args['after_widget'];
if (!is_wp_error($rss)) {
$rss->__destruct();
}
unset($rss);
}
开发者ID:nmeiser,项目名称:WordPress,代码行数:55,代码来源:class-wp-widget-rss.php
示例9: jwl_tinymce_widget
function jwl_tinymce_widget()
{
$jwl_widgets = get_option('jwl_dashboard_options4');
// Get the dashboard widget options
$jwl_widget_id = 'jwl_tinymce_dashboard_widget';
// This must be the same ID we set in wp_add_dashboard_widget
/* Check whether we have set the post count through the controls. If we didn't, set the default to 5 */
$jwl_total_items = isset($jwl_widgets[$jwl_widget_id]) && isset($jwl_widgets[$jwl_widget_id]['items']) ? absint($jwl_widgets[$jwl_widget_id]['items']) : 5;
// Echo the output of the RSS Feed.
echo '<p style="border-bottom:#000 1px solid;">';
echo 'Showing (' . $jwl_total_items . ') Posts';
echo '</p>';
echo '<div class="rss-widget">';
wp_widget_rss_output(array('url' => 'http://www.plugins.joshlobe.com/feed/', 'title' => '', 'items' => $jwl_total_items, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0));
echo "</div>";
echo '<p style="text-align:center;border-top: #000 1px solid;padding:5px;"><a href="http://www.plugins.joshlobe.com/">Ultimate Tinymce</a> - Visual Wordpress Editor</p>';
}
开发者ID:newshorts,项目名称:thorn,代码行数:17,代码来源:admin_functions.php
示例10: widget
function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_title', $instance['title']);
$name = $instance['name'];
//Lower case everything
$name = strtolower($name);
//Make alphanumeric (removes all other characters)
$name = preg_replace("/[^a-z0-9_\\s-]/", "", $name);
//Clean up multiple dashes or whitespaces
$name = preg_replace("/[\\s-]+/", " ", $name);
//Convert whitespaces and underscore to dash
$name = preg_replace("/[\\s_]/", "-", $name);
$num_field = $instance['num_field'];
echo $before_widget;
if ($title) {
echo $before_title . $title . $after_title;
}
wp_widget_rss_output(array('url' => 'https://groups.google.com/forum/feed/' . $name . '/msgs/rss.xml?num=7', 'title' => $title, 'items' => $num_field, 'show_summary' => 1, 'show_author' => 1, 'show_date' => 0));
echo $after_widget;
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:21,代码来源:odyno-google-groups-widget.php
示例11: synved_connect_dashboard_widget
function synved_connect_dashboard_widget()
{
$out = null;
$install_date = get_option('synved_connect_install_date', null);
if ($install_date == null) {
update_option('synved_connect_install_date', time());
}
if ($install_date != null && time() - $install_date >= 60 * 60 * 6) {
$sponsor_item = synved_connect_sponsor_item_pick(array('type' => 'intern|extern'));
if ($sponsor_item != null) {
$out .= synved_connect_sponsor_content($sponsor_item);
$out .= '<div> </div>';
}
}
$out .= '<div class="rss-widget">';
ob_start();
wp_widget_rss_output('http://feeds.feedburner.com/SynvedNews?format=xml', array('items' => 3, 'show_author' => 0, 'show_date' => 0, 'show_summary' => 1));
$out .= ob_get_clean();
$out .= '</div>';
echo $out;
}
开发者ID:tlandn,项目名称:akvo-sites-zz-template,代码行数:21,代码来源:synved-connect.php
示例12: wps_display_widget_content
public function wps_display_widget_content($post, $wps_widget_handle)
{
if ($wps_widget_handle['args']['type'] == 1) {
echo '<div class="rss-widget">';
wp_widget_rss_output(array('url' => $wps_widget_handle['args']['rss'], 'items' => 5, 'show_summary' => 1, 'show_author' => 1, 'show_date' => 1));
echo "</div>";
} else {
echo $wps_widget_handle['args']['content'];
}
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:10,代码来源:wat.class.php
示例13: outputDashboardWidget
/**
* Echo the dashboard widget.
*
* @param int $items
*
* @return void
*/
public function outputDashboardWidget($items = 10)
{
echo '<div class="rss-widget">';
wp_widget_rss_output(self::FEED_URL, array('items' => $items));
echo '</div>';
}
开发者ID:kevinaxu,项目名称:99boulders,代码行数:13,代码来源:Main.php
示例14: wp_edit_user_tinymce_widget
function wp_edit_user_tinymce_widget()
{
$jwl_widgets = get_option('wp_edit_user_dashboard_options');
// Get the dashboard widget options
$jwl_widget_id = 'jwl_user_tinymce_dashboard_widget';
// This must be the same ID we set in wp_add_dashboard_widget
/* Check whether we have set the post count through the controls. If we didn't, set the default to 5 */
$jwl_total_items = isset($jwl_widgets[$jwl_widget_id]) && isset($jwl_widgets[$jwl_widget_id]['items']) ? absint($jwl_widgets[$jwl_widget_id]['items']) : 5;
// Echo the output of the RSS Feed.
echo '<p><a href="http://www.feedblitz.com/f/?Sub=950320"><img title="Subscribe to get updates by email and more!" border="0" src="http://assets.feedblitz.com/chicklets/email/i/25/950320.bmp"></a><br />News updates for WP Edit Pro and Stable versions.</p>';
echo '<p style="border-bottom:#000 1px solid;">Showing (' . $jwl_total_items . ') Posts</p>';
echo '<div class="rss-widget">';
wp_widget_rss_output(array('url' => 'http://feeds.feedblitz.com/wpeditpro&x=1', 'title' => '', 'items' => $jwl_total_items, 'show_author' => 0, 'show_date' => 1));
echo "</div>";
echo '<p style="text-align:center;border-top: #000 1px solid;padding:5px;"><a target="_blank" href="https://wpeditpro.com/">WP Edit Pro</a> - Visual Wordpress Editor</p>';
}
开发者ID:SayenkoDesign,项目名称:gogo-racing.com,代码行数:16,代码来源:functions.php
示例15: wp_dashboard_primary_output
/**
* Display the WordPress news feeds.
*
* @since 3.8.0
*
* @param string $widget_id Widget ID.
* @param array $feeds Array of RSS feeds.
*/
function wp_dashboard_primary_output($widget_id, $feeds)
{
foreach ($feeds as $type => $args) {
$args['type'] = $type;
echo '<div class="rss-widget">';
if ($type === 'plugins') {
wp_dashboard_plugins_output($args['url'], $args);
} else {
wp_widget_rss_output($args['url'], $args);
}
echo "</div>";
}
}
开发者ID:riasnelli,项目名称:WordPress,代码行数:21,代码来源:dashboard.php
示例16: wpsc_dashboard_news
function wpsc_dashboard_news()
{
$rss = fetch_feed('http://getshopped.org/category/wp-e-commerce-plugin/');
$args = array('show_author' => 1, 'show_date' => 1, 'show_summary' => 1, 'items' => 3);
wp_widget_rss_output($rss, $args);
}
开发者ID:hornet9,项目名称:Morato,代码行数:6,代码来源:admin.php
示例17: wpmudev_news_widget
function wpmudev_news_widget()
{
$rss = @fetch_feed('http://wpmu.org/category/wpmudev/feed/');
if (is_wp_error($rss)) {
if (is_admin() || current_user_can('manage_options')) {
echo '<div class="rss-widget"><p>';
printf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message());
echo '</p></div>';
}
} elseif (!$rss->get_item_quantity()) {
$rss->__destruct();
unset($rss);
return false;
} else {
echo '<div class="rss-widget">';
wp_widget_rss_output($rss, array('items' => 5));
echo '</div>';
$rss->__destruct();
unset($rss);
}
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:21,代码来源:update-notifications.php
示例18: aaron_feed_meta_box
public function aaron_feed_meta_box()
{
$args = array('url' => $this->_feed_url, 'items' => '5');
echo '<div class="rss-widget">';
wp_widget_rss_output($args);
echo "</div>";
}
开发者ID:RJRandell79,项目名称:RJRStudios,代码行数:7,代码来源:wp-twitter-widget.php
示例19: appthemes_dashboard_forum
function appthemes_dashboard_forum()
{
global $app_forum_rss_feed;
wp_widget_rss_output($app_forum_rss_feed, array('items' => 5, 'show_author' => 0, 'show_date' => 1, 'show_summary' => 1));
}
开发者ID:joaosigno,项目名称:dazake-job,代码行数:5,代码来源:appthemes-functions.php
示例20: widget
function widget($args, $instance) {
if ( isset($instance['error']) && $instance['error'] )
return;
extract($args, EXTR_SKIP);
$url = $instance['url'];
while ( stristr($url, 'http') != $url )
$url = substr($url, 1);
if ( empty($url) )
return;
$rss = fetch_feed($url);
$title = $instance['title'];
$desc = '';
$link = '';
if ( ! is_wp_error($rss) ) {
$desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
if ( empty($title) )
$title = htmlentities(strip_tags($rss->get_title()));
$link = esc_url(strip_tags($rss->get_permalink()));
while ( stristr($link, 'http') != $link )
$link = substr($link, 1);
}
if ( empty($title) )
$title = empty($desc) ? __('Unknown Feed') : $desc;
$title = apply_filters('widget_title', $title );
$url = esc_url(strip_tags($url));
$icon = includes_url('images/rss.png');
if ( $title )
$title = "<a class='rsswidget' href='$url' title='" . esc_attr(__('Syndicate this content')) ."'><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' title='$desc'>$title</a>";
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
wp_widget_rss_output( $rss, $instance );
echo $after_widget;
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:43,代码来源:default-widgets.php
注:本文中的wp_widget_rss_output函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论