Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduces indexables verification cron #20470

Open
wants to merge 48 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
10b8949
Sets a timestamp whenever the plugin is deactivated.
thijsoo May 30, 2023
d0cfb1f
Start implementing cron system.
thijsoo May 31, 2023
4caadb2
Start implementing handling of the crons
thijsoo Jun 2, 2023
c6683bc
Start setup of non timestamp handling.
thijsoo Jun 5, 2023
2120c43
Progress on creating cron system.
thijsoo Jun 8, 2023
f597ee9
Progress on indexing.
thijsoo Jun 8, 2023
6fa5a94
Implement term verification.
thijsoo Jun 12, 2023
8d65697
Add batch size to command.
thijsoo Jun 13, 2023
ce1511f
Adds options to option list
thijsoo Jun 14, 2023
f3f8ef7
Finish implementation archive and general.
thijsoo Jun 14, 2023
08069ab
Progress on updating post indexables.
thijsoo Jun 15, 2023
bca7ecd
Make indexables update instead of insert by using the ORM to fetch th…
thijsoo Jun 19, 2023
bbf4fcb
Implement link builder.
thijsoo Jun 19, 2023
ea1d393
Lots 'o comments.
thijsoo Jun 19, 2023
ecaa0d9
CS.
thijsoo Jun 20, 2023
175998e
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/c…
thijsoo Jun 20, 2023
5727788
CS...
thijsoo Jun 21, 2023
c3a368a
More tests
thijsoo Jun 22, 2023
eff9831
Tests progress.
thijsoo Jun 27, 2023
593338f
More tests.
thijsoo Jun 28, 2023
0f7eb10
Update tests
thijsoo Jun 28, 2023
5762829
Tests
thijsoo Jun 29, 2023
0a08048
More tests
thijsoo Jun 29, 2023
541ad4d
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/c…
thijsoo Jun 30, 2023
e36272d
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/c…
thijsoo Oct 30, 2023
a825771
cs
thijsoo Oct 30, 2023
2545829
Remove unneeded deactivation tracking.
thijsoo Nov 1, 2023
375e767
Update scheduling mechanics
thijsoo Nov 2, 2023
82f7324
Add comment.
thijsoo Nov 3, 2023
52e6c52
Add batch size filters.
thijsoo Nov 3, 2023
49f252f
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/c…
thijsoo Nov 3, 2023
a22a22d
CS.
thijsoo Nov 13, 2023
449c46c
Initial run of some more CS and first feedback.
thijsoo Nov 14, 2023
bd4447e
Actually use exception as intended.
thijsoo Nov 15, 2023
dd1fa1e
Update src/indexables/infrastructure/actions/verify-term-indexables-a…
thijsoo Nov 15, 2023
577c340
Feedback.
thijsoo Nov 16, 2023
d5dc77f
Merge branch 'feature/cron-indexation-verification' of github.com:Yoa…
thijsoo Nov 16, 2023
f1dad56
Fix unit tests.
thijsoo Nov 16, 2023
c4037c4
Small fix in using the name of the post type instead of the object.
thijsoo Nov 16, 2023
b16f582
Add/update unit tests
thijsoo Dec 7, 2023
4a1bdbb
cs.
thijsoo Dec 11, 2023
d053abc
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/c…
thijsoo Dec 11, 2023
cf8749b
Add test for laptop transfer.
thijsoo Dec 12, 2023
1a50886
Adds integration tests.
thijsoo Dec 13, 2023
7ff3314
CS...
thijsoo Dec 13, 2023
d202f83
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/c…
thijsoo Jan 25, 2024
05c5ab6
CS
thijsoo Jan 25, 2024
af58d70
more CS
thijsoo Jan 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions admin/tracking/class-tracking-settings-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ class WPSEO_Tracking_Settings_Data implements WPSEO_Collection {
'deny_google_extended_crawling',
'deny_gptbot_crawling',
'last_known_no_unindexed',
'cron_verify_current_action',
'cron_verify_post_indexables_last_batch',
'cron_verify_non_timestamped_indexables_last_batch',
];

