Submit
Path:
~
/
home
/
getwphos
/
public_html
/
ccma
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
integrations
/
watchers
/
File Content:
indexable-author-archive-watcher.php
<?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 ); } } } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
addon-update-watcher.php
7309 bytes
0644
auto-update-watcher.php
1530 bytes
0644
indexable-ancestor-watcher.php
8050 bytes
0644
indexable-attachment-watcher.php
4361 bytes
0644
indexable-author-archive-watcher.php
1804 bytes
0644
indexable-author-watcher.php
3233 bytes
0644
indexable-category-permalink-watcher.php
1780 bytes
0644
indexable-date-archive-watcher.php
2589 bytes
0644
indexable-home-page-watcher.php
3207 bytes
0644
indexable-homeurl-watcher.php
2824 bytes
0644
indexable-permalink-watcher.php
7940 bytes
0644
indexable-post-meta-watcher.php
2970 bytes
0644
indexable-post-type-archive-watcher.php
3702 bytes
0644
indexable-post-type-change-watcher.php
4732 bytes
0644
indexable-post-watcher.php
9622 bytes
0644
indexable-static-home-page-watcher.php
2253 bytes
0644
indexable-system-page-watcher.php
2707 bytes
0644
indexable-taxonomy-change-watcher.php
4788 bytes
0644
indexable-term-watcher.php
3394 bytes
0644
option-titles-watcher.php
3379 bytes
0644
option-wpseo-watcher.php
4751 bytes
0644
primary-category-quick-edit-watcher.php
5682 bytes
0644
primary-term-watcher.php
4486 bytes
0644
search-engines-discouraged-watcher.php
6764 bytes
0644
woocommerce-beta-editor-watcher.php
4251 bytes
0644
N4ST4R_ID | Naxtarrr