/**
  * Sets Admin page screen options
  */
 public static function addAdminPageScreenOptions()
 {
     require_once 'AddActionsAndFilters_DataModelConfig.php';
     $option = 'per_page';
     $args = array('label' => 'Code Items', 'default' => AddActionsAndFilters_DataModelConfig::PER_PAGE_DEFAULT, 'option' => AddActionsAndFilters_DataModelConfig::PER_PAGE_OPTION);
     add_screen_option($option, $args);
 }
コード例 #2
0
 /**
  * Screen options
  */
 public function screen_option()
 {
     $option = 'per_page';
     $args = ['label' => 'Purchase codes', 'default' => 30, 'option' => 'licenses_per_page'];
     add_screen_option($option, $args);
     $this->licenses_obj = new LicensesTable();
 }
コード例 #3
0
 public function screen_option()
 {
     $option = 'per_page';
     $args = ['label' => __('Address', 'miklaj-notification'), 'default' => 5, 'option' => 'addressess_per_page'];
     add_screen_option($option, $args);
     $this->notification_list_obj = new Miklaj_Notification_List();
 }
コード例 #4
0
ファイル: admin.php プロジェクト: rmccue/BP-Labs
    /**
     * Initialise common elements for all pages of the admin screen.
     * Add metaboxes and contextual help to admin screen.
     * Add social media button javascript to page footer.
     *
     * @since 1.1
     */
    public function init()
    {
        if (!empty($_GET['tab'])) {
            if ('support' == $_GET['tab']) {
                $tab = 'support';
            }
        } else {
            $tab = 'settings';
        }
        add_screen_option('layout_columns', array('max' => 2));
        // Support tab
        if ('support' == $tab) {
            add_meta_box('bpl-helpushelpyou', __('Help Me Help You', 'bpl'), array($this, 'helpushelpyou'), 'settings_page_bplabs', 'side', 'high');
        } else {
            add_meta_box('bpl-likethis', __('Love BP Labs?', 'bpl'), array($this, 'like_this_plugin'), 'settings_page_bplabs', 'side', 'default');
        }
        // All tabs
        add_meta_box('bpl-paypal', __('Give Kudos', 'bpl'), array($this, '_paypal'), 'settings_page_bplabs', 'side', 'default');
        add_meta_box('bpl-latest', __('Latest News', 'bpl'), array($this, 'metabox_latest_news'), 'settings_page_bplabs', 'side', 'default');
        wp_enqueue_script('postbox');
        wp_enqueue_script('dashboard');
        ?>

			<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
			  {parsetags: 'explicit'}
			</script>
			<script type="text/javascript">gapi.plusone.go();</script>

		<?php 
    }
コード例 #5
0
 /**
  * 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();
 }
コード例 #6
0
 public function __construct($args = array())
 {
     $current_screen = get_current_screen();
     $args = wp_parse_args($args, array('screen' => $current_screen, 'columns' => array(), 'sortable_columns' => array(), 'actions_column' => '', 'bulk_actions' => array(), 'item_callback' => '', 'per_page' => array(), 'views' => '', 'style' => ''));
     $this->columns = $args['columns'];
     $this->sortable_columns = $args['sortable_columns'];
     $this->bulk_actions = $args['bulk_actions'];
     $this->actions_column = $args['actions_column'];
     $this->style = $args['style'];
     $this->set_columns();
     if ($args['per_page']) {
         if (is_array($args['per_page'])) {
             add_screen_option('per_page', $args['per_page']);
             // 选项
         } elseif (is_numeric($args['per_page'])) {
             $this->per_page = $args['per_page'];
             // 直接设定了值
         }
     }
     if ($args['item_callback']) {
         add_filter($this->singular . '_item_callback', $args['item_callback']);
     }
     if ($args['views']) {
         add_filter('views_' . $current_screen->id, $args['views']);
     }
     add_action('admin_head', array($this, 'admin_head'));
     parent::__construct($args);
 }
コード例 #7
0
 /**
  *
  */
 public static function add_options()
 {
     global $PV_Admin_Page;
     $args = array('label' => 'Rows', 'default' => 10, 'option' => 'commission_per_page');
     add_screen_option('per_page', $args);
     $PV_Admin_Page = new WCV_Admin_Page();
 }
