|
39 | 39 | add_action( 'pledge_footer', __NAMESPACE__ . '\render_manage_link_request' );
|
40 | 40 | add_action( 'wp_footer', __NAMESPACE__ . '\render_js_templates' );
|
41 | 41 |
|
42 |
| -// Misc |
| 42 | +// Misc. |
43 | 43 | add_action( 'init', __NAMESPACE__ . '\schedule_cron_jobs' );
|
44 | 44 | add_action( '5ftf_send_update_reminders', __NAMESPACE__ . '\send_update_reminders' );
|
45 | 45 |
|
@@ -250,7 +250,7 @@ function action_success_message() {
|
250 | 250 | * @return array The filtered list of post display states.
|
251 | 251 | */
|
252 | 252 | function add_status_to_display( $post_states, $post ) {
|
253 |
| - $showing_status = $_REQUEST['post_status'] ?? $showing_status = ''; |
| 253 | + $showing_status = $_REQUEST['post_status'] ?? ''; |
254 | 254 |
|
255 | 255 | $status = DEACTIVE_STATUS;
|
256 | 256 | if ( $showing_status !== $status && $status === $post->post_status ) {
|
@@ -454,7 +454,7 @@ function filter_query( $query ) {
|
454 | 454 | break;
|
455 | 455 |
|
456 | 456 | default:
|
457 |
| - $date = date( 'YmdH' ); |
| 457 | + $date = gmdate( 'YmdH' ); |
458 | 458 | $query->set( 'orderby', "RAND($date)" );
|
459 | 459 | break;
|
460 | 460 | }
|
@@ -574,7 +574,7 @@ function schedule_cron_jobs() {
|
574 | 574 | /**
|
575 | 575 | * Periodically ask companies to review their pledge for accuracy.
|
576 | 576 | */
|
577 |
| -function send_update_reminders() : void { |
| 577 | +function send_update_reminders(): void { |
578 | 578 | $resend_interval = 6 * MONTH_IN_SECONDS;
|
579 | 579 | $resend_threshold = time() - ( $resend_interval );
|
580 | 580 | $deactivation_date = time() + ( 2 * MONTH_IN_SECONDS );
|
@@ -610,7 +610,7 @@ function send_update_reminders() : void {
|
610 | 610 | 'key' => '5ftf_inactive_deactivate_date',
|
611 | 611 | 'compare' => 'NOT EXISTS',
|
612 | 612 | ),
|
613 |
| - ) |
| 613 | + ), |
614 | 614 | ) );
|
615 | 615 |
|
616 | 616 | foreach ( $pledges as $pledge ) {
|
|
0 commit comments