コード例 #1
0
ファイル: Help.php プロジェクト: jasmun/Noco100
 /**
  * Callback for WP >= 3.3
  * @since WP 3.3
  */
 public function addHelpTab()
 {
     $screen = IfwPsn_Wp_Proxy_Screen::getCurrent();
     $help = array('id' => $this->_id == null ? 1 : $this->_id, 'title' => $this->_title, 'content' => sprintf('<div class="ifw-help-tab-content">%s</div>', $this->_help));
     IfwPsn_Wp_Proxy_Screen::addHelpTab($help);
     if (!empty($this->_sidebar)) {
         IfwPsn_Wp_Proxy_Screen::setHelpSidebar($this->_sidebar);
     }
 }
コード例 #2
0
ファイル: Action.php プロジェクト: jasmun/Noco100
 /**
  * Shortcut for add_action( 'admin_footer-*', 'function_name' )
  *
  * @param $function_to_add
  * @param int $priority
  * @param int $accepted_args
  * @return bool|void
  */
 public static function addAdminFooterCurrentScreen($function_to_add, $priority = 10, $accepted_args = 1)
 {
     $current = IfwPsn_Wp_Proxy_Screen::getCurrent();
     if ($current instanceof WP_Screen) {
         return self::add('admin_footer-' . IfwPsn_Wp_Proxy_Screen::getCurrent()->id, $function_to_add, $priority, $accepted_args);
     }
     return false;
 }