| @@ -201,10 +201,10 @@ | ||
| 201 | 201 | $pro_link_text = ''; |
| 202 | 202 | |
| 203 | 203 | // Check if current date is between November 5th and December 10th |
| 204 | 204 | $current_date = current_time( 'Y-m-d' ); |
| 205 | - $start_date = date( 'Y' ) . '-01-01'; // January 1st of current year | |
| 206 | - $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 | |
| 207 | 207 | $menu_pro_text_period = ( $current_date >= $start_date && $current_date <= $end_date ); |
| 208 | 208 | |
| 209 | 209 | if ( ! Xpo::is_lc_active() ) { |
| 210 | 210 | $pro_link = Xpo::generate_utm_link( |
| @@ -297,13 +297,14 @@ | ||
| 297 | 297 | public function handle_external_redirects() { |
| 298 | 298 | if (empty($_GET['page'])) { // @codingStandardsIgnoreLine |
| 299 | 299 | return; |
| 300 | 300 | } |
| 301 | - $_page = sanitize_key( $_GET['page'] ); | |
| 301 | + $_page = sanitize_key( $_GET['page'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only admin page slug. | |
| 302 | 302 | if ('ultp-startersites' === $_page) { // @codingStandardsIgnoreLine |
| 303 | - 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; | |
| 304 | 305 | } else if ('go_postx_pro' === $_page) { // @codingStandardsIgnoreLine |
| 305 | - wp_redirect( | |
| 306 | + wp_redirect( // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- Intentional redirect to the fixed wpxpo.com pricing URL. | |
| 306 | 307 | Xpo::generate_utm_link( |
| 307 | 308 | array( |
| 308 | 309 | 'utmKey' => 'dashboard_go_pro', |
| 309 | 310 | ) |