option_page_capability_{$option_page}

option_page_capability_{$option_page}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-7.0

apply_filters('option_page_capability_{$option_page}') is found 1 times:

  • /wp-admin/options.php line 47
     * @since 7.0.0 Applied when `wp-admin/options.php` is accessed directly.
     *
     * @param string $capability The capability used for the page, which is manage_options by default.
     */
    $capability = apply_filters( "option_page_capability_{$option_page}", $capability );
    
    if ( ! current_user_can( $capability ) ) {
    	wp_die(
    		'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    		'<p>' . __( 'Sorry, you are not allowed to manage options for this site.' ) . '</p>',
    		403