add_screen_option example

if ( ! current_user_can( 'manage_sites' ) ) {
    wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}

$wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
$pagenum       = $wp_list_table->get_pagenum();

// Used in the HTML title tag. $title       = __( 'Sites' );
$parent_file = 'sites.php';

add_screen_option( 'per_page' );

get_current_screen()->add_help_tab(
    array(
        'id'      => 'overview',
        'title'   => __( 'Overview' ),
        'content' =>
            '<p>' . __( 'Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.' ) . '</p>' .
            '<p>' . __( 'This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.' ) . '</p>' .
            '<p>' . __( 'Hovering over each site reveals seven options (three for the primary site):' ) . '</p>' .
            '<ul><li>' . __( 'An Edit link to a separate Edit Site screen.' ) . '</li>' .
            '<li>' . __( 'Dashboard leads to the Dashboard for that site.' ) . '</li>' .
            

    );
    exit;
}

if ( isset( $_GET['action'] ) && 'update-site' === $_GET['action'] ) {
    wp_safe_redirect( $referer );
    exit;
}

add_thickbox();
add_screen_option( 'per_page' );

// Used in the HTML title tag. /* translators: %s: Site title. */
$title = sprintf( __( 'Edit Site: %s' )esc_html( $details->blogname ) );

$parent_file  = 'sites.php';
$submenu_file = 'sites.php';

require_once ABSPATH . 'wp-admin/admin-header.php';
?> <div class="wrap"> <h1 id="edit-site">
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );

if ( $pagenum > $total_pages && $total_pages > 0 ) {
    wp_redirect( add_query_arg( 'paged', $total_pages ) );
    exit;
}

// Used in the HTML title tag. $title       = __( 'Users' );
$parent_file = 'users.php';

add_screen_option( 'per_page' );

get_current_screen()->add_help_tab(
    array(
        'id'      => 'overview',
        'title'   => __( 'Overview' ),
        'content' =>
            '<p>' . __( 'This table shows all users across the network and the sites to which they are assigned.' ) . '</p>' .
            '<p>' . __( 'Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.' ) . '</p>' .
            '<p>' . __( 'You can also go to the user&#8217;s profile page by clicking on the individual username.' ) . '</p>' .
            '<p>' . __( 'You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.' ) . '</p>' .
            '<p>' . __( 'The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.' ) . '</p>' .
            

    unset( $autosave_field$_autosave_field );
}

$post_type_object = get_post_type_object( $post_type );

// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). require_once ABSPATH . 'wp-admin/includes/meta-boxes.php';

register_and_do_post_meta_boxes( $post );

add_screen_option(
    'layout_columns',
    array(
        'max'     => 2,
        'default' => 2,
    )
);

if ( 'post' === $post_type ) {
    $customize_display = '<p>' . __( 'The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.' ) . '</p>';

    get_current_screen()->add_help_tab(
        
        $title = sprintf(
            /* translators: %s: Comments count. */
            __( 'Comments (%s)' ),
            number_format_i18n( $comments_count->moderated )
        );
    } else {
        // Used in the HTML title tag.         $title = __( 'Comments' );
    }
}

add_screen_option( 'per_page' );

get_current_screen()->add_help_tab(
    array(
        'id'      => 'overview',
        'title'   => __( 'Overview' ),
        'content' =>
                '<p>' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the bulk actions.' ) . '</p>',
    )
);
get_current_screen()->add_help_tab(
    array(
        
403
    );
}

$wp_list_table = _get_list_table( 'WP_Users_List_Table' );
$pagenum       = $wp_list_table->get_pagenum();

// Used in the HTML title tag. $title       = __( 'Users' );
$parent_file = 'users.php';

add_screen_option( 'per_page' );

// Contextual help - choose Help on the top right of admin panel to preview this. get_current_screen()->add_help_tab(
    array(
        'id'      => 'overview',
        'title'   => __( 'Overview' ),
        'content' => '<p>' . __( 'This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.' ) . '</p>' .
                        '<p>' . __( 'To add a new user for your site, click the Add New button at the top of the screen or Add New in the Users menu section.' ) . '</p>',
    )
);

'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);

// Handle list table actions. _wp_personal_data_handle_actions();

// Cleans up failed and expired requests before displaying the list table. _wp_personal_data_cleanup_requests();

wp_enqueue_script( 'privacy-tools' );

add_screen_option(
    'per_page',
    array(
        'default' => 20,
        'option'  => 'remove_personal_data_requests_per_page',
    )
);

$_list_table_args = array(
    'plural'   => 'privacy_requests',
    'singular' => 'privacy_request',
);

'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);

// Handle list table actions. _wp_personal_data_handle_actions();

// Cleans up failed and expired requests before displaying the list table. _wp_personal_data_cleanup_requests();

wp_enqueue_script( 'privacy-tools' );

add_screen_option(
    'per_page',
    array(
        'default' => 20,
        'option'  => 'export_personal_data_requests_per_page',
    )
);

$_list_table_args = array(
    'plural'   => 'privacy_requests',
    'singular' => 'privacy_request',
);

wp_safe_redirect( add_query_arg( 'update', $update$referer ) );
    exit;
}

restore_current_blog();

