id ) ) { return; } $screens = [ 'toplevel_page_accessibility_checker', 'accessibility-checker_page_accessibility_checker_issues', 'accessibility-checker_page_accessibility_checker_ignored', 'accessibility-checker_page_accessibility_checker_settings', ]; /** * Filter the screens where admin notices should be removed. * * @since 1.14.0 * * @param array $screens The screens where admin notices should be removed. */ $screens = apply_filters( 'edac_filter_remove_admin_notices_screens', $screens ); if ( ! is_array( $screens ) ) { $screens = []; } if ( in_array( $current_screen->id, $screens, true ) ) { remove_all_actions( 'admin_notices' ); remove_all_actions( 'all_admin_notices' ); } } /** * Black Friday Admin Notice * * @return void */ public function edac_black_friday_notice() { // Check if Accessibility Checker Pro is active. if ( defined( 'EDACP_VERSION' ) ) { return; } // Check if the notice has been dismissed. if ( absint( get_option( 'edac_black_friday_2025_notice_dismiss', 0 ) ) ) { return; } // Show from November 24 to December 03. $current_date = date_i18n( 'Ymd' ); // Use date_i18n for localization. $start_date = '20251124'; $end_date = '20251203'; if ( $current_date >= $start_date && $current_date <= $end_date ) { // Get the promotional message from a separate function/file. $message = $this->edac_get_black_friday_message(); // Output the message with appropriate sanitization. echo wp_kses_post( $message ); } } /** * Get Black Friday Promo Message * * @return string */ public function edac_get_black_friday_message() { // Construct the promotional message. $message = '
' . esc_html__( '🎉 Black Friday special! 🎉', 'accessibility-checker' ) . '
';
$message .= esc_html__( 'Upgrade to a paid version of Accessibility Checker from November 24th to December 3rd and get 30% off! Full site scanning, site-wide open issues report, dismissal logs, and more.', 'accessibility-checker' ) . '
';
$message .= '' . esc_html__( 'Ask a Pre-Sale Question', 'accessibility-checker' ) . ' ';
$message .= '' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '
' . esc_html__( '⚡️ Global Accessibility Awareness Day Flash Sale', 'accessibility-checker' ) . '
';
if ( defined( 'EDACP_VERSION' ) && edac_is_pro() ) {
$message .= esc_html__( 'Starting May 20th: Save 15% on accessibility courses and ArchiveWP with coupon code ', 'accessibility-checker' ) . 'GAAD2026.
';
$message .= esc_html__( '3 days only • May 20–22', 'accessibility-checker' ) . '
'; $message .= '' . esc_html__( 'View ArchiveWP Pricing', 'accessibility-checker' ) . ' '; $message .= '' . esc_html__( 'View Course Pricing', 'accessibility-checker' ) . '
'; } else { $message .= esc_html__( 'Starting May 20th: Save 15% on Accessibility Checker Pro with coupon code ', 'accessibility-checker' ) . 'GAAD2026.'; $message .= '' . esc_html__( 'View Pricing', 'accessibility-checker' ) . '
'; } $message .= '' . esc_html__( '⚡️ Global Accessibility Awareness Day Flash Sale', 'accessibility-checker' ) . '
';
if ( defined( 'EDACP_VERSION' ) && edac_is_pro() ) {
$message .= esc_html__( 'Save 15% on accessibility courses and ArchiveWP with coupon code ', 'accessibility-checker' ) . 'GAAD2026.
';
$message .= esc_html__( 'Limited-time offer • Ends May 22nd', 'accessibility-checker' ) . '
'; $message .= '' . esc_html__( 'View ArchiveWP Pricing', 'accessibility-checker' ) . ' '; $message .= '' . esc_html__( 'View Course Pricing', 'accessibility-checker' ) . '
'; } else { $message .= esc_html__( '3 days only: Save 15% when you upgrade to Accessibility Checker Pro with coupon code ', 'accessibility-checker' ) . 'GAAD2026.'; $message .= '' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '
'; } $message .= '