• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP set_screen_options函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中set_screen_options函数的典型用法代码示例。如果您正苦于以下问题:PHP set_screen_options函数的具体用法?PHP set_screen_options怎么用?PHP set_screen_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了set_screen_options函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: load

 /**
  * Construct the parent class.
  * @access public
  */
 public function load()
 {
     global $status, $page;
     parent::__construct(array('singular' => 'activity', 'plural' => 'activity', 'ajax' => true));
     add_screen_option('per_page', array('default' => 15, 'label' => __('Events per page', 'revisr'), 'option' => 'edit_revisr_events_per_page'));
     set_screen_options();
 }
开发者ID:rebekahford,项目名称:testgcu,代码行数:11,代码来源:class-revisr-list-table.php


示例2: load

 /**
  * Construct the parent class.
  * @access public
  */
 public function load()
 {
     global $status, $page;
     parent::__construct(array('singular' => 'repository', 'plural' => 'repositories'));
     add_screen_option('per_page', array('default' => 10, 'label' => __('Repositories per page', 'revisr'), 'option' => 'edit_revisr_repositories_per_page'));
     set_screen_options();
 }
开发者ID:acchs,项目名称:test,代码行数:11,代码来源:class-revisr-repositories-table.php


示例3: admin_load

 /**
  * Settings Page
  * Adds Admin Menu Item via WordPress' "Administration Menus" API. Also hook actions to register options via WordPress' Settings API.
  */
 static function admin_load()
 {
     add_screen_option('per_page', array('label' => __('Per Page'), 'default' => 20));
     add_filter('set-screen-option', array(__CLASS__, 'set_screen_option'), 10, 3);
     // hack for core limitation: see http://core.trac.wordpress.org/ticket/18954
     set_screen_options();
     add_settings_section('usage', __('Scripts n Styles Usage', 'scripts-n-styles'), array(__CLASS__, 'usage_section'), SnS_Admin::MENU_SLUG);
 }
开发者ID:bristweb,项目名称:wp-plugins-submodule,代码行数:12,代码来源:class-sns-usage-page.php


示例4: __construct

 public function __construct($args = array())
 {
     parent::__construct(array('singular' => 'activity', 'screen' => isset($args['screen']) ? $args['screen'] : null));
     $this->_roles = apply_filters('aal_init_roles', array('manage_options' => array('Core', 'Export', 'Post', 'Taxonomy', 'User', 'Options', 'Attachment', 'Plugin', 'Widget', 'Theme', 'Menu', 'Comments'), 'edit_pages' => array('Post', 'Taxonomy', 'Attachment', 'Comments')));
     $this->_caps = apply_filters('aal_init_caps', array('administrator' => array('administrator', 'editor', 'author', 'guest'), 'editor' => array('editor', 'author', 'guest'), 'author' => array('author', 'guest')));
     add_screen_option('per_page', array('default' => 50, 'label' => __('Activities', 'aryo-activity-log'), 'option' => 'edit_aal_logs_per_page'));
     add_filter('set-screen-option', array(&$this, 'set_screen_option'), 10, 3);
     set_screen_options();
 }
开发者ID:arielk,项目名称:wordpress-aryo-activity-log,代码行数:9,代码来源:class-aal-activity-log-list-table.php


示例5: __construct

 function __construct($args = array())
 {
     $screen_id = isset($args['screen']) ? $args['screen'] : null;
     $screen_id = apply_filters('wp_stream_list_table_screen_id', $screen_id);
     parent::__construct(array('post_type' => 'stream', 'plural' => 'records', 'screen' => $screen_id));
     add_screen_option('per_page', array('default' => 20, 'label' => __('Records per page', 'stream'), 'option' => 'edit_stream_per_page'));
     // Check for default hidden columns
     $this->get_hidden_columns();
     add_filter('screen_settings', array($this, 'screen_controls'), 10, 2);
     add_filter('set-screen-option', array(__CLASS__, 'set_screen_option'), 10, 3);
     set_screen_options();
 }
开发者ID:Magnacarter,项目名称:livinghope.com,代码行数:12,代码来源:class-wp-stream-list-table.php


示例6: __construct

 function __construct($args = array())
 {
     $view = wp_stream_filter_input(INPUT_GET, 'view');
     parent::__construct(array('post_type' => 'stream_notifications', 'plural' => 'rules', 'screen' => isset($args['screen']) ? $args['screen'] : null));
     if (null === $view) {
         add_screen_option('per_page', array('default' => 20, 'label' => esc_html__('Rules per page', 'stream-notifications'), 'option' => 'edit_stream_notifications_per_page'));
     }
     add_filter('set-screen-option', array(__CLASS__, 'set_screen_option'), 10, 3);
     add_filter('wp_stream_query_args', array(__CLASS__, 'register_occurrences_for_sorting'));
     add_filter('wp_stream_query', array(__CLASS__, 'include_null_occurrences'), 10, 2);
     set_screen_options();
 }
开发者ID:xwp,项目名称:stream-legacy,代码行数:12,代码来源:list-table.php


示例7: wp_remote_get

            require_once ABSPATH . WPINC . '/http.php';
            $response = wp_remote_get(admin_url('upgrade.php?step=1'), array('timeout' => 120, 'httpversion' => '1.1'));
            /** This action is documented in wp-admin/network/upgrade.php */
            do_action('after_mu_upgrade', $response);
            unset($response);
        }
        unset($c);
    }
}
require_once ABSPATH . 'wp-admin/includes/admin.php';
auth_redirect();
// Schedule trash collection
if (!wp_next_scheduled('wp_scheduled_delete') && !wp_installing()) {
    wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
}
set_screen_options();
$date_format = __('F j, Y');
$time_format = __('g:i a');
wp_enqueue_script('common');
/**
 * $pagenow is set in vars.php
 * $wp_importers is sometimes set in wp-admin/includes/import.php
 * The remaining variables are imported as globals elsewhere, declared as globals here
 *
 * @global string $pagenow
 * @global array  $wp_importers
 * @global string $hook_suffix
 * @global string $plugin_page
 * @global string $typenow
 * @global string $taxnow
 */
开发者ID:yaoyonstudio,项目名称:WordPress,代码行数:31,代码来源:admin.php


示例8: setScreenOptions

 /**
  * Saves option for number of rows when listing posts, pages, comments, etc.
  *
  * @since 2.8.0
  *
  * @return WpTesting_WordPressFacade
  */
 public function setScreenOptions()
 {
     set_screen_options();
     return $this;
 }
开发者ID:pmanterys,项目名称:wp-mw-newsletter,代码行数:12,代码来源:WordPressFacade.php



注:本文中的set_screen_options函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP set_section_visible函数代码示例发布时间:2022-05-15
下一篇:
PHP set_role_contextlevels函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap