check_site_url_and_maybe_exit(); } /** * Check the site's URL and set the should_load property accordingly. */ private function check_site_url_and_maybe_exit() { $site_url = get_site_url(); if ( strpos( $site_url, 'playground.wordpress.net' ) !== false ) { // This is the playground site, show an admin notice. add_action( 'admin_notices', [ $this, 'show_playground_notice' ] ); // Set should_load to false. $this->should_load = false; } } /** * Display an admin notice for the playground site. */ public function show_playground_notice() { ?>