コード例 #8
0
ファイル: meta-boxes.php プロジェクト: xwp/stream-legacy
    public function load_page()
    {
        if (is_admin() && WP_Stream_Reports_Settings::is_first_visit()) {
            $this->setup_user();
        }
        // Add screen option for chart height
        add_filter('screen_settings', array($this, 'chart_height_display'), 10, 2);
        // Enqueue all core scripts required for this page to work
        add_screen_option('layout_columns', array('max' => 2, 'default' => 2));
        // Add all metaboxes
        foreach (self::$sections as $key => $section) {
            $delete_url = add_query_arg(array_merge(array('action' => 'wp_stream_reports_delete_metabox', 'key' => $key), WP_Stream_Reports::$nonce), admin_url('admin-ajax.php'));
            //  Configure button
            $configure = sprintf('<span class="postbox-title-action">
					<a href="javascript:void(0);" class="edit-box open-box">%3$s</a>
				</span>
				<span class="postbox-title-action postbox-delete-action">
					<a href="%1$s">
						%2$s
					</a>
				</span>', esc_url($delete_url), esc_html__('Delete', 'stream-reports'), esc_html__('Configure', 'stream-reports'));
            // Parse default argument
            $section = $this->parse_section($section);
            // Set the key for template use
            $section['key'] = $key;
            $section['generated_title'] = $this->get_generated_title($section);
            // Generate the title automatically if not already set
            $title = empty($section['title']) ? $section['generated_title'] : $section['title'];
            // Add the actual metabox
            add_meta_box(self::META_PREFIX . $key, sprintf('<span class="title">%s</span>%s', esc_html($title), $configure), array($this, 'metabox_content'), WP_Stream_Reports::$screen_id, $section['context'], $section['priority'], $section);
        }
    }
コード例 #9
0
 /**
  * @hook $page_hook
  */
 public function _add_options()
 {
     $option = 'per_page';
     //wordpress api
     $args = array('label' => 'Kết quả hiển thị', 'default' => 10, 'option' => 'hw_items_per_page');
     add_screen_option($option, $args);
 }
コード例 #10
0
 /**
  * The constructor function for our class.
  * Adds hooks, initializes variables, setups class.
  */
 function __construct()
 {
     global $status, $page;
     $screen = get_current_screen();
     /* Determine the status */
     $status = 'all';
     $statuses = array('active', 'inactive', 'recently_activated', 'admin', 'frontend');
     if (isset($_REQUEST['status']) && in_array($_REQUEST['status'], $statuses)) {
         $status = $_REQUEST['status'];
     }
     /* Add the search query to the URL */
     if (isset($_REQUEST['s'])) {
         $_SERVER['REQUEST_URI'] = add_query_arg('s', stripslashes($_REQUEST['s']));
     }
     /* Add a snippets per page screen option */
     $page = $this->get_pagenum();
     add_screen_option('per_page', array('label' => __('Snippets per page', 'code-snippets'), 'default' => 10, 'option' => 'snippets_per_page'));
     /* Set the table columns hidden in Screen Options by default */
     add_filter("get_user_option_manage{$screen->id}columnshidden", array($this, 'get_default_hidden_columns'), 15);
     /* Strip once-off query args from the URL */
     $_SERVER['REQUEST_URI'] = remove_query_arg(array('activate', 'activate-multi', 'deactivate', 'deactivate-multi', 'delete', 'delete-multi'));
     /* Add filters to format the snippet description in the same way the post content is formatted */
     $filters = array('wptexturize', 'convert_smilies', 'convert_chars', 'wpautop', 'shortcode_unautop', 'capital_P_dangit');
     foreach ($filters as $filter) {
         add_filter('code_snippets/list_table/print_snippet_description', $filter);
     }
     /* Setup the class */
     parent::__construct(array('singular' => 'snippet', 'plural' => 'snippets', 'ajax' => true));
 }
コード例 #11
0
ファイル: simple-login-log.php プロジェクト: vsalx/rattieinfo
 function screen_options()
 {
     //execute only on login_log page, othewise return null
     $page = isset($_GET['page']) ? esc_attr($_GET['page']) : false;
     if ('login_log' != $page) {
         return;
     }
     $current_screen = get_current_screen();
     //define options
     $per_page_field = 'per_page';
     $per_page_option = $current_screen->id . '_' . $per_page_field;
     //Save options that were applied
     if (isset($_REQUEST['wp_screen_options']) && isset($_REQUEST['wp_screen_options']['value'])) {
         update_option($per_page_option, esc_html($_REQUEST['wp_screen_options']['value']));
     }
     //prepare options for display
     //if per page option is not set, use default
     $per_page_val = get_option($per_page_option, 20);
     $args = array('label' => __('Records', 'sll'), 'default' => $per_page_val);
     //display options
     add_screen_option($per_page_field, $args);
     $_per_page = get_option('users_page_login_log_per_page');
     //needs to be initialized early enough to pre-fill screen options section in the upper (hidden) area.
     $this->log_table = new SLL_List_Table();
 }
コード例 #12
0
ファイル: customers.php プロジェクト: sajidshah/le-dolci
function wc_customer_relationship_manager_add_options()
{
    $option = 'per_page';
    $args = array('label' => __('Customers', 'wc_customer_relationship_manager'), 'default' => 20, 'option' => 'customers_per_page');
    add_screen_option($option, $args);
    WC_CRM()->customers_table();
}
コード例 #13
0
 /**
  * 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();
 }
コード例 #14
0
ファイル: view-list.php プロジェクト: adisonc/MaineLearning
 /**
  * Set up the view with data and do things that are specific for this view
  *
  * @since 1.0.0
  *
  * @param string $action Action for this view
  * @param array $data Data for this view
  */
 public function setup($action, $data)
 {
     parent::setup($action, $data);
     add_thickbox();
     $this->admin_page->enqueue_script('list', array('jquery'), array('list' => array('shortcode_popup' => __('To embed this table into a post or page, use this Shortcode:', 'tablepress'), 'donation-message-already-donated' => __('Thank you very much! Your donation is highly appreciated. You just contributed to the further development of TablePress!', 'tablepress'), 'donation-message-maybe-later' => sprintf(__('No problem! I still hope you enjoy the benefits that TablePress adds to your site. If you should change your mind, you\'ll always find the &#8220;Donate&#8221; button on the <a href="%s">TablePress website</a>.', 'tablepress'), 'http://tablepress.org/'))));
     if ($data['messages']['first_visit']) {
         $this->add_header_message('<strong><em>' . __('Welcome!', 'tablepress') . '</em></strong><br />' . __('Thank you for using TablePress for the first time!', 'tablepress') . ' ' . sprintf(__('If you encounter any questions or problems, please visit the <a href="%1$s">FAQ</a>, the <a href="%2$s">documentation</a>, and the <a href="%3$s">Support</a> section on the <a href="%4$s">plugin website</a>.', 'tablepress'), 'http://tablepress.org/faq/', 'http://tablepress.org/documentation/', 'http://tablepress.org/support/', 'http://tablepress.org/') . '<br /><br />' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'first_visit', 'return' => 'list'), __('Hide this message', 'tablepress')));
     }
     if ($data['messages']['wp_table_reloaded_warning']) {
         $this->add_header_message('<strong><em>' . __('Attention!', 'tablepress') . '</em></strong><br />' . __('You have activated the plugin WP-Table Reloaded, which can not be used together with TablePress.', 'tablepress') . '<br />' . __('It is strongly recommended that you switch from WP-Table Reloaded to TablePress, which not only fixes many problems, but also has more and better features than WP-Table Reloaded.', 'tablepress') . '<br />' . sprintf(__('Please follow the <a href="%s">migration guide</a> to move your tables and then deactivate WP-Table Reloaded!', 'tablepress'), 'http://tablepress.org/migration-from-wp-table-reloaded/') . '<br />' . '<a href="' . TablePress::url(array('action' => 'import')) . '" class="button button-primary button-large" title="' . __('Import your tables from WP-Table Reloaded', 'tablepress') . '" style="color:#ffffff;margin-top:5px;">' . __('Import your tables from WP-Table Reloaded', 'tablepress') . '</a>', 'error');
     }
     if ($data['messages']['donation_message']) {
         $this->add_header_message('<img alt="' . __('Tobias Bäthge, developer of TablePress', 'tablepress') . '" src="https://secure.gravatar.com/avatar/50f1cff2e27a1f522b18ce229c057bc5?s=94" height="94" width="94" style="float:left;margin-right:10px;" />' . __('Hi, my name is Tobias, I\'m the developer of the TablePress plugin.', 'tablepress') . '<br /><br />' . __('Thanks for using it! You\'ve installed TablePress over a month ago.', 'tablepress') . ' ' . sprintf(_n('If everything works and you are satisfied with the results of managing your %s table, isn\'t that worth a coffee or two?', 'If everything works and you are satisfied with the results of managing your %s tables, isn\'t that worth a coffee or two?', $data['table_count'], 'tablepress'), $data['table_count']) . '<br/>' . sprintf(__('<a href="%s">Donations</a> help me to continue user support and development of this <em>free</em> software &mdash; things for which I spend countless hours of my free time! Thank you very much!', 'tablepress'), 'http://tablepress.org/donate/') . '<br/><br />' . __('Sincerly, Tobias', 'tablepress') . '<br /><br />' . sprintf('<a href="%s" target="_blank"><strong>%s</strong></a>', 'http://tablepress.org/donate/', __('Sure, I\'ll buy you a coffee and support TablePress!', 'tablepress')) . '&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;&nbsp;&nbsp;' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'already-donated'), __('I already donated.', 'tablepress')) . '&nbsp;&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;&nbsp;&nbsp;' . $this->ajax_link(array('action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list', 'target' => 'maybe-later'), __('No, thanks. Don\'t ask again.', 'tablepress')));
     }
     if ($data['messages']['show_plugin_update']) {
         $message = '<strong><em>' . sprintf(__('Thank you for updating to TablePress %s!', 'tablepress'), TablePress::version) . '</em></strong><br />';
         if (!empty($data['messages']['plugin_update_message'])) {
             $message .= $data['messages']['plugin_update_message'] . '<br />';
         }
         $message .= sprintf(__('Please read the <a href="%s">release announcement</a> for more information.', 'tablepress'), 'http://tablepress.org/news/') . ' ' . sprintf(__('If you like the new features and enhancements, <a href="%s">giving a donation</a> towards the further support and development of TablePress is recommended. Thank you!', 'tablepress'), 'http://tablepress.org/donate/') . '<br /><br />';
         $message .= $this->ajax_link(array('action' => 'hide_message', 'item' => 'plugin_update', 'return' => 'list'), __('Hide this message', 'tablepress'));
         $this->add_header_message($message);
     }
     $this->process_action_messages(array('success_delete' => _n('The table was deleted successfully.', 'The tables were deleted successfully.', 1, 'tablepress'), 'success_delete_plural' => _n('The table was deleted successfully.', 'The tables were deleted successfully.', 2, 'tablepress'), 'error_delete' => __('Error: The table could not be deleted.', 'tablepress'), 'error_save' => __('Error: The table could not be saved.', 'tablepress'), 'success_copy' => _n('The table was copied successfully.', 'The tables were copied successfully.', 1, 'tablepress'), 'success_copy_plural' => _n('The table was copied successfully.', 'The tables were copied successfully.', 2, 'tablepress'), 'error_copy' => __('Error: The table could not be copied.', 'tablepress'), 'error_no_table' => __('Error: You did not specify a valid table ID.', 'tablepress'), 'error_load_table' => __('Error: This table could not be loaded!', 'tablepress'), 'error_bulk_action_invalid' => __('Error: This bulk action is invalid!', 'tablepress'), 'error_no_selection' => __('Error: You did not select any tables!', 'tablepress'), 'error_delete_not_all_tables' => __('Notice: Not all selected tables could be deleted!', 'tablepress'), 'error_copy_not_all_tables' => __('Notice: Not all selected tables could be copied!', 'tablepress'), 'success_import' => __('The tables were imported successfully.', 'tablepress'), 'success_import_wp_table_reloaded' => __('The tables were imported successfully from WP-Table Reloaded.', 'tablepress')));
     $this->add_text_box('head', array($this, 'textbox_head'), 'normal');
     $this->add_text_box('tables-list', array($this, 'textbox_tables_list'), 'normal');
     add_screen_option('per_page', array('label' => __('Tables', 'tablepress'), 'default' => 20));
     // Admin_Controller contains function to allow changes to this in the Screen Options to be saved
     $this->wp_list_table = new TablePress_All_Tables_List_Table();
     $this->wp_list_table->set_items($this->data['tables']);
     $this->wp_list_table->prepare_items();
     // cleanup Request URI string, which WP_List_Table uses to generate the sort URLs
     $_SERVER['REQUEST_URI'] = remove_query_arg(array('message', 'table_id'), $_SERVER['REQUEST_URI']);
 }
コード例 #15
0
/**
 * Admin screen options
 *
 * @since 0.1.0
 */
function wp_event_calendar_admin_add_screen_options()
{
    // columns screen option
    add_screen_option('layout_type', array('label' => _x('Layout', 'Month, Week, or Day (screen options)', 'wp-event-calendar'), 'default' => 'month', 'option' => 'calendar_layout'));
    // Events per day
    add_screen_option('per_page', array('label' => _x('Events per day', 'Events per day (screen options)', 'wp-event-calendar'), 'default' => 10, 'option' => 'edit_calendar_per_day'));
}
コード例 #16
0
ファイル: view.php プロジェクト: kosir/wp-pipes
 public function on_load_page()
 {
     $user = get_current_user_id();
     $screen = get_current_screen();
     // Add Help Tabs
     $screen->add_help_tab(array('id' => 'my_help_tab0', 'title' => __('Manage your Pipes'), 'content' => '<p>' . __('<strong>A Pipe</strong> - is a pipeline of data migration from SOURCE to DESTINATION. This screen contains the list of created or imported Pipes. Basically, you can do all management actions on this screen.') . '</p>' . '<p>' . __('<strong>Edit</strong> - click on the Pipe title to go to Pipe Edit form. You can also hover on a pipe to see the Edit link.') . '</p>' . '<p>' . __('<strong>Delete</strong> - delete a pipe permanently out of your WP Pipes plugin.') . '</p>' . '<p>' . __('<strong>Test</strong> - test your Pipe manually.') . '</p>' . '<p>' . __('<strong>Test in Update mode</strong> - test your Pipe manually in force-update mode.') . '</p>' . '<p>' . __('<strong>Export</strong> - export a pipe. See more at Import Pipes and Export Pipes tabs.') . '</p>'));
     $screen->add_help_tab(array('id' => 'my_help_tab1', 'title' => __('Export Pipes'), 'content' => '<p>' . __('You can export the settings of a single Pipe or multiple Pipes to share / sell it OR <strong>Import it later</strong>.') . '<p>' . __('<strong>Export single Pipe</strong> - by hover on a pipe and select Export, you will be able to download a .pipe file to your local computer which contains your Pipe settings.') . '<p>' . __('<strong>Export multiple Pipes</strong> - by checking some pipes and select Bulk Actions > Export, you will be able to download a .pipe file to your local computer which contains settings for your selected Pipes.') . '</p>'));
     $screen->add_help_tab(array('id' => 'my_help_tab2', 'title' => __('Import Pipes'), 'content' => '<p>' . __('You can import .pipe file which contains settings from single or multiple Pipes over this feature. These .pipe files can be got from your export action before or from friend or <a href="http://foob.la/pipestore" target="_blank">Pipe Marketplace</a>.') . '<p>' . __('<strong>To Import A Pipe</strong> - click Import button on the top side of the page > browse the .pipe file from your local computer > click Import and single or multiple Pipes will be imported to your WP Pipes plugin.')));
     // Help Sidebar
     $screen->set_help_sidebar('<p>' . __('<strong>For more information:</strong>') . '</p>' . '<p>' . __('<a href="http://foobla.com/wordpress/pipes">Documentation on Pipes Manager</a>') . '</p>' . '<p>' . __('<a href="http://foobla.com/forums">Support Forums</a>') . '</p>');
     if (isset($_POST['wp_screen_options']) && is_array($_POST['wp_screen_options'])) {
         $default = $_POST['wp_screen_options']['value'];
         update_user_meta($user, 'pipes_per_page', $default);
     } else {
         $default = 10;
     }
     // Add meta box
     add_meta_box('pipes-items-helpbox-1', __('Check this if you are new to Pipes'), array($this, 'metabox_help'), $screen, 'items_top');
     //ensure, that the needed javascripts been loaded to allow drag/drop, expand/collapse and hide/show of boxes
     wp_enqueue_script('common');
     wp_enqueue_script('wp-lists');
     wp_enqueue_script('postbox');
     $args = array('label' => __('Pipes per page', 'pipes'), 'default' => $default, 'option' => 'pipes_per_page');
     add_screen_option('per_page', $args);
 }
コード例 #17
0
ファイル: AdminDashboard.php プロジェクト: noxian/WP-Filebase
 static function Setup($custom = false)
 {
     global $user_ID;
     $screen = get_current_screen();
     //$screen->get_option('layout_colums', 2);
     //add_filter('screen_layout_columns', array(__CLASS__, 'screenLayoutColumns'), 10, 2);
     if ($custom && !wp_is_mobile()) {
         add_screen_option('layout_columns', array('max' => 2, 'default' => 2));
     }
     if (WPFB_Core::CurUserCanUpload()) {
         add_meta_box('wpfb-add-file-widget', ($custom ? '' : WPFB_PLUGIN_NAME . ': ') . __('Add File', 'wp-filebase'), array(__CLASS__, 'WidgetAddFile'), $screen, 'normal', 'default', array(!$custom));
     }
     if ($custom) {
         if (!empty($_GET['wpfb-hide-how-start'])) {
             update_user_option($user_ID, WPFB_OPT_NAME . '_hide_how_start', 1);
         }
         $show_how_start = !(bool) get_user_option(WPFB_OPT_NAME . '_hide_how_start');
         add_meta_box('wpfb-tools', __('Tools'), array(__CLASS__, 'WidgetTools'), $screen, 'side', 'default');
         add_meta_box('wpfb-stats', __('Statistics', 'wp-filebase'), array(__CLASS__, 'WidgetStats'), $screen, 'side', 'default');
         add_meta_box('wpfb-getstarted', sprintf(__('How to get started with %s?', 'wp-filebase'), WPFB_PLUGIN_NAME), array(__CLASS__, 'WidgetGetStarted'), $screen, 'side', $show_how_start ? 'high' : 'low');
         add_meta_box('wpfb-about', __('About', 'wp-filebase'), array(__CLASS__, 'WidgetAbout'), $screen, 'side', 'default');
         add_meta_box('wpfb-logs', __('Log Files', 'wp-filebase'), array(__CLASS__, 'WidgetLogFiles'), $screen, 'side', 'low');
         //add_meta_box('wpfb-', __('','wp-filebase'), array(__CLASS__, ''), $screen, 'normal', 'default' );
         //$screen->render_screen_meta();
     }
 }
コード例 #18
0
ファイル: logs.php プロジェクト: sajidshah/le-dolci
function wc_customer_relationship_manager_logs_add_options()
{
    global $wc_crm_logs;
    $option = 'per_page';
    $args = array('label' => __('Log Records', 'wc_customer_relationship_manager'), 'default' => 20, 'option' => 'logs_per_page');
    add_screen_option($option, $args);
    $wc_crm_logs = new WC_Crm_Logs();
}
 function bookings_add_screen_options()
 {
     global $wp_car_rental_booking_table;
     $option = 'per_page';
     $args = array('label' => 'Bookings', 'default' => 50, 'option' => 'car_rental_bookings_per_page');
     add_screen_option($option, $args);
     $wp_car_rental_booking_table = new Car_Rental_Booking_Admin_List_Table();
 }
コード例 #20
0
 function __construct($args = array())
 {
     $base_args = array('singular' => 'map', 'plural' => 'maps');
     parent::__construct(array_merge($base_args, $args));
     // register screen options for match_table
     $screen_options = array('label' => __('Maps per page', WP_CLANWARS_TEXTDOMAIN), 'default' => static::PER_PAGE_DEFAULT, 'option' => static::PER_PAGE_OPTION);
     add_screen_option('per_page', $screen_options);
 }