/**
Expand Down
232 changes: 121 additions & 111 deletions inc/options/class-wpseo-option-wpseo.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,124 +26,127 @@ class WPSEO_Option_Wpseo extends WPSEO_Option {
*/
protected $defaults = [
// Non-form fields, set via (ajax) function.
'tracking' => null,
'toggled_tracking' => false,
'license_server_version' => false,
'ms_defaults_set' => false,
'ignore_search_engines_discouraged_notice' => false,
'indexing_first_time' => true,
'indexing_started' => null,
'indexing_reason' => '',
'indexables_indexing_completed' => false,
'index_now_key' => '',
'tracking' => null,
'toggled_tracking' => false,
'license_server_version' => false,
'ms_defaults_set' => false,
'ignore_search_engines_discouraged_notice' => false,
'indexing_first_time' => true,
'indexing_started' => null,
'indexing_reason' => '',
'indexables_indexing_completed' => false,
'index_now_key' => '',
// Non-form field, should only be set via validation routine.
'version' => '', // Leave default as empty to ensure activation/upgrade works.
'previous_version' => '',
'version' => '', // Leave default as empty to ensure activation/upgrade works.
'previous_version' => '',
// Form fields.
'disableadvanced_meta' => true,
'enable_headless_rest_endpoints' => true,
'ryte_indexability' => false,
'baiduverify' => '', // Text field.
'googleverify' => '', // Text field.
'msverify' => '', // Text field.
'yandexverify' => '',
'site_type' => '', // List of options.
'has_multiple_authors' => '',
'environment_type' => '',
'content_analysis_active' => true,
'keyword_analysis_active' => true,
'inclusive_language_analysis_active' => false,
'enable_admin_bar_menu' => true,
'enable_cornerstone_content' => true,
'enable_xml_sitemap' => true,
'enable_text_link_counter' => true,
'enable_index_now' => true,
'enable_ai_generator' => true,
'ai_enabled_pre_default' => false,
'show_onboarding_notice' => false,
'first_activated_on' => false,
'myyoast-oauth' => [
'disableadvanced_meta' => true,
'enable_headless_rest_endpoints' => true,
'ryte_indexability' => false,
'baiduverify' => '', // Text field.
'googleverify' => '', // Text field.
'msverify' => '', // Text field.
'yandexverify' => '',
'site_type' => '', // List of options.
'has_multiple_authors' => '',
'environment_type' => '',
'content_analysis_active' => true,
'keyword_analysis_active' => true,
'inclusive_language_analysis_active' => false,
'enable_admin_bar_menu' => true,
'enable_cornerstone_content' => true,
'enable_xml_sitemap' => true,
'enable_text_link_counter' => true,
'enable_index_now' => true,
'enable_ai_generator' => true,
'ai_enabled_pre_default' => false,
'show_onboarding_notice' => false,
'first_activated_on' => false,
'myyoast-oauth' => [
'config' => [
'clientId' => null,
'secret' => null,
],
'access_tokens' => [],
],
'semrush_integration_active' => true,
'semrush_tokens' => [],
'semrush_country_code' => 'us',
'permalink_structure' => '',
'home_url' => '',
'dynamic_permalinks' => false,
'category_base_url' => '',
'tag_base_url' => '',
'custom_taxonomy_slugs' => [],
'enable_enhanced_slack_sharing' => true,
'zapier_integration_active' => false,
'zapier_subscription' => [],
'zapier_api_key' => '',
'enable_metabox_insights' => true,
'enable_link_suggestions' => true,
'algolia_integration_active' => false,
'import_cursors' => [],
'workouts_data' => [ 'configuration' => [ 'finishedSteps' => [] ] ],
'configuration_finished_steps' => [],
'dismiss_configuration_workout_notice' => false,
'dismiss_premium_deactivated_notice' => false,
'importing_completed' => [],
'wincher_integration_active' => true,
'wincher_tokens' => [],
'wincher_automatically_add_keyphrases' => false,
'wincher_website_id' => '',
'wordproof_integration_active' => false,
'wordproof_integration_changed' => false,
'first_time_install' => false,
'should_redirect_after_install_free' => false,
'activation_redirect_timestamp_free' => 0,
'remove_feed_global' => false,
'remove_feed_global_comments' => false,
'remove_feed_post_comments' => false,
'remove_feed_authors' => false,
'remove_feed_categories' => false,
'remove_feed_tags' => false,
'remove_feed_custom_taxonomies' => false,
'remove_feed_post_types' => false,
'remove_feed_search' => false,
'remove_atom_rdf_feeds' => false,
'remove_shortlinks' => false,
'remove_rest_api_links' => false,
'remove_rsd_wlw_links' => false,
'remove_oembed_links' => false,
'remove_generator' => false,
'remove_emoji_scripts' => false,
'remove_powered_by_header' => false,
'remove_pingback_header' => false,
'clean_campaign_tracking_urls' => false,
'clean_permalinks' => false,
'clean_permalinks_extra_variables' => '',
'search_cleanup' => false,
'search_cleanup_emoji' => false,
'search_cleanup_patterns' => false,
'search_character_limit' => 50,
'deny_search_crawling' => false,
'deny_wp_json_crawling' => false,
'deny_adsbot_crawling' => false,
'deny_ccbot_crawling' => false,
'deny_google_extended_crawling' => false,
'deny_gptbot_crawling' => false,
'redirect_search_pretty_urls' => false,
'least_readability_ignore_list' => [],
'least_seo_score_ignore_list' => [],
'most_linked_ignore_list' => [],
'least_linked_ignore_list' => [],
'indexables_page_reading_list' => [ false, false, false, false, false ],
'indexables_overview_state' => 'dashboard-not-visited',
'last_known_public_post_types' => [],
'last_known_public_taxonomies' => [],
'last_known_no_unindexed' => [],
'new_post_types' => [],
'new_taxonomies' => [],
'show_new_content_type_notification' => false,
'semrush_integration_active' => true,
'semrush_tokens' => [],
'semrush_country_code' => 'us',
'permalink_structure' => '',
'home_url' => '',
'dynamic_permalinks' => false,
'category_base_url' => '',
'tag_base_url' => '',
'custom_taxonomy_slugs' => [],
'enable_enhanced_slack_sharing' => true,
'zapier_integration_active' => false,
'zapier_subscription' => [],
'zapier_api_key' => '',
'enable_metabox_insights' => true,
'enable_link_suggestions' => true,
'algolia_integration_active' => false,
'import_cursors' => [],
'workouts_data' => [ 'configuration' => [ 'finishedSteps' => [] ] ],
'configuration_finished_steps' => [],
'dismiss_configuration_workout_notice' => false,
'dismiss_premium_deactivated_notice' => false,
'importing_completed' => [],
'wincher_integration_active' => true,
'wincher_tokens' => [],
'wincher_automatically_add_keyphrases' => false,
'wincher_website_id' => '',
'wordproof_integration_active' => false,
'wordproof_integration_changed' => false,
'first_time_install' => false,
'should_redirect_after_install_free' => false,
'activation_redirect_timestamp_free' => 0,
'remove_feed_global' => false,
'remove_feed_global_comments' => false,
'remove_feed_post_comments' => false,
'remove_feed_authors' => false,
'remove_feed_categories' => false,
'remove_feed_tags' => false,
'remove_feed_custom_taxonomies' => false,
'remove_feed_post_types' => false,
'remove_feed_search' => false,
'remove_atom_rdf_feeds' => false,
'remove_shortlinks' => false,
'remove_rest_api_links' => false,
'remove_rsd_wlw_links' => false,
'remove_oembed_links' => false,
'remove_generator' => false,
'remove_emoji_scripts' => false,
'remove_powered_by_header' => false,
'remove_pingback_header' => false,
'clean_campaign_tracking_urls' => false,
'clean_permalinks' => false,
'clean_permalinks_extra_variables' => '',
'search_cleanup' => false,
'search_cleanup_emoji' => false,
'search_cleanup_patterns' => false,
'search_character_limit' => 50,
'deny_search_crawling' => false,
'deny_wp_json_crawling' => false,
'deny_adsbot_crawling' => false,
'deny_ccbot_crawling' => false,
'deny_google_extended_crawling' => false,
'deny_gptbot_crawling' => false,
'redirect_search_pretty_urls' => false,
'least_readability_ignore_list' => [],
'least_seo_score_ignore_list' => [],
'most_linked_ignore_list' => [],
'least_linked_ignore_list' => [],
'indexables_page_reading_list' => [ false, false, false, false, false ],
'indexables_overview_state' => 'dashboard-not-visited',
'last_known_public_post_types' => [],
'last_known_public_taxonomies' => [],
'last_known_no_unindexed' => [],
'new_post_types' => [],
'new_taxonomies' => [],
'show_new_content_type_notification' => false,
'cron_verify_current_action' => 'term',
'cron_verify_post_indexables_last_batch' => 0,
'cron_verify_non_timestamped_indexables_last_batch' => 0,
];

/**
Expand Down Expand Up @@ -333,6 +336,7 @@ protected function validate_option( $dirty, $clean, $old ) {
case 'wincher_website_id':
case 'clean_permalinks_extra_variables':
case 'indexables_overview_state':
case 'cron_verify_current_action':
thijsoo marked this conversation as resolved.
Show resolved Hide resolved
if ( isset( $dirty[ $key ] ) ) {
$clean[ $key ] = $dirty[ $key ];
}
Expand Down Expand Up @@ -397,7 +401,13 @@ protected function validate_option( $dirty, $clean, $old ) {
}
}
break;

case 'cron_verify_post_indexables_last_batch':
case 'cron_verify_non_timestamped_indexables_last_batch':
$clean[ $key ] = 0;
if ( isset( $dirty[ $key ] ) && WPSEO_Utils::validate_int( $dirty[ $key ] ) ) {
$clean[ $key ] = $dirty[ $key ];
}
break;
case 'tracking':
$clean[ $key ] = ( isset( $dirty[ $key ] ) ? WPSEO_Utils::validate_bool( $dirty[ $key ] ) : null );
break;
Expand Down
Loading