diff --git a/includes/class-admin.php b/includes/class-admin.php index bed29643..afbb7f6f 100644 --- a/includes/class-admin.php +++ b/includes/class-admin.php @@ -3656,9 +3656,13 @@ public function site_status_tests( $tests ) { 'test' => array( $this, 'friend_roles_test' ), ); $tests['direct']['friends-cron'] = array( - 'label' => __( 'Friend cron job is enabled', 'friends' ), + 'label' => __( 'Friends cron job is enabled', 'friends' ), 'test' => array( $this, 'friends_cron_test' ), ); + $tests['direct']['friends-delete-cron'] = array( + 'label' => __( 'Friends delete old posts cron job is enabled', 'friends' ), + 'test' => array( $this, 'friends_cron_delete_test' ), + ); return $tests; } @@ -3727,7 +3731,7 @@ public function friend_roles_test() { public function friends_cron_test() { $result = array( - 'label' => __( 'The friend cron job is enabled', 'friends' ), + 'label' => __( 'The refresh cron job is enabled', 'friends' ), 'status' => 'good', 'badge' => array( 'label' => __( 'Friends', 'friends' ), @@ -3739,9 +3743,8 @@ public function friends_cron_test() { '

', 'test' => 'friends-cron', ); - if ( ! wp_next_scheduled( 'cron_friends_refresh_feeds' ) ) { - $result['label'] = __( 'The friends cron job is not enabled', 'friends' ); + $result['label'] = __( 'The refresh cron job is not enabled', 'friends' ); $result['badge']['color'] = 'red'; $result['status'] = 'critical'; $result['description'] .= '

'; @@ -3755,10 +3758,28 @@ public function friends_cron_test() { $result['description'] .= '

'; } + return $result; + } + + public function friends_cron_delete_test() { + $result = array( + 'label' => __( 'The cron job to delete old posts is enabled', 'friends' ), + 'status' => 'good', + 'badge' => array( + 'label' => __( 'Friends', 'friends' ), + 'color' => 'green', + ), + 'description' => + '

' . + __( 'The Friends Plugin uses a cron job to delete old posts your friends.', 'friends' ) . + '

', + 'test' => 'friends-delete-cron', + ); + if ( ! wp_next_scheduled( 'cron_friends_delete_old_posts' ) ) { - $result['label'] = __( 'The friends delete old posts cron job is not enabled', 'friends' ); - $result['badge']['color'] = 'yellow'; - $result['status'] = 'warning'; + $result['label'] = __( 'The cron job to delete old posts is not enabled', 'friends' ); + $result['badge']['color'] = 'orange'; + $result['status'] = 'recommended'; $result['description'] .= '

'; $result['description'] .= wp_kses_post( sprintf(