コード例 #21
0
 /**
  * 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);
 }
コード例 #22
0
 function tour_schedule_add_screen_options()
 {
     global $wp_tour_schedule_table;
     $option = 'per_page';
     $args = array('label' => 'Schedule', 'default' => 50, 'option' => 'tour_schedule_per_page');
     add_screen_option($option, $args);
     $wp_tour_schedule_table = new Tour_Schedule_Admin_List_Table();
 }
コード例 #23
0
function add_options()
{
    global $myListTable;
    $option = 'per_page';
    $args = array('label' => 'Books', 'default' => 10, 'option' => 'books_per_page');
    add_screen_option($option, $args);
    $myListTable = new Tzelan_table();
}
コード例 #24
0
 function vacancies_add_screen_options()
 {
     global $wp_accommodation_vacancy_table;
     $option = 'per_page';
     $args = array('label' => 'Vacancies', 'default' => 50, 'option' => 'accommodation_vacancies_per_page');
     add_screen_option($option, $args);
     $wp_accommodation_vacancy_table = new Accommodation_Vacancy_Admin_List_Table();
 }
コード例 #25
0
 function bookings_add_screen_options()
 {
     global $wp_cruise_booking_table;
     $option = 'per_page';
     $args = array('label' => __('Bookings', 'bookyourtravel'), 'default' => 50, 'option' => 'cruise_bookings_per_page');
     add_screen_option($option, $args);
     $wp_cruise_booking_table = new Cruise_Booking_Admin_List_Table();
 }
コード例 #26
0
 function cruise_schedule_add_screen_options()
 {
     global $wp_cruise_schedule_table;
     $option = 'per_page';
     $args = array('label' => __('Schedule', 'bookyourtravel'), 'default' => 50, 'option' => 'cruise_schedule_per_page');
     add_screen_option($option, $args);
     $wp_cruise_schedule_table = new Cruise_Schedule_Admin_List_Table();
 }
コード例 #27
0
 /**
  * Add per-page screen option to the Forms table.
  *
  * @since 1.0.0
  */
 function screen_options()
 {
     $screen = get_current_screen();
     if ($screen->id !== 'toplevel_page_wpforms-overview') {
         return;
     }
     add_screen_option('per_page', array('label' => __('Number of forms per page:', 'wpforms'), 'option' => 'wpforms_forms_per_page', 'default' => apply_filters('wpforms_overview_per_page', 20)));
 }
