diff --git a/source/wp-content/themes/wporg-main-2022/inc/capabilities.php b/source/wp-content/themes/wporg-main-2022/inc/capabilities.php index 1a931cb1..ab63911c 100644 --- a/source/wp-content/themes/wporg-main-2022/inc/capabilities.php +++ b/source/wp-content/themes/wporg-main-2022/inc/capabilities.php @@ -91,12 +91,12 @@ function map_meta_caps( $required_caps, $current_cap, $user_id, $args ) { $post = get_post( $args[0] ); if ( $post && 'page' === $post->post_type ) { // There ought to be a way to do this using a function like `locate_block_template()`, but if there is I can't figure out how. - if ( 'page' === get_option( 'show_on_front' ) && $post->ID == get_option( 'page_on_front' ) ) { + if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_on_front' ) == $post->ID ) { $maybe_template = get_stylesheet_directory() . '/templates/front-page.html'; } else { $maybe_template = get_stylesheet_directory() . '/templates/page-' . $post->post_name . '.html'; } - if ( !file_exists( $maybe_template ) ) { + if ( ! file_exists( $maybe_template ) ) { $required_caps[] = 'do_not_allow'; } }