| @@ -81,15 +81,15 @@ | ||
| 81 | 81 | ), |
| 82 | 82 | 'utmKey' => 'summer_sale_meta', |
| 83 | 83 | ), |
| 84 | 84 | array( |
| 85 | - 'start' => '2026-08-02 00:00 Asia/Dhaka', | |
| 86 | - 'end' => '2026-08-16 23:59 Asia/Dhaka', | |
| 85 | + 'start' => '2026-09-02 00:00 Asia/Dhaka', | |
| 86 | + 'end' => '2026-10-10 23:59 Asia/Dhaka', | |
| 87 | 87 | 'text' => __( |
| 88 | - 'Summer Sale - Up to 50% OFF', | |
| 88 | + 'Get Pro at $39', | |
| 89 | 89 | 'ultimate-post' |
| 90 | 90 | ), |
| 91 | - 'utmKey' => 'summer_sale_meta', | |
| 91 | + 'utmKey' => 'base_price_meta', | |
| 92 | 92 | ), |
| 93 | 93 | ); |
| 94 | 94 | |
| 95 | 95 | $setting_link = array( |
| @@ -108,11 +108,13 @@ | ||
| 108 | 108 | $url = 'https://account.wpxpo.com/checkout/?edd_license_key=' . $license_key; |
| 109 | 109 | } else { |
| 110 | 110 | |
| 111 | 111 | $text = esc_html__( 'Upgrade to Pro', 'ultimate-post' ); |
| 112 | - $url = Xpo::generate_utm_link(array( | |
| 113 | - 'utmKey' => 'sub_menu', | |
| 114 | - )); | |
| 112 | + $url = Xpo::generate_utm_link( | |
| 113 | + array( | |
| 114 | + 'utmKey' => 'sub_menu', | |
| 115 | + ) | |
| 116 | + ); | |
| 115 | 117 | |
| 116 | 118 | foreach ( $offer_config as $offer ) { |
| 117 | 119 | $current_time = gmdate( 'U' ); |
| 118 | 120 | $notice_start = gmdate( 'U', strtotime( $offer['start'] ) ); |
| @@ -199,10 +201,10 @@ | ||
| 199 | 201 | $pro_link_text = ''; |
| 200 | 202 | |
| 201 | 203 | // Check if current date is between November 5th and December 10th |
| 202 | 204 | $current_date = current_time( 'Y-m-d' ); |
| 203 | - $start_date = date( 'Y' ) . '-01-01'; // January 1st of current year | |
| 204 | - $end_date = date( 'Y' ) . '-02-15'; // February 15th of current year | |
| 205 | + $start_date = gmdate( 'Y' ) . '-01-01'; // January 1st of current year | |
| 206 | + $end_date = gmdate( 'Y' ) . '-02-15'; // February 15th of current year | |
| 205 | 207 | $menu_pro_text_period = ( $current_date >= $start_date && $current_date <= $end_date ); |
| 206 | 208 | |
| 207 | 209 | if ( ! Xpo::is_lc_active() ) { |
| 208 | 210 | $pro_link = Xpo::generate_utm_link( |
| @@ -295,13 +297,14 @@ | ||
| 295 | 297 | public function handle_external_redirects() { |
| 296 | 298 | if (empty($_GET['page'])) { // @codingStandardsIgnoreLine |
| 297 | 299 | return; |
| 298 | 300 | } |
| 299 | - $_page = sanitize_key( $_GET['page'] ); | |
| 301 | + $_page = sanitize_key( $_GET['page'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only admin page slug. | |
| 300 | 302 | if ('ultp-startersites' === $_page) { // @codingStandardsIgnoreLine |
| 301 | - exit( wp_safe_redirect( admin_url( 'admin.php?page=ultp-settings#startersites' ) ) ); | |
| 303 | + wp_safe_redirect( admin_url( 'admin.php?page=ultp-settings#startersites' ) ); | |
| 304 | + exit; | |
| 302 | 305 | } else if ('go_postx_pro' === $_page) { // @codingStandardsIgnoreLine |
| 303 | - wp_redirect( | |
| 306 | + wp_redirect( // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- Intentional redirect to the fixed wpxpo.com pricing URL. | |
| 304 | 307 | Xpo::generate_utm_link( |
| 305 | 308 | array( |
| 306 | 309 | 'utmKey' => 'dashboard_go_pro', |
| 307 | 310 | ) |