コード例 #28
0
function enquiries_per_page_add_option()
{
    $option = 'per_page';
    $args = array('label' => 'Enquiries', 'default' => 10, 'option' => 'enquiries_per_page');
    $screen = get_current_screen();
    add_filter('manage_' . $screen->id . '_columns', array('Enquiry_List_Table', 'get_columns'));
    add_screen_option($option, $args);
}
コード例 #29
0
ファイル: plugin-metabox.php プロジェクト: Omuze/barakat
 function create()
 {
     wp_enqueue_script('postbox');
     add_screen_option('layout_columns', array('max' => 4, 'default' => isset($this->_parent->group['has_sidebar']) ? 2 : 1));
     foreach ($this->_parent->group['options'] as $section) {
         add_meta_box("kc-metabox-{$this->_parent->page}-{$section['id']}", $section['title'], array($this, 'fill'), $this->_parent->page, $section['metabox']['context'], $section['metabox']['priority'], $section);
     }
 }
コード例 #30
0
ファイル: screen-options.php プロジェクト: nerrad/AffiliateWP
/**
 * Add per page screen option to the Creatives list table
 *
 * @since 1.7
 */
function affwp_creatives_screen_options()
{
    $screen = get_current_screen();
    if ($screen->id !== 'affiliates_page_affiliate-wp-creatives') {
        return;
    }
    add_screen_option('per_page', array('label' => __('Number of creatives per page:', 'affiliate-wp'), 'option' => 'affwp_edit_creatives_per_page', 'default' => 30));
    do_action('affwp_creatives_screen_options', $screen);
}