Пример #1
0
 public static function _dashboard_control_callback($dashboard, $meta_box)
 {
     echo '<form action="" method="post" class="dashboard-widget-control-form">';
     Util_Widget::trigger_widget_control($meta_box['id']);
     wp_nonce_field('edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce');
     echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
     submit_button(__('Submit'));
     echo '</form>';
 }
 /**
  * Dashboard setup action
  *
  * @return void
  */
 function wp_dashboard_setup()
 {
     $nerser = Dispatcher::component('Extension_NewRelic_Service');
     $view = '';
     $view_application = $nerser->get_effective_application_id();
     $new_relic_configured = $this->_config->get_string(array('newrelic', 'api_key')) && $view_application != 0;
     if ($new_relic_configured) {
         $view_vis = sprintf("https://rpm.newrelic.com/accounts/%d/applications/%d", $nerser->get_account_id(), $nerser->get_effective_application_id());
         $view = '<div class="w3tc-widget-text"><a href="' . $view_vis . '">' . __('view visualizations', 'w3-total-cache') . '</a></div>';
     }
     Util_Widget::add('w3tc_new_relic', '<div class="w3tc-widget-newrelic-logo"></div>' . $view, array($this, 'widget_new_relic'), Util_Ui::admin_url('admin.php?page=w3tc_general#monitoring'), 'normal');
 }
 /**
  * Dashboard tab
  */
 function view()
 {
     $module_status = Dispatcher::component('ModuleStatus');
     Util_Widget::setup();
     global $current_user;
     $config_master = $this->_config_master;
     $browsercache_enabled = $module_status->is_enabled('browsercache');
     $enabled = $module_status->plugin_is_enabled();
     $can_empty_memcache = $module_status->can_empty_memcache();
     $can_empty_opcode = $module_status->can_empty_opcode();
     $can_empty_file = $module_status->can_empty_file();
     $can_empty_varnish = $module_status->can_empty_varnish();
     $cdn_enabled = $module_status->is_enabled('cdn');
     $cdn_mirror_purge = Cdn_Util::can_purge_all($module_status->get_module_engine('cdn'));
     // Required for Update Media Query String button
     $browsercache_update_media_qs = $this->_config->get_boolean('browsercache.cssjs.replace') || $this->_config->get_boolean('browsercache.other.replace');
     include W3TC_INC_DIR . '/options/dashboard.php';
 }
 function w3tc_widget_setup()
 {
     Util_Widget::add('w3tc_usage_statistics', __('Usage Statistics', 'w3-total-cache'), array($this, 'widget_form'), Util_Ui::admin_url('admin.php?page=w3tc_general#miscellaneous'), 'normal');
 }
 function w3tc_widget_setup()
 {
     Util_Widget::add('w3tc_usage_statistics', '<div class="w3tc-widget-w3tc-logo"></div>' . '<div class="w3tc-widget-text">' . __('Caching Statistics', 'w3-total-cache') . '</div>', array($this, 'widget_form'), Util_Ui::admin_url('admin.php?page=w3tc_general#miscellaneous'), 'normal');
 }
 /**
  * Dashboard setup action
  *
  * @return void
  */
 function wp_dashboard_setup()
 {
     Util_Widget::add('w3tc_latest', __('Discussions', 'w3-total-cache'), array($this, 'widget_latest'), array($this, 'widget_latest_control'), 'side');
 }
 /**
  * Dashboard setup action
  *
  * @return void
  */
 function wp_dashboard_setup()
 {
     Util_Widget::add('w3tc_spreadtheword', '<div class="w3tc-widget-w3tc-logo"></div>' . '<div class="w3tc-widget-text">' . __('Spread the Word', 'w3-total-cache') . '</div>', array($this, 'widget_form'), null, 'normal');
 }
 /**
  * Dashboard setup action
  *
  * @return void
  */
 function wp_dashboard_setup()
 {
     Util_Widget::add('w3tc_services', '<div class="w3tc-widget-services-logo"></div>' . '<div class="w3tc-widget-text">' . __('Premium Services', 'w3-total-cache') . '</div>', array($this, 'widget_form'), null, 'normal');
 }
 public function w3tc_widget_setup()
 {
     Util_Widget::add('w3tc_highwinds', '<div class="w3tc-widget-highwinds-logo"></div>', array($this, 'widget_form'), Util_Ui::admin_url('admin.php?page=w3tc_cdn'), 'normal');
 }
 function w3tc_widget_setup()
 {
     Util_Widget::add('w3tc_cloudflare', '<div class="w3tc_cloudflare_widget_logo"></div>', array($this, 'widget_form'), Util_Ui::admin_url('admin.php?page=w3tc_general#cloudflare'), 'normal');
 }
 /**
  * Dashboard setup action
  *
  * @return void
  */
 function wp_dashboard_setup()
 {
     Util_Widget::add('w3tc_netdna', '<div class="w3tc-widget-netdna-logo"></div>', array($this, 'widget_netdna'), Util_Ui::admin_url('admin.php?page=w3tc_cdn'), 'normal');
 }
 /**
  * Dashboard setup action
  *
  * @return void
  */
 public function wp_dashboard_setup()
 {
     Util_Widget::add('w3tc_pagespeed', '<div class="w3tc-widget-pagespeed-logo"></div>' . '<div class="w3tc-widget-text">' . __('Page Speed Report', 'w3-total-cache') . '</div>', array($this, 'widget_pagespeed'), Util_Ui::admin_url('admin.php?page=w3tc_general#miscellaneous'), 'normal');
 }
 function w3tc_widget_setup()
 {
     Util_Widget::add('w3tc_cloudflare', __('CloudFlare', 'w3-total-cache'), array($this, 'widget_form'), Util_Ui::admin_url('admin.php?page=w3tc_general#cloudflare'), 'normal');
 }