當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wp_dashboard_cached_rss_widget函數代碼示例

本文整理匯總了PHP中wp_dashboard_cached_rss_widget函數的典型用法代碼示例。如果您正苦於以下問題:PHP wp_dashboard_cached_rss_widget函數的具體用法?PHP wp_dashboard_cached_rss_widget怎麽用?PHP wp_dashboard_cached_rss_widget使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wp_dashboard_cached_rss_widget函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: sj_dashboard_widget

/**
 * SliceJack News dashboard widget.
 *
 * @since 1.0
 */
function sj_dashboard_widget()
{
    global $slicejack_url;
    $feed = array('type' => '', 'link' => $slicejack_url, 'url' => $slicejack_url . '?feed=rss2', 'title' => __('SliceJack Blog', 'briar'), 'items' => 5, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 1);
    define('DOING_AJAX', true);
    wp_dashboard_cached_rss_widget('dashboard_slicejack', 'sj_dashboard_widget_output', $feed);
}
開發者ID:Fsantana31,項目名稱:briar,代碼行數:12,代碼來源:dashboard.php

示例2: wp_dashboard_primary

/**
 * WordPress News dashboard widget.
 *
 * @since 2.7.0
 */
function wp_dashboard_primary()
{
    $feeds = array('news' => array('link' => apply_filters('dashboard_primary_link', __('https://wordpress.org/news/')), 'url' => apply_filters('dashboard_primary_feed', __('http://wordpress.org/news/feed/')), 'title' => apply_filters('dashboard_primary_title', __('WordPress Blog')), 'items' => 1, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 1), 'planet' => array('link' => apply_filters('dashboard_secondary_link', __('https://planet.wordpress.org/')), 'url' => apply_filters('dashboard_secondary_feed', __('https://planet.wordpress.org/feed/')), 'title' => apply_filters('dashboard_secondary_title', __('Other WordPress News')), 'items' => apply_filters('dashboard_secondary_items', 3), 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0));
    if (!is_multisite() && is_blog_admin() && current_user_can('install_plugins') || is_network_admin() && current_user_can('manage_network_plugins') && current_user_can('install_plugins')) {
        $feeds['plugins'] = array('link' => '', 'url' => array('popular' => 'http://wordpress.org/plugins/rss/browse/popular/'), 'title' => '', 'items' => 1, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0);
    }
    wp_dashboard_cached_rss_widget('dashboard_primary', 'wp_dashboard_primary_output', $feeds);
}
開發者ID:riasnelli,項目名稱:WordPress,代碼行數:13,代碼來源:dashboard.php

示例3: wp_dashboard_plugins

function wp_dashboard_plugins()
{
    wp_dashboard_cached_rss_widget('dashboard_plugins', 'wp_dashboard_plugins_output', array('http://wordpress.org/extend/plugins/rss/browse/popular/', 'http://wordpress.org/extend/plugins/rss/browse/new/', 'http://wordpress.org/extend/plugins/rss/browse/updated/'));
}
開發者ID:nouphet,項目名稱:rata,代碼行數:4,代碼來源:dashboard.php

示例4: wp_dashboard_primary

/**
 * WordPress News dashboard widget.
 *
 * @since 2.7.0
 */
function wp_dashboard_primary() {
	$feeds = array(
		'news' => array(

			/**
			 * Filter the primary link URL for the 'WordPress News' dashboard widget.
			 *
			 * @since 2.5.0
			 *
			 * @param string $link The widget's primary link URL.
			 */
			'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ),

			/**
			 * Filter the primary feed URL for the 'WordPress News' dashboard widget.
			 *
			 * @since 2.3.0
			 *
			 * @param string $url The widget's primary feed URL.
			 */
			'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ),

			/**
			 * Filter the primary link title for the 'WordPress News' dashboard widget.
			 *
			 * @since 2.3.0
			 *
			 * @param string $title Title attribute for the widget's primary link.
			 */
			'title'        => apply_filters( 'dashboard_primary_title', __( 'WordPress Blog' ) ),
			'items'        => 1,
			'show_summary' => 1,
			'show_author'  => 0,
			'show_date'    => 1,
		),
		'planet' => array(

			/**
			 * Filter the secondary link URL for the 'WordPress News' dashboard widget.
			 *
			 * @since 2.3.0
			 *
			 * @param string $link The widget's secondary link URL.
			 */
			'link' => apply_filters( 'dashboard_secondary_link', __( 'https://planet.wordpress.org/' ) ),

			/**
			 * Filter the secondary feed URL for the 'WordPress News' dashboard widget.
			 *
			 * @since 2.3.0
			 *
			 * @param string $url The widget's secondary feed URL.
			 */
			'url' => apply_filters( 'dashboard_secondary_feed', __( 'https://planet.wordpress.org/feed/' ) ),

			/**
			 * Filter the secondary link title for the 'WordPress News' dashboard widget.
			 *
			 * @since 2.3.0
			 *
			 * @param string $title Title attribute for the widget's secondary link.
			 */
			'title'        => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ),
			'items'        => 3,
			'show_summary' => 0,
			'show_author'  => 0,
			'show_date'    => 0,
		)
	);

	if ( ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) {
		$feeds['plugins'] = array(
			'link'         => '',
			'url'          => array(
				'popular' => 'http://wordpress.org/plugins/rss/browse/popular/',
			),
			'title'        => '',
			'items'        => 1,
			'show_summary' => 0,
			'show_author'  => 0,
			'show_date'    => 0,
		);
	}

	wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_primary_output', $feeds );
}
開發者ID:ShankarVellal,項目名稱:WordPress,代碼行數:91,代碼來源:dashboard.php

示例5: function

<?php

require_once ABSPATH . 'wp-admin/includes/dashboard.php';
$success = \wp_dashboard_cached_rss_widget('podlove_dashboard_news', 'wp_dashboard_primary_output', $feeds);
if (!$success) {
    ?>
<script type="text/javascript">
jQuery.ajax(ajaxurl, {
	dataType: 'html',
	type: 'GET',
	data: { action: 'podlove-admin-news' },
	success: function(response, status, xhr) {
		jQuery("#toplevel_page_podlove_settings_handle_news .inside").html(response);
	}
});
</script>
<?php 
}
開發者ID:johannes-mueller,項目名稱:podlove-publisher,代碼行數:18,代碼來源:news.php


注:本文中的wp_dashboard_cached_rss_widget函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。