I am working on a site on WordPress and doing it for the first time since branch 3.x so I feel a little confused.
I’m using version 6.1 with default theme 2022, from which I made myself a child theme. Can someone take a look at my functions.php file and tell me why instead of a maintenance announcement, the site is throwing me a critical error?
<?php
function add_style() {
wp_enqueue_style( ‘style’, get_stylesheet_uri() );
}
add_action( ‘wp_enqueue_scripts’, ‘add_style’ );
function maintenance_mode() {
if ( !current_user_can( ‘edit_themes’ ) || !is_user_logged_in() ) {wp_die(‘Maintenance in progress. Please come back later.’);
}
}
add_action(‘get_header’, ‘maintenance_mode’);
​
[ad_2]
enable wp debug to see the full error message