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); }
/** * 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>', __('*****@*****.**', '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)); }
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>"; }
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); }
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>'; }
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; }
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()); }
/** * @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); }
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>'; }
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; }
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; }
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']; } }
/** * 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>'; }
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>'; }
/** * 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>"; } }
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); }
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); } }
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>"; }
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)); }
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; }
function sfc_options_page() { ?> <div class="wrap"> <h2><?php _e('Simple Facebook Connect', 'sfc'); ?> </h2> <p><?php _e('Options relating to the Simple Facebook Connect plugins.', 'sfc'); ?> </p> <form method="post" action="options.php"> <?php settings_fields('sfc_options'); ?> <table><tr><td> <?php do_settings_sections('sfc'); ?> </td><td style='vertical-align:top;'> <div style='width:20em; float:right; background: #ffc; border: 1px solid #333; margin: 2px; padding: 5px'> <h3 align='center'><?php _e('About the Author', 'sfc'); ?> </h3> <p><a href="http://ottopress.com/blog/wordpress-plugins/simple-facebook-connect/">Simple Facebook Connect</a> is developed and maintained by <a href="http://ottodestruct.com">Otto</a>.</p> <p>He blogs at <a href="http://ottodestruct.com">Nothing To See Here</a> and <a href="http://ottopress.com">Otto on WordPress</a>, posts photos on <a href="http://www.flickr.com/photos/otto42/">Flickr</a>, and chats on <a href="http://twitter.com/otto42">Twitter</a>.</p> <p>You can follow his site on either <a href="http://www.facebook.com/apps/application.php?id=116002660893">Facebook</a> or <a href="http://twitter.com/ottodestruct">Twitter</a>, if you like.</p> <p>If you'd like to <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=otto%40ottodestruct%2ecom">buy him a beer</a>, then he'd be perfectly happy to drink it.</p> </div> <div style='width:20em; float:right; background: #fff; border: 1px solid #333; margin: 2px; padding: 5px'> <h3 align='center'><?php _e('Facebook Platform Status', 'sfc'); ?> </h3> <?php @wp_widget_rss_output('http://www.facebook.com/feeds/api_messages.php', array('show_date' => 1, 'items' => 10)); ?> </div> </td></tr></table> <p class="submit"> <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?> " /> </p> </form> </div> <?php }
function cpt_settings() { global $CPT_URL, $wp_post_types; //flush rewrite rules flush_rewrite_rules(); ?> <div class="wrap"> <?php screen_icon('plugins'); ?> <h2><?php _e('Custom Post Type UI', 'cpt-plugin'); ?> <?php _e('version', 'cpt-plugin'); ?> : <?php echo CPT_VERSION; ?> </h2> <h2><?php _e('Frequently Asked Questions', 'cpt-plugin'); ?> </h2> <p><?php _e('Please note that this plugin will NOT handle display of registered post types or taxonomies in your current theme. It will simply register them for you.', 'cpt-plugin'); ?> <h3><?php _e('Q: <strong>How can I display content from a custom post type on my website?</strong>', 'cpt-plugin'); ?> </h3> <p> <?php _e('A: Justin Tadlock has written some great posts on the topic:', 'cpt-plugin'); ?> <br /> <a href="http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page" target="_blank"><?php _e('Showing Custom Post Types on your Home Page', 'cpt-plugin'); ?> </a><br /> <a href="http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress" target="_blank"><?php _e('Custom Post Types in WordPress', 'cpt-plugin'); ?> </a> </p> <h3><?php _e('Q: <strong>How can I add custom meta boxes to my custom post types?</strong>', 'cpt-plugin'); ?> </h3> <p><?php _e('A: The More Fields plugin does a great job at creating custom meta boxes and fully supports custom post types: ', 'cpt-plugin'); ?> <a href="http://wordpress.org/extend/plugins/more-fields/" target="_blank">http://wordpress.org/extend/plugins/more-fields/</a>. The <a href="https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress" target="_blank">Custom Metaboxes and Fields for WordPress</a> class is a great alternative to a plugin for more advanced users.</p> <h3><?php _e('Q: <strong>I changed my custom post type name and now I can\'t get to my posts</strong>', 'cpt-plugin'); ?> </h3> <p><?php _e('A: You can either change the custom post type name back to the original name or try the Post Type Switcher plugin: ', 'cpt-plugin'); ?> <a href="http://wordpress.org/extend/plugins/post-type-switcher/" target="_blank">http://wordpress.org/extend/plugins/post-type-switcher/</a></p> <div class="cp-rss-widget"> <table border="0"> <tr> <td colspan="3"><h2><?php _e('Help Support This Plugin!', 'cpt-plugin'); ?> </h2></td> </tr> <tr> <td width="33%"><h3><?php _e('PayPal Donation', 'cpt-plugin'); ?> </h3></td> <td width="33%"><h3><?php _e('Professional WordPress<br />Second Edition', 'cpt-plugin'); ?> </h3></td> <td width="33%"><h3><?php _e('Professional WordPress<br />Plugin Development', 'cpt-plugin'); ?> </h3></td> </tr> <tr> <td valign="top" width="33%"> <p><?php _e('Please donate to the development<br />of Custom Post Type UI:', 'cpt-plugin'); ?> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="YJEDXPHE49Q3U"> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </p> </td> <td valign="top" width="33%"><a href="http://bit.ly/prowp2" target="_blank"><img src="<?php echo plugins_url('/images/professional-wordpress-secondedition.jpg', __FILE__); ?> " width="200"></a><br /><?php _e('The leading book on WordPress design and development!<br /><strong>Brand new second edition!', 'cpt-plugin'); ?> </strong></td> <td valign="top" width="33%"><a href="http://amzn.to/plugindevbook" target="_blank"><img src="<?php echo plugins_url('/images/professional-wordpress-plugin-development.png', __FILE__); ?> " width="200"></a><br /><?php _e('Highest rated WordPress development book on Amazon!', 'cpt-plugin'); ?> </td> </tr> </table> <h2><?php _e('WebDevStudios.com Recent News', 'cpt-plugin'); ?> </h2> <?php wp_widget_rss_output(array('url' => esc_url('http://webdevstudios.com/feed/'), 'title' => __('WebDevStudios.com News', 'cpt-plugin'), 'items' => 3, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 1)); ?> </div> </div> <?php //load footer cpt_footer(); }
function PricerrTheme_information() { $id_icon = 'icon-options-general-info'; $ttl_of_stuff = 'PricerrTheme - ' . __('Information', 'PricerrTheme'); //------------------------------------------------------ echo '<div class="wrap">'; echo '<div class="icon32" id="' . $id_icon . '"><br/></div>'; echo '<h2 class="my_title_class_sitemile">' . $ttl_of_stuff . '</h2>'; ?> <div id="usual2" class="usual"> <ul> <li><a href="#tabs1" class="selected"><?php _e('Main Information', 'PricerrTheme'); ?> </a></li> <li><a href="#tabs2"><?php _e('From SiteMile Blog', 'PricerrTheme'); ?> </a></li> </ul> <div id="tabs1" style="display: block; "> <table width="100%" class="sitemile-table"> <tr> <td width="260"><?php _e('PricerrTheme Version:', 'PricerrTheme'); ?> </td> <td><?php echo PRICERRTHEME_VERSION; ?> </td> </tr> <tr> <td width="160"><?php _e('PricerrTheme Latest Release:', 'PricerrTheme'); ?> </td> <td><?php echo PRICERRTHEME_RELEASE; ?> </td> </tr> <tr> <td width="160"><?php _e('WordPress Version:', 'PricerrTheme'); ?> </td> <td><?php bloginfo('version'); ?> </td> </tr> <tr> <td width="160"><?php _e('Go to SiteMile official page:', 'PricerrTheme'); ?> </td> <td><a class="festin" href="http://sitemile.com">SiteMile - Premium WordPress Themes</a></td> </tr> <tr> <td width="160"><?php _e('Go to Pricerr official page:', 'PricerrTheme'); ?> </td> <td><a class="festin" href="http://sitemile.com/p/pricerr">Pricerr Micro-Job Theme</a></td> </tr> <tr> <td width="160"><?php _e('Go to support forums:', 'PricerrTheme'); ?> </td> <td><a class="festin" href="http://sitemile.com/forums">SiteMile Support Forums</a></td> </tr> <tr> <td width="160"><?php _e('Contact SiteMile Team:', 'PricerrTheme'); ?> </td> <td><a class="festin" href="http://sitemile.com/contact-us">Contact Form</a></td> </tr> <tr> <td width="160"><?php _e('Like us on Facebook:', 'PricerrTheme'); ?> </td> <td><a class="festin" href="http://facebook.com/sitemile">SiteMile Facebook Fan Page</a></td> </tr> <tr> <td width="160"><?php _e('Follow us on Twitter:', 'PricerrTheme'); ?> </td> <td><a class="festin" href="http://twitter.com/sitemile">SiteMile Twitter Page</a></td> </tr> </table> </div> <div id="tabs2" style="display: none; overflow:hidden "> <?php echo '<div style="float:left;">'; wp_widget_rss_output(array('url' => 'http://sitemile.com/feed/', 'title' => 'Latest news from SiteMile.com Blog', 'items' => 10, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 1)); echo "</div>"; ?> </div> <?php echo '</div>'; }
/** * Display secondary dashboard RSS widget feed. * * @since unknown * * @return unknown */ function wp_dashboard_secondary_output() { $widgets = get_option( 'dashboard_widget_options' ); @extract( @$widgets['dashboard_secondary'], EXTR_SKIP ); $rss = @fetch_rss( $url ); if ( !isset($rss->items) || 0 == count($rss->items) ) return false; $rss->items = array_slice($rss->items, 0, $items); if ( 'http://planet.wordpress.org/' == $rss->channel['link'] ) { foreach ( array_keys($rss->items) as $i ) { list($site, $description) = explode( ':', wp_specialchars($rss->items[$i]['title']), 2 ); $rss->items[$i]['dc']['creator'] = trim($site); $rss->items[$i]['title'] = trim($description); } } echo "<div class='rss-widget'>"; wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); echo "</div>"; }
/** * Display secondary dashboard RSS widget feed. * * @since 2.5.0 * * @return unknown */ function wp_dashboard_secondary_output() { $widgets = get_option('dashboard_widget_options'); @extract(@$widgets['dashboard_secondary'], EXTR_SKIP); $rss = @fetch_feed($url); 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, $widgets['dashboard_secondary']); echo '</div>'; $rss->__destruct(); unset($rss); } }
function wpsc_getshopped_news_meta_box() { $rss = fetch_feed('http://getshopped.org/category/community-plugins/feed/'); $args = array('show_author' => 1, 'show_date' => 1, 'show_summary' => 1, 'items' => 3); wp_widget_rss_output($rss, $args); }
</div> </div> </div> </div> <div id="postbox-container-2" class="postbox-container"> <div id="side-sortables" class="meta-box-sortables ui-sortable"> <div class="postbox"> <h3 class="hndle"><span><?php esc_html_e('Pronamic News', 'pronamic_ideal'); ?> </span></h3> <div class="inside"> <?php wp_widget_rss_output('http://feeds.feedburner.com/pronamic', array('link' => __('http://www.pronamic.eu/', 'pronamic_ideal'), 'url' => 'http://feeds.feedburner.com/pronamic', 'title' => __('Pronamic News', 'pronamic_ideal'), 'items' => 5)); ?> </div> </div> </div> </div> <div class="clear"></div> </div> </div> <?php include 'pronamic.php'; ?> </div>
/** * Blog news Widget * * @return void * @since 1.0.0 * @access public */ public function dashboard_blog_news() { $args = array('show_author' => 1, 'show_date' => 1, 'show_summary' => 0, 'items' => 10); wp_widget_rss_output($this->_blogFeed, $args); }
function widget($args, $instance) { if (isset($instance['error']) && $instance['error']) { return; } extract($args, EXTR_SKIP); $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 = esc_html(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, $instance, $this->id_base); $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='border:0' 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; if (!is_wp_error($rss)) { $rss->__destruct(); } unset($rss); }
/** * Write out the ComicPress News Dashboard widget. */ function cpm_dashboard_widget($sidebar_args) { if (is_array($sidebar_args)) { extract($sidebar_args, EXTR_SKIP); } echo $before_widget . $before_title . $widget_name . $after_title; wp_widget_rss_output('http://feeds.feedburner.com/comicpress?format=xml', array('items' => 2, 'show_summary' => true)); echo $after_widget; }