PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wordpress-seo
/
src
/
integrations
/
watchers
<?php namespace Yoast\WP\SEO\Integrations\Watchers; use Yoast\WP\SEO\Conditionals\Migrations_Conditional; use Yoast\WP\SEO\Integrations\Cleanup_Integration; use Yoast\WP\SEO\Integrations\Integration_Interface; /** * Watches the `wpseo_titles` option for changes to the author archive settings. */ class Indexable_Author_Archive_Watcher implements Integration_Interface { /** * Check if the author archives are disabled whenever the `wpseo_titles` option * changes. * * @return void */ public function register_hooks() { \add_action( 'update_option_wpseo_titles', [ $this, 'reschedule_indexable_cleanup_when_author_archives_are_disabled' ], 10, 2 ); } /** * This watcher should only be run when the migrations have been run. * (Otherwise there may not be an indexable table to clean). * * @return string[] The conditionals. */ public static function get_conditionals() { return [ Migrations_Conditional::class ]; } /** * Reschedule the indexable cleanup routine if the author archives are disabled. * to make sure that all authors are removed from the indexables table. * * When author archives are disabled, they can never be indexed. * * @param array $old_value The old `wpseo_titles` option value. * @param array $new_value The new `wpseo_titles` option value. * * @return void */ public function reschedule_indexable_cleanup_when_author_archives_are_disabled( $old_value, $new_value ) { if ( $old_value['disable-author'] !== true && $new_value['disable-author'] === true ) { $cleanup_not_yet_scheduled = ! \wp_next_scheduled( Cleanup_Integration::START_HOOK ); if ( $cleanup_not_yet_scheduled ) { \wp_schedule_single_event( ( \time() + ( \MINUTE_IN_SECONDS * 5 ) ), Cleanup_Integration::START_HOOK ); } } } }
[-] primary-category-quick-edit-watcher.php
[edit]
[-] indexable-home-page-watcher.php
[edit]
[-] indexable-term-watcher.php
[edit]
[-] indexable-author-watcher.php
[edit]
[-] auto-update-watcher.php
[edit]
[-] option-titles-watcher.php
[edit]
[-] indexable-taxonomy-change-watcher.php
[edit]
[-] indexable-post-meta-watcher.php
[edit]
[-] indexable-permalink-watcher.php
[edit]
[-] indexable-post-type-archive-watcher.php
[edit]
[-] indexable-category-permalink-watcher.php
[edit]
[-] indexable-post-watcher.php
[edit]
[-] primary-term-watcher.php
[edit]
[-] option-wpseo-watcher.php
[edit]
[-] addon-update-watcher.php
[edit]
[-] indexable-system-page-watcher.php
[edit]
[-] indexable-author-archive-watcher.php
[edit]
[-] indexable-static-home-page-watcher.php
[edit]
[-] indexable-homeurl-watcher.php
[edit]
[-] indexable-ancestor-watcher.php
[edit]
[-] search-engines-discouraged-watcher.php
[edit]
[-] indexable-date-archive-watcher.php
[edit]
[+]
..
[-] indexable-post-type-change-watcher.php
[edit]