本文整理汇总了PHP中wp_add_dashboard_widget函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_add_dashboard_widget函数的具体用法?PHP wp_add_dashboard_widget怎么用?PHP wp_add_dashboard_widget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_add_dashboard_widget函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: mgm_add_dashboard_widgets
/**
* add dashboard widgets
*/
function mgm_add_dashboard_widgets()
{
// check dashboard is enabled
if (mgm_is_mgm_menu_enabled('primary', 'mgm_widget_dashboard_statistics')) {
wp_add_dashboard_widget('mgm_dashboard_widget_statistics', __('Magic Members Statistics', 'mgm'), 'mgm_dashboard_widget_statistics');
}
}
开发者ID:jervy-ez,项目名称:magic-members-test,代码行数:10,代码来源:mgm_widget_dashboard.php
示例2: __construct
/**
* __construct function.
*
* @access public
* @return void
*/
public function __construct()
{
if (!current_user_can('manage_options')) {
return;
}
wp_add_dashboard_widget('dlm_popular_downloads', __('Popular Downloads', 'download_monitor'), array($this, 'popular_downloads'));
}
开发者ID:par-orillonsoft,项目名称:elearning-wordpress,代码行数:13,代码来源:class-dlm-admin-dashboard.php
示例3: stream_activity
/**
* Add Stream Activity widget to the dashboard
*
* @action wp_dashboard_setup
*/
public static function stream_activity()
{
if (!current_user_can(WP_Stream_Admin::VIEW_CAP)) {
return;
}
wp_add_dashboard_widget('dashboard_stream_activity', esc_html__('Stream Activity', 'stream'), array(__CLASS__, 'stream_activity_initial_contents'), array(__CLASS__, 'stream_activity_options'));
}
开发者ID:johnleesw,项目名称:mustardseedwp,代码行数:12,代码来源:class-wp-stream-dashboard-widget.php
示例4: action_wp_dashboard_setup
public function action_wp_dashboard_setup()
{
if (!current_user_can('edit_others_un_feedback_items')) {
return;
}
wp_add_dashboard_widget('dashboard_usernoise', __('New feedback', 'usernoise'), array($this, 'widget_callback'));
}
开发者ID:congtrieu112,项目名称:anime,代码行数:7,代码来源:dashboard.php
示例5: wds_add_sitemaps_dashboard_widget
function wds_add_sitemaps_dashboard_widget()
{
if (!current_user_can('edit_posts')) {
return false;
}
wp_add_dashboard_widget('wds_sitemaps_dashboard_widget', __('Sitemaps', 'wds'), 'wds_sitemaps_dashboard_widget');
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:7,代码来源:wds-sitemaps-dashboard-widget.php
示例6: bones_custom_dashboard_widgets
function bones_custom_dashboard_widgets()
{
wp_add_dashboard_widget('act-intro', __('Thomas Vaughan Website by AmberCouch', 'act'), 'actDashboardIntro');
add_meta_box('act-video-overview', __('Website Video Overview', 'act'), 'actVideoOverview', 'dashboard', 'side');
add_meta_box('act-video-tutorials', __('Website Video Tutorials', 'act'), 'actVideoTutorials', 'dashboard', 'side');
add_meta_box('act-short-codes', __('Website Short Codes', 'act'), 'actShortCodeHelp', 'dashboard', 'side');
}
开发者ID:ambercouch,项目名称:ac_timber,代码行数:7,代码来源:functions--admin-widgets.php
示例7: wpse_67876_wp_dashboard_setup
function wpse_67876_wp_dashboard_setup()
{
// Admins only
if (current_user_can('install_plugins')) {
wp_add_dashboard_widget('wpse_67876_folder_sizes', __('Folder Sizes'), 'wpse_67876_wp_add_dashboard_widget');
}
}
开发者ID:riesal,项目名称:php-scripts,代码行数:7,代码来源:disk.php
示例8: replace_recent_comments_dashboard_widget
function replace_recent_comments_dashboard_widget()
{
global $wp_meta_boxes;
// Find the recent comments widget
foreach ($wp_meta_boxes['dashboard'] as $context => $widgets) {
if (!empty($widgets) && !empty($widgets['core']) && is_array($widgets['core']) && array_key_exists('dashboard_recent_comments', $widgets['core'])) {
// Take note of the context for when we add our widget
$drc_widget_context = $context;
// Store the widget so that we have access to its information
$drc_widget = $widgets['core']['dashboard_recent_comments'];
// Store the array keys, so that we can reorder things later
$widget_order = array_keys($widgets['core']);
// Remove the core widget
remove_meta_box('dashboard_recent_comments', 'dashboard', $drc_widget_context);
// No need to continue the loop
break;
}
}
// If we couldn't find the recent comments widget, it must have been removed. We'll
// assume this means we shouldn't add our own
if (empty($drc_widget)) {
return;
}
// Set up and add our widget
$recent_comments_title = __('Recent Comments');
// Add our widget in the same location
wp_add_dashboard_widget('dashboard_recent_comments_bp_docs', $recent_comments_title, array($this, 'wp_dashboard_recent_comments'), 'wp_dashboard_recent_comments_control');
// Restore the previous widget order. File this under "good citizenship"
$wp_meta_boxes['dashboard'][$context]['core']['dashboard_recent_comments'] = $wp_meta_boxes['dashboard'][$context]['core']['dashboard_recent_comments_bp_docs'];
unset($wp_meta_boxes['dashboard'][$context]['core']['dashboard_recent_comments_bp_docs']);
// In order to inherit the styles, we're going to spoof the widget ID. Sadness
$wp_meta_boxes['dashboard'][$context]['core']['dashboard_recent_comments']['id'] = 'dashboard_recent_comments';
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:33,代码来源:admin.php
示例9: init
/**
* Hook to wp_dashboard_setup to add the widget.
*/
public static function init()
{
//Register widget settings...
self::update_dashboard_widget_options(self::wid, array('example_number' => 42), true);
//Register the widget...
wp_add_dashboard_widget(self::wid, __('Việt Ngân Site 2015 - Bảng điều hướng', 'nouveau'), array('My_Dashboard_Widget_2', 'widget'), array('My_Dashboard_Widget_2', 'config'));
}
开发者ID:quangpropk,项目名称:vietngansite_2015,代码行数:10,代码来源:preview.php
示例10: _dashboard_widget_setup
function _dashboard_widget_setup()
{
global $zendesk_support;
$agents = Zendesk_Wordpress_Agents::get_instance();
$widget_options = $this->_get_current_user_dashboard_widget();
// If the plugin hasn't been configured yet.
if (!isset($zendesk_support->settings['account']) || empty($zendesk_support->settings['account']) && $widget_options != 'none') {
wp_add_dashboard_widget('zendesk-dashboard-widget', __('Zendesk Support', 'zendesk'), array(&$this, '_dashboard_widget_config'));
return;
}
if (!$zendesk_support->zendesk_user && $widget_options == 'contact-form' && $zendesk_support->settings['contact_form_anonymous'] && $agents->_is_agent($zendesk_support->settings['contact_form_anonymous_user'])) {
wp_add_dashboard_widget('zendesk-dashboard-widget', $zendesk_support->settings['contact_form_title'], array(&$this, '_dashboard_widget_contact_form'));
return;
}
if (!$zendesk_support->zendesk_user && $widget_options != 'none') {
wp_add_dashboard_widget('zendesk-dashboard-widget', __('Zendesk Support Login', 'zendesk'), array(&$this, '_dashboard_widget_login'));
} else {
// Based on user role and the plugin settings.
switch ($widget_options) {
case 'contact-form':
wp_add_dashboard_widget('zendesk-dashboard-widget', $zendesk_support->settings['contact_form_title'], array(&$this, '_dashboard_widget_contact_form'));
break;
case 'tickets-widget':
wp_add_dashboard_widget('zendesk-dashboard-widget', __('Zendesk for WordPress', 'zendesk'), array(&$this, '_dashboard_widget_tickets'));
break;
}
}
}
开发者ID:tccyp001,项目名称:onemore-wordpress,代码行数:28,代码来源:zendesk-wordpress-dashboard-widget.php
示例11: add_dashboard_widgets
}
}
static function add_dashboard_widgets()
{
$custom_dashboard_widgets = array('wp-lead-stats' => array('title' => 'Lead Stats', 'callback' => 'wp_lead_dashboard_stats'), 'wp-lead-dashboard-list' => array('title' => 'Lead Lists', 'callback' => 'wp_lead_dashboard_list'));
foreach ($custom_dashboard_widgets as $widget_id => $options) {
wp_add_dashboard_widget($widget_id, $options['title'], $options['callback']);
开发者ID:jyotiprava,项目名称:45serverbackup,代码行数:7,代码来源:module.dashboard.php
示例12: init
/**
* Hook to wp_dashboard_setup to add the widget.
*/
public static function init()
{
// register the widget settings
self::update_dashboard_widget_options(self::wid, array('example_setting' => 1), true);
// register the widget
wp_add_dashboard_widget(self::wid, __('Next Level Cache', 'nlc'), array('NLC_Dashboard_Widget', 'widget'), array('NLC_Dashboard_Widget', 'config'));
}
开发者ID:andrewjdmartin,项目名称:next-level-cache,代码行数:10,代码来源:widget.php
示例13: addDashboardWidget
/**
* Add the widget to the dashboard
**/
function addDashboardWidget()
{
# Check if the user is an admin
if (ga_current_user_is(get_option(key_ga_dashboard_role))) {
wp_add_dashboard_widget('google-analytics-summary', __('Google Analytics Summary', 'google-analyticator'), array($this, 'widget'));
}
}
开发者ID:CoordCulturaDigital-Minc,项目名称:setoriais,代码行数:10,代码来源:google-analytics-summary-widget.php
示例14: woo_vl_dashboard_setup
function woo_vl_dashboard_setup()
{
// Limit the Dashboard widget to Users with the Manage Options capability
if (current_user_can('manage_options')) {
wp_add_dashboard_widget('woo_vl_news_widget', __('Plugin News - by Visser Labs', 'woocommerce-exporter'), 'woo_vl_news_widget');
}
}
开发者ID:hikaram,项目名称:wee,代码行数:7,代码来源:common-dashboard_widgets.php
示例15: add_tc_dashboard_widgets
function add_tc_dashboard_widgets()
{
if (!current_user_can(apply_filters('tc_can_view_dashboard_widgets_capability', 'manage_options'))) {
return;
}
wp_add_dashboard_widget('tc_store_report', $this->title, array(&$this, 'tc_store_report_display'));
}
开发者ID:walkthenight,项目名称:walkthenight-wordpress,代码行数:7,代码来源:index.php
示例16: init
/**
* Hook to wp_dashboard_setup to add the widget.
*
* @since 2.2.3
*/
public static function init()
{
if (!current_user_can('manage_options')) {
return;
}
wp_add_dashboard_widget(self::wid, __('Upcoming Tweets', 'ppp-tweets'), array('PPP_Dashboard_Tweets', 'widget'), array('PPP_Dashboard_Tweets', 'config'));
}
开发者ID:sumobi,项目名称:post-promoter-pro,代码行数:12,代码来源:dashboard.php
示例17: init
/**
* Hook to wp_dashboard_setup to add the widget.
*/
public static function init()
{
//Register widget settings...
self::update_dashboard_widget_options(self::wid, array('example_number' => 42), true);
//Register the widget...
wp_add_dashboard_widget(self::wid, 'Próximos Eventos', array('Dashboard_Widget', 'widget'), array('Dashboard_Widget', 'config'));
}
开发者ID:TiagoGouvea,项目名称:event-manager-plugin-wordpress,代码行数:10,代码来源:Dashboard.class.php
示例18: wps_deals_register_dashboard_sales_widgets
/**
* Register Dashboard Widgets
*
* Register the dashboard widgets
*
* @package Social Deals Engine
* @since 1.0.0
*/
function wps_deals_register_dashboard_sales_widgets()
{
if (current_user_can('manage_options')) {
//if user is admin user then only show dashboard widget
wp_add_dashboard_widget('wps_deals_sales_dashboard_widget', __('Social Deals Sales Summary', 'wpsdeals'), 'wps_deals_sales_summary_widget');
}
}
开发者ID:wppassion,项目名称:deals-engine,代码行数:15,代码来源:wps-deals-dashboard-widgets.php
示例19: load_dashboard
public function load_dashboard()
{
global $wpdb;
$sql = "SELECT * FROM {$this->table} WHERE id={$this->countyID}";
$data = $wpdb->get_row($sql, ARRAY_A);
wp_add_dashboard_widget('county_dashboard_' . $this->countyID, $data['name'], array($this, 'load_dashboard_widget'));
}
开发者ID:Owchzzz,项目名称:County_functionality,代码行数:7,代码来源:county-administration.php
示例20: add_dashboard_widget
/**
* Add Dashboard widget
*/
public function add_dashboard_widget()
{
if (!$this->dashboard_allowed()) {
return;
}
wp_add_dashboard_widget($this->id, __('Frosty Media', CUSTOM_LOGIN_DIRNAME), array($this, 'widget'));
}
开发者ID:kc596,项目名称:cse.nits.ac.in,代码行数:10,代码来源:dashboard.php
注:本文中的wp_add_dashboard_widget函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论