if ( isset( $_GET['action'] ) && 'update-site' === $_GET['action'] ) {
    wp_safe_redirect( $referer );
    exit;
}

add_screen_option( 'per_page' );

// Used in the HTML title tag. /* translators: %s: Site title. */
$title = sprintf( __( 'Edit Site: %s' )esc_html( $details->blogname ) );

$parent_file  = 'sites.php';
$submenu_file = 'sites.php';

/** * Filters whether to show the Add Existing User form on the Multisite Users screen. * * @since 3.1.0 * * @param bool $bool Whether to show the Add Existing User form. Default true. */
if ( 'post' !== $post_type ) {
    $parent_file  = ( 'attachment' === $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
    $submenu_file = "edit-tags.php?taxonomy=$taxonomy&amp;post_type=$post_type";
} elseif ( 'link_category' === $tax->name ) {
    $parent_file  = 'link-manager.php';
    $submenu_file = 'edit-tags.php?taxonomy=link_category';
} else {
    $parent_file  = 'edit.php';
    $submenu_file = "edit-tags.php?taxonomy=$taxonomy";
}

add_screen_option(
    'per_page',
    array(
        'default' => 20,
        'option'  => 'edit_' . $tax->name . '_per_page',
    )
);

get_current_screen()->set_screen_reader_content(
    array(
        'heading_pagination' => $tax->labels->items_list_navigation,
        'heading_list'       => $tax->labels->items_list,
    )
$referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer$action$themes ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
            wp_safe_redirect( $referer );
            exit;
    }
}

$wp_list_table->prepare_items();

add_thickbox();

add_screen_option( 'per_page' );

get_current_screen()->add_help_tab(
    array(
        'id'      => 'overview',
        'title'   => __( 'Overview' ),
        'content' =>
            '<p>' . __( 'This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.' ) . '</p>' .
            '<p>' . __( 'If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site&#8217;s Appearance > Themes screen.' ) . '</p>' .
            '<p>' . __( 'Themes can be enabled on a site by site basis by the network admin on the Edit Site screen (which has a Themes tab); get there via the Edit action link on the All Sites screen. Only network admins are able to install or edit themes.' ) . '</p>',
    )
);



get_current_screen()->set_screen_reader_content(
    array(
        'heading_views'      => $post_type_object->labels->filter_items_list,
        'heading_pagination' => $post_type_object->labels->items_list_navigation,
        'heading_list'       => $post_type_object->labels->items_list,
    )
);

add_screen_option(
    'per_page',
    array(
        'default' => 20,
        'option'  => 'edit_' . $post_type . '_per_page',
    )
);

$bulk_counts = array(
    'updated'   => isset( $_REQUEST['updated'] ) ? absint( $_REQUEST['updated'] ) : 0,
    'locked'    => isset( $_REQUEST['locked'] ) ? absint( $_REQUEST['locked'] ) : 0,
    'deleted'   => isset( $_REQUEST['deleted'] ) ? absint( $_REQUEST['deleted'] ) : 0,
    
exit;
            }
            break;
    }
}

$wp_list_table->prepare_items();

wp_enqueue_script( 'plugin-install' );
add_thickbox();

add_screen_option( 'per_page', array( 'default' => 999 ) );

get_current_screen()->add_help_tab(
    array(
        'id'      => 'overview',
        'title'   => __( 'Overview' ),
        'content' =>
                '<p>' . __( 'Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.' ) . '</p>' .
                '<p>' . __( 'The search for installed plugins will search for terms in their name, description, or author.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>' .
                '<p>' . sprintf(
                    /* translators: %s: WordPress Plugin Directory URL. */
                    __( 'If you would like to see more plugins to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional plugins from the <a href="%s">WordPress Plugin Directory</a>. Plugins in the WordPress Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ),
                    

do_action( 'add_meta_boxes_link', $link );

/** This action is documented in wp-admin/includes/meta-boxes.php */
do_action( 'do_meta_boxes', 'link', 'normal', $link );
/** This action is documented in wp-admin/includes/meta-boxes.php */
do_action( 'do_meta_boxes', 'link', 'advanced', $link );
/** This action is documented in wp-admin/includes/meta-boxes.php */
do_action( 'do_meta_boxes', 'link', 'side', $link );

add_screen_option(
    'layout_columns',
    array(
        'max'     => 2,
        'default' => 2,
    )
);

get_current_screen()->add_help_tab(
    array(
        'id'      => 'overview',
        'title'   => __( 'Overview' ),
        
exit;
}

$wp_list_table->prepare_items();

// Used in the HTML title tag. $title       = __( 'Media Library' );
$parent_file = 'upload.php';

wp_enqueue_script( 'media' );

add_screen_option( 'per_page' );

get_current_screen()->add_help_tab(
    array(
        'id'      => 'overview',
        'title'   => __( 'Overview' ),
        'content' =>
                '<p>' . __( 'All the files you&#8217;ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the Screen Options tab to customize the display of this screen.' ) . '</p>' .
                '<p>' . __( 'You can narrow the list by file type/status or by date using the dropdown menus above the media table.' ) . '</p>' .
                '<p>' . __( 'You can view your media in a simple visual grid or a list with columns. Switch between these views using the icons to the left above the media.' ) . '</p>',
    )
);
Home | Imprint | This part of the site doesn't use cookies.