File Editor
Directories:
.. (Back)
addon-installation
Files:
activation-cleanup-integration.php
admin-columns-cache-integration.php
background-indexing-integration.php
check-required-version.php
crawl-settings-integration.php
cron-integration.php
deactivated-premium-integration.php
first-time-configuration-integration.php
first-time-configuration-notice-integration.php
fix-news-dependencies-integration.php
health-check-integration.php
helpscout-beacon.php
import-integration.php
indexables-exclude-taxonomy-integration.php
indexing-notification-integration.php
indexing-tool-integration.php
installation-success-integration.php
integrations-page.php
link-count-columns-integration.php
menu-badge-integration.php
migration-error-integration.php
old-configuration-integration.php
redirect-integration.php
redirects-page-integration.php
unsupported-php-version-notice.php
workouts-integration.php
Create New File
Create
Edit File: cron-integration.php
<?php namespace Yoast\WP\SEO\Integrations\Admin; use Yoast\WP\SEO\Conditionals\Admin_Conditional; use Yoast\WP\SEO\Helpers\Date_Helper; use Yoast\WP\SEO\Integrations\Integration_Interface; /** * Cron_Integration class. */ class Cron_Integration implements Integration_Interface { /** * The indexing notification integration. * * @var Date_Helper */ protected $date_helper; /** * {@inheritDoc} */ public static function get_conditionals() { return [ Admin_Conditional::class ]; } /** * Cron_Integration constructor * * @param Date_Helper $date_helper The date helper. */ public function __construct( Date_Helper $date_helper ) { $this->date_helper = $date_helper; } /** * {@inheritDoc} */ public function register_hooks() { if ( ! \wp_next_scheduled( Indexing_Notification_Integration::NOTIFICATION_ID ) ) { \wp_schedule_event( $this->date_helper->current_time(), 'daily', Indexing_Notification_Integration::NOTIFICATION_ID ); } } }
Save Changes
Rename File
Rename