• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 5066322038

pending completion
5066322038

push

github

GitHub
Merge pull request #20316 from Yoast/JRF/ghactions-run-more-selectively

2550 of 29012 relevant lines covered (8.79%)

0.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/integrations/admin/cron-integration.php
1
<?php
2

3
namespace Yoast\WP\SEO\Integrations\Admin;
4

5
use Yoast\WP\SEO\Conditionals\Admin_Conditional;
6
use Yoast\WP\SEO\Helpers\Date_Helper;
7
use Yoast\WP\SEO\Integrations\Integration_Interface;
8

9
/**
10
 * Cron_Integration class.
11
 */
12
class Cron_Integration implements Integration_Interface {
13

14
        /**
15
         * The indexing notification integration.
16
         *
17
         * @var Date_Helper
18
         */
19
        protected $date_helper;
20

21
        /**
22
         * {@inheritDoc}
23
         */
24
        public static function get_conditionals() {
25
                return [ Admin_Conditional::class ];
×
26
        }
27

28
        /**
29
         * Cron_Integration constructor
30
         *
31
         * @param Date_Helper $date_helper The date helper.
32
         */
33
        public function __construct(
34
                Date_Helper $date_helper
35
        ) {
36
                $this->date_helper = $date_helper;
×
37
        }
38

39
        /**
40
         * {@inheritDoc}
41
         */
42
        public function register_hooks() {
43
                if ( ! \wp_next_scheduled( Indexing_Notification_Integration::NOTIFICATION_ID ) ) {
×
44
                        \wp_schedule_event(
×
45
                                $this->date_helper->current_time(),
×
46
                                'daily',
×
47
                                Indexing_Notification_Integration::NOTIFICATION_ID
×
48
                        );
×
49
                }
50
        }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc