add_action( 'after_setup_theme', array
( $this, 'after_setup_theme'
) );
} else { /*
* If the requested theme is not the active theme and the user doesn't have
* the switch_themes cap, bail.
*/
if ( !
current_user_can( 'switch_themes'
) ) { $this->
wp_die( -1,
__( 'Sorry, you are not allowed to edit theme options on this site.'
) );
} // If the theme has errors while loading, bail.
if ( $this->
theme()->
errors() ) { $this->
wp_die( -1,
$this->
theme()->
errors()->
get_error_message() );
} // If the theme isn't allowed per multisite settings, bail.
if ( !
$this->
theme()->
is_allowed() ) { $this->
wp_die( -1,
__( 'The requested theme does not exist.'
) );
} } // Make sure changeset UUID is established immediately after the theme is loaded.
add_action( 'after_setup_theme', array
( $this, 'establish_loaded_changeset'
), 5
);