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-6.7.1

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

  • /wp-admin/options.php line 46
    	 * @since 3.2.0
    	 *
    	 * @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>',