Actions(); $this->Filters(); } function Actions() { //delete_option( 'attire_options' ); add_action( 'after_switch_theme', array( $this, 'check_required_theme_plugins' ), 10, 2 ); } function check_required_theme_plugins( $oldtheme_name, $oldtheme ) { if ( version_compare( PHP_VERSION, '8.4.0', '<' ) ) { // Info message: Theme not activated add_action( 'admin_notices', array( $this, 'not_activated_admin_notice' ) ); // Switch back to previous theme switch_theme( $oldtheme->stylesheet ); return false; } } function not_activated_admin_notice() { ?>