From d30e180e77e231e5f75dfaff6ae99870d3ebd2e6 Mon Sep 17 00:00:00 2001
From: Olivier Legat
Date: Tue, 21 Sep 2021 15:05:30 +0200
Subject: [PATCH] Yoast SEO update
---
.../admin/admin-settings-changed-listener.php | 85 +
.../plugins/wordpress-seo/admin/ajax.php | 143 +-
.../ajax/class-recalculate-scores-ajax.php | 121 -
.../admin/ajax/class-shortcode-filter.php | 19 +-
.../ajax/class-yoast-dismissable-notice.php | 29 +-
.../admin/ajax/class-yoast-onpage-ajax.php | 40 -
.../ajax/class-yoast-plugin-conflict-ajax.php | 24 +-
.../banner/class-admin-banner-renderer.php | 50 -
.../class-admin-banner-sidebar-renderer.php | 62 -
.../banner/class-admin-banner-sidebar.php | 348 --
.../class-admin-banner-spot-renderer.php | 39 -
.../admin/banner/class-admin-banner-spot.php | 120 -
.../admin/banner/class-admin-banner.php | 89 -
.../class-abstract-capability-manager.php | 13 +-
.../class-capability-manager-factory.php | 15 +-
.../class-capability-manager-integration.php | 52 +-
.../class-capability-manager-vip.php | 7 +-
.../class-capability-manager-wp.php | 1 +
.../capabilities/class-capability-manager.php | 1 +
.../capabilities/class-capability-utils.php | 48 +-
.../class-register-capabilities.php | 55 +-
...s-admin-asset-analysis-worker-location.php | 75 +
.../class-admin-asset-dev-server-location.php | 31 +-
.../admin/class-admin-asset-manager.php | 714 ++--
.../admin/class-admin-asset-seo-location.php | 55 +-
...lass-admin-asset-yoast-components-l10n.php | 63 +
...ass-admin-editor-specific-replace-vars.php | 227 +
...n-gutenberg-compatibility-notification.php | 105 +
.../admin/class-admin-help-panel.php | 22 +-
.../wordpress-seo/admin/class-admin-init.php | 683 ++-
.../class-admin-recommended-replace-vars.php | 205 +
.../admin/class-admin-user-profile.php | 19 +-
.../wordpress-seo/admin/class-admin-utils.php | 13 +-
.../wordpress-seo/admin/class-admin.php | 425 +-
.../wordpress-seo/admin/class-asset.php | 147 +-
...ass-bulk-description-editor-list-table.php | 19 +-
.../admin/class-bulk-editor-list-table.php | 380 +-
.../class-bulk-title-editor-list-table.php | 26 +-
.../wordpress-seo/admin/class-collector.php | 12 +-
.../wordpress-seo/admin/class-config.php | 160 +-
.../admin/class-cornerstone-field.php | 57 -
.../wordpress-seo/admin/class-cornerstone.php | 92 -
.../wordpress-seo/admin/class-customizer.php | 278 +-
.../admin/class-database-proxy.php | 171 +-
.../wordpress-seo/admin/class-export.php | 228 +-
.../admin/class-expose-shortlinks.php | 115 +
.../admin/class-extension-manager.php | 140 -
.../wordpress-seo/admin/class-extensions.php | 108 -
.../admin/class-gutenberg-compatibility.php | 107 +
.../admin/class-help-center-item.php | 96 -
.../wordpress-seo/admin/class-help-center.php | 272 --
.../wordpress-seo/admin/class-helpscout.php | 265 ++
.../admin/class-license-page-manager.php | 211 -
.../admin/class-meta-columns.php | 247 +-
.../admin/class-meta-storage.php | 111 -
.../admin/class-meta-table-accessible.php | 103 -
.../admin/class-my-yoast-proxy.php | 209 +
.../wordpress-seo/admin/class-option-tab.php | 31 +-
.../admin/class-option-tabs-formatter.php | 40 +-
.../wordpress-seo/admin/class-option-tabs.php | 42 +-
.../admin/class-paper-presenter.php | 141 +
.../admin/class-plugin-availability.php | 104 +-
.../admin/class-plugin-compatibility.php | 109 -
.../admin/class-plugin-conflict.php | 35 +-
.../admin/class-premium-popup.php | 39 +-
.../class-premium-upsell-admin-block.php | 102 +-
.../admin/class-primary-term-admin.php | 203 +-
.../admin/class-product-upsell-notice.php | 58 +-
.../admin/class-recalculate-scores.php | 54 -
.../admin/class-remote-request.php | 46 +-
...ass-schema-person-upgrade-notification.php | 76 +
.../admin/class-social-admin.php | 243 --
.../admin/class-suggested-plugins.php | 72 +-
.../admin/class-yoast-alerts.php | 260 --
.../admin/class-yoast-columns.php | 92 +-
.../admin/class-yoast-dashboard-widget.php | 68 +-
.../wordpress-seo/admin/class-yoast-form.php | 846 ++--
.../admin/class-yoast-input-validation.php | 326 ++
.../admin/class-yoast-network-admin.php | 324 ++
.../class-yoast-network-settings-api.php | 164 +
.../admin/class-yoast-notification-center.php | 557 ++-
.../admin/class-yoast-notification.php | 188 +-
.../admin/class-yoast-notifications.php | 376 ++
.../admin/class-yoast-plugin-conflict.php | 82 +-
.../class-configuration-components.php | 28 +-
.../class-configuration-endpoint.php | 70 +-
.../class-configuration-options-adapter.php | 82 +-
.../config-ui/class-configuration-page.php | 74 +-
.../config-ui/class-configuration-service.php | 70 +-
.../config-ui/class-configuration-storage.php | 63 +-
.../class-configuration-structure.php | 104 +-
.../class-configuration-translations.php | 25 +-
.../class-component-configuration-choices.php | 98 -
...omponent-connect-google-search-console.php | 151 -
.../class-component-mailchimp-signup.php | 19 +-
.../class-component-suggestions.php | 79 +-
.../components/interface-component.php | 11 +-
.../factories/class-factory-post-type.php | 20 +-
.../fields/class-field-choice-post-type.php | 18 +-
.../config-ui/fields/class-field-choice.php | 22 +-
.../class-field-company-info-missing.php | 28 +
.../fields/class-field-company-logo.php | 6 +-
.../fields/class-field-company-name.php | 7 +-
.../fields/class-field-company-or-person.php | 11 +-
.../class-field-configuration-choices.php | 43 -
...ss-field-connect-google-search-console.php | 30 -
.../fields/class-field-environment.php | 13 +-
...lass-field-google-search-console-intro.php | 37 -
.../fields/class-field-mailchimp-signup.php | 37 +-
.../fields/class-field-multiple-authors.php | 19 +-
...person-name.php => class-field-person.php} | 12 +-
.../class-field-post-type-visibility.php | 6 +-
.../class-field-profile-url-facebook.php | 6 +-
.../class-field-profile-url-googleplus.php | 31 -
.../class-field-profile-url-instagram.php | 6 +-
.../class-field-profile-url-linkedin.php | 6 +-
.../class-field-profile-url-myspace.php | 6 +-
.../class-field-profile-url-pinterest.php | 6 +-
.../class-field-profile-url-twitter.php | 6 +-
.../class-field-profile-url-wikipedia.php | 35 +
.../class-field-profile-url-youtube.php | 6 +-
.../fields/class-field-separator.php | 28 +-
.../fields/class-field-site-name.php | 12 +-
.../fields/class-field-site-type.php | 4 +-
.../class-field-social-profiles-intro.php | 33 -
.../fields/class-field-success-message.php | 23 +-
.../fields/class-field-suggestions.php | 21 +-
.../fields/class-field-title-intro.php | 8 +-
.../fields/class-field-tracking-intro.php | 25 +
.../config-ui/fields/class-field-tracking.php | 66 +
...ass-field-upsell-configuration-service.php | 45 -
.../fields/class-field-upsell-site-review.php | 38 -
.../admin/config-ui/fields/class-field.php | 61 +-
.../endpoints/class-endpoint-file-size.php | 85 +
.../endpoints/class-endpoint-statistics.php | 37 +-
.../exceptions/class-file-size-exception.php | 46 +
.../filters/class-abstract-post-filter.php | 41 +-
.../filters/class-cornerstone-filter.php | 74 +-
.../formatter/class-metabox-formatter.php | 305 +-
.../class-post-metabox-formatter.php | 152 +-
.../class-term-metabox-formatter.php | 137 +-
.../formatter/interface-metabox-formatter.php | 3 +-
.../google_search_console/class-gsc-ajax.php | 110 -
.../class-gsc-bulk-action.php | 98 -
.../class-gsc-category-filters.php | 201 -
.../class-gsc-config.php | 24 -
.../google_search_console/class-gsc-count.php | 229 -
.../google_search_console/class-gsc-issue.php | 91 -
.../class-gsc-issues.php | 177 -
.../class-gsc-mapper.php | 121 -
.../class-gsc-marker.php | 145 -
.../google_search_console/class-gsc-modal.php | 58 -
.../class-gsc-platform-tabs.php | 97 -
.../class-gsc-service.php | 195 -
.../class-gsc-settings.php | 104 -
.../google_search_console/class-gsc-table.php | 370 --
.../admin/google_search_console/class-gsc.php | 297 +-
.../views/gsc-display.php | 179 +-
.../views/gsc-redirect-nopremium.php | 2 +
.../admin/import/class-import-detector.php | 5 +-
.../admin/import/class-import-plugin.php | 7 +-
.../admin/import/class-import-settings.php | 200 +-
.../admin/import/class-import-status.php | 3 +-
.../class-abstract-plugin-importer.php | 88 +-
.../import/plugins/class-import-aioseo.php | 53 +-
...class-import-greg-high-performance-seo.php | 42 +
.../import/plugins/class-import-headspace.php | 31 +-
.../import/plugins/class-import-jetpack.php | 16 +-
.../class-import-platinum-seo-pack.php | 138 +
.../plugins/class-import-premium-seo-pack.php | 39 +
.../import/plugins/class-import-rankmath.php | 175 +
.../plugins/class-import-seo-framework.php | 94 +
.../plugins/class-import-seopressor.php | 54 +-
.../plugins/class-import-smartcrawl.php | 151 +
.../import/plugins/class-import-squirrly.php | 224 +
.../plugins/class-import-ultimate-seo.php | 42 +-
.../plugins/class-import-woothemes-seo.php | 34 +-
.../plugins/class-import-wp-meta-seo.php | 82 +
.../import/plugins/class-import-wpseo.php | 87 +-
.../admin/import/plugins/class-importers.php | 17 +-
.../admin/interface-collection.php | 1 -
.../links/class-link-cleanup-transient.php | 35 -
.../admin/links/class-link-column-count.php | 88 -
.../admin/links/class-link-columns.php | 255 --
.../class-link-compatibility-notifier.php | 58 -
.../links/class-link-content-processor.php | 135 -
.../admin/links/class-link-extractor.php | 48 -
.../admin/links/class-link-factory.php | 83 -
.../admin/links/class-link-filter.php | 57 -
.../admin/links/class-link-installer.php | 52 -
.../links/class-link-internal-lookup.php | 25 -
.../admin/links/class-link-notifier.php | 127 -
.../admin/links/class-link-query.php | 160 -
.../links/class-link-reindex-dashboard.php | 224 -
.../class-link-reindex-post-endpoint.php | 56 -
.../links/class-link-reindex-post-service.php | 95 -
.../admin/links/class-link-storage.php | 152 -
.../class-link-table-accessible-notifier.php | 56 -
.../links/class-link-table-accessible.php | 103 -
.../links/class-link-type-classifier.php | 95 -
.../admin/links/class-link-utils.php | 41 -
.../admin/links/class-link-watcher-loader.php | 25 -
.../admin/links/class-link-watcher.php | 121 -
.../wordpress-seo/admin/links/class-link.php | 64 -
.../admin/menu/class-admin-menu.php | 229 +-
.../admin/menu/class-base-menu.php | 281 ++
.../wordpress-seo/admin/menu/class-menu.php | 21 +-
.../admin/menu/class-network-admin-menu.php | 87 +-
.../admin/menu/class-replacevar-editor.php | 157 +
.../admin/menu/class-replacevar-field.php | 88 +
.../class-submenu-capability-normalize.php | 2 +-
.../class-abstract-sectioned-metabox-tab.php | 95 +
.../metabox/class-metabox-add-keyword-tab.php | 69 -
.../metabox/class-metabox-addon-section.php | 39 -
.../class-metabox-analysis-readability.php | 2 +-
.../metabox/class-metabox-analysis-seo.php | 2 +-
.../metabox/class-metabox-collapsible.php | 84 +
.../class-metabox-collapsibles-section.php | 63 +
.../admin/metabox/class-metabox-editor.php | 11 +-
.../admin/metabox/class-metabox-form-tab.php | 32 +-
.../admin/metabox/class-metabox-null-tab.php | 5 +-
.../class-metabox-section-additional.php | 109 +
.../metabox/class-metabox-section-react.php | 118 +
.../class-metabox-section-readability.php | 42 +
.../metabox/class-metabox-tab-section.php | 168 -
.../admin/metabox/class-metabox.php | 1175 +++---
.../metabox/interface-metabox-analysis.php | 2 +-
.../class-configuration-notifier.php | 30 +-
.../notifiers/dismissible-notification.php | 121 +
.../interface-notification-handler.php | 21 +
.../admin/onpage/class-onpage-option.php | 119 -
.../admin/onpage/class-onpage-request.php | 67 -
.../admin/onpage/class-onpage.php | 290 --
.../admin/onpage/class-ryte-service.php | 102 -
.../wordpress-seo/admin/pages/dashboard.php | 38 +-
.../wordpress-seo/admin/pages/licenses.php | 4 +-
.../wordpress-seo/admin/pages/metas.php | 72 +-
.../wordpress-seo/admin/pages/network.php | 147 +-
.../wordpress-seo/admin/pages/social.php | 14 +-
.../wordpress-seo/admin/pages/tools.php | 27 +-
.../recalculate/class-recalculate-posts.php | 151 -
.../recalculate/class-recalculate-terms.php | 151 -
.../admin/recalculate/class-recalculate.php | 103 -
.../roles/class-abstract-role-manager.php | 32 +-
.../admin/roles/class-register-roles.php | 3 +-
.../roles/class-role-manager-factory.php | 1 +
.../admin/roles/class-role-manager-vip.php | 9 +-
.../admin/roles/class-role-manager-wp.php | 3 +-
.../admin/roles/class-role-manager.php | 3 +-
.../admin/ryte/class-ryte-option.php | 160 +
.../admin/ryte/class-ryte-request.php | 107 +
.../wordpress-seo/admin/ryte/class-ryte.php | 230 +
.../admin/services/class-file-size.php | 106 +
.../class-statistics-integration.php | 12 +-
.../statistics/class-statistics-service.php | 79 +-
.../admin/taxonomy/class-taxonomy-columns.php | 32 +-
.../class-taxonomy-content-fields.php | 78 -
.../class-taxonomy-fields-presenter.php | 95 +-
.../admin/taxonomy/class-taxonomy-fields.php | 211 +-
.../admin/taxonomy/class-taxonomy-metabox.php | 376 +-
.../class-taxonomy-settings-fields.php | 108 -
.../taxonomy/class-taxonomy-social-fields.php | 143 -
.../admin/taxonomy/class-taxonomy.php | 219 +-
.../tracking/class-tracking-default-data.php | 20 +-
.../tracking/class-tracking-plugin-data.php | 23 +-
.../tracking/class-tracking-server-data.php | 30 +-
.../tracking/class-tracking-settings-data.php | 216 +
.../tracking/class-tracking-theme-data.php | 14 +-
.../admin/tracking/class-tracking.php | 201 +-
.../admin/views/class-view-utils.php | 122 +-
.../views/class-yoast-feature-toggle.php | 154 +
.../views/class-yoast-feature-toggles.php | 252 ++
.../admin/views/class-yoast-form-fieldset.php | 170 -
.../admin/views/class-yoast-input-select.php | 32 +-
.../views/class-yoast-integration-toggles.php | 170 +
.../admin/views/form/fieldset.php | 26 -
.../wordpress-seo/admin/views/form/select.php | 14 +-
.../admin/views/js-templates-primary-term.php | 40 +-
.../wordpress-seo/admin/views/licenses.php | 392 +-
.../admin/views/paper-collapsible.php | 79 +
.../admin/views/partial-alerts-errors.php | 22 -
.../admin/views/partial-alerts-template.php | 71 -
.../admin/views/partial-alerts-warnings.php | 22 -
.../views/partial-notifications-errors.php | 29 +
.../views/partial-notifications-template.php | 114 +
.../views/partial-notifications-warnings.php | 29 +
.../wordpress-seo/admin/views/sidebar.php | 78 +
.../admin/views/tabs/dashboard/dashboard.php | 37 +-
.../admin/views/tabs/dashboard/features.php | 158 +-
.../views/tabs/dashboard/integrations.php | 88 +
.../views/tabs/dashboard/site-analysis.php | 6 +-
.../views/tabs/dashboard/webmaster-tools.php | 26 +-
.../admin/views/tabs/metas/archives.php | 171 +-
.../admin/views/tabs/metas/archives/help.php | 35 +
.../admin/views/tabs/metas/breadcrumbs.php | 107 +-
.../admin/views/tabs/metas/general.php | 76 +-
.../metas/general/force-rewrite-title.php | 25 -
.../views/tabs/metas/general/homepage.php | 48 -
.../tabs/metas/general/knowledge-graph.php | 43 -
.../tabs/metas/general/title-separator.php | 25 -
.../admin/views/tabs/metas/media.php | 48 +-
.../paper-content/author-archive-settings.php | 98 +
.../paper-content/breadcrumbs-content.php | 115 +
.../paper-content/date-archives-settings.php | 69 +
.../paper-content/front-page-content.php | 65 +
.../general/force-rewrite-title.php | 17 +
.../metas/paper-content/general/homepage.php | 54 +
.../paper-content/general/knowledge-graph.php | 69 +
.../paper-content/general/title-separator.php | 15 +
.../metas/paper-content/media-content.php | 36 +
.../metas/paper-content/post-type-content.php | 106 +
.../paper-content/post_type/post-type.php | 71 +
.../post_type/woocommerce-shop-page.php | 24 +
.../tabs/metas/paper-content/rss-content.php | 54 +
.../metas/paper-content/special-pages.php | 27 +
.../metas/paper-content/taxonomy-content.php | 86 +
.../admin/views/tabs/metas/post-types.php | 88 +-
.../admin/views/tabs/metas/rss.php | 71 +-
.../admin/views/tabs/metas/taxonomies.php | 98 +-
.../tabs/metas/taxonomies/category-url.php | 28 +
.../admin/views/tabs/network/features.php | 66 +
.../admin/views/tabs/network/general.php | 56 +
.../admin/views/tabs/network/integrations.php | 68 +
.../admin/views/tabs/network/restore-site.php | 32 +
.../admin/views/tabs/social/accounts.php | 103 +-
.../admin/views/tabs/social/facebook.php | 74 +-
.../admin/views/tabs/social/google.php | 27 -
.../admin/views/tabs/social/pinterest.php | 10 +-
.../admin/views/tabs/social/twitterbox.php | 12 +-
.../admin/views/tabs/tool/import-seo.php | 41 +-
.../admin/views/tabs/tool/wpseo-export.php | 15 +-
.../admin/views/tabs/tool/wpseo-import.php | 37 +-
.../admin/views/tool-bulk-editor.php | 84 +-
.../admin/views/tool-file-editor.php | 53 +-
.../admin/views/tool-import-export.php | 108 +-
.../admin/views/user-profile.php | 28 +-
.../wordpress-seo/admin/views/workouts.php | 177 +
.../watchers/class-slug-change-watcher.php | 196 +-
.../css/dist/admin-global-1720-rtl.css | 1 +
.../css/dist/admin-global-1720.css | 1 +
.../css/dist/admin-global-720-rtl.min.css | 1 -
.../css/dist/admin-global-720.min.css | 1 -
.../css/dist/adminbar-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/adminbar-1720.css | 1 +
.../css/dist/adminbar-720-rtl.min.css | 1 -
.../css/dist/adminbar-720.min.css | 1 -
.../css/dist/alerts-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/alerts-1720.css | 1 +
.../css/dist/alerts-720-rtl.min.css | 1 -
.../wordpress-seo/css/dist/alerts-720.min.css | 1 -
...720-rtl.min.css => dashboard-1720-rtl.css} | 2 +-
...shboard-720.min.css => dashboard-1720.css} | 2 +-
.../css/dist/edit-page-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/edit-page-1720.css | 1 +
.../css/dist/edit-page-720-rtl.min.css | 1 -
.../css/dist/edit-page-720.min.css | 1 -
.../css/dist/elementor-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/elementor-1720.css | 1 +
...tl.min.css => featured-image-1720-rtl.css} | 0
...ge-720.min.css => featured-image-1720.css} | 0
.../css/dist/filter-explanation-1720-rtl.css | 1 +
.../css/dist/filter-explanation-1720.css | 1 +
.../dist/filter-explanation-720-rtl.min.css | 1 -
.../css/dist/filter-explanation-720.min.css | 1 -
.../wordpress-seo/css/dist/icons-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/icons-1720.css | 1 +
...rtl.min.css => inside-editor-1720-rtl.css} | 2 +-
...tor-720.min.css => inside-editor-1720.css} | 2 +-
.../css/dist/metabox-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/metabox-1720.css | 3 +
.../css/dist/metabox-720-rtl.min.css | 1 -
.../css/dist/metabox-720.min.css | 1 -
... => metabox-primary-category-1720-rtl.css} | 2 +-
....css => metabox-primary-category-1720.css} | 2 +-
.../wordpress-seo/css/dist/modal-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/modal-1720.css | 1 +
.../css/dist/monorepo-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/monorepo-1720.css | 1 +
.../css/dist/notifications-1720-rtl.css | 1 +
.../css/dist/notifications-1720.css | 1 +
.../css/dist/schema-blocks-1720-rtl.css | 1 +
.../css/dist/schema-blocks-1720.css | 1 +
.../css/dist/score_icon-1720-rtl.css | 1 +
.../css/dist/score_icon-1720.css | 1 +
.../css/dist/search-appearance-1720-rtl.css | 1 +
.../css/dist/search-appearance-1720.css | 1 +
.../css/dist/select2/select2-rtl.css | 1 +
.../css/dist/select2/select2.min.css | 2 +-
.../css/dist/snippet-720-rtl.min.css | 1 -
.../css/dist/snippet-720.min.css | 1 -
.../dist/structured-data-blocks-1720-rtl.css | 1 +
.../css/dist/structured-data-blocks-1720.css | 1 +
.../css/dist/toggle-switch-1720-rtl.css | 1 +
.../css/dist/toggle-switch-1720.css | 1 +
.../css/dist/toggle-switch-720-rtl.min.css | 1 -
.../css/dist/toggle-switch-720.min.css | 1 -
.../css/dist/workouts-1720-rtl.css | 1 +
.../wordpress-seo/css/dist/workouts-1720.css | 1 +
.../css/dist/wpseo-dismissible-1720-rtl.css | 1 +
.../css/dist/wpseo-dismissible-1720.css | 1 +
.../dist/wpseo-dismissible-720-rtl.min.css | 1 -
.../css/dist/wpseo-dismissible-720.min.css | 1 -
.../css/dist/yoast-components-1720-rtl.css | 1 +
.../css/dist/yoast-components-1720.css | 1 +
.../css/dist/yoast-components-720-rtl.min.css | 1 -
.../css/dist/yoast-components-720.min.css | 1 -
.../css/dist/yoast-extensions-1720-rtl.css | 1 +
.../css/dist/yoast-extensions-1720.css | 1 +
.../css/dist/yoast-extensions-720-rtl.min.css | 1 -
.../css/dist/yoast-extensions-720.min.css | 1 -
.../css/dist/yst_plugin_tools-1720-rtl.css | 1 +
.../css/dist/yst_plugin_tools-1720.css | 1 +
.../css/dist/yst_plugin_tools-720-rtl.min.css | 1 -
.../css/dist/yst_plugin_tools-720.min.css | 1 -
.../css/dist/yst_seo_score-1720-rtl.css | 1 +
.../css/dist/yst_seo_score-1720.css | 1 +
.../css/dist/yst_seo_score-720-rtl.min.css | 1 -
.../css/dist/yst_seo_score-720.min.css | 1 -
.../deprecated/class-submenu-hider.php | 39 -
.../class-wpseo-advanced-settings.php | 49 -
.../class-wpseo-option-internallinks.php | 117 -
.../class-wpseo-option-permalinks.php | 65 -
.../frontend/class-breadcrumbs.php | 905 ----
.../frontend/class-frontend-page-type.php | 43 -
.../wordpress-seo/frontend/class-frontend.php | 1845 --------
.../wordpress-seo/frontend/class-json-ld.php | 255 --
.../frontend/class-opengraph-image.php | 322 --
.../frontend/class-opengraph.php | 782 ----
.../frontend/class-primary-category.php | 71 -
.../frontend/class-remove-reply-to-com.php | 80 -
.../wordpress-seo/frontend/class-twitter.php | 653 ---
.../plugins/wordpress-seo/frontend/index.php | 4 -
.../images/Yoast_Academy_video.png | Bin 0 -> 74788 bytes
.../wordpress-seo/images/Yoast_SEO_Icon.svg | 1 -
.../images/Yoast_SEO_negative_icon.svg | 2 +-
.../wordpress-seo/images/alert-error-icon.svg | 1 +
.../wordpress-seo/images/alert-info-icon.svg | 1 +
.../images/alert-success-icon.svg | 1 +
.../images/alert-warning-icon.svg | 1 +
.../images/banner/basic-seo-training.png | Bin 29877 -> 0 bytes
.../images/banner/configuration-service.png | Bin 66399 -> 0 bytes
.../banner/keyword-research-training.png | Bin 31852 -> 0 bytes
.../banner/local-seo-for-woocommerce.png | Bin 38116 -> 0 bytes
.../wordpress-seo/images/banner/local-seo.png | Bin 27181 -> 0 bytes
.../wordpress-seo/images/banner/news-seo.png | Bin 67319 -> 0 bytes
.../images/banner/premium-seo.png | Bin 93692 -> 0 bytes
.../wordpress-seo/images/banner/seo-care.png | Bin 27542 -> 0 bytes
.../banner/seo-copywriting-training.png | Bin 31331 -> 0 bytes
.../images/banner/site-structure-training.png | Bin 31334 -> 0 bytes
.../images/banner/structured-data-course.png | Bin 38865 -> 0 bytes
.../images/banner/technical-seo-training.png | Bin 31467 -> 0 bytes
.../wordpress-seo/images/banner/video-seo.png | Bin 31339 -> 0 bytes
.../images/banner/website-review.png | Bin 28894 -> 0 bytes
.../images/banner/woocommerce-seo.png | Bin 31445 -> 0 bytes
.../yoast-seo-for-wordpress-training.png | Bin 24601 -> 0 bytes
.../images/brushstroke_background.svg | 1 +
.../plugins/wordpress-seo/images/editicon.png | Bin 509 -> 0 bytes
.../wordpress-seo/images/error-icon.svg | 1 +
.../extensions-local-for-woocommerce.png | Bin 7577 -> 0 bytes
.../wordpress-seo/images/extensions-local.png | Bin 8092 -> 0 bytes
.../wordpress-seo/images/extensions-news.png | Bin 4593 -> 0 bytes
.../images/extensions-premium-ribbon.png | Bin 12733 -> 0 bytes
.../wordpress-seo/images/extensions-video.png | Bin 10215 -> 0 bytes
.../wordpress-seo/images/extensions-woo.png | Bin 8332 -> 0 bytes
.../wordpress-seo/images/link-in-icon.svg | 2 +-
.../wordpress-seo/images/link-out-icon.svg | 2 +-
.../images/local_plugin_assistant.svg | 1 +
.../images/new-to-configuration-notice.svg | 2 +-
.../images/news_plugin_assistant.svg | 1 +
.../wordpress-seo/images/pinterest-23x30.png | Bin 1020 -> 0 bytes
.../wordpress-seo/images/readability-icon.svg | 2 +-
.../images/seo_fitness_assistants_fit.svg | 1 +
.../images/seo_fitness_assistants_unfit.svg | 1 +
...stale-cornerstone-content-in-yoast-seo.png | Bin 0 -> 24197 bytes
.../wordpress-seo/images/support-team.svg | 2 +-
.../images/video_plugin_assistant.svg | 1 +
.../plugins/wordpress-seo/images/waiting.gif | Bin 1815 -> 0 bytes
.../images/woo_plugin_assistant.svg | 1 +
.../images/yoast-configuration-icon.svg | 1 -
.../wordpress-seo/inc/class-addon-manager.php | 766 ++++
.../inc/class-my-yoast-api-request.php | 207 +
.../wordpress-seo/inc/class-post-type.php | 50 +-
.../wordpress-seo/inc/class-rewrite.php | 152 +-
.../inc/class-upgrade-history.php | 133 +
.../wordpress-seo/inc/class-upgrade.php | 993 ++++-
.../inc/class-wpseo-admin-bar-menu.php | 690 +++
.../inc/class-wpseo-content-images.php | 111 +
.../inc/class-wpseo-custom-fields.php | 67 +
.../inc/class-wpseo-custom-taxonomies.php | 72 +
.../inc/class-wpseo-features.php | 14 +-
.../inc/class-wpseo-image-utils.php | 484 +++
.../inc/class-wpseo-installation.php | 2 +-
.../wordpress-seo/inc/class-wpseo-meta.php | 853 ++--
.../inc/class-wpseo-primary-term.php | 16 +-
.../wordpress-seo/inc/class-wpseo-rank.php | 165 +-
.../inc/class-wpseo-replace-vars.php | 653 +--
.../inc/class-wpseo-replacement-variable.php | 76 +
.../inc/class-wpseo-shortlinker.php | 143 +-
.../inc/class-wpseo-statistics.php | 34 +-
.../wordpress-seo/inc/class-wpseo-utils.php | 1162 +++--
.../plugins/wordpress-seo/inc/date-helper.php | 61 +
.../class-myyoast-bad-request-exception.php | 13 +
.../class-myyoast-invalid-json-exception.php | 13 +
.../inc/health-check-curl-version.php | 137 +
.../inc/health-check-default-tagline.php | 66 +
...ealth-check-links-table-not-accessible.php | 70 +
.../inc/health-check-page-comments.php | 52 +
.../inc/health-check-postname-permalink.php | 59 +
.../wordpress-seo/inc/health-check-ryte.php | 259 ++
.../wordpress-seo/inc/health-check.php | 214 +
...rface-wpseo-wordpress-ajax-integration.php | 19 +
.../interface-wpseo-wordpress-integration.php | 6 +-
.../wordpress-seo/inc/language-utils.php | 33 +-
.../inc/options/class-wpseo-option-ms.php | 139 +-
.../inc/options/class-wpseo-option-social.php | 151 +-
.../inc/options/class-wpseo-option-titles.php | 667 +--
.../inc/options/class-wpseo-option-wpseo.php | 366 +-
.../inc/options/class-wpseo-option.php | 559 ++-
.../options/class-wpseo-options-backfill.php | 312 --
.../inc/options/class-wpseo-options.php | 375 +-
.../inc/options/class-wpseo-taxonomy-meta.php | 249 +-
.../class-author-sitemap-provider.php | 101 +-
.../class-post-type-sitemap-provider.php | 402 +-
.../inc/sitemaps/class-sitemap-cache-data.php | 45 +-
.../sitemaps/class-sitemap-image-parser.php | 138 +-
.../inc/sitemaps/class-sitemap-timezone.php | 121 -
.../inc/sitemaps/class-sitemaps-admin.php | 59 +-
.../class-sitemaps-cache-validator.php | 65 +-
.../inc/sitemaps/class-sitemaps-cache.php | 103 +-
.../inc/sitemaps/class-sitemaps-renderer.php | 95 +-
.../inc/sitemaps/class-sitemaps-router.php | 63 +-
.../inc/sitemaps/class-sitemaps.php | 252 +-
.../class-taxonomy-sitemap-provider.php | 152 +-
.../sitemaps/interface-sitemap-cache-data.php | 30 +-
.../sitemaps/interface-sitemap-provider.php | 4 +-
.../inc/wpseo-functions-deprecated.php | 32 +-
.../wordpress-seo/inc/wpseo-functions.php | 148 +-
.../inc/wpseo-non-ajax-functions.php | 424 +-
.../js/dist/addon-installation-1720.js | 5 +
.../js/dist/admin-global-1720.js | 1 +
.../js/dist/analysis-worker-1720.js | 1 +
.../wordpress-seo/js/dist/api-client-1720.js | 1 +
.../js/dist/block-editor-1720.js | 83 +
.../wordpress-seo/js/dist/bulk-editor-1720.js | 1 +
.../js/dist/classic-editor-1720.js | 83 +
.../wordpress-seo/js/dist/commons-720.min.js | 34 -
.../js/dist/configuration-wizard-1720.js | 5 +
.../js/dist/configuration-wizard-720.min.js | 24 -
.../js/dist/dashboard-widget-1720.js | 1 +
.../js/dist/dynamic-blocks-1720.js | 1 +
.../wordpress-seo/js/dist/edit-page-1720.js | 1 +
.../js/dist/editor-modules-1720.js | 19 +
.../wordpress-seo/js/dist/elementor-1720.js | 83 +
.../js/dist/externals/analysis-1720.js | 355 ++
.../js/dist/externals/analysisReport-1720.js | 1 +
.../js/dist/externals/components-1720.js | 3 +
.../js/dist/externals/componentsNew-1720.js | 6 +
.../externals/configurationWizard-1720.js | 5 +
.../js/dist/externals/draftJs-1720.js | 1 +
.../js/dist/externals/featureFlag-1720.js | 1 +
.../js/dist/externals/helpers-1720.js | 13 +
.../js/dist/externals/jed-1720.js | 1 +
.../js/dist/externals/propTypes-1720.js | 1 +
.../js/dist/externals/redux-1720.js | 1 +
.../replacementVariableEditor-1720.js | 1 +
.../js/dist/externals/schemaBlocks-1720.js | 19 +
.../externals/searchMetadataPreviews-1720.js | 2 +
.../externals/socialMetadataForms-1720.js | 1 +
.../js/dist/externals/styleGuide-1720.js | 1 +
.../dist/externals/styledComponents-1720.js | 1 +
.../js/dist/filter-explanation-1720.js | 1 +
.../js/dist/help-scout-beacon-1720.js | 1 +
.../wordpress-seo/js/dist/indexation-1720.js | 1 +
.../js/dist/languages/ar-1720.js | 1 +
.../js/dist/languages/ca-1720.js | 1 +
.../js/dist/languages/cs-1720.js | 1 +
.../js/dist/languages/de-1720.js | 1 +
.../js/dist/languages/default-1720.js | 1 +
.../js/dist/languages/en-1720.js | 1 +
.../js/dist/languages/es-1720.js | 1 +
.../js/dist/languages/fa-1720.js | 1 +
.../js/dist/languages/fr-1720.js | 1 +
.../js/dist/languages/he-1720.js | 1 +
.../js/dist/languages/hu-1720.js | 1 +
.../js/dist/languages/id-1720.js | 1 +
.../js/dist/languages/it-1720.js | 1 +
.../js/dist/languages/nb-1720.js | 1 +
.../js/dist/languages/nl-1720.js | 1 +
.../js/dist/languages/pl-1720.js | 1 +
.../js/dist/languages/pt-1720.js | 1 +
.../js/dist/languages/ru-1720.js | 1 +
.../js/dist/languages/sk-1720.js | 1 +
.../js/dist/languages/sv-1720.js | 1 +
.../js/dist/languages/tr-1720.js | 1 +
.../js/dist/network-admin-1720.js | 1 +
.../wordpress-seo/js/dist/post-edit-1720.js | 5 +
.../js/dist/quick-edit-handler-1720.js | 1 +
.../js/dist/react-select-1720.js | 1 +
.../js/dist/reindex-links-1720.js | 1 +
.../js/dist/schema-blocks-1720.js | 1 +
.../wordpress-seo/js/dist/select2/i18n/af.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ar.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/az.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/bg.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/bn.js | 3 +
.../wordpress-seo/js/dist/select2/i18n/bs.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ca.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/cs.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/da.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/de.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/dsb.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/el.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/en.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/es.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/et.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/eu.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/fa.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/fi.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/fr.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/gl.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/he.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/hi.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/hr.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/hsb.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/hu.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/hy.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/id.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/is.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/it.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ja.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ka.js | 3 +
.../wordpress-seo/js/dist/select2/i18n/km.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ko.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/lt.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/lv.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/mk.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ms.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/nb.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ne.js | 3 +
.../wordpress-seo/js/dist/select2/i18n/nl.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/pl.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ps.js | 4 +-
.../js/dist/select2/i18n/pt-BR.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/pt.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ro.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/ru.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/sk.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/sl.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/sq.js | 3 +
.../js/dist/select2/i18n/sr-Cyrl.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/sr.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/sv.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/th.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/tk.js | 3 +
.../wordpress-seo/js/dist/select2/i18n/tr.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/uk.js | 4 +-
.../wordpress-seo/js/dist/select2/i18n/vi.js | 4 +-
.../js/dist/select2/i18n/zh-CN.js | 4 +-
.../js/dist/select2/i18n/zh-TW.js | 4 +-
.../js/dist/select2/select2.full.min.js | 3 +-
.../wordpress-seo/js/dist/settings-1720.js | 10 +
.../js/dist/structured-data-blocks-1720.js | 9 +
.../wordpress-seo/js/dist/term-edit-1720.js | 1 +
.../js/dist/used-keywords-assessment-1720.js | 1 +
.../js/dist/wp-seo-admin-720.min.js | 1 -
.../js/dist/wp-seo-admin-global-720.min.js | 1 -
.../js/dist/wp-seo-admin-gsc-720.min.js | 1 -
.../js/dist/wp-seo-admin-media-720.min.js | 1 -
.../js/dist/wp-seo-api-720.min.js | 1 -
.../js/dist/wp-seo-babel-polyfill-720.min.js | 5 -
.../js/dist/wp-seo-bulk-editor-720.min.js | 1 -
.../dist/wp-seo-dashboard-widget-720.min.js | 1 -
.../js/dist/wp-seo-dismissible-720.min.js | 1 -
.../js/dist/wp-seo-edit-page-720.min.js | 1 -
.../js/dist/wp-seo-featured-image-720.min.js | 1 -
.../dist/wp-seo-filter-explanation-720.min.js | 1 -
.../js/dist/wp-seo-help-center-720.min.js | 13 -
.../js/dist/wp-seo-metabox-720.min.js | 1 -
.../dist/wp-seo-metabox-category-720.min.js | 1 -
.../js/dist/wp-seo-post-scraper-720.min.js | 30 -
.../dist/wp-seo-quick-edit-handler-720.min.js | 1 -
.../js/dist/wp-seo-recalculate-720.min.js | 40 -
.../js/dist/wp-seo-reindex-links-720.min.js | 1 -
.../dist/wp-seo-replacevar-plugin-720.min.js | 2 -
.../dist/wp-seo-shortcode-plugin-720.min.js | 1 -
.../js/dist/wp-seo-term-scraper-720.min.js | 30 -
.../plugins/wordpress-seo/languages/index.php | 4 -
.../languages/wordpress-seo-ar.json | 1 +
.../languages/wordpress-seo-bg_BG.json | 2 +-
.../languages/wordpress-seo-bs_BA.json | 1 +
.../languages/wordpress-seo-ca.json | 2 +-
.../languages/wordpress-seo-cs_CZ.json | 2 +-
.../languages/wordpress-seo-cy.json | 1 -
.../languages/wordpress-seo-da_DK.json | 2 +-
.../languages/wordpress-seo-de_CH.json | 1 -
.../languages/wordpress-seo-de_DE.json | 2 +-
.../languages/wordpress-seo-el.json | 2 +-
.../languages/wordpress-seo-en_AU.json | 2 +-
.../languages/wordpress-seo-en_CA.json | 2 +-
.../languages/wordpress-seo-en_GB.json | 2 +-
.../languages/wordpress-seo-en_NZ.json | 2 +-
.../languages/wordpress-seo-en_ZA.json | 1 +
.../languages/wordpress-seo-es_AR.json | 2 +-
.../languages/wordpress-seo-es_CL.json | 1 -
.../languages/wordpress-seo-es_CO.json | 1 +
.../languages/wordpress-seo-es_CR.json | 1 +
.../languages/wordpress-seo-es_EC.json | 1 +
.../languages/wordpress-seo-es_ES.json | 2 +-
.../languages/wordpress-seo-es_MX.json | 2 +-
.../languages/wordpress-seo-es_PE.json | 1 +
.../languages/wordpress-seo-es_VE.json | 2 +-
.../languages/wordpress-seo-eu.json | 1 -
.../languages/wordpress-seo-fa_IR.json | 2 +-
.../languages/wordpress-seo-fi.json | 2 +-
.../languages/wordpress-seo-fr_BE.json | 1 +
.../languages/wordpress-seo-fr_CA.json | 2 +-
.../languages/wordpress-seo-fr_FR.json | 2 +-
.../languages/wordpress-seo-gl_ES.json | 2 +-
.../languages/wordpress-seo-he_IL.json | 2 +-
.../languages/wordpress-seo-hi_IN.json | 1 +
.../languages/wordpress-seo-hr.json | 2 +-
.../languages/wordpress-seo-hu_HU.json | 2 +-
.../languages/wordpress-seo-id_ID.json | 2 +-
.../languages/wordpress-seo-it_IT.json | 2 +-
.../languages/wordpress-seo-ja.json | 2 +-
.../languages/wordpress-seo-ko_KR.json | 1 +
.../languages/wordpress-seo-lt_LT.json | 1 +
.../languages/wordpress-seo-nb_NO.json | 2 +-
.../languages/wordpress-seo-nl_BE.json | 2 +-
.../languages/wordpress-seo-nl_NL.json | 2 +-
.../languages/wordpress-seo-pl_PL.json | 2 +-
.../languages/wordpress-seo-pt_AO.json | 1 +
.../languages/wordpress-seo-pt_BR.json | 2 +-
.../languages/wordpress-seo-pt_PT.json | 2 +-
.../languages/wordpress-seo-ro_RO.json | 2 +-
.../languages/wordpress-seo-ru_RU.json | 2 +-
.../languages/wordpress-seo-sk_SK.json | 2 +-
.../languages/wordpress-seo-sq.json | 1 -
.../languages/wordpress-seo-sr_RS.json | 2 +-
.../languages/wordpress-seo-sv_SE.json | 2 +-
.../languages/wordpress-seo-tr_TR.json | 2 +-
.../languages/wordpress-seo-uk.json | 1 +
.../languages/wordpress-seo-vi.json | 1 +
.../languages/wordpress-seo-zh_CN.json | 2 +-
.../languages/wordpress-seo-zh_HK.json | 1 -
.../languages/wordpress-seo-zh_TW.json | 2 +-
.../languages/wordpress-seojs-ar.json | 1 +
.../languages/wordpress-seojs-bg_BG.json | 1 +
.../languages/wordpress-seojs-bs_BA.json | 1 +
.../languages/wordpress-seojs-ca.json | 1 +
.../languages/wordpress-seojs-cs_CZ.json | 1 +
.../languages/wordpress-seojs-da_DK.json | 1 +
.../languages/wordpress-seojs-de_DE.json | 1 +
.../languages/wordpress-seojs-el.json | 1 +
.../languages/wordpress-seojs-en_AU.json | 1 +
.../languages/wordpress-seojs-en_CA.json | 1 +
.../languages/wordpress-seojs-en_GB.json | 1 +
.../languages/wordpress-seojs-en_NZ.json | 1 +
.../languages/wordpress-seojs-en_ZA.json | 1 +
.../languages/wordpress-seojs-es_AR.json | 1 +
.../languages/wordpress-seojs-es_CO.json | 1 +
.../languages/wordpress-seojs-es_CR.json | 1 +
.../languages/wordpress-seojs-es_EC.json | 1 +
.../languages/wordpress-seojs-es_ES.json | 1 +
.../languages/wordpress-seojs-es_MX.json | 1 +
.../languages/wordpress-seojs-es_PE.json | 1 +
.../languages/wordpress-seojs-es_VE.json | 1 +
.../languages/wordpress-seojs-fa_IR.json | 1 +
.../languages/wordpress-seojs-fi.json | 1 +
.../languages/wordpress-seojs-fr_BE.json | 1 +
.../languages/wordpress-seojs-fr_CA.json | 1 +
.../languages/wordpress-seojs-fr_FR.json | 1 +
.../languages/wordpress-seojs-gl_ES.json | 1 +
.../languages/wordpress-seojs-he_IL.json | 1 +
.../languages/wordpress-seojs-hi_IN.json | 1 +
.../languages/wordpress-seojs-hr.json | 1 +
.../languages/wordpress-seojs-hu_HU.json | 1 +
.../languages/wordpress-seojs-id_ID.json | 1 +
.../languages/wordpress-seojs-it_IT.json | 1 +
.../languages/wordpress-seojs-ja.json | 1 +
.../languages/wordpress-seojs-ko_KR.json | 1 +
.../languages/wordpress-seojs-lt_LT.json | 1 +
.../languages/wordpress-seojs-nb_NO.json | 1 +
.../languages/wordpress-seojs-nl_BE.json | 1 +
.../languages/wordpress-seojs-nl_NL.json | 1 +
.../languages/wordpress-seojs-pl_PL.json | 1 +
.../languages/wordpress-seojs-pt_AO.json | 1 +
.../languages/wordpress-seojs-pt_BR.json | 1 +
.../languages/wordpress-seojs-pt_PT.json | 1 +
.../languages/wordpress-seojs-ro_RO.json | 1 +
.../languages/wordpress-seojs-ru_RU.json | 1 +
.../languages/wordpress-seojs-sk_SK.json | 1 +
.../languages/wordpress-seojs-sr_RS.json | 1 +
.../languages/wordpress-seojs-sv_SE.json | 1 +
.../languages/wordpress-seojs-tr_TR.json | 1 +
.../languages/wordpress-seojs-uk.json | 1 +
.../languages/wordpress-seojs-vi.json | 1 +
.../languages/wordpress-seojs-zh_CN.json | 1 +
.../languages/wordpress-seojs-zh_TW.json | 1 +
.../languages/wordpress-seojs.json | 1 +
.../languages/wordpress-seojs.php | 842 ++++
.../languages/yoast-components-ar.json | 1 +
.../languages/yoast-components-bg_BG.json | 2 +-
.../languages/yoast-components-bs_BA.json | 1 +
.../languages/yoast-components-ca.json | 2 +-
.../languages/yoast-components-cs_CZ.json | 2 +-
.../languages/yoast-components-da_DK.json | 2 +-
.../languages/yoast-components-de_CH.json | 1 -
.../languages/yoast-components-de_DE.json | 2 +-
.../languages/yoast-components-el.json | 2 +-
.../languages/yoast-components-en_AU.json | 2 +-
.../languages/yoast-components-en_CA.json | 2 +-
.../languages/yoast-components-en_GB.json | 2 +-
.../languages/yoast-components-en_NZ.json | 2 +-
.../languages/yoast-components-en_ZA.json | 1 +
.../languages/yoast-components-es_AR.json | 2 +-
.../languages/yoast-components-es_CL.json | 1 -
.../languages/yoast-components-es_CO.json | 1 +
.../languages/yoast-components-es_CR.json | 1 +
.../languages/yoast-components-es_EC.json | 1 +
.../languages/yoast-components-es_ES.json | 2 +-
.../languages/yoast-components-es_MX.json | 2 +-
.../languages/yoast-components-es_PE.json | 1 +
.../languages/yoast-components-es_VE.json | 2 +-
.../languages/yoast-components-eu.json | 1 -
.../languages/yoast-components-fa_IR.json | 2 +-
.../languages/yoast-components-fi.json | 2 +-
.../languages/yoast-components-fr_BE.json | 1 +
.../languages/yoast-components-fr_CA.json | 2 +-
.../languages/yoast-components-fr_FR.json | 2 +-
.../languages/yoast-components-gl_ES.json | 2 +-
.../languages/yoast-components-he_IL.json | 2 +-
.../languages/yoast-components-hi_IN.json | 1 +
.../languages/yoast-components-hr.json | 2 +-
.../languages/yoast-components-hu_HU.json | 2 +-
.../languages/yoast-components-id_ID.json | 2 +-
.../languages/yoast-components-it_IT.json | 2 +-
.../languages/yoast-components-ja.json | 2 +-
.../languages/yoast-components-ko_KR.json | 1 +
.../languages/yoast-components-lt_LT.json | 1 +
.../languages/yoast-components-nb_NO.json | 2 +-
.../languages/yoast-components-nl_BE.json | 2 +-
.../languages/yoast-components-nl_NL.json | 2 +-
.../languages/yoast-components-pl_PL.json | 2 +-
.../languages/yoast-components-pt_AO.json | 1 +
.../languages/yoast-components-pt_BR.json | 2 +-
.../languages/yoast-components-pt_PT.json | 2 +-
.../languages/yoast-components-ro_RO.json | 2 +-
.../languages/yoast-components-ru_RU.json | 2 +-
.../languages/yoast-components-sk_SK.json | 2 +-
.../languages/yoast-components-sq.json | 1 -
.../languages/yoast-components-sr_RS.json | 2 +-
.../languages/yoast-components-sv_SE.json | 2 +-
.../languages/yoast-components-tr_TR.json | 2 +-
.../languages/yoast-components-uk.json | 1 +
.../languages/yoast-components-vi.json | 1 +
.../languages/yoast-components-zh_CN.json | 2 +-
.../languages/yoast-components-zh_HK.json | 1 -
.../languages/yoast-components-zh_TW.json | 2 +-
.../languages/yoast-components.php | 287 +-
.../wordpress-seo/languages/yoast-seo-js.json | 2 +-
.../wordpress-seo/languages/yoast-seo-js.php | 589 +--
.../wordpress-seo/lib/abstract-main.php | 120 +
.../container-registry.php | 72 +
.../wordpress-seo/lib/migrations/adapter.php | 1072 +++++
.../wordpress-seo/lib/migrations/column.php | 101 +
.../lib/migrations/constants.php | 22 +
.../lib/migrations/migration.php | 277 ++
.../wordpress-seo/lib/migrations/table.php | 257 ++
.../plugins/wordpress-seo/lib/model.php | 721 ++++
wp-content/plugins/wordpress-seo/lib/orm.php | 2538 +++++++++++
.../packages/js/images/Yoast_SEO_Icon.svg | 1 +
.../packages/js/images/Yoast_icon_kader.svg | 1 +
.../packages/js/images/icon-facebook.svg | 1 +
.../packages/js/images/icon-twitter.svg | 1 +
.../packages/js/images/local_assistant.svg | 1 +
wp-content/plugins/wordpress-seo/readme.txt | 300 +-
.../addon-activate-action.php | 85 +
.../addon-install-action.php | 128 +
.../src/actions/alert-dismissal-action.php | 215 +
.../indexables/indexable-head-action.php | 171 +
.../indexing/abstract-indexing-action.php | 92 +
.../abstract-link-indexing-action.php | 110 +
.../indexable-general-indexation-action.php | 131 +
.../indexable-indexing-complete-action.php | 36 +
.../indexable-post-indexation-action.php | 206 +
...le-post-type-archive-indexation-action.php | 190 +
.../indexable-term-indexation-action.php | 163 +
.../indexing/indexation-action-interface.php | 34 +
.../indexing/indexing-complete-action.php | 36 +
.../indexing/indexing-prepare-action.php | 54 +
.../limited-indexing-action-interface.php | 20 +
.../indexing/post-link-indexing-action.php | 142 +
.../indexing/term-link-indexing-action.php | 128 +
.../actions/semrush/semrush-login-action.php | 60 +
.../semrush/semrush-options-action.php | 51 +
.../semrush/semrush-phrases-action.php | 97 +
.../src/builders/indexable-author-builder.php | 128 +
.../src/builders/indexable-builder.php | 321 ++
.../indexable-date-archive-builder.php | 50 +
.../builders/indexable-hierarchy-builder.php | 400 ++
.../builders/indexable-home-page-builder.php | 86 +
.../src/builders/indexable-link-builder.php | 482 +++
.../src/builders/indexable-post-builder.php | 402 ++
.../indexable-post-type-archive-builder.php | 85 +
.../builders/indexable-social-image-trait.php | 158 +
.../indexable-system-page-builder.php | 65 +
.../src/builders/indexable-term-builder.php | 202 +
.../src/builders/primary-term-builder.php | 96 +
.../src/commands/command-interface.php | 18 +
.../src/commands/index-command.php | 265 ++
.../addon-installation-conditional.php | 19 +
.../src/conditionals/admin-conditional.php | 18 +
...doing-post-quick-edit-save-conditional.php | 38 +
.../estimated-reading-time-conditional.php | 64 +
.../admin/licenses-page-conditional.php | 31 +
.../conditionals/admin/post-conditional.php | 32 +
.../posts-overview-or-ajax-conditional.php | 21 +
.../conditionals/conditional-interface.php | 16 +
.../conditionals/development-conditional.php | 20 +
.../conditionals/feature-flag-conditional.php | 37 +
.../conditionals/front-end-conditional.php | 18 +
.../conditionals/get-request-conditional.php | 22 +
...ess-rest-endpoints-enabled-conditional.php | 36 +
.../src/conditionals/jetpack-conditional.php | 19 +
.../conditionals/migrations-conditional.php | 36 +
.../src/conditionals/news-conditional.php | 18 +
.../conditionals/no-conditionals-trait.php | 18 +
.../no-tool-selected-conditional.php | 19 +
.../conditionals/open-graph-conditional.php | 36 +
.../premium-inactive-conditional.php | 18 +
.../primary-category-conditional.php | 42 +
.../schema-blocks-conditional.php | 19 +
.../semrush-enabled-conditional.php | 36 +
.../should-index-links-conditional.php | 43 +
.../the-events-calendar-conditional.php | 18 +
.../elementor-activated-conditional.php | 20 +
.../elementor-edit-conditional.php | 31 +
.../w3-total-cache-conditional.php | 24 +
.../third-party/wpml-conditional.php | 20 +
.../third-party/wpml-wpseo-conditional.php | 28 +
.../conditionals/web-stories-conditional.php | 18 +
.../conditionals/woocommerce-conditional.php | 18 +
.../conditionals/wp-robots-conditional.php | 18 +
.../src/conditionals/xmlrpc-conditional.php | 19 +
.../yoast-admin-and-dashboard-conditional.php | 50 +
.../yoast-tools-page-conditional.php | 28 +
.../src/config/badge-group-names.php | 62 +
.../src/config/indexing-reasons.php | 34 +
.../src/config/migration-status.php | 176 +
.../20171228151840_WpYoastIndexable.php | 360 ++
.../20171228151841_WpYoastPrimaryTerm.php | 100 +
..._WpYoastDropIndexableMetaTableIfExists.php | 45 +
...191011111109_WpYoastIndexableHierarchy.php | 79 +
.../20200408101900_AddCollationToTables.php | 49 +
.../20200420073606_AddColumnsToIndexables.php | 92 +
...23747_BreadcrumbTitleAndHierarchyReset.php | 60 +
...428194858_ExpandIndexableColumnLengths.php | 80 +
...20200429105310_TruncateIndexableTables.php | 52 +
...75614_AddIndexableObjectIdAndTypeIndex.php | 60 +
.../20200430150130_ClearIndexableTables.php | 52 +
...200507054848_DeleteDuplicateIndexables.php | 48 +
...513133401_ResetIndexableHierarchyTable.php | 42 +
.../20200609154515_AddHasAncestorsColumn.php | 49 +
...200616130143_ReplacePermalinkHashIndex.php | 126 +
.../20200617122511_CreateSEOLinksTable.php | 96 +
...702141921_CreateIndexableSubpagesIndex.php | 72 +
...ddIndexesForProminentWordsOnIndexables.php | 68 +
...20201202144329_AddEstimatedReadingTime.php | 58 +
...6124002_ExpandIndexableIDColumnLengths.php | 63 +
...41134_ExpandPrimaryTermIDColumnLengths.php | 62 +
.../src/config/researcher-languages.php | 10 +
.../wordpress-seo/src/config/schema-ids.php | 64 +
.../wordpress-seo/src/config/schema-types.php | 154 +
.../src/config/semrush-client.php | 269 ++
.../src/context/meta-tags-context.php | 609 +++
.../deprecated/admin/add-keyword-modal.php | 84 +
.../ajax/class-recalculate-scores-ajax.php | 63 +
.../admin/ajax/class-yoast-onpage-ajax.php | 41 +
.../admin/class-recalculate-scores.php | 47 +
.../deprecated/admin/class-social-admin.php | 105 +
.../admin/endpoints/class-endpoint-ryte.php | 50 +-
.../deprecated/admin/extension-manager.php | 93 +
.../deprecated/admin/extension.php} | 65 +-
.../src/deprecated/admin/extensions.php | 76 +
.../admin/keyword-synonyms-modal.php | 87 +
.../deprecated/admin/license-page-manager.php | 84 +
.../class-link-compatibility-notifier.php | 49 +
.../class-link-table-accessible-notifier.php | 49 +
.../admin/multiple-keywords-modal.php | 87 +
...post-type-archive-notification-handler.php | 45 +
.../admin/onpage/class-onpage-option.php | 29 +
.../admin/onpage/class-onpage-request.php | 30 +
.../deprecated/admin/onpage/class-onpage.php | 40 +
.../admin/onpage/class-ryte-service.php | 38 +
.../recalculate/class-recalculate-posts.php | 71 +
.../recalculate/class-recalculate-terms.php | 71 +
.../admin/recalculate/class-recalculate.php | 64 +
.../class-taxonomy-content-fields.php | 25 +
.../class-taxonomy-settings-fields.php | 25 +
.../taxonomy/class-taxonomy-social-fields.php | 25 +
...abstract-class-deprecated-schema-piece.php | 108 +
.../src/deprecated/frontend/breadcrumbs.php | 143 +
.../frontend/class-frontend-page-type.php | 85 +
.../deprecated/frontend/class-handle-404.php | 46 +
.../frontend/class-opengraph-image.php | 38 +
.../frontend/class-opengraph-oembed.php | 46 +
.../deprecated/frontend/class-opengraph.php | 285 ++
.../frontend/class-primary-category.php | 39 +
.../src/deprecated/frontend/class-twitter.php | 64 +
.../frontend/class-woocommerce-shop-page.php | 73 +-
.../src/deprecated/frontend/frontend.php | 276 ++
.../frontend/schema/class-schema-article.php | 54 +
.../frontend/schema/class-schema-author.php | 117 +
.../schema/class-schema-breadcrumb.php | 29 +
.../schema/class-schema-faq-question-list.php | 43 +
.../schema/class-schema-faq-questions.php | 68 +
.../frontend/schema/class-schema-faq.php | 80 +
.../frontend/schema/class-schema-howto.php | 227 +
.../frontend/schema/class-schema-ids.php | 70 +
.../frontend/schema/class-schema-image.php | 88 +
.../schema/class-schema-main-image.php | 79 +
.../schema/class-schema-organization.php | 29 +
.../frontend/schema/class-schema-person.php | 169 +
.../frontend/schema/class-schema-utils.php | 65 +
.../frontend/schema/class-schema-webpage.php | 69 +
.../frontend/schema/class-schema-website.php | 29 +
.../frontend/schema/class-schema.php | 52 +
.../schema/interface-wpseo-graph-piece.php | 31 +
.../deprecated/inc/class-wpseo-validator.php | 99 +
.../{ => src}/deprecated/index.php | 0
.../abstract-link-indexing-action.php | 13 +
.../indexable-complete-indexation-action.php | 15 +
.../indexable-general-indexation-action.php | 13 +
.../indexable-post-indexation-action.php | 13 +
...le-post-type-archive-indexation-action.php | 13 +
.../indexable-prepare-indexation-action.php | 13 +
.../indexable-term-indexation-action.php | 13 +
.../indexation-action-interface.php | 13 +
.../indexation/post-link-indexing-action.php | 13 +
.../indexation/term-link-indexing-action.php | 13 +
.../indexable-prepare-indexation-action.php | 13 +
.../farsi-support-conditional.php | 26 +
.../norwegian-readability-conditional.php | 26 +
.../admin/indexation-integration.php | 170 +
.../link-count-notification-integration.php | 85 +
.../admin/link-count-tools-integration.php | 116 +
.../integrations/third-party/elementor.php | 43 +
.../admin/indexation-list-item-presenter.php | 45 +
.../admin/indexation-modal-presenter.php | 40 +
...indexation-permalink-warning-presenter.php | 41 +
.../admin/indexation-warning-presenter.php | 77 +
...ink-count-indexing-list-item-presenter.php | 40 +
.../link-count-indexing-modal-presenter.php | 40 +
.../open-graph/fb-app-id-presenter.php | 40 +
.../addon-activation-error-exception.php | 10 +
.../addon-already-installed-exception.php | 10 +
.../addon-installation-error-exception.php | 10 +
...user-cannot-activate-plugins-exception.php | 10 +
.../user-cannot-install-plugins-exception.php | 10 +
.../indexable/indexable-exception.php | 12 +
.../indexable/invalid-term-exception.php | 26 +
.../indexable/post-not-found-exception.php | 18 +
.../exceptions/indexable/source-exception.php | 10 +
.../indexable/term-not-found-exception.php | 18 +
.../src/exceptions/missing-method.php | 30 +
.../oauth/authentication-failed-exception.php | 33 +
.../tokens/empty-property-exception.php | 20 +
.../semrush/tokens/empty-token-exception.php | 18 +
.../tokens/failed-storage-exception.php | 24 +
.../plugins/wordpress-seo/src/functions.php | 40 +
.../src/generated/assets/externals.php | 1 +
.../src/generated/assets/languages.php | 1 +
.../src/generated/assets/plugin.php | 1 +
.../wordpress-seo/src/generated/container.php | 3722 +++++++++++++++++
.../src/generators/breadcrumbs-generator.php | 388 ++
.../src/generators/generator-interface.php | 17 +
.../generators/open-graph-image-generator.php | 226 +
.../open-graph-locale-generator.php | 221 +
.../src/generators/schema-generator.php | 356 ++
.../schema/abstract-schema-piece.php | 40 +
.../src/generators/schema/article.php | 208 +
.../src/generators/schema/author.php | 113 +
.../src/generators/schema/breadcrumb.php | 169 +
.../src/generators/schema/faq.php | 113 +
.../src/generators/schema/howto.php | 178 +
.../src/generators/schema/main-image.php | 54 +
.../src/generators/schema/organization.php | 85 +
.../src/generators/schema/person.php | 301 ++
.../third-party/events-calendar-schema.php | 236 ++
.../src/generators/schema/webpage.php | 137 +
.../src/generators/schema/website.php | 99 +
.../generators/twitter-image-generator.php | 98 +
.../src/helpers/asset-helper.php | 98 +
.../src/helpers/author-archive-helper.php | 110 +
.../src/helpers/blocks-helper.php | 96 +
.../src/helpers/capability-helper.php | 86 +
.../src/helpers/current-page-helper.php | 480 +++
.../wordpress-seo/src/helpers/date-helper.php | 104 +
.../src/helpers/environment-helper.php | 27 +
.../src/helpers/home-url-helper.php | 49 +
.../src/helpers/image-helper.php | 369 ++
.../src/helpers/indexable-helper.php | 162 +
.../src/helpers/indexing-helper.php | 282 ++
.../src/helpers/input-helper.php | 22 +
.../src/helpers/language-helper.php | 56 +
.../wordpress-seo/src/helpers/meta-helper.php | 67 +
.../src/helpers/notification-helper.php | 25 +
.../src/helpers/open-graph/image-helper.php | 107 +
.../src/helpers/open-graph/values-helper.php | 85 +
.../src/helpers/options-helper.php | 118 +
.../src/helpers/pagination-helper.php | 130 +
.../src/helpers/permalink-helper.php | 46 +
.../wordpress-seo/src/helpers/post-helper.php | 207 +
.../src/helpers/post-type-helper.php | 130 +
.../src/helpers/primary-term-helper.php | 48 +
.../src/helpers/product-helper.php | 40 +
.../src/helpers/redirect-helper.php | 51 +
.../src/helpers/request-helper.php | 18 +
.../src/helpers/require-file-helper.php | 18 +
.../src/helpers/robots-helper.php | 27 +
.../src/helpers/schema/article-helper.php | 42 +
.../src/helpers/schema/html-helper.php | 49 +
.../src/helpers/schema/id-helper.php | 29 +
.../src/helpers/schema/image-helper.php | 193 +
.../src/helpers/schema/language-helper.php | 31 +
.../helpers/schema/replace-vars-helper.php | 133 +
.../src/helpers/short-link-helper.php | 153 +
.../wordpress-seo/src/helpers/site-helper.php | 28 +
.../src/helpers/string-helper.php | 45 +
.../src/helpers/taxonomy-helper.php | 117 +
.../src/helpers/twitter/image-helper.php | 56 +
.../wordpress-seo/src/helpers/url-helper.php | 216 +
.../wordpress-seo/src/helpers/user-helper.php | 109 +
.../src/helpers/woocommerce-helper.php | 52 +
.../src/helpers/wordpress-helper.php | 22 +
.../initializers/disable-core-sitemaps.php | 119 +
.../initializers/initializer-interface.php | 20 +
.../src/initializers/migration-runner.php | 171 +
.../abstract-exclude-post-type.php | 46 +
.../addon-installation/dialog-integration.php | 141 +
.../installation-integration.php | 189 +
.../admin/admin-columns-cache-integration.php | 271 ++
.../admin/background-indexing-integration.php | 185 +
.../integrations/admin/cron-integration.php | 51 +
...isable-concatenate-scripts-integration.php | 43 +
.../fix-news-dependencies-integration.php | 60 +
.../integrations/admin/helpscout-beacon.php | 351 ++
.../indexing-notification-integration.php | 276 ++
.../admin/indexing-tool-integration.php | 238 ++
.../admin/link-count-columns-integration.php | 252 ++
.../admin/menu-badge-integration.php | 38 +
.../admin/migration-error-integration.php | 58 +
.../admin/social-templates-integration.php | 262 ++
.../admin/workouts-integration.php | 100 +
.../alerts/abstract-dismissable-alert.php | 45 +
.../blocks/abstract-dynamic-block.php | 70 +
.../integrations/blocks/block-categories.php | 77 +
.../integrations/blocks/breadcrumbs-block.php | 124 +
.../blocks/structured-data-blocks.php | 59 +
.../integrations/breadcrumbs-integration.php | 80 +
.../src/integrations/cleanup-integration.php | 316 ++
.../duplicate-post-integration.php | 36 +
.../integrations/estimated-reading-time.php | 49 +
.../exclude-oembed-cache-post-type.php | 34 +
.../integrations/feature-flag-integration.php | 106 +
.../integrations/front-end-integration.php | 453 ++
.../front-end/backwards-compatibility.php | 72 +
.../front-end/category-term-description.php | 51 +
.../front-end/comment-link-fixer.php | 137 +
.../front-end/force-rewrite-title.php | 177 +
.../src/integrations/front-end/handle-404.php | 122 +
.../front-end/indexing-controls.php | 109 +
.../front-end/open-graph-oembed.php | 138 +
.../src/integrations/front-end/redirects.php | 179 +
.../front-end/rss-footer-embed.php | 197 +
.../schema-accessibility-feature.php | 80 +
.../integrations/front-end/theme-titles.php | 57 +
.../front-end/wp-robots-integration.php | 203 +
.../integrations/integration-interface.php | 22 +
.../src/integrations/primary-category.php | 73 +
.../src/integrations/schema-blocks.php | 164 +
.../src/integrations/third-party/amp.php | 61 +
.../src/integrations/third-party/bbpress.php | 62 +
.../integrations/third-party/elementor.php | 717 ++++
.../exclude-elementor-post-types.php | 36 +
.../exclude-woocommerce-post-types.php | 36 +
.../src/integrations/third-party/jetpack.php | 34 +
.../third-party/the-events-calendar.php | 48 +
.../third-party/w3-total-cache.php | 33 +
.../integrations/third-party/web-stories.php | 107 +
.../third-party/woocommerce-permalinks.php | 108 +
.../integrations/third-party/woocommerce.php | 366 ++
.../third-party/wpml-wpseo-notification.php | 120 +
.../src/integrations/third-party/wpml.php | 66 +
.../watchers/addon-update-watcher.php | 184 +
.../watchers/auto-update-watcher.php | 204 +
.../watchers/indexable-ancestor-watcher.php | 245 ++
.../watchers/indexable-author-watcher.php | 88 +
.../indexable-category-permalink-watcher.php | 53 +
.../indexable-date-archive-watcher.php | 94 +
.../watchers/indexable-home-page-watcher.php | 113 +
.../watchers/indexable-homeurl-watcher.php | 114 +
.../watchers/indexable-permalink-watcher.php | 291 ++
.../watchers/indexable-post-meta-watcher.php | 109 +
.../indexable-post-type-archive-watcher.php | 126 +
.../watchers/indexable-post-watcher.php | 291 ++
.../indexable-static-home-page-watcher.php | 91 +
.../indexable-system-page-watcher.php | 100 +
.../watchers/indexable-term-watcher.php | 135 +
.../watchers/option-titles-watcher.php | 128 +
.../watchers/option-wpseo-watcher.php | 47 +
.../primary-category-quick-edit-watcher.php | 191 +
.../watchers/primary-term-watcher.php | 144 +
.../wordpress-seo/src/integrations/xmlrpc.php | 48 +
.../wordpress-seo/src/loadable-interface.php | 16 +
.../plugins/wordpress-seo/src/loader.php | 237 ++
.../wordpress-seo/src/loggers/logger.php | 51 +
wp-content/plugins/wordpress-seo/src/main.php | 82 +
.../memoizers/meta-tags-context-memoizer.php | 171 +
.../src/memoizers/presentation-memoizer.php | 87 +
.../src/models/indexable-extension.php | 31 +
.../src/models/indexable-hierarchy.php | 28 +
.../wordpress-seo/src/models/indexable.php | 210 +
.../wordpress-seo/src/models/primary-term.php | 39 +
.../wordpress-seo/src/models/seo-links.php | 75 +
.../wordpress-seo/src/models/seo-meta.php | 43 +
.../presentations/abstract-presentation.php | 93 +
.../presentations/archive-adjacent-trait.php | 72 +
.../indexable-author-archive-presentation.php | 175 +
.../indexable-date-archive-presentation.php | 123 +
.../indexable-error-page-presentation.php | 37 +
.../indexable-home-page-presentation.php | 63 +
...dexable-post-type-archive-presentation.php | 72 +
.../indexable-post-type-presentation.php | 420 ++
.../presentations/indexable-presentation.php | 785 ++++
...exable-search-result-page-presentation.php | 71 +
...ndexable-static-home-page-presentation.php | 32 +
...dexable-static-posts-page-presentation.php | 51 +
.../indexable-term-archive-presentation.php | 217 +
.../abstract-indexable-presenter.php | 80 +
.../abstract-indexable-tag-presenter.php | 68 +
.../src/presenters/abstract-presenter.php | 25 +
.../src/presenters/admin/alert-presenter.php | 72 +
.../auto-update-notification-presenter.php | 53 +
.../src/presenters/admin/badge-presenter.php | 104 +
.../presenters/admin/help-link-presenter.php | 85 +
.../admin/indexing-error-presenter.php | 127 +
...indexing-failed-notification-presenter.php | 99 +
.../admin/indexing-list-item-presenter.php | 50 +
.../admin/indexing-notification-presenter.php | 138 +
.../admin/light-switch-presenter.php | 159 +
.../admin/meta-fields-presenter.php | 64 +
.../admin/migration-error-presenter.php | 71 +
.../admin/premium-badge-presenter.php | 60 +
.../src/presenters/bingbot-presenter.php | 66 +
.../src/presenters/breadcrumbs-presenter.php | 265 ++
.../src/presenters/canonical-presenter.php | 52 +
.../debug/marker-close-presenter.php | 41 +
.../debug/marker-open-presenter.php | 65 +
.../src/presenters/googlebot-presenter.php | 66 +
.../presenters/meta-description-presenter.php | 64 +
.../open-graph/article-author-presenter.php | 42 +
.../article-modified-time-presenter.php | 35 +
.../article-published-time-presenter.php | 36 +
.../article-publisher-presenter.php | 42 +
.../open-graph/description-presenter.php | 42 +
.../presenters/open-graph/image-presenter.php | 98 +
.../open-graph/locale-presenter.php | 42 +
.../open-graph/site-name-presenter.php | 42 +
.../presenters/open-graph/title-presenter.php | 44 +
.../presenters/open-graph/type-presenter.php | 42 +
.../presenters/open-graph/url-presenter.php | 49 +
.../src/presenters/rel-next-presenter.php | 73 +
.../src/presenters/rel-prev-presenter.php | 72 +
.../src/presenters/robots-presenter.php | 40 +
.../src/presenters/schema-presenter.php | 62 +
.../slack/enhanced-data-presenter.php | 65 +
.../src/presenters/title-presenter.php | 80 +
.../src/presenters/twitter/card-presenter.php | 35 +
.../presenters/twitter/creator-presenter.php | 27 +
.../twitter/description-presenter.php | 35 +
.../presenters/twitter/image-presenter.php | 42 +
.../src/presenters/twitter/site-presenter.php | 60 +
.../presenters/twitter/title-presenter.php | 35 +
.../src/presenters/url-list-presenter.php | 48 +
.../presenters/webmaster/baidu-presenter.php | 27 +
.../presenters/webmaster/bing-presenter.php | 27 +
.../presenters/webmaster/google-presenter.php | 27 +
.../webmaster/pinterest-presenter.php | 27 +
.../presenters/webmaster/yandex-presenter.php | 27 +
.../indexable-hierarchy-repository.php | 144 +
.../src/repositories/indexable-repository.php | 543 +++
.../repositories/primary-term-repository.php | 49 +
.../src/repositories/seo-links-repository.php | 144 +
.../src/repositories/seo-meta-repository.php | 35 +
.../src/routes/abstract-indexation-route.php | 50 +
.../src/routes/alert-dismissal-route.php | 104 +
.../src/routes/indexables-head-route.php | 102 +
.../src/routes/indexing-route.php | 431 ++
.../src/routes/route-interface.php | 18 +
.../src/routes/semrush-route.php | 248 ++
.../src/routes/supported-features-route.php | 59 +
.../src/routes/yoast-head-rest-field.php | 225 +
.../src/schema-templates/assets/icons.php | 306 ++
.../schema-templates/cooking-time.block.php | 15 +
.../schema-templates/cooking-time.schema.php | 3 +
.../src/schema-templates/image.schema.php | 10 +
.../preparation-time.block.php | 15 +
.../preparation-time.schema.php | 3 +
.../recipe-description.block.php | 15 +
.../recipe-description.schema.php | 5 +
.../recipe-ingredients.block.php | 15 +
.../recipe-ingredients.schema.php | 3 +
.../recipe-instructions.block.php | 16 +
.../recipe-instructions.schema.php | 3 +
.../schema-templates/recipe-name.block.php | 10 +
.../schema-templates/recipe-name.schema.php | 5 +
.../src/schema-templates/recipe.block.php | 40 +
.../src/schema-templates/recipe.schema.php | 20 +
.../src/surfaces/classes-surface.php | 33 +
.../src/surfaces/helpers-surface.php | 110 +
.../src/surfaces/meta-surface.php | 373 ++
.../surfaces/open-graph-helpers-surface.php | 45 +
.../src/surfaces/schema-helpers-surface.php | 60 +
.../src/surfaces/twitter-helpers-surface.php | 45 +
.../src/surfaces/values/meta.php | 287 ++
.../wordpress-seo/src/values/images.php | 151 +
.../src/values/open-graph/images.php | 56 +
.../src/values/semrush/semrush-token.php | 129 +
.../wordpress-seo/src/wordpress/wrapper.php | 64 +
.../src/wrappers/wp-query-wrapper.php | 46 +
.../src/wrappers/wp-remote-handler.php | 65 +
.../src/wrappers/wp-rewrite-wrapper.php | 20 +
.../plugins/wordpress-seo/vendor/autoload.php | 2 +-
.../wordpress-seo/vendor/autoload_52.php | 7 -
.../vendor/composer/ClassLoader.php | 4 +-
.../vendor/composer/ClassLoader52.php | 271 --
.../vendor/composer/autoload_classmap.php | 797 +++-
.../vendor/composer/autoload_files.php | 10 -
.../vendor/composer/autoload_namespaces.php | 1 -
.../vendor/composer/autoload_real.php | 26 +-
.../vendor/composer/autoload_real_52.php | 46 -
.../vendor/composer/autoload_static.php | 820 +++-
.../vendor/xrstf/composer-php52/LICENSE | 19 -
.../xrstf/Composer52/AutoloadGenerator.php | 346 --
.../lib/xrstf/Composer52/ClassLoader.php | 271 --
.../lib/xrstf/Composer52/Generator.php | 39 -
.../api-libs/class-api-google-client.php | 269 --
.../yoast/api-libs/class-api-google.php | 64 -
.../vendor/yoast/api-libs/class-api-libs.php | 49 -
.../yoast/api-libs/google/Google_Client.php | 457 --
.../auth/Google_AssertionCredentials.php | 103 -
.../api-libs/google/auth/Google_Auth.php | 33 -
.../api-libs/google/auth/Google_AuthNone.php | 48 -
.../google/auth/Google_LoginTicket.php | 63 -
.../api-libs/google/auth/Google_OAuth2.php | 451 --
.../api-libs/google/auth/Google_P12Signer.php | 70 -
.../google/auth/Google_PemVerifier.php | 66 -
.../api-libs/google/auth/Google_Signer.php | 28 -
.../api-libs/google/auth/Google_Verifier.php | 29 -
.../api-libs/google/cache/Google_Cache.php | 52 -
.../api-libs/google/cache/Google_WPCache.php | 53 -
.../vendor/yoast/api-libs/google/config.php | 83 -
.../google/external/URITemplateParser.php | 209 -
.../api-libs/google/io/Google_CacheParser.php | 173 -
.../api-libs/google/io/Google_CurlIO.php | 196 -
.../api-libs/google/io/Google_HttpRequest.php | 304 --
.../yoast/api-libs/google/io/Google_IO.php | 156 -
.../yoast/api-libs/google/io/Google_REST.php | 128 -
.../yoast/api-libs/google/io/Google_WPIO.php | 170 -
.../yoast/api-libs/google/io/cacerts.pem | 738 ----
.../google/service/Google_BatchRequest.php | 110 -
.../google/service/Google_MediaFileUpload.php | 262 --
.../api-libs/google/service/Google_Model.php | 115 -
.../google/service/Google_Service.php | 22 -
.../google/service/Google_ServiceResource.php | 205 -
.../api-libs/google/service/Google_Utils.php | 117 -
.../vendor/yoast/i18n-module/CHANGELOG.md | 10 +
.../src/{i18n-module.php => i18n-v3.php} | 94 +-
...dpressorg.php => i18n-wordpressorg-v3.php} | 17 +-
.../vendor/yoast/license-manager/CHANGELOG.md | 35 -
.../license-manager/class-api-request.php | 138 -
.../license-manager/class-license-manager.php | 781 ----
.../class-plugin-license-manager.php | 95 -
.../class-plugin-update-manager.php | 93 -
.../yoast/license-manager/class-product.php | 323 --
.../license-manager/class-update-manager.php | 224 -
.../vendor/yoast/license-manager/index.php | 2 -
.../yoast/license-manager/views/form.php | 102 -
.../yoast/license-manager/views/index.php | 2 -
.../yoast/license-manager/views/script.php | 67 -
.../vendor/yoast/whip/CHANGELOG.md | 34 -
.../wordpress-seo/vendor/yoast/whip/LICENSE | 21 -
.../vendor/yoast/whip/images/wp-message.png | Bin 276951 -> 0 bytes
.../vendor/yoast/whip/phpunit.xml | 13 -
.../yoast/whip/src/Whip_Configuration.php | 54 -
.../vendor/yoast/whip/src/Whip_Host.php | 88 -
.../yoast/whip/src/Whip_MessageDismisser.php | 45 -
.../yoast/whip/src/Whip_MessageFormatter.php | 37 -
.../yoast/whip/src/Whip_MessagesManager.php | 83 -
.../whip/src/Whip_RequirementsChecker.php | 148 -
.../whip/src/Whip_VersionRequirement.php | 133 -
.../yoast/whip/src/Whip_WPDismissOption.php | 36 -
.../src/Whip_WPMessageDismissListener.php | 51 -
.../vendor/yoast/whip/src/configs/default.php | 5 -
.../vendor/yoast/whip/src/configs/version.php | 3 -
.../src/exceptions/Whip_EmptyProperty.php | 10 -
.../exceptions/Whip_InvalidOperatorType.php | 22 -
.../whip/src/exceptions/Whip_InvalidType.php | 18 -
.../Whip_InvalidVersionComparisonString.php | 19 -
.../yoast/whip/src/facades/wordpress.php | 36 -
.../src/interfaces/Whip_DismissStorage.php | 24 -
.../whip/src/interfaces/Whip_Listener.php | 15 -
.../whip/src/interfaces/Whip_Message.php | 8 -
.../src/interfaces/Whip_MessagePresenter.php | 10 -
.../whip/src/interfaces/Whip_Requirement.php | 8 -
.../src/interfaces/Whip_VersionDetector.php | 21 -
.../whip/src/messages/Whip_BasicMessage.php | 42 -
.../whip/src/messages/Whip_HostMessage.php | 56 -
.../Whip_InvalidVersionRequirementMessage.php | 37 -
.../whip/src/messages/Whip_NullMessage.php | 13 -
.../src/messages/Whip_UpgradePhpMessage.php | 55 -
.../presenters/Whip_WPMessagePresenter.php | 83 -
.../yoast/whip/tests/ConfigurationTest.php | 62 -
.../yoast/whip/tests/MessageDismisserTest.php | 86 -
.../vendor/yoast/whip/tests/MessageTest.php | 23 -
.../yoast/whip/tests/MessagesManagerTest.php | 14 -
.../whip/tests/RequirementsCheckerTest.php | 144 -
.../whip/tests/VersionRequirementTest.php | 99 -
.../vendor/yoast/whip/tests/bootstrap.php | 5 -
.../guzzlehttp/guzzle/src/Client.php | 347 ++
.../guzzlehttp/guzzle/src/ClientInterface.php | 79 +
.../guzzle/src/Cookie/CookieJar.php | 245 ++
.../guzzle/src/Cookie/CookieJarInterface.php | 76 +
.../guzzle/src/Cookie/FileCookieJar.php | 83 +
.../guzzle/src/Cookie/SessionCookieJar.php | 66 +
.../guzzle/src/Cookie/SetCookie.php | 343 ++
.../src/Exception/BadResponseException.php | 19 +
.../guzzle/src/Exception/ClientException.php | 10 +
.../guzzle/src/Exception/ConnectException.php | 31 +
.../guzzle/src/Exception/GuzzleException.php | 16 +
.../guzzle/src/Exception/RequestException.php | 165 +
.../guzzle/src/Exception/SeekException.php | 25 +
.../guzzle/src/Exception/ServerException.php | 10 +
.../Exception/TooManyRedirectsException.php | 7 +
.../src/Exception/TransferException.php | 7 +
.../guzzle/src/Handler/CurlFactory.php | 425 ++
.../src/Handler/CurlFactoryInterface.php | 26 +
.../guzzle/src/Handler/CurlHandler.php | 39 +
.../guzzle/src/Handler/CurlMultiHandler.php | 160 +
.../guzzle/src/Handler/EasyHandle.php | 67 +
.../guzzle/src/Handler/MockHandler.php | 152 +
.../guzzlehttp/guzzle/src/Handler/Proxy.php | 46 +
.../guzzle/src/Handler/StreamHandler.php | 376 ++
.../guzzlehttp/guzzle/src/HandlerStack.php | 239 ++
.../guzzle/src/MessageFormatter.php | 151 +
.../guzzlehttp/guzzle/src/Middleware.php | 222 +
.../guzzlehttp/guzzle/src/Pool.php | 106 +
.../guzzle/src/PrepareBodyMiddleware.php | 86 +
.../guzzle/src/RedirectMiddleware.php | 160 +
.../guzzlehttp/guzzle/src/RequestOptions.php | 228 +
.../guzzlehttp/guzzle/src/RetryMiddleware.php | 84 +
.../guzzlehttp/guzzle/src/TransferStats.php | 110 +
.../guzzlehttp/guzzle/src/UriTemplate.php | 191 +
.../guzzlehttp/guzzle/src/functions.php | 294 ++
.../guzzle/src/functions_include.php | 8 +
.../promises/src/AggregateException.php | 14 +
.../promises/src/CancellationException.php | 10 +
.../guzzlehttp/promises/src/Coroutine.php | 135 +
.../guzzlehttp/promises/src/EachPromise.php | 190 +
.../promises/src/FulfilledPromise.php | 69 +
.../guzzlehttp/promises/src/Promise.php | 231 +
.../promises/src/PromiseInterface.php | 84 +
.../promises/src/PromisorInterface.php | 16 +
.../promises/src/RejectedPromise.php | 74 +
.../promises/src/RejectionException.php | 40 +
.../guzzlehttp/promises/src/TaskQueue.php | 62 +
.../promises/src/TaskQueueInterface.php | 24 +
.../guzzlehttp/promises/src/functions.php | 387 ++
.../promises/src/functions_include.php | 8 +
.../guzzlehttp/psr7/src/AppendStream.php | 202 +
.../guzzlehttp/psr7/src/BufferStream.php | 115 +
.../guzzlehttp/psr7/src/CachingStream.php | 115 +
.../guzzlehttp/psr7/src/DroppingStream.php | 36 +
.../guzzlehttp/psr7/src/FnStream.php | 132 +
.../guzzlehttp/psr7/src/InflateStream.php | 48 +
.../guzzlehttp/psr7/src/LazyOpenStream.php | 35 +
.../guzzlehttp/psr7/src/LimitStream.php | 128 +
.../guzzlehttp/psr7/src/MessageTrait.php | 150 +
.../guzzlehttp/psr7/src/MultipartStream.php | 123 +
.../guzzlehttp/psr7/src/NoSeekStream.php | 20 +
.../guzzlehttp/psr7/src/PumpStream.php | 140 +
.../guzzlehttp/psr7/src/Request.php | 112 +
.../guzzlehttp/psr7/src/Response.php | 61 +
.../guzzlehttp/psr7/src/Rfc7230.php | 18 +
.../guzzlehttp/psr7/src/ServerRequest.php | 302 ++
.../guzzlehttp/psr7/src/Stream.php | 212 +
.../psr7/src/StreamDecoratorTrait.php | 128 +
.../guzzlehttp/psr7/src/StreamWrapper.php | 102 +
.../guzzlehttp/psr7/src/UploadedFile.php | 244 ++
.../guzzlehttp/psr7/src/Uri.php | 584 +++
.../guzzlehttp/psr7/src/UriNormalizer.php | 179 +
.../guzzlehttp/psr7/src/UriResolver.php | 190 +
.../guzzlehttp/psr7/src/functions.php | 657 +++
.../guzzlehttp/psr7/src/functions_include.php | 8 +
.../oauth2-client/src/Grant/AbstractGrant.php | 72 +
.../src/Grant/AuthorizationCode.php | 38 +
.../src/Grant/ClientCredentials.php | 38 +
.../Grant/Exception/InvalidGrantException.php | 25 +
.../oauth2-client/src/Grant/GrantFactory.php | 91 +
.../oauth2-client/src/Grant/Password.php | 38 +
.../oauth2-client/src/Grant/RefreshToken.php | 38 +
.../HttpBasicAuthOptionProvider.php | 38 +
.../OptionProviderInterface.php | 30 +
.../OptionProvider/PostAuthOptionProvider.php | 46 +
.../src/Provider/AbstractProvider.php | 709 ++++
.../Exception/IdentityProviderException.php | 45 +
.../src/Provider/GenericProvider.php | 190 +
.../src/Provider/GenericResourceOwner.php | 57 +
.../src/Provider/ResourceOwnerInterface.php | 35 +
.../oauth2-client/src/Token/AccessToken.php | 174 +
.../src/Token/AccessTokenInterface.php | 65 +
.../ResourceOwnerAccessTokenInterface.php | 25 +
.../src/Tool/ArrayAccessorTrait.php | 47 +
.../src/Tool/BearerAuthorizationTrait.php | 35 +
.../src/Tool/GuardedPropertyTrait.php | 66 +
.../src/Tool/MacAuthorizationTrait.php | 76 +
.../src/Tool/ProviderRedirectTrait.php | 105 +
.../src/Tool/QueryBuilderTrait.php | 33 +
.../oauth2-client/src/Tool/RequestFactory.php | 67 +
.../src/Tool/RequiredParameterTrait.php | 51 +
.../src/ContainerExceptionInterface.php | 13 +
.../psr/container/src/ContainerInterface.php | 36 +
.../src/NotFoundExceptionInterface.php | 13 +
.../psr/http-message/src/MessageInterface.php | 177 +
.../psr/http-message/src/RequestInterface.php | 124 +
.../http-message/src/ResponseInterface.php | 66 +
.../src/ServerRequestInterface.php | 249 ++
.../psr/http-message/src/StreamInterface.php | 144 +
.../src/UploadedFileInterface.php | 118 +
.../psr/http-message/src/UriInterface.php | 309 ++
.../psr/log/Psr/Log/AbstractLogger.php | 121 +
.../log/Psr/Log/InvalidArgumentException.php | 7 +
.../psr/log/Psr/Log/LogLevel.php | 18 +
.../psr/log/Psr/Log/LoggerAwareInterface.php | 18 +
.../psr/log/Psr/Log/LoggerAwareTrait.php | 25 +
.../psr/log/Psr/Log/LoggerInterface.php | 115 +
.../psr/log/Psr/Log/LoggerTrait.php | 132 +
.../psr/log/Psr/Log/NullLogger.php | 28 +
.../Argument/RewindableGenerator.php | 40 +
.../dependency-injection/Container.php | 465 ++
.../ContainerInterface.php | 91 +
.../Exception/EnvNotFoundException.php | 24 +
.../Exception/ExceptionInterface.php | 22 +
.../Exception/InvalidArgumentException.php | 20 +
.../Exception/LogicException.php | 18 +
.../ParameterCircularReferenceException.php | 30 +
.../Exception/RuntimeException.php | 20 +
.../ServiceCircularReferenceException.php | 36 +
.../Exception/ServiceNotFoundException.php | 58 +
.../EnvPlaceholderParameterBag.php | 108 +
.../ParameterBag/FrozenParameterBag.php | 62 +
.../ParameterBag/ParameterBag.php | 263 ++
.../ParameterBag/ParameterBagInterface.php | 103 +
.../ResettableContainerInterface.php | 30 +
.../plugins/wordpress-seo/wp-seo-main.php | 312 +-
wp-content/plugins/wordpress-seo/wp-seo.php | 9 +-
.../plugins/wordpress-seo/wpml-config.xml | 1 -
1569 files changed, 96960 insertions(+), 36354 deletions(-)
create mode 100644 wp-content/plugins/wordpress-seo/admin/admin-settings-changed-listener.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/ajax/class-recalculate-scores-ajax.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-onpage-ajax.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-renderer.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar-renderer.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot-renderer.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-admin-asset-analysis-worker-location.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-admin-asset-yoast-components-l10n.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-admin-editor-specific-replace-vars.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-admin-gutenberg-compatibility-notification.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-admin-recommended-replace-vars.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-cornerstone-field.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-cornerstone.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-expose-shortlinks.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-extension-manager.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-extensions.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-gutenberg-compatibility.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-help-center-item.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-help-center.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-helpscout.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-license-page-manager.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-meta-storage.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-meta-table-accessible.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-paper-presenter.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-plugin-compatibility.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-recalculate-scores.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-schema-person-upgrade-notification.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-social-admin.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/class-yoast-alerts.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-yoast-input-validation.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-yoast-network-admin.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-yoast-network-settings-api.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/class-yoast-notifications.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-configuration-choices.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-connect-google-search-console.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-info-missing.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-configuration-choices.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-connect-google-search-console.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-google-search-console-intro.php
rename wp-content/plugins/wordpress-seo/admin/config-ui/fields/{class-field-person-name.php => class-field-person.php} (54%)
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-googleplus.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-wikipedia.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-social-profiles-intro.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-tracking-intro.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-tracking.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-upsell-configuration-service.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-upsell-site-review.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-file-size.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/exceptions/class-file-size-exception.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-ajax.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-bulk-action.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-category-filters.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-config.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-count.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-issue.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-issues.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-mapper.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-marker.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-modal.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-platform-tabs.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-service.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-settings.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc-table.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-greg-high-performance-seo.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-platinum-seo-pack.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-premium-seo-pack.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-rankmath.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-seo-framework.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-smartcrawl.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-squirrly.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-wp-meta-seo.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-cleanup-transient.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-column-count.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-columns.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-compatibility-notifier.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-content-processor.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-extractor.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-factory.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-filter.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-installer.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-internal-lookup.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-notifier.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-query.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-reindex-dashboard.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-reindex-post-endpoint.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-reindex-post-service.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-storage.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-table-accessible-notifier.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-table-accessible.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-type-classifier.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-utils.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-watcher-loader.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link-watcher.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/links/class-link.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/menu/class-base-menu.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/menu/class-replacevar-editor.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/menu/class-replacevar-field.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-abstract-sectioned-metabox-tab.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-add-keyword-tab.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-addon-section.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-collapsible.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-collapsibles-section.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-additional.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-react.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-readability.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-tab-section.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/notifiers/dismissible-notification.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/notifiers/interface-notification-handler.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/onpage/class-onpage-option.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/onpage/class-onpage-request.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/onpage/class-onpage.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/onpage/class-ryte-service.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate-posts.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate-terms.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/recalculate/class-recalculate.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/ryte/class-ryte-option.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/ryte/class-ryte-request.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/ryte/class-ryte.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/services/class-file-size.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-content-fields.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-settings-fields.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-social-fields.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-settings-data.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/class-yoast-feature-toggle.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/class-yoast-feature-toggles.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/class-yoast-form-fieldset.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/class-yoast-integration-toggles.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/form/fieldset.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/paper-collapsible.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/partial-alerts-errors.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/partial-alerts-template.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/partial-alerts-warnings.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/partial-notifications-errors.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/partial-notifications-template.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/partial-notifications-warnings.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/sidebar.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/dashboard/integrations.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/archives/help.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/general/force-rewrite-title.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/general/homepage.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/general/knowledge-graph.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/general/title-separator.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/author-archive-settings.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/breadcrumbs-content.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/date-archives-settings.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/front-page-content.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/general/force-rewrite-title.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/general/homepage.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/general/knowledge-graph.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/general/title-separator.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/media-content.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/post-type-content.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/post_type/post-type.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/post_type/woocommerce-shop-page.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/rss-content.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/special-pages.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/paper-content/taxonomy-content.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/metas/taxonomies/category-url.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/network/features.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/network/general.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/network/integrations.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/network/restore-site.php
delete mode 100644 wp-content/plugins/wordpress-seo/admin/views/tabs/social/google.php
create mode 100644 wp-content/plugins/wordpress-seo/admin/views/workouts.php
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/admin-global-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/admin-global-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/admin-global-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/admin-global-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/adminbar-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/adminbar-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/adminbar-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/adminbar-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/alerts-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/alerts-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/alerts-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/alerts-720.min.css
rename wp-content/plugins/wordpress-seo/css/dist/{dashboard-720-rtl.min.css => dashboard-1720-rtl.css} (54%)
rename wp-content/plugins/wordpress-seo/css/dist/{dashboard-720.min.css => dashboard-1720.css} (54%)
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/edit-page-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/edit-page-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/edit-page-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/edit-page-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/elementor-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/elementor-1720.css
rename wp-content/plugins/wordpress-seo/css/dist/{featured-image-720-rtl.min.css => featured-image-1720-rtl.css} (100%)
rename wp-content/plugins/wordpress-seo/css/dist/{featured-image-720.min.css => featured-image-1720.css} (100%)
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/filter-explanation-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/filter-explanation-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/filter-explanation-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/filter-explanation-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/icons-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/icons-1720.css
rename wp-content/plugins/wordpress-seo/css/dist/{inside-editor-720-rtl.min.css => inside-editor-1720-rtl.css} (60%)
rename wp-content/plugins/wordpress-seo/css/dist/{inside-editor-720.min.css => inside-editor-1720.css} (60%)
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/metabox-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/metabox-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/metabox-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/metabox-720.min.css
rename wp-content/plugins/wordpress-seo/css/dist/{metabox-primary-category-720-rtl.min.css => metabox-primary-category-1720-rtl.css} (81%)
rename wp-content/plugins/wordpress-seo/css/dist/{metabox-primary-category-720.min.css => metabox-primary-category-1720.css} (81%)
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/modal-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/modal-1720.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/monorepo-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/monorepo-1720.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/notifications-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/notifications-1720.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/schema-blocks-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/schema-blocks-1720.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/score_icon-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/score_icon-1720.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/search-appearance-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/search-appearance-1720.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/select2/select2-rtl.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/snippet-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/snippet-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/structured-data-blocks-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/structured-data-blocks-1720.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/toggle-switch-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/toggle-switch-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/toggle-switch-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/toggle-switch-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/workouts-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/workouts-1720.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/yoast-components-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/yoast-components-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/yoast-components-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/yoast-components-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-720.min.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-1720-rtl.css
create mode 100644 wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-1720.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-720-rtl.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-720.min.css
delete mode 100644 wp-content/plugins/wordpress-seo/deprecated/class-submenu-hider.php
delete mode 100644 wp-content/plugins/wordpress-seo/deprecated/class-wpseo-advanced-settings.php
delete mode 100644 wp-content/plugins/wordpress-seo/deprecated/class-wpseo-option-internallinks.php
delete mode 100644 wp-content/plugins/wordpress-seo/deprecated/class-wpseo-option-permalinks.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-breadcrumbs.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-frontend-page-type.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-frontend.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-json-ld.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-opengraph-image.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-opengraph.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-primary-category.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-remove-reply-to-com.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/class-twitter.php
delete mode 100644 wp-content/plugins/wordpress-seo/frontend/index.php
create mode 100644 wp-content/plugins/wordpress-seo/images/Yoast_Academy_video.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/Yoast_SEO_Icon.svg
create mode 100644 wp-content/plugins/wordpress-seo/images/alert-error-icon.svg
create mode 100644 wp-content/plugins/wordpress-seo/images/alert-info-icon.svg
create mode 100644 wp-content/plugins/wordpress-seo/images/alert-success-icon.svg
create mode 100644 wp-content/plugins/wordpress-seo/images/alert-warning-icon.svg
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/basic-seo-training.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/configuration-service.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/keyword-research-training.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/local-seo-for-woocommerce.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/local-seo.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/news-seo.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/premium-seo.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/seo-care.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/seo-copywriting-training.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/site-structure-training.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/structured-data-course.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/technical-seo-training.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/video-seo.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/website-review.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/woocommerce-seo.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/banner/yoast-seo-for-wordpress-training.png
create mode 100644 wp-content/plugins/wordpress-seo/images/brushstroke_background.svg
delete mode 100644 wp-content/plugins/wordpress-seo/images/editicon.png
create mode 100644 wp-content/plugins/wordpress-seo/images/error-icon.svg
delete mode 100644 wp-content/plugins/wordpress-seo/images/extensions-local-for-woocommerce.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/extensions-local.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/extensions-news.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/extensions-premium-ribbon.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/extensions-video.png
delete mode 100644 wp-content/plugins/wordpress-seo/images/extensions-woo.png
create mode 100644 wp-content/plugins/wordpress-seo/images/local_plugin_assistant.svg
create mode 100644 wp-content/plugins/wordpress-seo/images/news_plugin_assistant.svg
delete mode 100644 wp-content/plugins/wordpress-seo/images/pinterest-23x30.png
create mode 100644 wp-content/plugins/wordpress-seo/images/seo_fitness_assistants_fit.svg
create mode 100644 wp-content/plugins/wordpress-seo/images/seo_fitness_assistants_unfit.svg
create mode 100644 wp-content/plugins/wordpress-seo/images/stale-cornerstone-content-in-yoast-seo.png
create mode 100644 wp-content/plugins/wordpress-seo/images/video_plugin_assistant.svg
delete mode 100644 wp-content/plugins/wordpress-seo/images/waiting.gif
create mode 100644 wp-content/plugins/wordpress-seo/images/woo_plugin_assistant.svg
delete mode 100644 wp-content/plugins/wordpress-seo/images/yoast-configuration-icon.svg
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-addon-manager.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-my-yoast-api-request.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-upgrade-history.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-wpseo-content-images.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-wpseo-custom-fields.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-wpseo-custom-taxonomies.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-wpseo-image-utils.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/class-wpseo-replacement-variable.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/date-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/exceptions/class-myyoast-bad-request-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/exceptions/class-myyoast-invalid-json-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/health-check-curl-version.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/health-check-default-tagline.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/health-check-links-table-not-accessible.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/health-check-page-comments.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/health-check-postname-permalink.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/health-check-ryte.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/health-check.php
create mode 100644 wp-content/plugins/wordpress-seo/inc/interface-wpseo-wordpress-ajax-integration.php
delete mode 100644 wp-content/plugins/wordpress-seo/inc/options/class-wpseo-options-backfill.php
delete mode 100644 wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-timezone.php
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/addon-installation-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/admin-global-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/analysis-worker-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/api-client-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/block-editor-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/bulk-editor-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/classic-editor-1720.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/commons-720.min.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/configuration-wizard-1720.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/configuration-wizard-720.min.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/dashboard-widget-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/dynamic-blocks-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/edit-page-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/editor-modules-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/elementor-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/analysis-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/analysisReport-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/components-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/componentsNew-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/configurationWizard-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/draftJs-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/featureFlag-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/helpers-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/jed-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/propTypes-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/redux-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/replacementVariableEditor-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/schemaBlocks-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/searchMetadataPreviews-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/socialMetadataForms-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/styleGuide-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/externals/styledComponents-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/filter-explanation-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/help-scout-beacon-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/indexation-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/ar-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/ca-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/cs-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/de-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/default-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/en-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/es-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/fa-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/fr-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/he-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/hu-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/id-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/it-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/nb-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/nl-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/pl-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/pt-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/ru-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/sk-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/sv-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/languages/tr-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/network-admin-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/post-edit-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/quick-edit-handler-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/react-select-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/reindex-links-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/schema-blocks-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/select2/i18n/bn.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ka.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/select2/i18n/ne.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/select2/i18n/sq.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/select2/i18n/tk.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/settings-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/structured-data-blocks-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/term-edit-1720.js
create mode 100644 wp-content/plugins/wordpress-seo/js/dist/used-keywords-assessment-1720.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-admin-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-admin-global-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-admin-gsc-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-admin-media-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-api-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-babel-polyfill-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-bulk-editor-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-dashboard-widget-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-dismissible-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-edit-page-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-featured-image-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-filter-explanation-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-help-center-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-metabox-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-metabox-category-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-post-scraper-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-quick-edit-handler-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-recalculate-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-reindex-links-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-replacevar-plugin-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-shortcode-plugin-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/js/dist/wp-seo-term-scraper-720.min.js
delete mode 100644 wp-content/plugins/wordpress-seo/languages/index.php
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-ar.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-bs_BA.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-cy.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-de_CH.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-en_ZA.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-es_CL.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-es_CO.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-es_CR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-es_EC.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-es_PE.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-eu.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-fr_BE.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-hi_IN.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-ko_KR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-lt_LT.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-pt_AO.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-sq.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-uk.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-vi.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seo-zh_HK.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-ar.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-bg_BG.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-bs_BA.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-ca.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-cs_CZ.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-da_DK.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-de_DE.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-el.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-en_AU.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-en_CA.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-en_GB.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-en_NZ.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-en_ZA.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-es_AR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-es_CO.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-es_CR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-es_EC.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-es_ES.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-es_MX.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-es_PE.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-es_VE.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-fa_IR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-fi.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-fr_BE.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-fr_CA.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-fr_FR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-gl_ES.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-he_IL.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-hi_IN.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-hr.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-hu_HU.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-id_ID.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-it_IT.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-ja.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-ko_KR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-lt_LT.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-nb_NO.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-nl_BE.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-nl_NL.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-pl_PL.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-pt_AO.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-pt_BR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-pt_PT.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-ro_RO.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-ru_RU.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-sk_SK.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-sr_RS.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-sv_SE.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-tr_TR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-uk.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-vi.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-zh_CN.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs-zh_TW.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/wordpress-seojs.php
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-ar.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-bs_BA.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-de_CH.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-en_ZA.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-es_CL.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-es_CO.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-es_CR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-es_EC.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-es_PE.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-eu.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-fr_BE.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-hi_IN.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-ko_KR.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-lt_LT.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-pt_AO.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-sq.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-uk.json
create mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-vi.json
delete mode 100644 wp-content/plugins/wordpress-seo/languages/yoast-components-zh_HK.json
create mode 100644 wp-content/plugins/wordpress-seo/lib/abstract-main.php
create mode 100644 wp-content/plugins/wordpress-seo/lib/dependency-injection/container-registry.php
create mode 100644 wp-content/plugins/wordpress-seo/lib/migrations/adapter.php
create mode 100644 wp-content/plugins/wordpress-seo/lib/migrations/column.php
create mode 100644 wp-content/plugins/wordpress-seo/lib/migrations/constants.php
create mode 100644 wp-content/plugins/wordpress-seo/lib/migrations/migration.php
create mode 100644 wp-content/plugins/wordpress-seo/lib/migrations/table.php
create mode 100644 wp-content/plugins/wordpress-seo/lib/model.php
create mode 100644 wp-content/plugins/wordpress-seo/lib/orm.php
create mode 100644 wp-content/plugins/wordpress-seo/packages/js/images/Yoast_SEO_Icon.svg
create mode 100644 wp-content/plugins/wordpress-seo/packages/js/images/Yoast_icon_kader.svg
create mode 100644 wp-content/plugins/wordpress-seo/packages/js/images/icon-facebook.svg
create mode 100644 wp-content/plugins/wordpress-seo/packages/js/images/icon-twitter.svg
create mode 100644 wp-content/plugins/wordpress-seo/packages/js/images/local_assistant.svg
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/addon-installation/addon-activate-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/addon-installation/addon-install-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/alert-dismissal-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexables/indexable-head-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/abstract-indexing-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/abstract-link-indexing-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/indexable-general-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/indexable-indexing-complete-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/indexable-post-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/indexable-post-type-archive-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/indexable-term-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/indexation-action-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/indexing-complete-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/indexing-prepare-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/limited-indexing-action-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/post-link-indexing-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/indexing/term-link-indexing-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/semrush/semrush-login-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/semrush/semrush-options-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/actions/semrush/semrush-phrases-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-author-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-date-archive-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-home-page-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-link-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-post-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-post-type-archive-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-social-image-trait.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-system-page-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/indexable-term-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/builders/primary-term-builder.php
create mode 100644 wp-content/plugins/wordpress-seo/src/commands/command-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/commands/index-command.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/addon-installation-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/admin-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/admin/doing-post-quick-edit-save-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/admin/estimated-reading-time-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/admin/licenses-page-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/admin/post-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/admin/posts-overview-or-ajax-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/conditional-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/development-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/feature-flag-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/front-end-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/get-request-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/headless-rest-endpoints-enabled-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/jetpack-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/migrations-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/news-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/no-conditionals-trait.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/no-tool-selected-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/open-graph-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/premium-inactive-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/primary-category-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/schema-blocks-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/semrush-enabled-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/should-index-links-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/the-events-calendar-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-activated-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/third-party/w3-total-cache-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/third-party/wpml-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/third-party/wpml-wpseo-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/web-stories-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/woocommerce-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/wp-robots-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/xmlrpc-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/yoast-admin-and-dashboard-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/conditionals/yoast-tools-page-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/badge-group-names.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/indexing-reasons.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migration-status.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20171228151840_WpYoastIndexable.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20171228151841_WpYoastPrimaryTerm.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20190529075038_WpYoastDropIndexableMetaTableIfExists.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20191011111109_WpYoastIndexableHierarchy.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200408101900_AddCollationToTables.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200420073606_AddColumnsToIndexables.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200428123747_BreadcrumbTitleAndHierarchyReset.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200428194858_ExpandIndexableColumnLengths.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200429105310_TruncateIndexableTables.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200430075614_AddIndexableObjectIdAndTypeIndex.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200430150130_ClearIndexableTables.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200507054848_DeleteDuplicateIndexables.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200513133401_ResetIndexableHierarchyTable.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200609154515_AddHasAncestorsColumn.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200616130143_ReplacePermalinkHashIndex.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200617122511_CreateSEOLinksTable.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200702141921_CreateIndexableSubpagesIndex.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20200728095334_AddIndexesForProminentWordsOnIndexables.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20201202144329_AddEstimatedReadingTime.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20201216124002_ExpandIndexableIDColumnLengths.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/migrations/20201216141134_ExpandPrimaryTermIDColumnLengths.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/researcher-languages.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/schema-ids.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/schema-types.php
create mode 100644 wp-content/plugins/wordpress-seo/src/config/semrush-client.php
create mode 100644 wp-content/plugins/wordpress-seo/src/context/meta-tags-context.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/add-keyword-modal.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/ajax/class-recalculate-scores-ajax.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/ajax/class-yoast-onpage-ajax.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/class-recalculate-scores.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/class-social-admin.php
rename wp-content/plugins/wordpress-seo/{ => src/deprecated}/admin/endpoints/class-endpoint-ryte.php (52%)
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/extension-manager.php
rename wp-content/plugins/wordpress-seo/{admin/class-extension.php => src/deprecated/admin/extension.php} (50%)
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/extensions.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/keyword-synonyms-modal.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/license-page-manager.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/links/class-link-compatibility-notifier.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/links/class-link-table-accessible-notifier.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/multiple-keywords-modal.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/notifiers/class-post-type-archive-notification-handler.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/onpage/class-onpage-option.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/onpage/class-onpage-request.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/onpage/class-onpage.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/onpage/class-ryte-service.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/recalculate/class-recalculate-posts.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/recalculate/class-recalculate-terms.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/recalculate/class-recalculate.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/taxonomy/class-taxonomy-content-fields.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/taxonomy/class-taxonomy-settings-fields.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/admin/taxonomy/class-taxonomy-social-fields.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/abstract-class-deprecated-schema-piece.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/breadcrumbs.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/class-frontend-page-type.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/class-handle-404.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/class-opengraph-image.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/class-opengraph-oembed.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/class-opengraph.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/class-primary-category.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/class-twitter.php
rename wp-content/plugins/wordpress-seo/{ => src/deprecated}/frontend/class-woocommerce-shop-page.php (50%)
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/frontend.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-article.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-author.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-breadcrumb.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-faq-question-list.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-faq-questions.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-faq.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-howto.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-ids.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-image.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-main-image.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-organization.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-person.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-utils.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-webpage.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema-website.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/class-schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/frontend/schema/interface-wpseo-graph-piece.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/inc/class-wpseo-validator.php
rename wp-content/plugins/wordpress-seo/{ => src}/deprecated/index.php (100%)
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/abstract-link-indexing-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/indexable-complete-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/indexable-general-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/indexable-post-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/indexable-post-type-archive-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/indexable-prepare-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/indexable-term-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/indexation-action-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/post-link-indexing-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexation/term-link-indexing-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/actions/indexing/indexable-prepare-indexation-action.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/conditionals/farsi-support-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/conditionals/norwegian-readability-conditional.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/integrations/admin/indexation-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/integrations/admin/link-count-notification-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/integrations/admin/link-count-tools-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/integrations/third-party/elementor.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/presenters/admin/indexation-list-item-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/presenters/admin/indexation-modal-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/presenters/admin/indexation-permalink-warning-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/presenters/admin/indexation-warning-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/presenters/admin/link-count-indexing-list-item-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/presenters/admin/link-count-indexing-modal-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/deprecated/src/presenters/open-graph/fb-app-id-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/addon-installation/addon-activation-error-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/addon-installation/addon-already-installed-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/addon-installation/addon-installation-error-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/addon-installation/user-cannot-activate-plugins-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/addon-installation/user-cannot-install-plugins-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/indexable/indexable-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/indexable/invalid-term-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/indexable/post-not-found-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/indexable/source-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/indexable/term-not-found-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/missing-method.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/oauth/authentication-failed-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/semrush/tokens/empty-property-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/semrush/tokens/empty-token-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/exceptions/semrush/tokens/failed-storage-exception.php
create mode 100644 wp-content/plugins/wordpress-seo/src/functions.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generated/assets/externals.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generated/assets/languages.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generated/assets/plugin.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generated/container.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/breadcrumbs-generator.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/generator-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/open-graph-image-generator.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/open-graph-locale-generator.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema-generator.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/abstract-schema-piece.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/article.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/author.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/breadcrumb.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/faq.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/howto.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/main-image.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/organization.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/person.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/third-party/events-calendar-schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/webpage.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/schema/website.php
create mode 100644 wp-content/plugins/wordpress-seo/src/generators/twitter-image-generator.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/asset-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/author-archive-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/blocks-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/capability-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/current-page-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/date-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/environment-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/home-url-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/image-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/indexable-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/indexing-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/input-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/language-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/meta-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/notification-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/open-graph/image-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/open-graph/values-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/options-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/pagination-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/permalink-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/post-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/post-type-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/primary-term-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/product-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/redirect-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/request-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/require-file-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/robots-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/schema/article-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/schema/html-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/schema/id-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/schema/image-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/schema/language-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/schema/replace-vars-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/short-link-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/site-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/string-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/taxonomy-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/twitter/image-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/url-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/user-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/woocommerce-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/helpers/wordpress-helper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/initializers/disable-core-sitemaps.php
create mode 100644 wp-content/plugins/wordpress-seo/src/initializers/initializer-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/initializers/migration-runner.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/abstract-exclude-post-type.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/addon-installation/dialog-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/addon-installation/installation-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/admin-columns-cache-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/background-indexing-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/cron-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/disable-concatenate-scripts-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/fix-news-dependencies-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/helpscout-beacon.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/indexing-notification-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/indexing-tool-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/link-count-columns-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/menu-badge-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/migration-error-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/social-templates-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/admin/workouts-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/alerts/abstract-dismissable-alert.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/blocks/abstract-dynamic-block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/blocks/block-categories.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/blocks/breadcrumbs-block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/blocks/structured-data-blocks.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/breadcrumbs-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/cleanup-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/duplicate-post-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/estimated-reading-time.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/exclude-oembed-cache-post-type.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/feature-flag-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/backwards-compatibility.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/category-term-description.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/comment-link-fixer.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/force-rewrite-title.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/handle-404.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/indexing-controls.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/open-graph-oembed.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/redirects.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/rss-footer-embed.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/schema-accessibility-feature.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/theme-titles.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/front-end/wp-robots-integration.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/integration-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/primary-category.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/schema-blocks.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/amp.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/bbpress.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/elementor.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/exclude-elementor-post-types.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/exclude-woocommerce-post-types.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/jetpack.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/the-events-calendar.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/w3-total-cache.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/web-stories.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/woocommerce-permalinks.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/woocommerce.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/wpml-wpseo-notification.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/third-party/wpml.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/addon-update-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/auto-update-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-ancestor-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-author-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-category-permalink-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-date-archive-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-home-page-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-homeurl-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-permalink-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-post-meta-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-post-type-archive-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-post-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-static-home-page-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-system-page-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-term-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/option-titles-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/option-wpseo-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/primary-category-quick-edit-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/watchers/primary-term-watcher.php
create mode 100644 wp-content/plugins/wordpress-seo/src/integrations/xmlrpc.php
create mode 100644 wp-content/plugins/wordpress-seo/src/loadable-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/loader.php
create mode 100644 wp-content/plugins/wordpress-seo/src/loggers/logger.php
create mode 100644 wp-content/plugins/wordpress-seo/src/main.php
create mode 100644 wp-content/plugins/wordpress-seo/src/memoizers/meta-tags-context-memoizer.php
create mode 100644 wp-content/plugins/wordpress-seo/src/memoizers/presentation-memoizer.php
create mode 100644 wp-content/plugins/wordpress-seo/src/models/indexable-extension.php
create mode 100644 wp-content/plugins/wordpress-seo/src/models/indexable-hierarchy.php
create mode 100644 wp-content/plugins/wordpress-seo/src/models/indexable.php
create mode 100644 wp-content/plugins/wordpress-seo/src/models/primary-term.php
create mode 100644 wp-content/plugins/wordpress-seo/src/models/seo-links.php
create mode 100644 wp-content/plugins/wordpress-seo/src/models/seo-meta.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/archive-adjacent-trait.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-author-archive-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-date-archive-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-error-page-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-home-page-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-post-type-archive-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-post-type-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-search-result-page-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-static-home-page-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-static-posts-page-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presentations/indexable-term-archive-presentation.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/abstract-indexable-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/abstract-indexable-tag-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/abstract-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/alert-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/auto-update-notification-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/badge-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/help-link-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/indexing-error-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/indexing-failed-notification-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/indexing-list-item-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/indexing-notification-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/light-switch-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/meta-fields-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/migration-error-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/admin/premium-badge-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/bingbot-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/breadcrumbs-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/canonical-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/debug/marker-close-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/debug/marker-open-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/googlebot-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/meta-description-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/article-author-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/article-modified-time-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/article-published-time-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/article-publisher-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/description-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/image-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/locale-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/site-name-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/title-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/type-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/open-graph/url-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/rel-next-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/rel-prev-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/robots-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/schema-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/slack/enhanced-data-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/title-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/twitter/card-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/twitter/creator-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/twitter/description-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/twitter/image-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/twitter/site-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/twitter/title-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/url-list-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/webmaster/baidu-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/webmaster/bing-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/webmaster/google-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/webmaster/pinterest-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/presenters/webmaster/yandex-presenter.php
create mode 100644 wp-content/plugins/wordpress-seo/src/repositories/indexable-hierarchy-repository.php
create mode 100644 wp-content/plugins/wordpress-seo/src/repositories/indexable-repository.php
create mode 100644 wp-content/plugins/wordpress-seo/src/repositories/primary-term-repository.php
create mode 100644 wp-content/plugins/wordpress-seo/src/repositories/seo-links-repository.php
create mode 100644 wp-content/plugins/wordpress-seo/src/repositories/seo-meta-repository.php
create mode 100644 wp-content/plugins/wordpress-seo/src/routes/abstract-indexation-route.php
create mode 100644 wp-content/plugins/wordpress-seo/src/routes/alert-dismissal-route.php
create mode 100644 wp-content/plugins/wordpress-seo/src/routes/indexables-head-route.php
create mode 100644 wp-content/plugins/wordpress-seo/src/routes/indexing-route.php
create mode 100644 wp-content/plugins/wordpress-seo/src/routes/route-interface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/routes/semrush-route.php
create mode 100644 wp-content/plugins/wordpress-seo/src/routes/supported-features-route.php
create mode 100644 wp-content/plugins/wordpress-seo/src/routes/yoast-head-rest-field.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/assets/icons.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/cooking-time.block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/cooking-time.schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/image.schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/preparation-time.block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/preparation-time.schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe-description.block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe-description.schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe-ingredients.block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe-ingredients.schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe-instructions.block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe-instructions.schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe-name.block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe-name.schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe.block.php
create mode 100644 wp-content/plugins/wordpress-seo/src/schema-templates/recipe.schema.php
create mode 100644 wp-content/plugins/wordpress-seo/src/surfaces/classes-surface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/surfaces/helpers-surface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/surfaces/meta-surface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/surfaces/open-graph-helpers-surface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/surfaces/schema-helpers-surface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/surfaces/twitter-helpers-surface.php
create mode 100644 wp-content/plugins/wordpress-seo/src/surfaces/values/meta.php
create mode 100644 wp-content/plugins/wordpress-seo/src/values/images.php
create mode 100644 wp-content/plugins/wordpress-seo/src/values/open-graph/images.php
create mode 100644 wp-content/plugins/wordpress-seo/src/values/semrush/semrush-token.php
create mode 100644 wp-content/plugins/wordpress-seo/src/wordpress/wrapper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/wrappers/wp-query-wrapper.php
create mode 100644 wp-content/plugins/wordpress-seo/src/wrappers/wp-remote-handler.php
create mode 100644 wp-content/plugins/wordpress-seo/src/wrappers/wp-rewrite-wrapper.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/autoload_52.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/composer/ClassLoader52.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/composer/autoload_files.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/composer/autoload_real_52.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/xrstf/composer-php52/LICENSE
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/xrstf/composer-php52/lib/xrstf/Composer52/ClassLoader.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/class-api-google-client.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/class-api-google.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/class-api-libs.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/Google_Client.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_AssertionCredentials.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_Auth.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_AuthNone.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_LoginTicket.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_OAuth2.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_P12Signer.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_PemVerifier.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_Signer.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/auth/Google_Verifier.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/cache/Google_Cache.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/cache/Google_WPCache.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/config.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/external/URITemplateParser.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/io/Google_CacheParser.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/io/Google_CurlIO.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/io/Google_HttpRequest.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/io/Google_IO.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/io/Google_REST.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/io/Google_WPIO.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/io/cacerts.pem
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/service/Google_BatchRequest.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/service/Google_MediaFileUpload.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/service/Google_Model.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/service/Google_Service.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/service/Google_ServiceResource.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/api-libs/google/service/Google_Utils.php
rename wp-content/plugins/wordpress-seo/vendor/yoast/i18n-module/src/{i18n-module.php => i18n-v3.php} (75%)
rename wp-content/plugins/wordpress-seo/vendor/yoast/i18n-module/src/{i18n-module-wordpressorg.php => i18n-wordpressorg-v3.php} (79%)
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/CHANGELOG.md
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/class-api-request.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/class-license-manager.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/class-plugin-license-manager.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/class-plugin-update-manager.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/class-product.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/class-update-manager.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/index.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/views/form.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/views/index.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/license-manager/views/script.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/CHANGELOG.md
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/LICENSE
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/images/wp-message.png
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/phpunit.xml
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_Configuration.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_Host.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_MessageDismisser.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_MessageFormatter.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_MessagesManager.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_RequirementsChecker.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_VersionRequirement.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_WPDismissOption.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Whip_WPMessageDismissListener.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/configs/default.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/configs/version.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/exceptions/Whip_EmptyProperty.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/exceptions/Whip_InvalidOperatorType.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/exceptions/Whip_InvalidType.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/exceptions/Whip_InvalidVersionComparisonString.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/facades/wordpress.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/interfaces/Whip_DismissStorage.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/interfaces/Whip_Listener.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/interfaces/Whip_Message.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/interfaces/Whip_MessagePresenter.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/interfaces/Whip_Requirement.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/interfaces/Whip_VersionDetector.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/messages/Whip_BasicMessage.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/messages/Whip_HostMessage.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/messages/Whip_InvalidVersionRequirementMessage.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/messages/Whip_NullMessage.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/messages/Whip_UpgradePhpMessage.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/presenters/Whip_WPMessagePresenter.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/tests/ConfigurationTest.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/tests/MessageDismisserTest.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/tests/MessageTest.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/tests/MessagesManagerTest.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/tests/RequirementsCheckerTest.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/tests/VersionRequirementTest.php
delete mode 100644 wp-content/plugins/wordpress-seo/vendor/yoast/whip/tests/bootstrap.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Client.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJar.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/SetCookie.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/BadResponseException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ClientException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ConnectException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/GuzzleException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/SeekException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ServerException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Exception/TransferException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlFactory.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlHandler.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Handler/EasyHandle.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Handler/MockHandler.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Handler/Proxy.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Handler/StreamHandler.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/HandlerStack.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/MessageFormatter.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Middleware.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Pool.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/RedirectMiddleware.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/RequestOptions.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/TransferStats.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/UriTemplate.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/functions.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/functions_include.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/AggregateException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/CancellationException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/Coroutine.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/EachPromise.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/FulfilledPromise.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/Promise.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/PromiseInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/PromisorInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/RejectedPromise.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/RejectionException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/TaskQueue.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/TaskQueueInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/functions.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/functions_include.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/AppendStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/BufferStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/CachingStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/DroppingStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/FnStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/InflateStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/LazyOpenStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/LimitStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/MessageTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/MultipartStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/NoSeekStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/PumpStream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/Request.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/Response.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/Rfc7230.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/ServerRequest.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/Stream.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/StreamDecoratorTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/StreamWrapper.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/UploadedFile.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/Uri.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/UriNormalizer.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/UriResolver.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/functions.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/psr7/src/functions_include.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Grant/AbstractGrant.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Grant/AuthorizationCode.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Grant/ClientCredentials.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Grant/Exception/InvalidGrantException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Grant/GrantFactory.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Grant/Password.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Grant/RefreshToken.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/OptionProvider/HttpBasicAuthOptionProvider.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/OptionProvider/OptionProviderInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/AbstractProvider.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/Exception/IdentityProviderException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/GenericProvider.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/GenericResourceOwner.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/ResourceOwnerInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Token/AccessToken.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Token/AccessTokenInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Tool/ArrayAccessorTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Tool/BearerAuthorizationTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Tool/GuardedPropertyTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Tool/MacAuthorizationTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Tool/ProviderRedirectTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Tool/QueryBuilderTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Tool/RequestFactory.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Tool/RequiredParameterTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/container/src/ContainerExceptionInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/container/src/ContainerInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/container/src/NotFoundExceptionInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/http-message/src/MessageInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/http-message/src/RequestInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/http-message/src/ResponseInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/http-message/src/ServerRequestInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/http-message/src/StreamInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/http-message/src/UploadedFileInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/http-message/src/UriInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/log/Psr/Log/AbstractLogger.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/log/Psr/Log/InvalidArgumentException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/log/Psr/Log/LogLevel.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/log/Psr/Log/LoggerAwareInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/log/Psr/Log/LoggerAwareTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/log/Psr/Log/LoggerInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/log/Psr/Log/LoggerTrait.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/psr/log/Psr/Log/NullLogger.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Argument/RewindableGenerator.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/ContainerInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Exception/EnvNotFoundException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Exception/ExceptionInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Exception/InvalidArgumentException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Exception/LogicException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Exception/RuntimeException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Exception/ServiceNotFoundException.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/ParameterBag/ParameterBag.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php
create mode 100644 wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/ResettableContainerInterface.php
diff --git a/wp-content/plugins/wordpress-seo/admin/admin-settings-changed-listener.php b/wp-content/plugins/wordpress-seo/admin/admin-settings-changed-listener.php
new file mode 100644
index 00000000..f3032b09
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/admin-settings-changed-listener.php
@@ -0,0 +1,85 @@
+helpers->current_page->is_yoast_seo_page() ) {
+ return;
+ }
+
+ // Variable name is the same as the global that is set by get_settings_errors.
+ $wp_settings_errors = get_settings_errors();
+
+ foreach ( $wp_settings_errors as $key => $wp_settings_error ) {
+ if ( ! $this->is_settings_updated_notification( $wp_settings_error ) ) {
+ continue;
+ }
+
+ self::$settings_saved = true;
+ unset( $wp_settings_errors[ $key ] );
+ // phpcs:ignore WordPress.WP.GlobalVariablesOverride -- Overwrite the global with the list excluding the Changed saved message.
+ $GLOBALS['wp_settings_errors'] = $wp_settings_errors;
+ break;
+ }
+ }
+
+ /**
+ * Checks whether the settings notification is a settings_updated notification.
+ *
+ * @param array $wp_settings_error The settings object.
+ *
+ * @return bool Whether this is a settings updated settings notification.
+ */
+ public function is_settings_updated_notification( $wp_settings_error ) {
+ return ! empty( $wp_settings_error['code'] ) && $wp_settings_error['code'] === 'settings_updated';
+ }
+
+ /**
+ * Get whether the settings have successfully been saved
+ *
+ * @return bool Whether the settings have successfully been saved.
+ */
+ public function have_settings_been_saved() {
+ return self::$settings_saved;
+ }
+
+ /**
+ * Renders a success message if the Yoast SEO settings have been saved.
+ */
+ public function show_success_message() {
+ if ( $this->have_settings_been_saved() ) {
+ echo ' ',
+ esc_html__( 'Settings saved.', 'wordpress-seo' ),
+ '
';
+ }
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/ajax.php b/wp-content/plugins/wordpress-seo/admin/ajax.php
index 0df8d933..37d36344 100644
--- a/wp-content/plugins/wordpress-seo/admin/ajax.php
+++ b/wp-content/plugins/wordpress-seo/admin/ajax.php
@@ -12,16 +12,13 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
}
/**
- * @todo this whole thing should probably be a proper class.
- */
-
-/**
- * Convenience function to JSON encode and echo results and then die
+ * Convenience function to JSON encode and echo results and then die.
*
* @param array $results Results array for encoding.
*/
function wpseo_ajax_json_echo_die( $results ) {
- echo wp_json_encode( $results );
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: WPSEO_Utils::format_json_encode is safe.
+ echo WPSEO_Utils::format_json_encode( $results );
die();
}
@@ -49,7 +46,7 @@ add_action( 'wp_ajax_wpseo_set_option', 'wpseo_set_option' );
/**
* Since 3.2 Notifications are dismissed in the Notification Center.
*/
-add_action( 'wp_ajax_yoast_dismiss_notification', array( 'Yoast_Notification_Center', 'ajax_dismiss_notification' ) );
+add_action( 'wp_ajax_yoast_dismiss_notification', [ 'Yoast_Notification_Center', 'ajax_dismiss_notification' ] );
/**
* Function used to remove the admin notices for several purposes, dies on exit.
@@ -69,42 +66,6 @@ function wpseo_set_ignore() {
add_action( 'wp_ajax_wpseo_set_ignore', 'wpseo_set_ignore' );
-/**
- * Hides the default tagline notice for a specific user.
- */
-function wpseo_dismiss_tagline_notice() {
- if ( ! current_user_can( 'manage_options' ) ) {
- die( '-1' );
- }
-
- check_ajax_referer( 'wpseo-dismiss-tagline-notice' );
-
- update_user_meta( get_current_user_id(), 'wpseo_seen_tagline_notice', 'seen' );
-
- die( '1' );
-}
-
-add_action( 'wp_ajax_wpseo_dismiss_tagline_notice', 'wpseo_dismiss_tagline_notice' );
-
-/**
- * Used in the editor to replace vars for the snippet preview
- */
-function wpseo_ajax_replace_vars() {
- global $post;
- check_ajax_referer( 'wpseo-replace-vars' );
-
- $post = get_post( intval( filter_input( INPUT_POST, 'post_id' ) ) );
- global $wp_query;
- $wp_query->queried_object = $post;
- $wp_query->queried_object_id = $post->ID;
-
- $omit = array( 'excerpt', 'excerpt_only', 'title' );
- echo wpseo_replace_vars( stripslashes( filter_input( INPUT_POST, 'string' ) ), $post, $omit );
- die;
-}
-
-add_action( 'wp_ajax_wpseo_replace_vars', 'wpseo_ajax_replace_vars' );
-
/**
* Save an individual SEO title from the Bulk Editor.
*/
@@ -124,7 +85,7 @@ function wpseo_save_description() {
add_action( 'wp_ajax_wpseo_save_metadesc', 'wpseo_save_description' );
/**
- * Save titles & descriptions
+ * Save titles & descriptions.
*
* @param string $what Type of item to save (title, description).
*/
@@ -158,12 +119,12 @@ function wpseo_upsert_meta( $post_id, $new_meta_value, $orig_meta_value, $meta_k
$sanitized_new_meta_value = wp_strip_all_tags( $new_meta_value );
$orig_meta_value = wp_strip_all_tags( $orig_meta_value );
- $upsert_results = array(
+ $upsert_results = [
'status' => 'success',
'post_id' => $post_id,
"new_{$return_key}" => $sanitized_new_meta_value,
"original_{$return_key}" => $orig_meta_value,
- );
+ ];
$the_post = get_post( $post_id );
if ( empty( $the_post ) ) {
@@ -209,7 +170,6 @@ function wpseo_upsert_meta( $post_id, $new_meta_value, $orig_meta_value, $meta_k
);
return $upsert_results;
-
}
if ( $sanitized_new_meta_value === $orig_meta_value && $sanitized_new_meta_value !== $new_meta_value ) {
@@ -246,30 +206,31 @@ function wpseo_save_all_descriptions() {
add_action( 'wp_ajax_wpseo_save_all_descriptions', 'wpseo_save_all_descriptions' );
/**
- * Utility function to save values
+ * Utility function to save values.
*
* @param string $what Type of item so save.
*/
function wpseo_save_all( $what ) {
check_ajax_referer( 'wpseo-bulk-editor' );
- // @todo the WPSEO Utils class can't filter arrays in POST yet.
- $new_values = $_POST['items'];
- $original_values = $_POST['existing_items'];
-
- $results = array();
-
- if ( is_array( $new_values ) && $new_values !== array() ) {
- foreach ( $new_values as $post_id => $new_value ) {
- $original_value = $original_values[ $post_id ];
- $results[] = wpseo_upsert_new( $what, $post_id, $new_value, $original_value );
- }
+ $results = [];
+ if ( ! isset( $_POST['items'], $_POST['existingItems'] ) ) {
+ wpseo_ajax_json_echo_die( $results );
}
+
+ $new_values = array_map( [ 'WPSEO_Utils', 'sanitize_text_field' ], wp_unslash( (array) $_POST['items'] ) );
+ $original_values = array_map( [ 'WPSEO_Utils', 'sanitize_text_field' ], wp_unslash( (array) $_POST['existingItems'] ) );
+
+ foreach ( $new_values as $post_id => $new_value ) {
+ $original_value = $original_values[ $post_id ];
+ $results[] = wpseo_upsert_new( $what, $post_id, $new_value, $original_value );
+ }
+
wpseo_ajax_json_echo_die( $results );
}
/**
- * Insert a new value
+ * Insert a new value.
*
* @param string $what Item type (such as title).
* @param int $post_id Post ID.
@@ -296,7 +257,8 @@ function ajax_get_keyword_usage() {
}
wp_die(
- wp_json_encode( WPSEO_Meta::keyword_usage( $keyword, $post_id ) )
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: WPSEO_Utils::format_json_encode is safe.
+ WPSEO_Utils::format_json_encode( WPSEO_Meta::keyword_usage( $keyword, $post_id ) )
);
}
@@ -326,64 +288,45 @@ function ajax_get_term_keyword_usage() {
$usage = $usage[ $keyword ];
wp_die(
- wp_json_encode( $usage )
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: WPSEO_Utils::format_json_encode is safe.
+ WPSEO_Utils::format_json_encode( $usage )
);
}
add_action( 'wp_ajax_get_term_keyword_usage', 'ajax_get_term_keyword_usage' );
-// Crawl Issue Manager AJAX hooks.
-new WPSEO_GSC_Ajax();
+/**
+ * Registers hooks for all AJAX integrations.
+ *
+ * @return void
+ */
+function wpseo_register_ajax_integrations() {
+ $integrations = [ new Yoast_Network_Admin() ];
-// SEO Score Recalculations.
-new WPSEO_Recalculate_Scores_Ajax();
+ foreach ( $integrations as $integration ) {
+ $integration->register_ajax_hooks();
+ }
+}
-new Yoast_OnPage_Ajax();
+wpseo_register_ajax_integrations();
new WPSEO_Shortcode_Filter();
new WPSEO_Taxonomy_Columns();
-// Setting the notice for the recalculate the posts.
-new Yoast_Dismissable_Notice_Ajax( 'recalculate', Yoast_Dismissable_Notice_Ajax::FOR_SITE );
-
-/********************** DEPRECATED METHODS **********************/
-
+/* ********************* DEPRECATED FUNCTIONS ********************* */
/**
- * Removes stopword from the sample permalink that is generated in an AJAX request
+ * Hides the default tagline notice for a specific user.
*
- * @deprecated 6.3
+ * @deprecated 13.2
* @codeCoverageIgnore
*/
-function wpseo_remove_stopwords_sample_permalink() {
- _deprecated_function( __FUNCTION__, 'WPSEO 6.3', 'This method is deprecated.' );
-
- wpseo_ajax_json_echo_die( '' );
-}
-
-/**
- * Function used to delete blocking files, dies on exit.
- *
- * @deprecated 7.0
- * @codeCoverageIgnore
- */
-function wpseo_kill_blocking_files() {
- _deprecated_function( __FUNCTION__, 'WPSEO 7.0', 'This method is deprecated.' );
-
- wpseo_ajax_json_echo_die( '' );
-}
-
-/**
- * Handles the posting of a new FB admin.
- *
- * @deprecated 7.1
- * @codeCoverageIgnore
- */
-function wpseo_add_fb_admin() {
+function wpseo_dismiss_tagline_notice() {
if ( ! current_user_can( 'manage_options' ) ) {
die( '-1' );
}
- _deprecated_function( __FUNCTION__, 'WPSEO 7.0', 'This method is deprecated.' );
+
+ _deprecated_function( __FUNCTION__, 'WPSEO 13.2', 'This method is deprecated.' );
wpseo_ajax_json_echo_die( '' );
}
diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-recalculate-scores-ajax.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-recalculate-scores-ajax.php
deleted file mode 100644
index 8ab77a7b..00000000
--- a/wp-content/plugins/wordpress-seo/admin/ajax/class-recalculate-scores-ajax.php
+++ /dev/null
@@ -1,121 +0,0 @@
- $this->calculate_posts(),
- 'terms' => $this->calculate_terms(),
- )
- )
- );
- }
-
- /**
- * Start recalculation
- */
- public function recalculate_scores() {
- check_ajax_referer( 'wpseo_recalculate', 'nonce' );
-
- $fetch_object = $this->get_fetch_object();
- if ( ! empty( $fetch_object ) ) {
- $paged = filter_input( INPUT_POST, 'paged', FILTER_VALIDATE_INT );
- $response = $fetch_object->get_items_to_recalculate( $paged );
-
- if ( ! empty( $response ) ) {
- wp_die( wp_json_encode( $response ) );
- }
- }
-
- wp_die( '' );
- }
-
- /**
- * Saves the new linkdex score for given post
- */
- public function save_score() {
- check_ajax_referer( 'wpseo_recalculate', 'nonce' );
-
- $fetch_object = $this->get_fetch_object();
- if ( ! empty( $fetch_object ) ) {
- $scores = filter_input( INPUT_POST, 'scores', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
- $fetch_object->save_scores( $scores );
- }
-
- wp_die();
- }
-
- /**
- * Returns the needed object for recalculating scores.
- *
- * @return WPSEO_Recalculate_Posts|WPSEO_Recalculate_Terms
- */
- private function get_fetch_object() {
- switch ( filter_input( INPUT_POST, 'type' ) ) {
- case 'post':
- return new WPSEO_Recalculate_Posts();
- case 'term':
- return new WPSEO_Recalculate_Terms();
- }
-
- return null;
- }
-
- /**
- * Gets the total number of posts
- *
- * @return int
- */
- private function calculate_posts() {
- $count_posts_query = new WP_Query(
- array(
- 'post_type' => 'any',
- 'meta_key' => '_yoast_wpseo_focuskw',
- 'posts_per_page' => 1,
- 'fields' => 'ids',
- )
- );
-
- return $count_posts_query->found_posts;
- }
-
- /**
- * Get the total number of terms
- *
- * @return int
- */
- private function calculate_terms() {
- $total = 0;
- foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy ) {
- $total += wp_count_terms( $taxonomy->name, array( 'hide_empty' => false ) );
- }
-
- return $total;
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php
index 26e6b071..833b1bfc 100644
--- a/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php
+++ b/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php
@@ -6,36 +6,37 @@
*/
/**
- * Class WPSEO_Shortcode_Filter
+ * Class WPSEO_Shortcode_Filter.
*
- * Used for parsing WP shortcodes with AJAX
+ * Used for parsing WP shortcodes with AJAX.
*/
class WPSEO_Shortcode_Filter {
/**
- * Initialize the AJAX hooks
+ * Initialize the AJAX hooks.
*/
public function __construct() {
- add_action( 'wp_ajax_wpseo_filter_shortcodes', array( $this, 'do_filter' ) );
+ add_action( 'wp_ajax_wpseo_filter_shortcodes', [ $this, 'do_filter' ] );
}
/**
- * Parse the shortcodes
+ * Parse the shortcodes.
*/
public function do_filter() {
check_ajax_referer( 'wpseo-filter-shortcodes', 'nonce' );
$shortcodes = filter_input( INPUT_POST, 'data', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
- $parsed_shortcodes = array();
+ $parsed_shortcodes = [];
foreach ( $shortcodes as $shortcode ) {
- $parsed_shortcodes[] = array(
+ $parsed_shortcodes[] = [
'shortcode' => $shortcode,
'output' => do_shortcode( $shortcode ),
- );
+ ];
}
- wp_die( wp_json_encode( $parsed_shortcodes ) );
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: WPSEO_Utils::format_json_encode is considered safe.
+ wp_die( WPSEO_Utils::format_json_encode( $parsed_shortcodes ) );
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php
index 46cb14c9..e6a30c73 100644
--- a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php
+++ b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php
@@ -6,39 +6,48 @@
*/
/**
- * This class will catch the request to dismiss the target notice (set by notice_name) and will store the dismiss status as an user meta
- * in the database
+ * This class will catch the request to dismiss the target notice (set by notice_name)
+ * and will store the dismiss status as an user meta in the database.
*/
class Yoast_Dismissable_Notice_Ajax {
/**
- * @var string Notice type toggle value for user notices.
+ * Notice type toggle value for user notices.
+ *
+ * @var string
*/
const FOR_USER = 'user_meta';
/**
- * @var string Notice type toggle value for network notices.
+ * Notice type toggle value for network notices.
+ *
+ * @var string
*/
const FOR_NETWORK = 'site_option';
/**
- * @var string Notice type toggle value for site notices.
+ * Notice type toggle value for site notices.
+ *
+ * @var string
*/
const FOR_SITE = 'option';
-
/**
- * @var string Name of the notice that will be dismissed.
+ * Name of the notice that will be dismissed.
+ *
+ * @var string
*/
private $notice_name;
/**
+ * The type of the current notice.
+ *
* @var string
*/
private $notice_type;
/**
- * Initialize the hooks for the AJAX request
+ * Initialize the hooks for the AJAX request.
*
* @param string $notice_name The name for the hook to catch the notice.
* @param string $notice_type The notice type.
@@ -47,11 +56,11 @@ class Yoast_Dismissable_Notice_Ajax {
$this->notice_name = $notice_name;
$this->notice_type = $notice_type;
- add_action( 'wp_ajax_wpseo_dismiss_' . $notice_name, array( $this, 'dismiss_notice' ) );
+ add_action( 'wp_ajax_wpseo_dismiss_' . $notice_name, [ $this, 'dismiss_notice' ] );
}
/**
- * Handles the dismiss notice request
+ * Handles the dismiss notice request.
*/
public function dismiss_notice() {
check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name );
diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-onpage-ajax.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-onpage-ajax.php
deleted file mode 100644
index 0e8f22d1..00000000
--- a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-onpage-ajax.php
+++ /dev/null
@@ -1,40 +0,0 @@
-save_dismissed();
-
- wp_die( 'true' );
- }
-
- /**
- * Storing the dismissed value as an user option in the database
- */
- private function save_dismissed() {
- update_user_meta( get_current_user_id(), WPSEO_OnPage::USER_META_KEY, 1 );
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php
index e4f80895..5567909d 100644
--- a/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php
+++ b/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php
@@ -6,29 +6,33 @@
*/
/**
- * Class Yoast_Plugin_Conflict_Ajax
+ * Class Yoast_Plugin_Conflict_Ajax.
*/
class Yoast_Plugin_Conflict_Ajax {
/**
+ * Option identifier where dismissed conflicts are stored.
+ *
* @var string
*/
private $option_name = 'wpseo_dismissed_conflicts';
/**
+ * List of notification identifiers that have been dismissed.
+ *
* @var array
*/
- private $dismissed_conflicts = array();
+ private $dismissed_conflicts = [];
/**
- * Initialize the hooks for the AJAX request
+ * Initialize the hooks for the AJAX request.
*/
public function __construct() {
- add_action( 'wp_ajax_wpseo_dismiss_plugin_conflict', array( $this, 'dismiss_notice' ) );
+ add_action( 'wp_ajax_wpseo_dismiss_plugin_conflict', [ $this, 'dismiss_notice' ] );
}
/**
- * Handles the dismiss notice request
+ * Handles the dismiss notice request.
*/
public function dismiss_notice() {
check_ajax_referer( 'dismiss-plugin-conflict' );
@@ -45,7 +49,7 @@ class Yoast_Plugin_Conflict_Ajax {
}
/**
- * Getting the user option from the database
+ * Getting the user option from the database.
*
* @return bool|array
*/
@@ -67,11 +71,11 @@ class Yoast_Plugin_Conflict_Ajax {
return $dismissed_conflicts[ $plugin_section ];
}
- return array();
+ return [];
}
/**
- * Storing the conflicting plugins as an user option in the database
+ * Storing the conflicting plugins as an user option in the database.
*
* @param string $plugin_section Plugin conflict type (such as Open Graph or sitemap).
*/
@@ -84,7 +88,7 @@ class Yoast_Plugin_Conflict_Ajax {
}
/**
- * Loop through the plugins to compare them with the already stored dismissed plugin conflicts
+ * Loop through the plugins to compare them with the already stored dismissed plugin conflicts.
*
* @param array $posted_plugins Plugin set to check.
*/
@@ -95,7 +99,7 @@ class Yoast_Plugin_Conflict_Ajax {
}
/**
- * Check if plugin is already dismissed, if not store it in the array that will be saved later
+ * Check if plugin is already dismissed, if not store it in the array that will be saved later.
*
* @param string $posted_plugin Plugin to check against dismissed conflicts.
*/
diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-renderer.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-renderer.php
deleted file mode 100644
index 2fbb6dc2..00000000
--- a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-renderer.php
+++ /dev/null
@@ -1,50 +0,0 @@
-get_url() ) . '">';
- $output .= ' ';
- $output .= '';
-
- return $output;
- }
-
- /**
- * Sets the base path, where the images are located.
- *
- * @param string $base_path The image location.
- */
- public function set_base_path( $base_path ) {
- $this->base_path = $base_path;
- }
-
- /**
- * Returns the full path for the image.
- *
- * @param string $image The image path.
- *
- * @return string
- */
- protected function get_image_path( $image ) {
- return rtrim( $this->base_path, '/' ) . '/' . ltrim( $image, '/' );
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar-renderer.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar-renderer.php
deleted file mode 100644
index 785b804f..00000000
--- a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar-renderer.php
+++ /dev/null
@@ -1,62 +0,0 @@
-spot_renderer = $spot_renderer;
- }
-
- /**
- * Renders the admin banner sidebar.
- *
- * @param WPSEO_Admin_Banner_Sidebar $banner_sidebar The sidebar to render.
- *
- * @return string
- */
- public function render( WPSEO_Admin_Banner_Sidebar $banner_sidebar ) {
- return sprintf( '
- ',
- $banner_sidebar->get_title(),
- $this->render_banner_spots( $banner_sidebar->get_banner_spots() )
- );
- }
-
- /**
- * Renders the admin banner spots.
- *
- * @param WPSEO_Admin_Banner_Spot[] $banner_spots The banner spots to render.
- *
- * @return string
- */
- protected function render_banner_spots( array $banner_spots ) {
- $return = '';
- foreach ( $banner_spots as $banner_spot ) {
- $return .= $this->spot_renderer->render( $banner_spot );
- }
-
- return $return;
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar.php
deleted file mode 100644
index 8f4399f8..00000000
--- a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-sidebar.php
+++ /dev/null
@@ -1,348 +0,0 @@
-title = $title;
- $this->banner_renderer = $banner_renderer;
- }
-
- /**
- * Returns the set title.
- *
- * @return string
- */
- public function get_title() {
- return $this->title;
- }
-
- /**
- * Initializes the banner sidebar by setting its banner spots.
- *
- * @param WPSEO_Features $features Class regarding WPSEO Features.
- */
- public function initialize( WPSEO_Features $features ) {
- if ( $features->is_free() ) {
- $this->add_banner_spot( $this->get_premium_spot() );
- }
-
- $this->add_banner_spot( $this->get_services_spot() );
-
- $extensions_spot = $this->get_extensions_spot( $this->get_active_extensions() );
- if ( $extensions_spot->has_banners() ) {
- $this->add_banner_spot( $extensions_spot );
- }
-
- $this->add_banner_spot( $this->get_courses_spot() );
- $this->add_banner_spot( $this->get_remove_banner_spot() );
- }
-
- /**
- * Returns array with bannerspots.
- *
- * @return WPSEO_Admin_Banner_Spot[]
- */
- public function get_banner_spots() {
- return $this->banner_spots;
- }
-
- /**
- * Adds a banner spot.
- *
- * @param WPSEO_Admin_Banner_Spot $spot The spot to add.
- */
- protected function add_banner_spot( WPSEO_Admin_Banner_Spot $spot ) {
- $this->banner_spots[] = $spot;
- }
-
- /**
- * Returns the premium banner spot.
- *
- * @return WPSEO_Admin_Banner_Spot
- */
- protected function get_premium_spot() {
- $premium_spot = new WPSEO_Admin_Banner_Spot( '', $this->banner_renderer );
-
- $premium_uri = WPSEO_Shortlinker::get( 'https://yoa.st/jj' );
-
- $premium_spot->set_extra(
- /* translators: %1$s expands to the plugin name */
- '' . sprintf( esc_html__( 'Upgrade to %1$s', 'wordpress-seo' ), 'Yoast SEO Premium' ) . ' ' .
- '' .
- '' . esc_html__( 'Rank for up to 5 focus keywords per page', 'wordpress-seo' ) . ' ' .
- '' . esc_html__( 'Preview your page in Facebook and Twitter', 'wordpress-seo' ) . ' ' .
- '' . esc_html__( 'Get real-time suggestions for internal links', 'wordpress-seo' ) . ' ' .
- '' . esc_html__( 'No more dead links a.k.a. 404 pages', 'wordpress-seo' ) . ' ' .
- '' . esc_html__( '24/7 email support', 'wordpress-seo' ) . ' ' .
- '' . esc_html__( 'No ads', 'wordpress-seo' ) . ' ' .
- ' ' .
- /* translators: %s expands to Yoast SEO Premium */
- '' . sprintf( __( 'Get %s now', 'wordpress-seo' ), 'Yoast SEO Premium' ) . ' '
- );
-
- return $premium_spot;
- }
-
- /**
- * Returns the services banner spot.
- *
- * @return WPSEO_Admin_Banner_Spot
- */
- protected function get_services_spot() {
- $service_spot = new WPSEO_Admin_Banner_Spot( __( 'Services', 'wordpress-seo' ), $this->banner_renderer );
-
- $service_spot->set_description(
- sprintf(
- /* translators: %1$s expands to a link start tag to the Yoast Services page, %2$s to Yoast, %3$s is the link closing tag. */
- __( 'Do you want to know how to improve your rankings? %1$sLet team %2$s help you!%3$s', 'wordpress-seo' ),
- '',
- 'Yoast',
- ' '
- )
- );
-
- $service_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/jm' ),
- 'configuration-service.png',
- 261,
- 152,
- sprintf(
- /* translators: %1$s expands to Yoast SEO Premium. */
- __( 'Let our experts set up your %1$s plugin!', 'wordpress-seo' ),
- 'Yoast SEO Premium'
- )
- )
- );
-
- return $service_spot;
- }
-
- /**
- * Returns an array with the Yoast SEO extensions with the value true when they are active.
- *
- * @return array
- */
- protected function get_active_extensions() {
- return array(
- 'video' => class_exists( 'wpseo_Video_Sitemap' ),
- 'woocommerce' => class_exists( 'Woocommerce' ) && class_exists( 'Yoast_WooCommerce_SEO' ),
- 'news' => class_exists( 'WPSEO_News' ),
- 'local' => defined( 'WPSEO_LOCAL_VERSION' ),
- );
- }
-
- /**
- * Returns the extensions banner spot.
- *
- * @param array $active_extensions The active extensions.
- *
- * @return WPSEO_Admin_Banner_Spot
- */
- protected function get_extensions_spot( array $active_extensions ) {
- $extension_spot = new WPSEO_Admin_Banner_Spot( __( 'Extensions', 'wordpress-seo' ), $this->banner_renderer );
-
- $extension_spot->set_description(
- sprintf(
- /* translators: %1$s expands to a link start tag to the Yoast plugin page, %2$s is the link closing tag. */
- __( 'Take your SEO to the next level and outrank your competition with our %1$sSEO plugins%2$s.', 'wordpress-seo' ),
- '',
- ' '
- )
- );
-
- if ( empty( $active_extensions['video'] ) ) {
- $extension_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/jo' ),
- 'video-seo.png',
- 261,
- 152,
- sprintf(
- /* translators: %1$s expands to Yoast Video SEO. */
- __( 'Buy the %1$s plugin now and optimize your videos for video search results and social media!', 'wordpress-seo' ),
- 'Yoast Video SEO'
- )
- )
- );
- }
-
- if ( empty( $active_extensions['woocommerce'] ) ) {
- $extension_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/jp' ),
- 'woocommerce-seo.png',
- 261,
- 152,
- sprintf(
- /* translators: %1$s expands to Yoast WooCommerce SEO. */
- __( 'Buy the %1$s plugin now and optimize your shop today to improve your product promotion!', 'wordpress-seo' ),
- 'Yoast WooCommerce SEO'
- )
- )
- );
- }
-
- if ( empty( $active_extensions['local'] ) ) {
- $extension_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/jq' ),
- 'local-seo.png', 261,
- 152,
- sprintf(
- /* translators: %1$s expands to Yoast Local SEO. */
- __( 'Buy the %1$s plugin now to improve your site’s Local SEO and ranking in Google Maps!', 'wordpress-seo' ),
- 'Yoast Local SEO'
- )
- )
- );
- }
-
- if ( empty( $active_extensions['news'] ) ) {
- $extension_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/jr' ),
- 'news-seo.png',
- 261,
- 152,
- sprintf(
- /* translators: %1$s expands to Yoast News SEO. */
- __( 'Buy the %1$s plugin now and start optimizing to get your site featured in Google News!', 'wordpress-seo' ),
- 'Yoast News SEO'
- )
- )
- );
- }
-
- return $extension_spot;
- }
-
- /**
- * Returns the courses banner spot.
- *
- * @return WPSEO_Admin_Banner_Spot
- */
- protected function get_courses_spot() {
- $courses_spot = new WPSEO_Admin_Banner_Spot( __( 'Improve your SEO skills', 'wordpress-seo' ), $this->banner_renderer );
-
- $courses_spot->set_description(
- sprintf(
- /* translators: %1$s expands to a link start tag to the Yoast Services page, %2$s is the link closing tag. */
- __( 'We believe SEO should be for everyone. That’s why we develop courses on any topic related to SEO. %1$sDiscover our online SEO courses »%2$s', 'wordpress-seo' ),
- '',
- ' '
- )
- );
-
- $courses_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/ju' ),
- 'basic-seo-training.png',
- 261,
- 152,
- __( 'Take the online Basic SEO Training course and learn the fundamentals of SEO!', 'wordpress-seo' )
- )
- );
-
- $courses_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/jv' ),
- 'yoast-seo-for-wordpress-training.png',
- 261,
- 152,
- sprintf(
- /* translators: %1$s expands to Yoast SEO for WordPress Training, %2$s to Yoast SEO for WordPress. */
- __( 'Take the %1$s course and become a certified %2$s expert!', 'wordpress-seo' ),
- 'Yoast SEO for WordPress Training',
- 'Yoast SEO for WordPress'
- )
- )
- );
-
- $courses_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/jw' ),
- 'seo-copywriting-training.png',
- 261,
- 152,
- __( 'Take the online SEO Copywriting Training course and learn how to write awesome copy that ranks!', 'wordpress-seo' )
- )
- );
-
- $courses_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/qy' ),
- 'site-structure-training.png',
- 261,
- 152,
- __( 'Take the online Site Structure Training course and learn how to structure your website!', 'wordpress-seo' )
- )
- );
-
- $courses_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/jaa' ),
- 'technical-seo-training.png',
- 261,
- 152,
- __( 'Take the online Technical SEO Training course and learn essential technical SEO-concepts!', 'wordpress-seo' )
- )
- );
-
- $courses_spot->add_banner(
- new WPSEO_Admin_Banner(
- WPSEO_Shortlinker::get( 'https://yoa.st/15h' ),
- 'structured-data-course.png',
- 261,
- 152,
- __( 'Take the online Structured Data Training course and learn how to create rich snippets!', 'wordpress-seo' )
- )
- );
-
- return $courses_spot;
- }
-
- /**
- * Returns the remove banner spot.
- *
- * @return WPSEO_Admin_Banner_Spot
- */
- protected function get_remove_banner_spot() {
-
- $remove_banner_spot = new WPSEO_Admin_Banner_Spot(
- __( 'Remove these ads?', 'wordpress-seo' )
- );
-
- $remove_banner_spot->set_description(
- '' .
- /* translators: %1$s expands to Yoast SEO Premium */
- sprintf( __( 'Upgrade to %1$s »', 'wordpress-seo' ), 'Yoast SEO Premium' ) .
- ' '
- );
-
- return $remove_banner_spot;
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot-renderer.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot-renderer.php
deleted file mode 100644
index 25c52a64..00000000
--- a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot-renderer.php
+++ /dev/null
@@ -1,39 +0,0 @@
-';
- if ( $banner_spot->get_title() !== '' ) {
- $output .= '' . $banner_spot->get_title() . ' ';
- }
-
- if ( $banner_spot->get_extra() !== '' ) {
- $output .= $banner_spot->get_extra();
- }
-
- if ( $banner_spot->get_description() !== '' ) {
- $output .= '' . $banner_spot->get_description() . '
';
- }
-
- $output .= $banner_spot->render_banner();
- $output .= '';
-
- return $output;
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot.php
deleted file mode 100644
index 648fd6d6..00000000
--- a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner-spot.php
+++ /dev/null
@@ -1,120 +0,0 @@
-title = $title;
- $this->banner_renderer = ( is_null( $banner_renderer ) ? new WPSEO_Admin_Banner_Renderer() : $banner_renderer );
- }
-
- /**
- * Returns the title.
- *
- * @return string
- */
- public function get_title() {
- return $this->title;
- }
-
- /**
- * Returns the description.
- *
- * @return string
- */
- public function get_description() {
- return $this->description;
- }
-
- /**
- * Returns the extra content.
- *
- * @return string
- */
- public function get_extra() {
- return $this->extra;
- }
-
- /**
- * Sets the description
- *
- * @param string $description The description.
- */
- public function set_description( $description ) {
- $this->description = $description;
- }
-
- /**
- * Sets the "extra"
- *
- * @param string $extra The "extra".
- */
- public function set_extra( $extra ) {
- $this->extra = $extra;
- }
-
- /**
- * Adds an admin banner.
- *
- * @param WPSEO_Admin_Banner $banner The banner to add.
- */
- public function add_banner( WPSEO_Admin_Banner $banner ) {
- $this->banners[] = $banner;
- }
-
- /**
- * Renders the banner.
- *
- * @return string
- */
- public function render_banner() {
- if ( ! $this->has_banners() ) {
- return '';
- }
-
- return $this->banner_renderer->render( $this->get_random_banner() );
- }
-
- /**
- * Checks if there are any banners set.
- *
- * @return bool
- */
- public function has_banners() {
- return ! empty( $this->banners );
- }
-
- /**
- * Returns a random banner.
- *
- * @return null|WPSEO_Admin_Banner
- */
- protected function get_random_banner() {
- return $this->banners[ array_rand( $this->banners, 1 ) ];
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner.php b/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner.php
deleted file mode 100644
index 55d0b358..00000000
--- a/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner.php
+++ /dev/null
@@ -1,89 +0,0 @@
-url = $url;
- $this->image = $image;
- $this->alt = $alt;
- $this->width = $width;
- $this->height = $height;
- }
-
- /**
- * Returns the set url.
- *
- * @return string
- */
- public function get_url() {
- return $this->url;
- }
-
- /**
- * Returns the image.
- *
- * @return string
- */
- public function get_image() {
- return $this->image;
- }
-
- /**
- * Returns the alt-text.
- *
- * @return string
- */
- public function get_alt() {
- return $this->alt;
- }
-
- /**
- * Returns the width.
- *
- * @return string
- */
- public function get_width() {
- return $this->width;
- }
-
- /**
- * Returns the height.
- *
- * @return string
- */
- public function get_height() {
- return $this->height;
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/capabilities/class-abstract-capability-manager.php b/wp-content/plugins/wordpress-seo/admin/capabilities/class-abstract-capability-manager.php
index 00e7417b..29e81605 100644
--- a/wp-content/plugins/wordpress-seo/admin/capabilities/class-abstract-capability-manager.php
+++ b/wp-content/plugins/wordpress-seo/admin/capabilities/class-abstract-capability-manager.php
@@ -9,15 +9,20 @@
* Abstract Capability Manager shared code.
*/
abstract class WPSEO_Abstract_Capability_Manager implements WPSEO_Capability_Manager {
- /** @var array Registered capabilities */
- protected $capabilities = array();
+
+ /**
+ * Registered capabilities.
+ *
+ * @var array
+ */
+ protected $capabilities = [];
/**
* Registers a capability.
*
* @param string $capability Capability to register.
* @param array $roles Roles to add the capability to.
- * @param bool $overwrite Optional. Use add or overwrite as registration method.
+ * @param bool $overwrite Optional. Use add or overwrite as registration method.
*/
public function register( $capability, array $roles, $overwrite = false ) {
if ( $overwrite || ! isset( $this->capabilities[ $capability ] ) ) {
@@ -76,7 +81,7 @@ abstract class WPSEO_Abstract_Capability_Manager implements WPSEO_Capability_Man
// Make sure we have the expected type.
if ( ! is_array( $filtered ) ) {
- return array();
+ return [];
}
return $filtered;
diff --git a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-factory.php b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-factory.php
index 0e1c56a1..e265bee1 100644
--- a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-factory.php
+++ b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-factory.php
@@ -9,24 +9,27 @@
* Capability Manager Factory.
*/
class WPSEO_Capability_Manager_Factory {
+
/**
* Returns the Manager to use.
*
+ * @param string $plugin_type Whether it's Free or Premium.
+ *
* @return WPSEO_Capability_Manager Manager to use.
*/
- public static function get() {
- static $manager = null;
+ public static function get( $plugin_type = 'free' ) {
+ static $manager = [];
- if ( $manager === null ) {
+ if ( ! array_key_exists( $plugin_type, $manager ) ) {
if ( function_exists( 'wpcom_vip_add_role_caps' ) ) {
- $manager = new WPSEO_Capability_Manager_VIP();
+ $manager[ $plugin_type ] = new WPSEO_Capability_Manager_VIP();
}
if ( ! function_exists( 'wpcom_vip_add_role_caps' ) ) {
- $manager = new WPSEO_Capability_Manager_WP();
+ $manager[ $plugin_type ] = new WPSEO_Capability_Manager_WP();
}
}
- return $manager;
+ return $manager[ $plugin_type ];
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-integration.php b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-integration.php
index b08416c6..ec8df74a 100644
--- a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-integration.php
+++ b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-integration.php
@@ -13,7 +13,11 @@
*/
class WPSEO_Capability_Manager_Integration implements WPSEO_WordPress_Integration {
- /** @var WPSEO_Capability_Manager Capability manager to use. */
+ /**
+ * Capability manager to use.
+ *
+ * @var WPSEO_Capability_Manager
+ */
public $manager;
/**
@@ -31,11 +35,11 @@ class WPSEO_Capability_Manager_Integration implements WPSEO_WordPress_Integratio
* @return void
*/
public function register_hooks() {
- add_filter( 'members_get_capabilities', array( $this, 'get_capabilities' ) );
- add_action( 'members_register_cap_groups', array( $this, 'action_members_register_cap_group' ) );
+ add_filter( 'members_get_capabilities', [ $this, 'get_capabilities' ] );
+ add_action( 'members_register_cap_groups', [ $this, 'action_members_register_cap_group' ] );
- add_filter( 'ure_capabilities_groups_tree', array( $this, 'filter_ure_capabilities_groups_tree' ) );
- add_filter( 'ure_custom_capability_groups', array( $this, 'filter_ure_custom_capability_groups' ), 10, 2 );
+ add_filter( 'ure_capabilities_groups_tree', [ $this, 'filter_ure_capabilities_groups_tree' ] );
+ add_filter( 'ure_custom_capability_groups', [ $this, 'filter_ure_custom_capability_groups' ], 10, 2 );
}
/**
@@ -45,7 +49,7 @@ class WPSEO_Capability_Manager_Integration implements WPSEO_WordPress_Integratio
* @param array $caps Optional existing capability list.
* @return array
*/
- public function get_capabilities( array $caps = array() ) {
+ public function get_capabilities( array $caps = [] ) {
if ( ! did_action( 'wpseo_register_capabilities' ) ) {
do_action( 'wpseo_register_capabilities' );
}
@@ -56,40 +60,40 @@ class WPSEO_Capability_Manager_Integration implements WPSEO_WordPress_Integratio
/**
* Add capabilities to its own group in the Members plugin.
*
- * @see members_register_cap_group()
+ * @see members_register_cap_group()
*/
public function action_members_register_cap_group() {
if ( ! function_exists( 'members_register_cap_group' ) ) {
return;
}
+
// Register the yoast group.
- members_register_cap_group( 'wordpress-seo',
- array(
- 'label' => esc_html__( 'Yoast SEO', 'wordpress-seo' ),
- 'caps' => $this->get_capabilities(),
- 'icon' => 'dashicons-admin-plugins',
- 'diff_added' => true,
- )
- );
+ $args = [
+ 'label' => esc_html__( 'Yoast SEO', 'wordpress-seo' ),
+ 'caps' => $this->get_capabilities(),
+ 'icon' => 'dashicons-admin-plugins',
+ 'diff_added' => true,
+ ];
+ members_register_cap_group( 'wordpress-seo', $args );
}
/**
* Adds Yoast SEO capability group in the User Role Editor plugin.
*
- * @see URE_Capabilities_Groups_Manager::get_groups_tree()
+ * @see URE_Capabilities_Groups_Manager::get_groups_tree()
*
- * @param array $groups Current groups.
+ * @param array $groups Current groups.
*
* @return array Filtered list of capabilty groups.
*/
- public function filter_ure_capabilities_groups_tree( $groups = array() ) {
+ public function filter_ure_capabilities_groups_tree( $groups = [] ) {
$groups = (array) $groups;
- $groups['wordpress-seo'] = array(
+ $groups['wordpress-seo'] = [
'caption' => 'Yoast SEO',
'parent' => 'custom',
'level' => 3,
- );
+ ];
return $groups;
}
@@ -97,14 +101,14 @@ class WPSEO_Capability_Manager_Integration implements WPSEO_WordPress_Integratio
/**
* Adds capabilities to the Yoast SEO group in the User Role Editor plugin.
*
- * @see URE_Capabilities_Groups_Manager::get_cap_groups()
+ * @see URE_Capabilities_Groups_Manager::get_cap_groups()
*
- * @param array $groups Current capability groups.
- * @param string $cap_id Capability identifier.
+ * @param array $groups Current capability groups.
+ * @param string $cap_id Capability identifier.
*
* @return array List of filtered groups.
*/
- public function filter_ure_custom_capability_groups( $groups = array(), $cap_id = '' ) {
+ public function filter_ure_custom_capability_groups( $groups = [], $cap_id = '' ) {
if ( in_array( $cap_id, $this->get_capabilities(), true ) ) {
$groups = (array) $groups;
$groups[] = 'wordpress-seo';
diff --git a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-vip.php b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-vip.php
index b621ddeb..4f56e8e4 100644
--- a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-vip.php
+++ b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-vip.php
@@ -9,13 +9,14 @@
* VIP implementation of the Capability Manager.
*/
final class WPSEO_Capability_Manager_VIP extends WPSEO_Abstract_Capability_Manager {
+
/**
* Adds the registered capabilities to the system.
*
* @return void
*/
public function add() {
- $role_capabilities = array();
+ $role_capabilities = [];
foreach ( $this->capabilities as $capability => $roles ) {
$role_capabilities = $this->get_role_capabilities( $role_capabilities, $capability, $roles );
}
@@ -35,7 +36,7 @@ final class WPSEO_Capability_Manager_VIP extends WPSEO_Abstract_Capability_Manag
$roles = wp_roles()->get_names();
$roles = array_keys( $roles );
- $role_capabilities = array();
+ $role_capabilities = [];
foreach ( array_keys( $this->capabilities ) as $capability ) {
// Allow filtering of roles.
$role_capabilities = $this->get_role_capabilities( $role_capabilities, $capability, $roles );
@@ -61,7 +62,7 @@ final class WPSEO_Capability_Manager_VIP extends WPSEO_Abstract_Capability_Manag
foreach ( $filtered_roles as $role ) {
if ( ! isset( $add_role_caps[ $role ] ) ) {
- $role_capabilities[ $role ] = array();
+ $role_capabilities[ $role ] = [];
}
$role_capabilities[ $role ][] = $capability;
diff --git a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-wp.php b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-wp.php
index 63ba3134..18309567 100644
--- a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-wp.php
+++ b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-wp.php
@@ -9,6 +9,7 @@
* Default WordPress capability manager implementation.
*/
final class WPSEO_Capability_Manager_WP extends WPSEO_Abstract_Capability_Manager {
+
/**
* Adds the capabilities to the roles.
*
diff --git a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager.php b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager.php
index 1f8ec264..63f6962d 100644
--- a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager.php
+++ b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager.php
@@ -9,6 +9,7 @@
* Capability Manager interface.
*/
interface WPSEO_Capability_Manager {
+
/**
* Registers a capability.
*
diff --git a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-utils.php b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-utils.php
index 7124a337..0134f3c4 100644
--- a/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-utils.php
+++ b/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-utils.php
@@ -9,6 +9,7 @@
* Capability Utils collection.
*/
class WPSEO_Capability_Utils {
+
/**
* Checks if the user has the proper capabilities.
*
@@ -21,7 +22,52 @@ class WPSEO_Capability_Utils {
return self::has( $capability );
}
- return self::has_any( array( 'wpseo_manage_options', $capability ) );
+ return self::has_any( [ 'wpseo_manage_options', $capability ] );
+ }
+
+ /**
+ * Retrieves the users that have the specified capability.
+ *
+ * @param string $capability The name of the capability.
+ *
+ * @return array The users that have the capability.
+ */
+ public static function get_applicable_users( $capability ) {
+ $applicable_roles = self::get_applicable_roles( $capability );
+
+ if ( $applicable_roles === [] ) {
+ return [];
+ }
+
+ return get_users( [ 'role__in' => $applicable_roles ] );
+ }
+
+ /**
+ * Retrieves the roles that have the specified capability.
+ *
+ * @param string $capability The name of the capability.
+ *
+ * @return array The names of the roles that have the capability.
+ */
+ public static function get_applicable_roles( $capability ) {
+ $roles = wp_roles();
+ $role_names = $roles->get_names();
+
+ $applicable_roles = [];
+ foreach ( array_keys( $role_names ) as $role_name ) {
+ $role = $roles->get_role( $role_name );
+
+ if ( ! $role ) {
+ continue;
+ }
+
+ // Add role if it has the capability.
+ if ( array_key_exists( $capability, $role->capabilities ) && $role->capabilities[ $capability ] === true ) {
+ $applicable_roles[] = $role_name;
+ }
+ }
+
+ return $applicable_roles;
}
/**
diff --git a/wp-content/plugins/wordpress-seo/admin/capabilities/class-register-capabilities.php b/wp-content/plugins/wordpress-seo/admin/capabilities/class-register-capabilities.php
index 762cf7c4..cd3d3646 100644
--- a/wp-content/plugins/wordpress-seo/admin/capabilities/class-register-capabilities.php
+++ b/wp-content/plugins/wordpress-seo/admin/capabilities/class-register-capabilities.php
@@ -9,13 +9,18 @@
* Capabilities registration class.
*/
class WPSEO_Register_Capabilities implements WPSEO_WordPress_Integration {
+
/**
* Registers the hooks.
*
* @return void
*/
public function register_hooks() {
- add_action( 'wpseo_register_capabilities', array( $this, 'register' ) );
+ add_action( 'wpseo_register_capabilities', [ $this, 'register' ] );
+
+ if ( is_multisite() ) {
+ add_action( 'user_has_cap', [ $this, 'filter_user_has_wpseo_manage_options_cap' ], 10, 4 );
+ }
}
/**
@@ -26,17 +31,47 @@ class WPSEO_Register_Capabilities implements WPSEO_WordPress_Integration {
public function register() {
$manager = WPSEO_Capability_Manager_Factory::get();
- $manager->register( 'wpseo_bulk_edit', array( 'editor', 'wpseo_editor', 'wpseo_manager' ) );
- $manager->register( 'wpseo_edit_advanced_metadata', array( 'wpseo_editor', 'wpseo_manager' ) );
+ $manager->register( 'wpseo_bulk_edit', [ 'editor', 'wpseo_editor', 'wpseo_manager' ] );
+ $manager->register( 'wpseo_edit_advanced_metadata', [ 'editor', 'wpseo_editor', 'wpseo_manager' ] );
- $manager->register( 'wpseo_manage_options', array( 'wpseo_manager' ) );
+ $manager->register( 'wpseo_manage_options', [ 'administrator', 'wpseo_manager' ] );
+ $manager->register( 'view_site_health_checks', [ 'wpseo_manager' ] );
+ }
- /*
- * Respect MultiSite 'access' setting if set to 'super admins only'.
- * This means that local admins do not get the `wpseo_manage_options` capability.
- */
- if ( WPSEO_Options::get( 'access' ) !== 'superadmins' ) {
- $manager->register( 'wpseo_manage_options', array( 'administrator' ) );
+ /**
+ * Revokes the 'wpseo_manage_options' capability from administrator users if it should
+ * only be granted to network administrators.
+ *
+ * @param array $allcaps An array of all the user's capabilities.
+ * @param array $caps Actual capabilities being checked.
+ * @param array $args Optional parameters passed to has_cap(), typically object ID.
+ * @param WP_User $user The user object.
+ *
+ * @return array Possibly modified array of the user's capabilities.
+ */
+ public function filter_user_has_wpseo_manage_options_cap( $allcaps, $caps, $args, $user ) {
+
+ // We only need to do something if 'wpseo_manage_options' is being checked.
+ if ( ! in_array( 'wpseo_manage_options', $caps, true ) ) {
+ return $allcaps;
}
+
+ // If the user does not have 'wpseo_manage_options' anyway, we don't need to revoke access.
+ if ( empty( $allcaps['wpseo_manage_options'] ) ) {
+ return $allcaps;
+ }
+
+ // If the user does not have 'delete_users', they are not an administrator.
+ if ( empty( $allcaps['delete_users'] ) ) {
+ return $allcaps;
+ }
+
+ $options = WPSEO_Options::get_instance();
+
+ if ( $options->get( 'access' ) === 'superadmin' && ! is_super_admin( $user->ID ) ) {
+ unset( $allcaps['wpseo_manage_options'] );
+ }
+
+ return $allcaps;
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-analysis-worker-location.php b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-analysis-worker-location.php
new file mode 100644
index 00000000..cb980ad1
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-analysis-worker-location.php
@@ -0,0 +1,75 @@
+flatten_version( WPSEO_VERSION );
+ }
+
+ $analysis_worker = $name . '-' . $flat_version . '.js';
+
+ $this->asset_location = WPSEO_Admin_Asset_Manager::create_default_location();
+ $this->asset = new WPSEO_Admin_Asset(
+ [
+ 'name' => $name,
+ 'src' => $analysis_worker,
+ ]
+ );
+ }
+
+ /**
+ * Retrieves the analysis worker asset.
+ *
+ * @return WPSEO_Admin_Asset The analysis worker asset.
+ */
+ public function get_asset() {
+ return $this->asset;
+ }
+
+ /**
+ * Determines the URL of the asset on the dev server.
+ *
+ * @param WPSEO_Admin_Asset $asset The asset to determine the URL for.
+ * @param string $type The type of asset. Usually JS or CSS.
+ *
+ * @return string The URL of the asset.
+ */
+ public function get_url( WPSEO_Admin_Asset $asset, $type ) {
+ $scheme = wp_parse_url( $asset->get_src(), PHP_URL_SCHEME );
+ if ( in_array( $scheme, [ 'http', 'https' ], true ) ) {
+ return $asset->get_src();
+ }
+
+ return $this->asset_location->get_url( $asset, $type );
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php
index d8c19fa2..5765bdc2 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php
@@ -9,28 +9,25 @@
* Changes the asset paths to dev server paths.
*/
final class WPSEO_Admin_Asset_Dev_Server_Location implements WPSEO_Admin_Asset_Location {
+
+ /**
+ * Holds the dev server's default URL.
+ *
+ * @var string
+ */
const DEFAULT_URL = 'http://localhost:8080';
/**
- * @var array
- */
- private static $dev_server_script = array(
- 'commons',
- 'configuration-wizard',
- 'wp-seo-dashboard-widget',
- 'wp-seo-help-center',
- 'wp-seo-metabox',
- 'wp-seo-post-scraper',
- 'wp-seo-term-scraper',
- );
-
- /**
+ * Holds the url where the server is located.
+ *
* @var string
*/
private $url;
/**
- * @param string $url Where the dev server is located.
+ * Class constructor.
+ *
+ * @param string|null $url Where the dev server is located.
*/
public function __construct( $url = null ) {
if ( $url === null ) {
@@ -49,7 +46,7 @@ final class WPSEO_Admin_Asset_Dev_Server_Location implements WPSEO_Admin_Asset_L
* @return string The URL of the asset.
*/
public function get_url( WPSEO_Admin_Asset $asset, $type ) {
- if ( WPSEO_Admin_Asset::TYPE_CSS === $type ) {
+ if ( $type === WPSEO_Admin_Asset::TYPE_CSS ) {
return $this->get_default_url( $asset, $type );
}
@@ -57,11 +54,11 @@ final class WPSEO_Admin_Asset_Dev_Server_Location implements WPSEO_Admin_Asset_L
$flat_version = $asset_manager->flatten_version( WPSEO_VERSION );
$version_less_source = str_replace( '-' . $flat_version, '', $asset->get_src() );
- if ( ! in_array( $version_less_source, self::$dev_server_script, true ) ) {
+ if ( strpos( $version_less_source, 'select2' ) !== false ) {
return $this->get_default_url( $asset, $type );
}
- $path = sprintf( '%s%s.js', $asset->get_src(), $asset->get_suffix() );
+ $path = sprintf( 'js/dist/%s%s.js', $asset->get_src(), $asset->get_suffix() );
return trailingslashit( $this->url ) . $path;
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php
index 4a469306..f0929b92 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php
@@ -6,31 +6,47 @@
*/
/**
- * This class registers all the necessary styles and scripts. Also has methods for the enqueing of scripts and styles. It automatically adds a prefix to the handle.
+ * This class registers all the necessary styles and scripts.
+ *
+ * Also has methods for the enqueing of scripts and styles.
+ * It automatically adds a prefix to the handle.
*/
class WPSEO_Admin_Asset_Manager {
/**
+ * Prefix for naming the assets.
+ *
+ * @var string
+ */
+ const PREFIX = 'yoast-seo-';
+
+ /**
+ * Class that manages the assets' location.
+ *
* @var WPSEO_Admin_Asset_Location
*/
protected $asset_location;
/**
- * Prefix for naming the assets.
+ * Prefix for naming the assets.
+ *
+ * @var string
*/
- const PREFIX = 'yoast-seo-';
+ private $prefix;
/**
* Constructs a manager of assets. Needs a location to know where to register assets at.
*
- * @param WPSEO_Admin_Asset_Location $asset_location The provider of the asset location.
+ * @param WPSEO_Admin_Asset_Location|null $asset_location The provider of the asset location.
+ * @param string $prefix The prefix for naming assets.
*/
- public function __construct( WPSEO_Admin_Asset_Location $asset_location = null ) {
+ public function __construct( WPSEO_Admin_Asset_Location $asset_location = null, $prefix = self::PREFIX ) {
if ( $asset_location === null ) {
$asset_location = self::create_default_location();
}
$this->asset_location = $asset_location;
+ $this->prefix = $prefix;
}
/**
@@ -39,7 +55,7 @@ class WPSEO_Admin_Asset_Manager {
* @param string $script The name of the script to enqueue.
*/
public function enqueue_script( $script ) {
- wp_enqueue_script( self::PREFIX . $script );
+ wp_enqueue_script( $this->prefix . $script );
}
/**
@@ -48,7 +64,14 @@ class WPSEO_Admin_Asset_Manager {
* @param string $style The name of the style to enqueue.
*/
public function enqueue_style( $style ) {
- wp_enqueue_style( self::PREFIX . $style );
+ wp_enqueue_style( $this->prefix . $style );
+ }
+
+ /**
+ * Enqueues the appropriate language for the user.
+ */
+ public function enqueue_user_language_script() {
+ $this->enqueue_script( 'language-' . YoastSEO()->helpers->language->get_researcher_language() );
}
/**
@@ -57,9 +80,11 @@ class WPSEO_Admin_Asset_Manager {
* @param WPSEO_Admin_Asset $script The script to register.
*/
public function register_script( WPSEO_Admin_Asset $script ) {
+ $url = $script->get_src() ? $this->get_url( $script, WPSEO_Admin_Asset::TYPE_JS ) : false;
+
wp_register_script(
- self::PREFIX . $script->get_name(),
- $this->asset_location->get_url( $script, WPSEO_Admin_Asset::TYPE_JS ),
+ $this->prefix . $script->get_name(),
+ $url,
$script->get_deps(),
$script->get_version(),
$script->is_in_footer()
@@ -73,8 +98,8 @@ class WPSEO_Admin_Asset_Manager {
*/
public function register_style( WPSEO_Admin_Asset $style ) {
wp_register_style(
- self::PREFIX . $style->get_name(),
- $this->asset_location->get_url( $style, WPSEO_Admin_Asset::TYPE_CSS ),
+ $this->prefix . $style->get_name(),
+ $this->get_url( $style, WPSEO_Admin_Asset::TYPE_CSS ),
$style->get_deps(),
$style->get_version(),
$style->get_media()
@@ -85,17 +110,6 @@ class WPSEO_Admin_Asset_Manager {
* Calls the functions that register scripts and styles with the scripts and styles to be registered as arguments.
*/
public function register_assets() {
-
- $user_locale = WPSEO_Utils::get_user_locale();
- $language = WPSEO_Utils::get_language( $user_locale );
-
- wp_register_script(
- self::PREFIX . 'intl-polyfill',
- sprintf( 'https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.%s', $language ),
- array(),
- WPSEO_VERSION
- );
-
$this->register_scripts( $this->scripts_to_be_registered() );
$this->register_styles( $this->styles_to_be_registered() );
}
@@ -113,9 +127,9 @@ class WPSEO_Admin_Asset_Manager {
}
/**
- * Registers all the styles it recieves.
+ * Registers all the styles it receives.
*
- * @param array $styles Styles that need to be registerd.
+ * @param array $styles Styles that need to be registered.
*/
public function register_styles( $styles ) {
foreach ( $styles as $style ) {
@@ -124,6 +138,17 @@ class WPSEO_Admin_Asset_Manager {
}
}
+ /**
+ * Localizes the script.
+ *
+ * @param string $handle The script handle.
+ * @param string $object_name The object name.
+ * @param array $data The l10n data.
+ */
+ public function localize_script( $handle, $object_name, $data ) {
+ \wp_localize_script( $this->prefix . $handle, $object_name, $data );
+ }
+
/**
* A list of styles that shouldn't be registered but are needed in other locations in the plugin.
*
@@ -131,19 +156,19 @@ class WPSEO_Admin_Asset_Manager {
*/
public function special_styles() {
$flat_version = $this->flatten_version( WPSEO_VERSION );
+ $asset_args = [
+ 'name' => 'inside-editor',
+ 'src' => 'inside-editor-' . $flat_version,
+ ];
- return array(
- 'inside-editor' => new WPSEO_Admin_Asset( array(
- 'name' => 'inside-editor',
- 'src' => 'inside-editor-' . $flat_version,
- ) ),
- );
+ return [ 'inside-editor' => new WPSEO_Admin_Asset( $asset_args ) ];
}
/**
- * Flattens a version number for use in a filename
+ * Flattens a version number for use in a filename.
*
* @param string $version The original version number.
+ *
* @return string The flattened version number.
*/
public function flatten_version( $version ) {
@@ -168,7 +193,18 @@ class WPSEO_Admin_Asset_Manager {
return new WPSEO_Admin_Asset_Dev_Server_Location( $url );
}
- return new WPSEO_Admin_Asset_SEO_Location( WPSEO_FILE );
+ return new WPSEO_Admin_Asset_SEO_Location( WPSEO_FILE, false );
+ }
+
+ /**
+ * Checks if the given script is enqueued.
+ *
+ * @param string $script The script to check.
+ *
+ * @return bool True when the script is enqueued.
+ */
+ public function is_script_enqueued( $script ) {
+ return \wp_script_is( $this->prefix . $script );
}
/**
@@ -176,13 +212,190 @@ class WPSEO_Admin_Asset_Manager {
*
* @todo Data format is not self-documenting. Needs explanation inline. R.
*
- * @return array scripts that need to be registered.
+ * @return array The scripts that need to be registered.
*/
- private function scripts_to_be_registered() {
+ protected function scripts_to_be_registered() {
+ $flat_version = $this->flatten_version( WPSEO_VERSION );
+ $ext_length = ( strlen( $flat_version ) + 4 );
+ $header_scripts = [
+ 'admin-global',
+ 'block-editor',
+ 'classic-editor',
+ 'post-edit',
+ 'help-scout-beacon',
+ ];
+ $additional_dependencies = [
+ 'analysis-worker' => [ self::PREFIX . 'analysis-package' ],
+ 'api-client' => [ 'wp-api' ],
+ 'dashboard-widget' => [ self::PREFIX . 'api-client' ],
+ 'elementor' => [ self::PREFIX . 'api-client' ],
+ 'indexation' => [
+ 'jquery-ui-core',
+ 'jquery-ui-progressbar',
+ ],
+ 'post-edit' => [
+ self::PREFIX . 'api-client',
+ self::PREFIX . 'block-editor',
+ self::PREFIX . 'select2',
+ ],
+ 'reindex-links' => [
+ 'jquery-ui-core',
+ 'jquery-ui-progressbar',
+ ],
+ 'settings' => [
+ 'jquery-ui-core',
+ 'jquery-ui-progressbar',
+ self::PREFIX . 'api-client',
+ self::PREFIX . 'select2',
+ ],
+ 'term-edit' => [
+ self::PREFIX . 'api-client',
+ self::PREFIX . 'classic-editor',
+ self::PREFIX . 'select2',
+ ],
+ ];
+
+ $plugin_scripts = $this->load_generated_asset_file(
+ [
+ 'asset_file' => __DIR__ . '/../src/generated/assets/plugin.php',
+ 'ext_length' => $ext_length,
+ 'additional_deps' => $additional_dependencies,
+ 'header_scripts' => $header_scripts,
+ ]
+ );
+ $external_scripts = $this->load_generated_asset_file(
+ [
+ 'asset_file' => __DIR__ . '/../src/generated/assets/externals.php',
+ 'ext_length' => $ext_length,
+ 'suffix' => '-package',
+ 'base_dir' => 'externals/',
+ 'additional_deps' => $additional_dependencies,
+ 'header_scripts' => $header_scripts,
+ ]
+ );
+ $language_scripts = $this->load_generated_asset_file(
+ [
+ 'asset_file' => __DIR__ . '/../src/generated/assets/languages.php',
+ 'ext_length' => $ext_length,
+ 'suffix' => '-language',
+ 'base_dir' => 'languages/',
+ 'additional_deps' => $additional_dependencies,
+ 'header_scripts' => $header_scripts,
+ ]
+ );
+ $select2_scripts = $this->load_select2_scripts();
+ $renamed_scripts = $this->load_renamed_scripts();
+
+ $scripts = array_merge(
+ $plugin_scripts,
+ $external_scripts,
+ $language_scripts,
+ $select2_scripts,
+ $renamed_scripts
+ );
+
+ $scripts['post-edit-classic'] = [
+ 'name' => 'post-edit-classic',
+ 'src' => $scripts['post-edit']['src'],
+ 'deps' => array_map(
+ function( $dep ) {
+ if ( $dep === self::PREFIX . 'block-editor' ) {
+ return self::PREFIX . 'classic-editor';
+ }
+ return $dep;
+ },
+ $scripts['post-edit']['deps']
+ ),
+ 'in_footer' => ! in_array( 'post-edit-classic', $header_scripts, true ),
+ ];
+
+ // Add the current language to every script that requires the analysis package.
+ foreach ( $scripts as $name => $script ) {
+ if ( substr( $name, -8 ) === 'language' ) {
+ continue;
+ }
+ if ( in_array( self::PREFIX . 'analysis-package', $script['deps'], true ) ) {
+ $scripts[ $name ]['deps'][] = self::PREFIX . YoastSEO()->helpers->language->get_researcher_language() . '-language';
+ }
+ }
+
+ return $scripts;
+ }
+
+ /**
+ * Loads a generated asset file.
+ *
+ * @param array $args {
+ * The arguments.
+ *
+ * @type string $asset_file The asset file to load.
+ * @type int $ext_length The length of the extension, including suffix, of the filename.
+ * @type string $suffix Optional. The suffix of the asset name.
+ * @type array $additional_deps Optional. The additional dependencies assets may have.
+ * @type string $base_dir Optional. The base directory of the asset.
+ * @type string[] $header_scripts Optional. The script names that should be in the header.
+ * }
+ *
+ * @return array {
+ * The scripts to be registered.
+ *
+ * @type string $name The name of the asset.
+ * @type string $src The src of the asset.
+ * @type string[] $deps The dependenies of the asset.
+ * @type bool $in_footer Whether or not the asset should be in the footer.
+ * }
+ */
+ protected function load_generated_asset_file( $args ) {
+ $args = wp_parse_args(
+ $args,
+ [
+ 'suffix' => '',
+ 'additional_deps' => [],
+ 'base_dir' => '',
+ 'header_scripts' => [],
+ ]
+ );
+ $scripts = [];
+ $assets = require $args['asset_file'];
+ foreach ( $assets as $file => $data ) {
+ $name = substr( $file, 0, -$args['ext_length'] );
+ $name = strtolower( preg_replace( '/([A-Z])/', '-$1', $name ) );
+ $name = $name . $args['suffix'];
+
+ $deps = $data['dependencies'];
+ if ( isset( $args['additional_deps'][ $name ] ) ) {
+ $deps = array_merge( $deps, $args['additional_deps'][ $name ] );
+ }
+
+ $scripts[ $name ] = [
+ 'name' => $name,
+ 'src' => $args['base_dir'] . $file,
+ 'deps' => $deps,
+ 'in_footer' => ! in_array( $name, $args['header_scripts'], true ),
+ ];
+ }
+
+ return $scripts;
+ }
+
+ /**
+ * Loads the select2 scripts.
+ *
+ * @return array {
+ * The scripts to be registered.
+ *
+ * @type string $name The name of the asset.
+ * @type string $src The src of the asset.
+ * @type string[] $deps The dependenies of the asset.
+ * @type bool $in_footer Whether or not the asset should be in the footer.
+ * }
+ */
+ protected function load_select2_scripts() {
+ $scripts = [];
$select2_language = 'en';
- $user_locale = WPSEO_Utils::get_user_locale();
- $language = WPSEO_Utils::get_language( $user_locale );
+ $user_locale = \get_user_locale();
+ $language = WPSEO_Language_Utils::get_language( $user_locale );
if ( file_exists( WPSEO_PATH . "js/dist/select2/i18n/{$user_locale}.js" ) ) {
$select2_language = $user_locale; // Chinese and some others use full locale.
@@ -191,217 +404,80 @@ class WPSEO_Admin_Asset_Manager {
$select2_language = $language;
}
- $flat_version = $this->flatten_version( WPSEO_VERSION );
+ $scripts['select2'] = [
+ 'name' => 'select2',
+ 'src' => false,
+ 'deps' => [
+ self::PREFIX . 'select2-translations',
+ self::PREFIX . 'select2-core',
+ ],
+ ];
+ $scripts['select2-core'] = [
+ 'name' => 'select2-core',
+ 'src' => 'select2/select2.full.min.js',
+ 'deps' => [
+ 'jquery',
+ ],
+ 'version' => '4.0.3',
+ ];
+ $scripts['select2-translations'] = [
+ 'name' => 'select2-translations',
+ 'src' => 'select2/i18n/' . $select2_language . '.js',
+ 'deps' => [
+ 'jquery',
+ self::PREFIX . 'select2-core',
+ ],
+ 'version' => '4.0.3',
+ ];
- return array(
- array(
- 'name' => 'react-dependencies',
- // Load webpack-commons for bundle support.
- 'src' => 'commons-' . $flat_version,
- 'deps' => array(
- self::PREFIX . 'intl-polyfill',
- self::PREFIX . 'babel-polyfill',
- ),
- ),
- array(
- 'name' => 'help-center',
- 'src' => 'wp-seo-help-center-' . $flat_version,
- 'deps' => array(
- 'jquery',
- self::PREFIX . 'react-dependencies',
- ),
- ),
- array(
- 'name' => 'admin-script',
- 'src' => 'wp-seo-admin-' . $flat_version,
- 'deps' => array(
- 'jquery',
- 'jquery-ui-core',
- 'jquery-ui-progressbar',
- self::PREFIX . 'select2',
- self::PREFIX . 'select2-translations',
- self::PREFIX . 'babel-polyfill',
- ),
- ),
- array(
- 'name' => 'admin-media',
- 'src' => 'wp-seo-admin-media-' . $flat_version,
- 'deps' => array(
- 'jquery',
- 'jquery-ui-core',
- self::PREFIX . 'babel-polyfill',
- ),
- ),
- array(
- 'name' => 'bulk-editor',
- 'src' => 'wp-seo-bulk-editor-' . $flat_version,
- 'deps' => array( 'jquery', self::PREFIX . 'babel-polyfill' ),
- ),
- array(
- 'name' => 'dismissible',
- 'src' => 'wp-seo-dismissible-' . $flat_version,
- 'deps' => array( 'jquery', self::PREFIX . 'babel-polyfill' ),
- ),
- array(
- 'name' => 'admin-global-script',
- 'src' => 'wp-seo-admin-global-' . $flat_version,
- 'deps' => array( 'jquery', self::PREFIX . 'babel-polyfill' ),
- ),
- array(
- 'name' => 'metabox',
- 'src' => 'wp-seo-metabox-' . $flat_version,
- 'deps' => array(
- 'jquery',
- self::PREFIX . 'select2',
- self::PREFIX . 'select2-translations',
- self::PREFIX . 'react-dependencies',
- ),
- 'in_footer' => false,
- ),
- array(
- 'name' => 'featured-image',
- 'src' => 'wp-seo-featured-image-' . $flat_version,
- 'deps' => array(
- 'jquery',
- self::PREFIX . 'babel-polyfill',
- ),
- ),
- array(
- 'name' => 'admin-gsc',
- 'src' => 'wp-seo-admin-gsc-' . $flat_version,
- 'deps' => array( self::PREFIX . 'babel-polyfill' ),
- 'in_footer' => false,
- ),
- array(
- 'name' => 'post-scraper',
- 'src' => 'wp-seo-post-scraper-' . $flat_version,
- 'deps' => array(
- self::PREFIX . 'replacevar-plugin',
- self::PREFIX . 'shortcode-plugin',
- 'wp-util',
- self::PREFIX . 'react-dependencies',
- ),
- ),
- array(
- 'name' => 'term-scraper',
- 'src' => 'wp-seo-term-scraper-' . $flat_version,
- 'deps' => array(
- self::PREFIX . 'replacevar-plugin',
- self::PREFIX . 'react-dependencies',
- ),
- ),
- array(
- 'name' => 'replacevar-plugin',
- 'src' => 'wp-seo-replacevar-plugin-' . $flat_version,
- 'deps' => array(
- self::PREFIX . 'babel-polyfill',
- ),
- ),
- array(
- 'name' => 'shortcode-plugin',
- 'src' => 'wp-seo-shortcode-plugin-' . $flat_version,
- 'deps' => array(
- self::PREFIX . 'babel-polyfill',
- ),
- ),
- array(
- 'name' => 'recalculate',
- 'src' => 'wp-seo-recalculate-' . $flat_version,
- 'deps' => array(
- 'jquery',
- 'jquery-ui-core',
- 'jquery-ui-progressbar',
- self::PREFIX . 'babel-polyfill',
- ),
- ),
- array(
- 'name' => 'primary-category',
- 'src' => 'wp-seo-metabox-category-' . $flat_version,
- 'deps' => array(
- 'jquery',
- 'wp-util',
- self::PREFIX . 'babel-polyfill',
- ),
- ),
- array(
- 'name' => 'select2',
- 'src' => 'select2/select2.full',
- 'suffix' => '.min',
- 'deps' => array(
- 'jquery',
- ),
- 'version' => '4.0.3',
- ),
- array(
- 'name' => 'select2-translations',
- 'src' => 'select2/i18n/' . $select2_language,
- 'deps' => array(
- 'jquery',
- self::PREFIX . 'select2',
- ),
- 'version' => '4.0.3',
- 'suffix' => '',
- ),
- array(
- 'name' => 'configuration-wizard',
- 'src' => 'configuration-wizard-' . $flat_version,
- 'deps' => array(
- 'jquery',
- self::PREFIX . 'react-dependencies',
- ),
- ),
- // Register for backwards-compatiblity.
- array(
- 'name' => 'polyfill',
- 'src' => 'wp-seo-babel-polyfill-' . $flat_version,
- ),
- array(
- 'name' => 'babel-polyfill',
- 'src' => 'wp-seo-babel-polyfill-' . $flat_version,
- ),
- array(
- 'name' => 'reindex-links',
- 'src' => 'wp-seo-reindex-links-' . $flat_version,
- 'deps' => array(
- 'jquery',
- 'jquery-ui-core',
- 'jquery-ui-progressbar',
- ),
- ),
- array(
- 'name' => 'edit-page-script',
- 'src' => 'wp-seo-edit-page-' . $flat_version,
- 'deps' => array( 'jquery' ),
- ),
- array(
- 'name' => 'quick-edit-handler',
- 'src' => 'wp-seo-quick-edit-handler-' . $flat_version,
- 'deps' => array( 'jquery' ),
- 'in_footer' => true,
- ),
- array(
- 'name' => 'api',
- 'src' => 'wp-seo-api-' . $flat_version,
- 'deps' => array(
- 'wp-api',
- 'jquery',
- ),
- ),
- array(
- 'name' => 'dashboard-widget',
- 'src' => 'wp-seo-dashboard-widget-' . $flat_version,
- 'deps' => array(
- self::PREFIX . 'api',
- 'jquery',
- self::PREFIX . 'react-dependencies',
- ),
- ),
- array(
- 'name' => 'filter-explanation',
- 'src' => 'wp-seo-filter-explanation-' . $flat_version,
- 'deps' => array( 'jquery' ),
- ),
- );
+ return $scripts;
+ }
+
+ /**
+ * Loads the scripts that should be renamed for BC.
+ *
+ * @return array {
+ * The scripts to be registered.
+ *
+ * @type string $name The name of the asset.
+ * @type string $src The src of the asset.
+ * @type string[] $deps The dependenies of the asset.
+ * @type bool $in_footer Whether or not the asset should be in the footer.
+ * }
+ */
+ protected function load_renamed_scripts() {
+ $scripts = [];
+ $renamed_scripts = [
+ 'admin-global-script' => 'admin-global',
+ 'analysis' => 'analysis-package',
+ 'analysis-report' => 'analysis-report-package',
+ 'api' => 'api-client',
+ 'commons' => 'commons-package',
+ 'edit-page' => 'edit-page-script',
+ 'draft-js' => 'draft-js-package',
+ 'feature-flag' => 'feature-flag-package',
+ 'helpers' => 'helpers-package',
+ 'jed' => 'jed-package',
+ 'legacy-components' => 'components-package',
+ 'network-admin-script' => 'network-admin',
+ 'redux' => 'redux-package',
+ 'replacement-variable-editor' => 'replacement-variable-editor-package',
+ 'search-metadata-previews' => 'search-metadata-previews-package',
+ 'social-metadata-forms' => 'social-metadata-forms-package',
+ 'styled-components' => 'styled-components-package',
+ 'style-guide' => 'style-guide-package',
+ 'yoast-components' => 'components-new-package',
+ ];
+
+ foreach ( $renamed_scripts as $original => $replacement ) {
+ $scripts[] = [
+ 'name' => $original,
+ 'src' => false,
+ 'deps' => [ self::PREFIX . $replacement ],
+ ];
+ }
+
+ return $scripts;
}
/**
@@ -409,87 +485,141 @@ class WPSEO_Admin_Asset_Manager {
*
* @todo Data format is not self-documenting. Needs explanation inline. R.
*
- * @return array styles that need to be registered.
+ * @return array Styles that need to be registered.
*/
- private function styles_to_be_registered() {
+ protected function styles_to_be_registered() {
$flat_version = $this->flatten_version( WPSEO_VERSION );
- return array(
- array(
+ return [
+ [
'name' => 'admin-css',
'src' => 'yst_plugin_tools-' . $flat_version,
- 'deps' => array( self::PREFIX . 'toggle-switch' ),
- ),
- array(
- 'name' => 'toggle-switch',
- 'src' => 'toggle-switch-' . $flat_version,
- ),
- array(
+ 'deps' => [ self::PREFIX . 'toggle-switch' ],
+ ],
+ [
+ 'name' => 'toggle-switch',
+ 'src' => 'toggle-switch-' . $flat_version,
+ ],
+ [
'name' => 'dismissible',
'src' => 'wpseo-dismissible-' . $flat_version,
- ),
- array(
- 'name' => 'alerts',
+ ],
+ [
+ 'name' => 'notifications',
+ 'src' => 'notifications-' . $flat_version,
+ ],
+ [
+ 'name' => 'alert',
'src' => 'alerts-' . $flat_version,
- ),
- array(
+ ],
+ [
'name' => 'edit-page',
'src' => 'edit-page-' . $flat_version,
- ),
- array(
+ ],
+ [
'name' => 'featured-image',
'src' => 'featured-image-' . $flat_version,
- ),
- array(
+ ],
+ [
'name' => 'metabox-css',
'src' => 'metabox-' . $flat_version,
- 'deps' => array(
+ 'deps' => [
self::PREFIX . 'select2',
- ),
- ),
- array(
+ self::PREFIX . 'admin-css',
+ 'wp-components',
+ ],
+ ],
+ [
'name' => 'wp-dashboard',
'src' => 'dashboard-' . $flat_version,
- ),
- array(
+ ],
+ [
'name' => 'scoring',
'src' => 'yst_seo_score-' . $flat_version,
- ),
- array(
- 'name' => 'snippet',
- 'src' => 'snippet-' . $flat_version,
- ),
- array(
+ ],
+ [
'name' => 'adminbar',
'src' => 'adminbar-' . $flat_version,
- ),
- array(
+ 'deps' => [
+ 'admin-bar',
+ ],
+ ],
+ [
'name' => 'primary-category',
'src' => 'metabox-primary-category-' . $flat_version,
- ),
- array(
+ ],
+ [
'name' => 'select2',
'src' => 'select2/select2',
'suffix' => '.min',
'version' => '4.0.1',
'rtl' => false,
- ),
- array(
+ ],
+ [
'name' => 'admin-global',
'src' => 'admin-global-' . $flat_version,
- ),
- array(
+ ],
+ [
'name' => 'yoast-components',
'src' => 'yoast-components-' . $flat_version,
- ),
- array(
+ ],
+ [
'name' => 'extensions',
'src' => 'yoast-extensions-' . $flat_version,
- ),
- array(
+ 'deps' => [
+ 'wp-components',
+ ],
+ ],
+ [
'name' => 'filter-explanation',
'src' => 'filter-explanation-' . $flat_version,
- ),
- );
+ ],
+ [
+ 'name' => 'search-appearance',
+ 'src' => 'search-appearance-' . $flat_version,
+ 'deps' => [
+ self::PREFIX . 'monorepo',
+ ],
+ ],
+ [
+ 'name' => 'monorepo',
+ 'src' => 'monorepo-' . $flat_version,
+ ],
+ [
+ 'name' => 'structured-data-blocks',
+ 'src' => 'structured-data-blocks-' . $flat_version,
+ 'deps' => [ 'wp-edit-blocks' ],
+ ],
+ [
+ 'name' => 'schema-blocks',
+ 'src' => 'schema-blocks-' . $flat_version,
+ ],
+ [
+ 'name' => 'elementor',
+ 'src' => 'elementor-' . $flat_version,
+ ],
+ [
+ 'name' => 'workouts',
+ 'src' => 'workouts-' . $flat_version,
+ 'deps' => [ self::PREFIX . 'monorepo' ],
+ ],
+ ];
+ }
+
+ /**
+ * Determines the URL of the asset.
+ *
+ * @param WPSEO_Admin_Asset $asset The asset to determine the URL for.
+ * @param string $type The type of asset. Usually JS or CSS.
+ *
+ * @return string The URL of the asset.
+ */
+ protected function get_url( WPSEO_Admin_Asset $asset, $type ) {
+ $scheme = wp_parse_url( $asset->get_src(), PHP_URL_SCHEME );
+ if ( in_array( $scheme, [ 'http', 'https' ], true ) ) {
+ return $asset->get_src();
+ }
+
+ return $this->asset_location->get_url( $asset, $type );
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-seo-location.php b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-seo-location.php
index 8719cd08..82ff1b68 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-seo-location.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-seo-location.php
@@ -11,17 +11,28 @@
final class WPSEO_Admin_Asset_SEO_Location implements WPSEO_Admin_Asset_Location {
/**
+ * Path to the plugin file.
+ *
* @var string
*/
protected $plugin_file;
+ /**
+ * Whether or not to add the file suffix to the asset.
+ *
+ * @var boolean
+ */
+ protected $add_suffix = true;
+
/**
* The plugin file to base the asset location upon.
*
- * @param string $plugin_file The plugin file string.
+ * @param string $plugin_file The plugin file string.
+ * @param boolean $add_suffix Optional. Whether or not a file suffix should be added.
*/
- public function __construct( $plugin_file ) {
+ public function __construct( $plugin_file, $add_suffix = true ) {
$this->plugin_file = $plugin_file;
+ $this->add_suffix = $add_suffix;
}
/**
@@ -38,57 +49,35 @@ final class WPSEO_Admin_Asset_SEO_Location implements WPSEO_Admin_Asset_Location
return '';
}
- if ( YOAST_ENVIRONMENT !== 'development' && ! $asset->get_suffix() ) {
- $plugin_path = plugin_dir_path( $this->plugin_file );
- if ( ! file_exists( $plugin_path . $path ) ) {
-
- // Give a notice to the user in the console (only once).
- WPSEO_Utils::javascript_console_notification(
- 'Development Files',
- sprintf(
- /* translators: %1$s resolves to https://github.com/Yoast/wordpress-seo */
- __( 'You are trying to load non-minified files. These are only available in our development package. Check out %1$s to see all the source files.', 'wordpress-seo' ),
- 'https://github.com/Yoast/wordpress-seo'
- ),
- true
- );
-
- // Just load the .min file.
- $path = $this->get_path( $asset, $type, '.min' );
- }
- }
-
return plugins_url( $path, $this->plugin_file );
}
/**
* Determines the path relative to the plugin folder of an asset.
*
- * @param WPSEO_Admin_Asset $asset The asset to determine the path
- * for.
- * @param string $type The type of asset.
- * @param string|null $force_suffix The suffix to force, or null when
- * to use the default suffix.
+ * @param WPSEO_Admin_Asset $asset The asset to determine the path for.
+ * @param string $type The type of asset.
*
* @return string The path to the asset file.
*/
- protected function get_path( WPSEO_Admin_Asset $asset, $type, $force_suffix = null ) {
+ protected function get_path( WPSEO_Admin_Asset $asset, $type ) {
$relative_path = '';
$rtl_suffix = '';
- $suffix = ( $force_suffix === null ) ? $asset->get_suffix() : $force_suffix;
-
switch ( $type ) {
case WPSEO_Admin_Asset::TYPE_JS:
- $relative_path = 'js/dist/' . $asset->get_src() . $suffix . '.js';
+ $relative_path = 'js/dist/' . $asset->get_src();
+ if ( $this->add_suffix ) {
+ $relative_path = $relative_path . $asset->get_suffix() . '.js';
+ }
break;
case WPSEO_Admin_Asset::TYPE_CSS:
// Path and suffix for RTL stylesheets.
- if ( function_exists( 'is_rtl' ) && is_rtl() && $asset->has_rtl() ) {
+ if ( is_rtl() && $asset->has_rtl() ) {
$rtl_suffix = '-rtl';
}
- $relative_path = 'css/dist/' . $asset->get_src() . $rtl_suffix . $suffix . '.css';
+ $relative_path = 'css/dist/' . $asset->get_src() . $rtl_suffix . $asset->get_suffix() . '.css';
break;
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-asset-yoast-components-l10n.php b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-yoast-components-l10n.php
new file mode 100644
index 00000000..04f290a7
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-asset-yoast-components-l10n.php
@@ -0,0 +1,63 @@
+asset_manager = new WPSEO_Admin_Asset_Manager();
+ }
+
+ /**
+ * Localizes the given script with the JavaScript translations.
+ *
+ * @param string $script_handle The script handle to localize for.
+ *
+ * @return void
+ */
+ public function localize_script( $script_handle ) {
+ $translations = [
+ 'yoast-components' => $this->get_translations( 'yoast-components' ),
+ 'wordpress-seo' => $this->get_translations( 'wordpress-seojs' ),
+ 'yoast-schema-blocks' => $this->get_translations( 'yoast-schema-blocks' ),
+ ];
+ $this->asset_manager->localize_script( $script_handle, 'wpseoYoastJSL10n', $translations );
+ }
+
+ /**
+ * Returns translations necessary for JS files.
+ *
+ * @param string $component The component to retrieve the translations for.
+ * @return object|null The translations in a Jed format for JS files.
+ */
+ protected function get_translations( $component ) {
+ $locale = \get_user_locale();
+
+ $file = WPSEO_PATH . 'languages/' . $component . '-' . $locale . '.json';
+ if ( file_exists( $file ) ) {
+ // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents -- Retrieving a local file.
+ $file = file_get_contents( $file );
+ if ( is_string( $file ) && $file !== '' ) {
+ return json_decode( $file, true );
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-editor-specific-replace-vars.php b/wp-content/plugins/wordpress-seo/admin/class-admin-editor-specific-replace-vars.php
new file mode 100644
index 00000000..4bcd1684
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-editor-specific-replace-vars.php
@@ -0,0 +1,227 @@
+ [ 'id', 'pt_single', 'pt_plural', 'parent_title' ],
+ 'post' => [ 'id', 'term404', 'pt_single', 'pt_plural' ],
+ // Custom post type.
+ 'custom_post_type' => [ 'id', 'term404', 'pt_single', 'pt_plural', 'parent_title' ],
+ // Settings - archive pages.
+ 'custom-post-type_archive' => [ 'pt_single', 'pt_plural' ],
+
+ // Taxonomies.
+ 'category' => [ 'term_title', 'term_description', 'category_description', 'parent_title', 'term_hierarchy' ],
+ 'post_tag' => [ 'term_title', 'term_description', 'tag_description' ],
+ 'post_format' => [ 'term_title' ],
+ // Custom taxonomy.
+ 'term-in-custom-taxonomy' => [ 'term_title', 'term_description', 'category_description', 'parent_title', 'term_hierarchy' ],
+
+ // Settings - special pages.
+ 'search' => [ 'searchphrase' ],
+ ];
+
+ /**
+ * WPSEO_Admin_Editor_Specific_Replace_Vars constructor.
+ */
+ public function __construct() {
+ $this->add_for_page_types(
+ [ 'page', 'post', 'custom_post_type' ],
+ WPSEO_Custom_Fields::get_custom_fields()
+ );
+
+ $this->add_for_page_types(
+ [ 'post', 'term-in-custom-taxonomy' ],
+ WPSEO_Custom_Taxonomies::get_custom_taxonomies()
+ );
+ }
+
+ /**
+ * Retrieves the editor specific replacement variables.
+ *
+ * @return array The editor specific replacement variables.
+ */
+ public function get() {
+ /**
+ * Filter: Adds the possibility to add extra editor specific replacement variables.
+ *
+ * @api array $replacement_variables Array of editor specific replace vars.
+ */
+ $replacement_variables = apply_filters(
+ 'wpseo_editor_specific_replace_vars',
+ $this->replacement_variables
+ );
+
+ if ( ! is_array( $replacement_variables ) ) {
+ $replacement_variables = $this->replacement_variables;
+ }
+
+ return array_filter( $replacement_variables, 'is_array' );
+ }
+
+ /**
+ * Retrieves the generic replacement variable names.
+ *
+ * Which are the replacement variables without the editor specific ones.
+ *
+ * @param array $replacement_variables Possibly generic replacement variables.
+ *
+ * @return array The generic replacement variable names.
+ */
+ public function get_generic( $replacement_variables ) {
+ $shared_variables = array_diff(
+ $this->extract_names( $replacement_variables ),
+ $this->get_unique_replacement_variables()
+ );
+
+ return array_values( $shared_variables );
+ }
+
+ /**
+ * Determines the page type of the current term.
+ *
+ * @param string $taxonomy The taxonomy name.
+ *
+ * @return string The page type.
+ */
+ public function determine_for_term( $taxonomy ) {
+ $replacement_variables = $this->get();
+ if ( array_key_exists( $taxonomy, $replacement_variables ) ) {
+ return $taxonomy;
+ }
+
+ return 'term-in-custom-taxonomy';
+ }
+
+ /**
+ * Determines the page type of the current post.
+ *
+ * @param WP_Post $post A WordPress post instance.
+ *
+ * @return string The page type.
+ */
+ public function determine_for_post( $post ) {
+ if ( $post instanceof WP_Post === false ) {
+ return 'post';
+ }
+
+ $replacement_variables = $this->get();
+ if ( array_key_exists( $post->post_type, $replacement_variables ) ) {
+ return $post->post_type;
+ }
+
+ return 'custom_post_type';
+ }
+
+ /**
+ * Determines the page type for a post type.
+ *
+ * @param string $post_type The name of the post_type.
+ * @param string $fallback The page type to fall back to.
+ *
+ * @return string The page type.
+ */
+ public function determine_for_post_type( $post_type, $fallback = 'custom_post_type' ) {
+ if ( ! $this->has_for_page_type( $post_type ) ) {
+ return $fallback;
+ }
+
+ return $post_type;
+ }
+
+ /**
+ * Determines the page type for an archive page.
+ *
+ * @param string $name The name of the archive.
+ * @param string $fallback The page type to fall back to.
+ *
+ * @return string The page type.
+ */
+ public function determine_for_archive( $name, $fallback = 'custom-post-type_archive' ) {
+ $page_type = $name . '_archive';
+
+ if ( ! $this->has_for_page_type( $page_type ) ) {
+ return $fallback;
+ }
+
+ return $page_type;
+ }
+
+ /**
+ * Adds the replavement variables for the given page types.
+ *
+ * @param array $page_types Page types to add variables for.
+ * @param array $replacement_variables_to_add The variables to add.
+ *
+ * @return void
+ */
+ protected function add_for_page_types( array $page_types, array $replacement_variables_to_add ) {
+ if ( empty( $replacement_variables_to_add ) ) {
+ return;
+ }
+
+ $replacement_variables_to_add = array_fill_keys( $page_types, $replacement_variables_to_add );
+ $replacement_variables = $this->replacement_variables;
+
+ $this->replacement_variables = array_merge_recursive( $replacement_variables, $replacement_variables_to_add );
+ }
+
+ /**
+ * Extracts the names from the given replacements variables.
+ *
+ * @param array $replacement_variables Replacement variables to extract the name from.
+ *
+ * @return array Extracted names.
+ */
+ protected function extract_names( $replacement_variables ) {
+ $extracted_names = [];
+
+ foreach ( $replacement_variables as $replacement_variable ) {
+ if ( empty( $replacement_variable['name'] ) ) {
+ continue;
+ }
+
+ $extracted_names[] = $replacement_variable['name'];
+ }
+
+ return $extracted_names;
+ }
+
+ /**
+ * Returns whether the given page type has editor specific replace vars.
+ *
+ * @param string $page_type The page type to check.
+ *
+ * @return bool True if there are associated editor specific replace vars.
+ */
+ protected function has_for_page_type( $page_type ) {
+ $replacement_variables = $this->get();
+
+ return ( ! empty( $replacement_variables[ $page_type ] ) && is_array( $replacement_variables[ $page_type ] ) );
+ }
+
+ /**
+ * Merges all editor specific replacement variables into one array and removes duplicates.
+ *
+ * @return array The list of unique editor specific replacement variables.
+ */
+ protected function get_unique_replacement_variables() {
+ $merged_replacement_variables = call_user_func_array( 'array_merge', array_values( $this->get() ) );
+
+ return array_unique( $merged_replacement_variables );
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-gutenberg-compatibility-notification.php b/wp-content/plugins/wordpress-seo/admin/class-admin-gutenberg-compatibility-notification.php
new file mode 100644
index 00000000..44d1957d
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-gutenberg-compatibility-notification.php
@@ -0,0 +1,105 @@
+compatibility_checker = new WPSEO_Gutenberg_Compatibility();
+ $this->notification_center = Yoast_Notification_Center::get();
+ }
+
+ /**
+ * Registers all hooks to WordPress.
+ *
+ * @return void
+ */
+ public function register_hooks() {
+ add_action( 'admin_init', [ $this, 'manage_notification' ] );
+ }
+
+ /**
+ * Manages if the notification should be shown or removed.
+ *
+ * @return void
+ */
+ public function manage_notification() {
+ /**
+ * Filter: 'yoast_display_gutenberg_compat_notification' - Allows developer to disable the Gutenberg compatibility
+ * notification.
+ *
+ * @api bool
+ */
+ $display_notification = apply_filters( 'yoast_display_gutenberg_compat_notification', true );
+
+ if (
+ ! $this->compatibility_checker->is_installed()
+ || $this->compatibility_checker->is_fully_compatible()
+ || ! $display_notification
+ ) {
+ $this->notification_center->remove_notification_by_id( $this->notification_id );
+
+ return;
+ }
+
+ $this->add_notification();
+ }
+
+ /**
+ * Adds the notification to the notificaton center.
+ *
+ * @return void
+ */
+ protected function add_notification() {
+ $level = $this->compatibility_checker->is_below_minimum() ? Yoast_Notification::ERROR : Yoast_Notification::WARNING;
+
+ $message = sprintf(
+ /* translators: %1$s expands to Yoast SEO, %2$s expands to the installed version, %3$s expands to Gutenberg */
+ __( '%1$s detected you are using version %2$s of %3$s, please update to the latest version to prevent compatibility issues.', 'wordpress-seo' ),
+ 'Yoast SEO',
+ $this->compatibility_checker->get_installed_version(),
+ 'Gutenberg'
+ );
+
+ $notification = new Yoast_Notification(
+ $message,
+ [
+ 'id' => $this->notification_id,
+ 'type' => $level,
+ 'priority' => 1,
+ ]
+ );
+
+ $this->notification_center->add_notification( $notification );
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-help-panel.php b/wp-content/plugins/wordpress-seo/admin/class-admin-help-panel.php
index 152598e5..6fdb6c2f 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-admin-help-panel.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-help-panel.php
@@ -11,21 +11,29 @@
class WPSEO_Admin_Help_Panel {
/**
+ * Unique identifier of the element the inline help refers to, used as an identifier in the html.
+ *
* @var string
*/
private $id;
/**
+ * The Help Button text. Needs a properly escaped string.
+ *
* @var string
*/
private $help_button_text;
/**
+ * The Help Panel content. Needs a properly escaped string (might contain HTML).
+ *
* @var string
*/
private $help_content;
/**
+ * Optional Whether to print out a container div element for the Help Panel, used for styling.
+ *
* @var string
*/
private $wrapper;
@@ -33,11 +41,13 @@ class WPSEO_Admin_Help_Panel {
/**
* Constructor.
*
- * @param string $id Unique identifier of the element the inline help refers to, used as an identifier in the html.
- * @param string $help_button_text The Help Button text. Needs a properly escaped string.
- * @param string $help_content The Help Panel content. Needs a properly escaped string (might contain HTML).
- * @param string $wrapper Optional Whether to print out a container div element for the Help Panel, used for styling.
- * Pass a `has-wrapper` value to print out the container. Default: no container.
+ * @param string $id Unique identifier of the element the inline help refers to, used as
+ * an identifier in the html.
+ * @param string $help_button_text The Help Button text. Needs a properly escaped string.
+ * @param string $help_content The Help Panel content. Needs a properly escaped string (might contain HTML).
+ * @param string $wrapper Optional Whether to print out a container div element for the Help Panel,
+ * used for styling.
+ * Pass a `has-wrapper` value to print out the container. Default: no container.
*/
public function __construct( $id, $help_button_text, $help_content, $wrapper = '' ) {
$this->id = $id;
@@ -78,7 +88,7 @@ class WPSEO_Admin_Help_Panel {
$wrapper_start = '';
$wrapper_end = '';
- if ( 'has-wrapper' === $this->wrapper ) {
+ if ( $this->wrapper === 'has-wrapper' ) {
$wrapper_start = '';
$wrapper_end = '
';
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-init.php b/wp-content/plugins/wordpress-seo/admin/class-admin-init.php
index 1c32b97f..8735d413 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-admin-init.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-init.php
@@ -25,7 +25,7 @@ class WPSEO_Admin_Init {
private $asset_manager;
/**
- * Class constructor
+ * Class constructor.
*/
public function __construct() {
$GLOBALS['wpseo_admin'] = new WPSEO_Admin();
@@ -34,18 +34,33 @@ class WPSEO_Admin_Init {
$this->asset_manager = new WPSEO_Admin_Asset_Manager();
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_dismissible' ) );
- add_action( 'admin_init', array( $this, 'tagline_notice' ), 15 );
- add_action( 'admin_init', array( $this, 'blog_public_notice' ), 15 );
- add_action( 'admin_init', array( $this, 'permalink_notice' ), 15 );
- add_action( 'admin_init', array( $this, 'page_comments_notice' ), 15 );
- add_action( 'admin_init', array( $this, 'ga_compatibility_notice' ), 15 );
- add_action( 'admin_init', array( $this, 'yoast_plugin_compatibility_notification' ), 15 );
- add_action( 'admin_init', array( $this, 'yoast_plugin_suggestions_notification' ), 15 );
- add_action( 'admin_init', array( $this, 'recalculate_notice' ), 15 );
- add_action( 'admin_init', array( $this->asset_manager, 'register_assets' ) );
- add_action( 'admin_init', array( $this, 'show_hook_deprecation_warnings' ) );
- add_action( 'admin_init', array( 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ) );
+ add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_dismissible' ] );
+ add_action( 'admin_init', [ $this, 'unsupported_php_notice' ], 15 );
+ add_action( 'admin_init', [ $this->asset_manager, 'register_assets' ] );
+ add_action( 'admin_init', [ $this, 'show_hook_deprecation_warnings' ] );
+ add_action( 'admin_init', [ 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ] );
+ add_action( 'admin_notices', [ $this, 'permalink_settings_notice' ] );
+ add_action( 'post_submitbox_misc_actions', [ $this, 'add_publish_box_section' ] );
+
+ /*
+ * The `admin_notices` hook fires on single site admin pages vs.
+ * `network_admin_notices` which fires on multisite admin pages and
+ * `user_admin_notices` which fires on multisite user admin pagss.
+ */
+ add_action( 'admin_notices', [ $this, 'search_engines_discouraged_notice' ] );
+
+ $health_checks = [
+ new WPSEO_Health_Check_Page_Comments(),
+ new WPSEO_Health_Check_Ryte(),
+ new WPSEO_Health_Check_Default_Tagline(),
+ new WPSEO_Health_Check_Postname_Permalink(),
+ new WPSEO_Health_Check_Curl_Version(),
+ new WPSEO_Health_Check_Link_Table_Not_Accessible(),
+ ];
+
+ foreach ( $health_checks as $health_check ) {
+ $health_check->register_test();
+ }
$this->load_meta_boxes();
$this->load_taxonomy_class();
@@ -63,362 +78,36 @@ class WPSEO_Admin_Init {
}
/**
- * Helper to verify if the current user has already seen the about page for the current version
- *
- * @return bool
- */
- private function seen_about() {
- $seen_about_version = substr( get_user_meta( get_current_user_id(), 'wpseo_seen_about_version', true ), 0, 3 );
- $last_minor_version = substr( WPSEO_VERSION, 0, 3 );
-
- return version_compare( $seen_about_version, $last_minor_version, '>=' );
- }
-
- /**
- * Notify about the default tagline if the user hasn't changed it
- */
- public function tagline_notice() {
-
- $current_url = ( is_ssl() ? 'https://' : 'http://' );
- $current_url .= sanitize_text_field( $_SERVER['SERVER_NAME'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] );
- $customize_url = add_query_arg( array(
- 'url' => urlencode( $current_url ),
- ), wp_customize_url() );
-
- $info_message = sprintf(
- /* translators: 1: link open tag; 2: link close tag. */
- __( 'You still have the default WordPress tagline, even an empty one is probably better. %1$sYou can fix this in the customizer%2$s.', 'wordpress-seo' ),
- '',
- ' '
- );
-
- $notification_options = array(
- 'type' => Yoast_Notification::ERROR,
- 'id' => 'wpseo-dismiss-tagline-notice',
- 'capabilities' => 'wpseo_manage_options',
- );
-
- $tagline_notification = new Yoast_Notification( $info_message, $notification_options );
-
- $notification_center = Yoast_Notification_Center::get();
- if ( $this->has_default_tagline() ) {
- $notification_center->add_notification( $tagline_notification );
- }
- else {
- $notification_center->remove_notification( $tagline_notification );
- }
- }
-
- /**
- * Add an alert if the blog is not publicly visible
- */
- public function blog_public_notice() {
-
- $info_message = '' . __( 'Huge SEO Issue: You\'re blocking access to robots.', 'wordpress-seo' ) . ' ';
- $info_message .= sprintf(
- /* translators: %1$s resolves to the opening tag of the link to the reading settings, %1$s resolves to the closing tag for the link */
- __( 'You must %1$sgo to your Reading Settings%2$s and uncheck the box for Search Engine Visibility.', 'wordpress-seo' ),
- '',
- ' '
- );
-
- $notification_options = array(
- 'type' => Yoast_Notification::ERROR,
- 'id' => 'wpseo-dismiss-blog-public-notice',
- 'priority' => 1.0,
- 'capabilities' => 'wpseo_manage_options',
- );
-
- $notification = new Yoast_Notification( $info_message, $notification_options );
-
- $notification_center = Yoast_Notification_Center::get();
- if ( ! $this->is_blog_public() ) {
- $notification_center->add_notification( $notification );
- }
- else {
- $notification_center->remove_notification( $notification );
- }
- }
-
- /**
- * Display notice to disable comment pagination
- */
- public function page_comments_notice() {
-
- $info_message = __( 'Paging comments is enabled, this is not needed in 999 out of 1000 cases, we recommend to disable it.', 'wordpress-seo' );
- $info_message .= ' ';
-
- $info_message .= sprintf(
- /* translators: %1$s resolves to the opening tag of the link to the comment setting page, %2$s resolves to the closing tag of the link */
- __( 'To fix this uncheck the box in front of the "Break comments into pages..." on the %1$sComment settings page%2$s.', 'wordpress-seo' ),
- '',
- ' '
- );
-
- $notification_options = array(
- 'type' => Yoast_Notification::WARNING,
- 'id' => 'wpseo-dismiss-page_comments-notice',
- 'capabilities' => 'wpseo_manage_options',
- );
-
- $tagline_notification = new Yoast_Notification( $info_message, $notification_options );
-
- $notification_center = Yoast_Notification_Center::get();
- if ( $this->has_page_comments() ) {
- $notification_center->add_notification( $tagline_notification );
- }
- else {
- $notification_center->remove_notification( $tagline_notification );
- }
- }
-
- /**
- * Returns whether or not the site has the default tagline
- *
- * @return bool
- */
- public function has_default_tagline() {
- $blog_description = get_bloginfo( 'description' );
- $default_blog_description = 'Just another WordPress site';
-
- // We are checking against the WordPress internal translation.
- // @codingStandardsIgnoreLine
- $translated_blog_description = __( 'Just another WordPress site' );
-
- return $translated_blog_description === $blog_description || $default_blog_description === $blog_description;
- }
-
- /**
- * Show alert when the permalink doesn't contain %postname%
- */
- public function permalink_notice() {
-
- $info_message = __( 'You do not have your postname in the URL of your posts and pages, it is highly recommended that you do. Consider setting your permalink structure to /%postname%/ .', 'wordpress-seo' );
- $info_message .= ' ';
- $info_message .= sprintf(
- /* translators: %1$s resolves to the starting tag of the link to the permalink settings page, %2$s resolves to the closing tag of the link */
- __( 'You can fix this on the %1$sPermalink settings page%2$s.', 'wordpress-seo' ),
- '',
- ' '
- );
-
- $notification_options = array(
- 'type' => Yoast_Notification::WARNING,
- 'id' => 'wpseo-dismiss-permalink-notice',
- 'capabilities' => 'wpseo_manage_options',
- 'priority' => 0.8,
- );
-
- $notification = new Yoast_Notification( $info_message, $notification_options );
-
- $notification_center = Yoast_Notification_Center::get();
- if ( ! $this->has_postname_in_permalink() ) {
- $notification_center->add_notification( $notification );
- }
- else {
- $notification_center->remove_notification( $notification );
- }
- }
-
- /**
- * Are page comments enabled
- *
- * @return bool
- */
- public function has_page_comments() {
- return '1' === get_option( 'page_comments' );
- }
-
- /**
- * Shows a notice to the user if they have Google Analytics for WordPress 5.4.3 installed because it causes an error
- * on the google search console page.
- */
- public function ga_compatibility_notice() {
-
- $notification = $this->get_compatibility_notification();
- $notification_center = Yoast_Notification_Center::get();
-
- if ( defined( 'GAWP_VERSION' ) && '5.4.3' === GAWP_VERSION ) {
- $notification_center->add_notification( $notification );
- }
- else {
- $notification_center->remove_notification( $notification );
- }
- }
-
- /**
- * Build compatibility problem notification
- *
- * @return Yoast_Notification
- */
- private function get_compatibility_notification() {
- $info_message = sprintf(
- /* translators: %1$s expands to Yoast SEO, %2$s expands to 5.4.3, %3$s expands to Google Analytics by Yoast */
- __( '%1$s detected you are using version %2$s of %3$s, please update to the latest version to prevent compatibility issues.', 'wordpress-seo' ),
- 'Yoast SEO',
- '5.4.3',
- 'Google Analytics by Yoast'
- );
-
- return new Yoast_Notification(
- $info_message,
- array(
- 'id' => 'gawp-compatibility-notice',
- 'type' => Yoast_Notification::ERROR,
- )
- );
- }
-
- /**
- * Determines whether a suggested plugins notification needs to be displayed.
+ * Creates an unsupported PHP version notification in the notification center.
*
* @return void
*/
- public function yoast_plugin_suggestions_notification() {
- $checker = new WPSEO_Plugin_Availability();
+ public function unsupported_php_notice() {
$notification_center = Yoast_Notification_Center::get();
+ $notification_center->remove_notification_by_id( 'wpseo-dismiss-unsupported-php' );
+ }
- // Get all Yoast plugins that have dependencies.
- $plugins = $checker->get_plugins_with_dependencies();
+ /**
+ * Gets the latest released major WordPress version from the WordPress stable-check api.
+ *
+ * @return float|int The latest released major WordPress version. 0 when the stable-check API doesn't respond.
+ */
+ private function get_latest_major_wordpress_version() {
+ $core_updates = get_core_updates( [ 'dismissed' => true ] );
- foreach ( $plugins as $plugin_name => $plugin ) {
- $dependency_names = $checker->get_dependency_names( $plugin );
- $notification = $this->get_yoast_seo_suggested_plugins_notification( $plugin_name, $plugin, $dependency_names[0] );
+ if ( $core_updates === false ) {
+ return 0;
+ }
- if ( $checker->dependencies_are_satisfied( $plugin ) && ! $checker->is_installed( $plugin ) ) {
- $notification_center->add_notification( $notification );
-
- continue;
+ $wp_version_latest = get_bloginfo( 'version' );
+ foreach ( $core_updates as $update ) {
+ if ( $update->response === 'upgrade' && version_compare( $update->version, $wp_version_latest, '>' ) ) {
+ $wp_version_latest = $update->version;
}
-
- $notification_center->remove_notification( $notification );
- }
- }
-
- /**
- * Build Yoast SEO suggested plugins notification.
- *
- * @param string $name The plugin name to use for the unique ID.
- * @param array $plugin The plugin to retrieve the data from.
- * @param string $dependency_name The name of the dependency.
- *
- * @return Yoast_Notification The notification containing the suggested plugin.
- */
- private function get_yoast_seo_suggested_plugins_notification( $name, $plugin, $dependency_name ) {
- $info_message = sprintf(
- /* translators: %1$s expands to Yoast SEO, %2$s expands to the plugin version, %3$s expands to the plugin name */
- __( '%1$s and %2$s can work together a lot better by adding a helper plugin. Please install %3$s to make your life better.', 'wordpress-seo' ),
- 'Yoast SEO',
- $dependency_name,
- sprintf( '%s ', $plugin['url'], $plugin['title'] )
- );
-
- return new Yoast_Notification(
- $info_message,
- array(
- 'id' => 'wpseo-suggested-plugin-' . $name,
- 'type' => Yoast_Notification::WARNING,
- )
- );
- }
-
- /**
- * Add an alert if outdated versions of Yoast SEO plugins are running.
- */
- public function yoast_plugin_compatibility_notification() {
- $compatibility_checker = new WPSEO_Plugin_Compatibility( WPSEO_VERSION );
- $plugins = $compatibility_checker->get_installed_plugins_compatibility();
-
- $notification_center = Yoast_Notification_Center::get();
-
- foreach ( $plugins as $name => $plugin ) {
- $type = ( $plugin['active'] ) ? Yoast_Notification::ERROR : Yoast_Notification::WARNING;
- $notification = $this->get_yoast_seo_compatibility_notification( $name, $plugin, $type );
-
- if ( $plugin['compatible'] === false ) {
- $notification_center->add_notification( $notification );
-
- continue;
- }
-
- $notification_center->remove_notification( $notification );
- }
- }
-
- /**
- * Build Yoast SEO compatibility problem notification
- *
- * @param string $name The plugin name to use for the unique ID.
- * @param array $plugin The plugin to retrieve the data from.
- * @param string $level The severity level to use for the notification.
- *
- * @return Yoast_Notification
- */
- private function get_yoast_seo_compatibility_notification( $name, $plugin, $level = Yoast_Notification::WARNING ) {
- $info_message = sprintf(
- /* translators: %1$s expands to Yoast SEO, %2$s expands to the plugin version, %3$s expands to the plugin name */
- __( '%1$s detected you are using version %2$s of %3$s, please update to the latest version to prevent compatibility issues.', 'wordpress-seo' ),
- 'Yoast SEO',
- $plugin['version'],
- $plugin['title']
- );
-
- return new Yoast_Notification(
- $info_message,
- array(
- 'id' => 'wpseo-outdated-yoast-seo-plugin-' . $name,
- 'type' => $level,
- )
- );
- }
-
- /**
- * Shows the notice for recalculating the post. the Notice will only be shown if the user hasn't dismissed it before.
- */
- public function recalculate_notice() {
- // Just a return, because we want to temporary disable this notice (#3998 and #4532).
- return;
-
- if ( filter_input( INPUT_GET, 'recalculate' ) === '1' ) {
- update_option( 'wpseo_dismiss_recalculate', '1' );
-
- return;
}
- if ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {
- return;
- }
-
- if ( $this->is_site_notice_dismissed( 'wpseo_dismiss_recalculate' ) ) {
- return;
- }
-
- Yoast_Notification_Center::get()->add_notification(
- new Yoast_Notification(
- sprintf(
- /* translators: 1: is a link to 'admin_url / admin.php?page=wpseo_tools&recalculate=1' 2: closing link tag */
- __( 'We\'ve updated our SEO score algorithm. %1$sRecalculate the SEO scores%2$s for all posts and pages.', 'wordpress-seo' ),
- '',
- ' '
- ),
- array(
- 'type' => 'updated yoast-dismissible',
- 'id' => 'wpseo-dismiss-recalculate',
- 'nonce' => wp_create_nonce( 'wpseo-dismiss-recalculate' ),
- )
- )
- );
- }
-
- /**
- * Check if the user has dismissed the given notice (by $notice_name)
- *
- * @param string $notice_name The name of the notice that might be dismissed.
- *
- * @return bool
- */
- private function is_site_notice_dismissed( $notice_name ) {
- return '1' === get_option( $notice_name, true );
+ // Strip the patch version and convert to a float.
+ return (float) $wp_version_latest;
}
/**
@@ -427,7 +116,7 @@ class WPSEO_Admin_Init {
* @return bool
*/
private function on_wpseo_admin_page() {
- return 'admin.php' === $this->pagenow && strpos( filter_input( INPUT_GET, 'page' ), 'wpseo' ) === 0;
+ return $this->pagenow === 'admin.php' && strpos( filter_input( INPUT_GET, 'page' ), 'wpseo' ) === 0;
}
/**
@@ -470,7 +159,7 @@ class WPSEO_Admin_Init {
* Loads admin page class for all admin pages starting with `wpseo_`.
*/
private function load_admin_user_class() {
- if ( in_array( $this->pagenow, array( 'user-edit.php', 'profile.php' ), true )
+ if ( in_array( $this->pagenow, [ 'user-edit.php', 'profile.php' ], true )
&& current_user_can( 'edit_users' )
) {
new WPSEO_Admin_User_Profile();
@@ -488,10 +177,13 @@ class WPSEO_Admin_Init {
// For backwards compatabilty, this still needs a global, for now...
$GLOBALS['wpseo_admin_pages'] = new WPSEO_Admin_Pages();
+ $page = filter_input( INPUT_GET, 'page' );
// Only register the yoast i18n when the page is a Yoast SEO page.
- if ( WPSEO_Utils::is_yoast_seo_free_page( filter_input( INPUT_GET, 'page' ) ) ) {
+ if ( WPSEO_Utils::is_yoast_seo_free_page( $page ) ) {
$this->register_i18n_promo_class();
- $this->register_premium_upsell_admin_block();
+ if ( $page !== 'wpseo_titles' ) {
+ $this->register_premium_upsell_admin_block();
+ }
}
}
}
@@ -510,7 +202,7 @@ class WPSEO_Admin_Init {
* @return void
*/
private function register_premium_upsell_admin_block() {
- if ( ! WPSEO_Utils::is_yoast_seo_premium() ) {
+ if ( ! YoastSEO()->helpers->product->is_premium() ) {
$upsell_block = new WPSEO_Premium_Upsell_Admin_Block( 'wpseo_admin_promo_footer' );
$upsell_block->register_hooks();
}
@@ -524,11 +216,12 @@ class WPSEO_Admin_Init {
private function register_i18n_promo_class() {
// BC, because an older version of the i18n-module didn't have this class.
$i18n_module = new Yoast_I18n_WordPressOrg_v3(
- array(
+ [
'textdomain' => 'wordpress-seo',
'plugin_name' => 'Yoast SEO',
'hook' => 'wpseo_admin_promo_footer',
- ), false
+ ],
+ false
);
$message = $i18n_module->get_promo_message();
@@ -541,10 +234,10 @@ class WPSEO_Admin_Init {
$notification = new Yoast_Notification(
$message,
- array(
+ [
'type' => Yoast_Notification::WARNING,
'id' => 'i18nModuleTranslationAssistance',
- )
+ ]
);
if ( $message ) {
@@ -557,7 +250,7 @@ class WPSEO_Admin_Init {
}
/**
- * See if we should start our XML Sitemaps Admin class
+ * See if we should start our XML Sitemaps Admin class.
*/
private function load_xml_sitemaps_admin() {
if ( WPSEO_Options::get( 'enable_xml_sitemap', false ) ) {
@@ -566,12 +259,12 @@ class WPSEO_Admin_Init {
}
/**
- * Check if the site is set to be publicly visible
+ * Checks whether search engines are discouraged from indexing the site.
*
- * @return bool
+ * @return bool Whether search engines are discouraged from indexing the site.
*/
- private function is_blog_public() {
- return '1' === (string) get_option( 'blog_public' );
+ private function are_search_engines_discouraged() {
+ return (string) get_option( 'blog_public' ) === '0';
}
/**
@@ -580,53 +273,45 @@ class WPSEO_Admin_Init {
public function show_hook_deprecation_warnings() {
global $wp_filter;
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
- return false;
+ if ( wp_doing_ajax() ) {
+ return;
}
// WordPress hooks that have been deprecated since a Yoast SEO version.
- $deprecated_filters = array(
- 'wpseo_metadesc_length' => array(
- 'version' => '3.0',
- 'alternative' => 'javascript',
- ),
- 'wpseo_metadesc_length_reason' => array(
- 'version' => '3.0',
- 'alternative' => 'javascript',
- ),
- 'wpseo_body_length_score' => array(
- 'version' => '3.0',
- 'alternative' => 'javascript',
- ),
- 'wpseo_linkdex_results' => array(
- 'version' => '3.0',
- 'alternative' => 'javascript',
- ),
- 'wpseo_snippet' => array(
- 'version' => '3.0',
- 'alternative' => 'javascript',
- ),
- 'wp_seo_get_bc_title' => array(
- 'version' => '5.8',
- 'alternative' => 'wpseo_breadcrumb_single_link_info',
- ),
- 'wpseo_metakey' => array(
- 'version' => '6.3',
+ $deprecated_filters = [
+ 'wpseo_genesis_force_adjacent_rel_home' => [
+ 'version' => '9.4',
'alternative' => null,
- ),
- 'wpseo_metakeywords' => array(
- 'version' => '6.3',
+ ],
+ 'wpseo_opengraph' => [
+ 'version' => '14.0',
'alternative' => null,
- ),
- 'wpseo_stopwords' => array(
- 'version' => '7.0',
+ ],
+ 'wpseo_twitter' => [
+ 'version' => '14.0',
'alternative' => null,
- ),
- 'wpseo_redirect_orphan_attachment' => array(
- 'version' => '7.0',
+ ],
+ 'wpseo_twitter_taxonomy_image' => [
+ 'version' => '14.0',
'alternative' => null,
- ),
- );
+ ],
+ 'wpseo_twitter_metatag_key' => [
+ 'version' => '14.0',
+ 'alternative' => null,
+ ],
+ 'wp_seo_get_bc_ancestors' => [
+ 'version' => '14.0',
+ 'alternative' => 'wpseo_breadcrumb_links',
+ ],
+ 'validate_facebook_app_id_api_response_code' => [
+ 'version' => '15.5',
+ 'alternative' => null,
+ ],
+ 'validate_facebook_app_id_api_response_body' => [
+ 'version' => '15.5',
+ 'alternative' => null,
+ ],
+ ];
// Determine which filters have been registered.
$deprecated_notices = array_intersect(
@@ -637,31 +322,177 @@ class WPSEO_Admin_Init {
// Show notice for each deprecated filter or action that has been registered.
foreach ( $deprecated_notices as $deprecated_filter ) {
$deprecation_info = $deprecated_filters[ $deprecated_filter ];
+ // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Only uses the hardcoded values from above.
_deprecated_hook(
$deprecated_filter,
'WPSEO ' . $deprecation_info['version'],
$deprecation_info['alternative']
);
+ // phpcs:enable
}
}
/**
- * Check if there is a dismiss notice action.
- *
- * @param string $notice_name The name of the notice to dismiss.
- *
- * @return bool
- */
- private function dismiss_notice( $notice_name ) {
- return filter_input( INPUT_GET, $notice_name ) === '1' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), $notice_name );
- }
-
- /**
- * Check if the permalink uses %postname%
+ * Check if the permalink uses %postname%.
*
* @return bool
*/
private function has_postname_in_permalink() {
- return ( false !== strpos( get_option( 'permalink_structure' ), '%postname%' ) );
+ return ( strpos( get_option( 'permalink_structure' ), '%postname%' ) !== false );
+ }
+
+ /**
+ * Shows a notice on the permalink settings page.
+ */
+ public function permalink_settings_notice() {
+ global $pagenow;
+
+ if ( $pagenow === 'options-permalink.php' ) {
+ printf(
+ '',
+ esc_html__( 'WARNING:', 'wordpress-seo' ),
+ sprintf(
+ /* translators: %1$s and %2$s expand to items to emphasize the word in the middle. */
+ esc_html__( 'Changing your permalinks settings can seriously impact your search engine visibility. It should almost %1$s never %2$s be done on a live website.', 'wordpress-seo' ),
+ '',
+ ' '
+ ),
+ esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/why-permalinks/' ) ),
+ // The link's content.
+ esc_html__( 'Learn about why permalinks are important for SEO.', 'wordpress-seo' )
+ );
+ }
+ }
+
+ /**
+ * Determines whether and where the "search engines discouraged" admin notice should be displayed.
+ *
+ * @return bool Whether the "search engines discouraged" admin notice should be displayed.
+ */
+ private function should_display_search_engines_discouraged_notice() {
+ $discouraged_pages = [
+ 'index.php',
+ 'plugins.php',
+ 'update-core.php',
+ ];
+
+ return (
+ $this->are_search_engines_discouraged()
+ && WPSEO_Capability_Utils::current_user_can( 'manage_options' )
+ && WPSEO_Options::get( 'ignore_search_engines_discouraged_notice', false ) === false
+ && (
+ $this->on_wpseo_admin_page()
+ || in_array( $this->pagenow, $discouraged_pages, true )
+ )
+ );
+ }
+
+ /**
+ * Displays an admin notice when WordPress is set to discourage search engines from indexing the site.
+ *
+ * @return void
+ */
+ public function search_engines_discouraged_notice() {
+ if ( ! $this->should_display_search_engines_discouraged_notice() ) {
+ return;
+ }
+
+ printf(
+ '',
+ esc_html__( 'Huge SEO Issue: You\'re blocking access to robots.', 'wordpress-seo' ),
+ sprintf(
+ /* translators: 1: Link start tag to the WordPress Reading Settings page, 2: Link closing tag. */
+ esc_html__( 'If you want search engines to show this site in their results, you must %1$sgo to your Reading Settings%2$s and uncheck the box for Search Engine Visibility.', 'wordpress-seo' ),
+ '',
+ ' '
+ ),
+ esc_js( wp_create_nonce( 'wpseo-ignore' ) ),
+ esc_html__( 'I don\'t want this site to show in the search results.', 'wordpress-seo' )
+ );
+ }
+
+ /**
+ * Adds a custom Yoast section within the Classic Editor publish box.
+ *
+ * @param \WP_Post $post The current post object.
+ *
+ * @return void
+ */
+ public function add_publish_box_section( $post ) {
+ if ( in_array( $this->pagenow, [ 'post.php', 'post-new.php' ], true ) ) {
+ ?>
+
+ [ 'sitename', 'title', 'sep', 'primary_category' ],
+ 'post' => [ 'sitename', 'title', 'sep', 'primary_category' ],
+ // Homepage.
+ 'homepage' => [ 'sitename', 'sitedesc', 'sep' ],
+ // Custom post type.
+ 'custom_post_type' => [ 'sitename', 'title', 'sep' ],
+
+ // Taxonomies.
+ 'category' => [ 'sitename', 'term_title', 'sep', 'term_hierarchy' ],
+ 'post_tag' => [ 'sitename', 'term_title', 'sep' ],
+ 'post_format' => [ 'sitename', 'term_title', 'sep', 'page' ],
+
+ // Custom taxonomy.
+ 'term-in-custom-taxomomy' => [ 'sitename', 'term_title', 'sep', 'term_hierarchy' ],
+
+ // Settings - archive pages.
+ 'author_archive' => [ 'sitename', 'title', 'sep', 'page' ],
+ 'date_archive' => [ 'sitename', 'sep', 'date', 'page' ],
+ 'custom-post-type_archive' => [ 'sitename', 'title', 'sep', 'page' ],
+
+ // Settings - special pages.
+ 'search' => [ 'sitename', 'searchphrase', 'sep', 'page' ],
+ '404' => [ 'sitename', 'sep' ],
+ ];
+
+ /**
+ * Determines the page type of the current term.
+ *
+ * @param string $taxonomy The taxonomy name.
+ *
+ * @return string The page type.
+ */
+ public function determine_for_term( $taxonomy ) {
+ $recommended_replace_vars = $this->get_recommended_replacevars();
+ if ( array_key_exists( $taxonomy, $recommended_replace_vars ) ) {
+ return $taxonomy;
+ }
+
+ return 'term-in-custom-taxomomy';
+ }
+
+ /**
+ * Determines the page type of the current post.
+ *
+ * @param WP_Post $post A WordPress post instance.
+ *
+ * @return string The page type.
+ */
+ public function determine_for_post( $post ) {
+ if ( $post instanceof WP_Post === false ) {
+ return 'post';
+ }
+
+ if ( $post->post_type === 'page' && $this->is_homepage( $post ) ) {
+ return 'homepage';
+ }
+
+ $recommended_replace_vars = $this->get_recommended_replacevars();
+ if ( array_key_exists( $post->post_type, $recommended_replace_vars ) ) {
+ return $post->post_type;
+ }
+
+ return 'custom_post_type';
+ }
+
+ /**
+ * Determines the page type for a post type.
+ *
+ * @param string $post_type The name of the post_type.
+ * @param string $fallback The page type to fall back to.
+ *
+ * @return string The page type.
+ */
+ public function determine_for_post_type( $post_type, $fallback = 'custom_post_type' ) {
+ $page_type = $post_type;
+ $recommended_replace_vars = $this->get_recommended_replacevars();
+ $has_recommended_replacevars = $this->has_recommended_replace_vars( $recommended_replace_vars, $page_type );
+
+ if ( ! $has_recommended_replacevars ) {
+ return $fallback;
+ }
+
+ return $page_type;
+ }
+
+ /**
+ * Determines the page type for an archive page.
+ *
+ * @param string $name The name of the archive.
+ * @param string $fallback The page type to fall back to.
+ *
+ * @return string The page type.
+ */
+ public function determine_for_archive( $name, $fallback = 'custom-post-type_archive' ) {
+ $page_type = $name . '_archive';
+ $recommended_replace_vars = $this->get_recommended_replacevars();
+ $has_recommended_replacevars = $this->has_recommended_replace_vars( $recommended_replace_vars, $page_type );
+
+ if ( ! $has_recommended_replacevars ) {
+ return $fallback;
+ }
+
+ return $page_type;
+ }
+
+ /**
+ * Retrieves the recommended replacement variables for the given page type.
+ *
+ * @param string $page_type The page type.
+ *
+ * @return array The recommended replacement variables.
+ */
+ public function get_recommended_replacevars_for( $page_type ) {
+ $recommended_replace_vars = $this->get_recommended_replacevars();
+ $has_recommended_replace_vars = $this->has_recommended_replace_vars( $recommended_replace_vars, $page_type );
+
+ if ( ! $has_recommended_replace_vars ) {
+ return [];
+ }
+
+ return $recommended_replace_vars[ $page_type ];
+ }
+
+ /**
+ * Retrieves the recommended replacement variables.
+ *
+ * @return array The recommended replacement variables.
+ */
+ public function get_recommended_replacevars() {
+ /**
+ * Filter: Adds the possibility to add extra recommended replacement variables.
+ *
+ * @api array $additional_replace_vars Empty array to add the replacevars to.
+ */
+ $recommended_replace_vars = apply_filters( 'wpseo_recommended_replace_vars', $this->recommended_replace_vars );
+
+ if ( ! is_array( $recommended_replace_vars ) ) {
+ return $this->recommended_replace_vars;
+ }
+
+ return $recommended_replace_vars;
+ }
+
+ /**
+ * Returns whether the given page type has recommended replace vars.
+ *
+ * @param array $recommended_replace_vars The recommended replace vars
+ * to check in.
+ * @param string $page_type The page type to check.
+ *
+ * @return bool True if there are associated recommended replace vars.
+ */
+ private function has_recommended_replace_vars( $recommended_replace_vars, $page_type ) {
+ if ( ! isset( $recommended_replace_vars[ $page_type ] ) ) {
+ return false;
+ }
+
+ if ( ! is_array( $recommended_replace_vars[ $page_type ] ) ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Determines whether or not a post is the homepage.
+ *
+ * @param WP_Post $post The WordPress global post object.
+ *
+ * @return bool True if the given post is the homepage.
+ */
+ private function is_homepage( $post ) {
+ if ( $post instanceof WP_Post === false ) {
+ return false;
+ }
+
+ /*
+ * The page on front returns a string with normal WordPress interaction, while the post ID is an int.
+ * This way we make sure we always compare strings.
+ */
+ $post_id = (int) $post->ID;
+ $page_on_front = (int) get_option( 'page_on_front' );
+
+ return get_option( 'show_on_front' ) === 'page' && $page_on_front === $post_id;
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php b/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php
index 76e6c61d..4579e462 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php
@@ -10,16 +10,17 @@
* Customizes user profile.
*/
class WPSEO_Admin_User_Profile {
+
/**
* Class constructor.
*/
public function __construct() {
- add_action( 'show_user_profile', array( $this, 'user_profile' ) );
- add_action( 'edit_user_profile', array( $this, 'user_profile' ) );
- add_action( 'personal_options_update', array( $this, 'process_user_option_update' ) );
- add_action( 'edit_user_profile_update', array( $this, 'process_user_option_update' ) );
+ add_action( 'show_user_profile', [ $this, 'user_profile' ] );
+ add_action( 'edit_user_profile', [ $this, 'user_profile' ] );
+ add_action( 'personal_options_update', [ $this, 'process_user_option_update' ] );
+ add_action( 'edit_user_profile_update', [ $this, 'process_user_option_update' ] );
- add_action( 'update_user_meta', array( $this, 'clear_author_sitemap_cache' ), 10, 3 );
+ add_action( 'update_user_meta', [ $this, 'clear_author_sitemap_cache' ], 10, 3 );
}
/**
@@ -27,13 +28,13 @@ class WPSEO_Admin_User_Profile {
*
* @since 3.1
*
- * @param int $meta_id The ID of the meta option changed.
+ * @param int $meta_id The ID of the meta option changed.
* @param int $object_id The ID of the user.
- * @param string $meta_key The key of the meta field changed.
+ * @param string $meta_key The key of the meta field changed.
*/
public function clear_author_sitemap_cache( $meta_id, $object_id, $meta_key ) {
- if ( '_yoast_wpseo_profile_updated' === $meta_key ) {
- WPSEO_Sitemaps_Cache::clear( array( 'author' ) );
+ if ( $meta_key === '_yoast_wpseo_profile_updated' ) {
+ WPSEO_Sitemaps_Cache::clear( [ 'author' ] );
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin-utils.php b/wp-content/plugins/wordpress-seo/admin/class-admin-utils.php
index d1a0aab4..b907214f 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-admin-utils.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin-utils.php
@@ -54,7 +54,7 @@ class WPSEO_Admin_Utils {
* @return string The link to the plugin install. Returns the title if the plugin is deemed a Premium product.
*/
public static function get_install_link( $plugin ) {
- $install_url = WPSEO_Admin_Utils::get_install_url( $plugin['slug'] );
+ $install_url = self::get_install_url( $plugin['slug'] );
if ( $install_url === '' || ( isset( $plugin['premium'] ) && $plugin['premium'] === true ) ) {
return $plugin['title'];
@@ -65,6 +65,17 @@ class WPSEO_Admin_Utils {
$install_url,
$plugin['title']
);
+ }
+ /**
+ * Gets a visually hidden accessible message for links that open in a new browser tab.
+ *
+ * @return string The visually hidden accessible message.
+ */
+ public static function get_new_tab_message() {
+ return sprintf(
+ '%s ',
+ esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' )
+ );
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-admin.php b/wp-content/plugins/wordpress-seo/admin/class-admin.php
index 22b26966..6f9ca269 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-admin.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-admin.php
@@ -10,7 +10,13 @@
*/
class WPSEO_Admin {
- /** The page identifier used in WordPress to register the admin page !DO NOT CHANGE THIS! */
+ /**
+ * The page identifier used in WordPress to register the admin page.
+ *
+ * !DO NOT CHANGE THIS!
+ *
+ * @var string
+ */
const PAGE_IDENTIFIER = 'wpseo_dashboard';
/**
@@ -24,7 +30,7 @@ class WPSEO_Admin {
* Class constructor.
*/
public function __construct() {
- $integrations = array();
+ $integrations = [];
global $pagenow;
@@ -36,46 +42,37 @@ class WPSEO_Admin {
}
if ( WPSEO_Options::get( 'stripcategorybase' ) === true ) {
- add_action( 'created_category', array( $this, 'schedule_rewrite_flush' ) );
- add_action( 'edited_category', array( $this, 'schedule_rewrite_flush' ) );
- add_action( 'delete_category', array( $this, 'schedule_rewrite_flush' ) );
+ add_action( 'created_category', [ $this, 'schedule_rewrite_flush' ] );
+ add_action( 'edited_category', [ $this, 'schedule_rewrite_flush' ] );
+ add_action( 'delete_category', [ $this, 'schedule_rewrite_flush' ] );
}
- $this->admin_features = array(
- // Google Search Console.
- 'google_search_console' => new WPSEO_GSC(),
- 'dashboard_widget' => new Yoast_Dashboard_Widget(),
- );
-
- if ( WPSEO_Metabox::is_post_overview( $pagenow ) || WPSEO_Metabox::is_post_edit( $pagenow ) ) {
- $this->admin_features['primary_category'] = new WPSEO_Primary_Term_Admin();
+ if ( WPSEO_Options::get( 'disable-attachment' ) === true ) {
+ add_filter( 'wpseo_accessible_post_types', [ 'WPSEO_Post_Type', 'filter_attachment_post_type' ] );
}
- if ( filter_input( INPUT_GET, 'page' ) === 'wpseo_tools' && filter_input( INPUT_GET, 'tool' ) === null ) {
- new WPSEO_Recalculate_Scores();
- }
+ add_filter( 'plugin_action_links_' . WPSEO_BASENAME, [ $this, 'add_action_link' ], 10, 2 );
+ add_filter( 'network_admin_plugin_action_links_' . WPSEO_BASENAME, [ $this, 'add_action_link' ], 10, 2 );
- add_filter( 'plugin_action_links_' . WPSEO_BASENAME, array( $this, 'add_action_link' ), 10, 2 );
+ add_action( 'admin_enqueue_scripts', [ $this, 'config_page_scripts' ] );
+ add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_global_style' ] );
- add_action( 'admin_enqueue_scripts', array( $this, 'config_page_scripts' ) );
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_global_style' ) );
+ add_filter( 'user_contactmethods', [ $this, 'update_contactmethods' ], 10, 1 );
- add_filter( 'user_contactmethods', array( $this, 'update_contactmethods' ), 10, 1 );
+ add_action( 'after_switch_theme', [ $this, 'switch_theme' ] );
+ add_action( 'switch_theme', [ $this, 'switch_theme' ] );
- add_action( 'after_switch_theme', array( $this, 'switch_theme' ) );
- add_action( 'switch_theme', array( $this, 'switch_theme' ) );
+ add_filter( 'set-screen-option', [ $this, 'save_bulk_edit_options' ], 10, 3 );
- add_filter( 'set-screen-option', array( $this, 'save_bulk_edit_options' ), 10, 3 );
+ add_action( 'admin_init', [ 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ], 10, 1 );
- add_action( 'admin_init', array( 'WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts' ), 10, 1 );
-
- add_action( 'admin_init', array( $this, 'map_manage_options_cap' ) );
+ add_action( 'admin_init', [ $this, 'map_manage_options_cap' ] );
WPSEO_Sitemaps_Cache::register_clear_on_option_update( 'wpseo' );
WPSEO_Sitemaps_Cache::register_clear_on_option_update( 'home' );
- if ( WPSEO_Utils::is_yoast_seo_page() ) {
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
+ if ( YoastSEO()->helpers->current_page->is_yoast_seo_page() ) {
+ add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
}
if ( WPSEO_Utils::is_api_available() ) {
@@ -86,27 +83,50 @@ class WPSEO_Admin {
$this->set_upsell_notice();
- $this->check_php_version();
$this->initialize_cornerstone_content();
- $integrations[] = new WPSEO_Yoast_Columns();
- $integrations[] = new WPSEO_License_Page_Manager();
- $integrations[] = new WPSEO_Statistic_Integration();
- $integrations[] = new WPSEO_Slug_Change_Watcher();
- $integrations[] = new WPSEO_Capability_Manager_Integration( WPSEO_Capability_Manager_Factory::get() );
- $integrations = array_merge( $integrations, $this->initialize_seo_links() );
+ if ( WPSEO_Utils::is_plugin_network_active() ) {
+ $integrations[] = new Yoast_Network_Admin();
+ }
+
+ $this->admin_features = [
+ 'dashboard_widget' => new Yoast_Dashboard_Widget(),
+ ];
+
+ if ( WPSEO_Metabox::is_post_overview( $pagenow ) || WPSEO_Metabox::is_post_edit( $pagenow ) ) {
+ $this->admin_features['primary_category'] = new WPSEO_Primary_Term_Admin();
+ }
+
+ $integrations[] = new WPSEO_Yoast_Columns();
+ $integrations[] = new WPSEO_Statistic_Integration();
+ $integrations[] = new WPSEO_Capability_Manager_Integration( WPSEO_Capability_Manager_Factory::get() );
+ $integrations[] = new WPSEO_Admin_Gutenberg_Compatibility_Notification();
+ $integrations[] = new WPSEO_Expose_Shortlinks();
+ $integrations[] = new WPSEO_MyYoast_Proxy();
+ $integrations[] = new WPSEO_Schema_Person_Upgrade_Notification();
+ $integrations[] = new WPSEO_Tracking( 'https://tracking.yoast.com/stats', ( WEEK_IN_SECONDS * 2 ) );
+ $integrations[] = new WPSEO_Admin_Settings_Changed_Listener();
+
+ $integrations = array_merge(
+ $integrations,
+ $this->get_admin_features(),
+ $this->initialize_cornerstone_content()
+ );
- /** @var WPSEO_WordPress_Integration $integration */
foreach ( $integrations as $integration ) {
$integration->register_hooks();
}
-
}
/**
* Schedules a rewrite flush to happen at shutdown.
*/
public function schedule_rewrite_flush() {
+ // Bail if this is a multisite installation and the site has been switched.
+ if ( is_multisite() && ms_is_switched() ) {
+ return;
+ }
+
add_action( 'shutdown', 'flush_rewrite_rules' );
}
@@ -123,7 +143,7 @@ class WPSEO_Admin {
* Register assets needed on admin pages.
*/
public function enqueue_assets() {
- if ( 'wpseo_licenses' === filter_input( INPUT_GET, 'page' ) ) {
+ if ( filter_input( INPUT_GET, 'page' ) === 'wpseo_licenses' ) {
$asset_manager = new WPSEO_Admin_Asset_Manager();
$asset_manager->enqueue_style( 'extensions' );
}
@@ -147,10 +167,11 @@ class WPSEO_Admin {
* Maps the manage_options cap on saving an options page to wpseo_manage_options.
*/
public function map_manage_options_cap() {
- $option_page = ! empty( $_POST['option_page'] ) ? $_POST['option_page'] : ''; // WPCS: CSRF ok.
+ // phpcs:ignore WordPress.Security -- The variable is only used in strpos and thus safe to not unslash or sanitize.
+ $option_page = ! empty( $_POST['option_page'] ) ? $_POST['option_page'] : '';
if ( strpos( $option_page, 'yoast_wpseo' ) === 0 ) {
- add_filter( 'option_page_capability_' . $option_page, array( $this, 'get_manage_options_cap' ) );
+ add_filter( 'option_page_capability_' . $option_page, [ $this, 'get_manage_options_cap' ] );
}
}
@@ -160,11 +181,11 @@ class WPSEO_Admin {
*/
public function bulk_edit_options() {
$option = 'per_page';
- $args = array(
+ $args = [
'label' => __( 'Posts', 'wordpress-seo' ),
'default' => 10,
'option' => 'wpseo_posts_per_page',
- );
+ ];
add_screen_option( $option, $args );
}
@@ -178,7 +199,7 @@ class WPSEO_Admin {
* @return int
*/
public function save_bulk_edit_options( $status, $option, $value ) {
- if ( 'wpseo_posts_per_page' === $option && ( $value > 0 && $value < 1000 ) ) {
+ if ( $option && ( $value > 0 && $value < 1000 ) === 'wpseo_posts_per_page' ) {
return $value;
}
@@ -188,36 +209,55 @@ class WPSEO_Admin {
/**
* Adds links to Premium Support and FAQ under the plugin in the plugin overview page.
*
- * @staticvar string $this_plugin Holds the directory & filename for the plugin.
- *
* @param array $links Array of links for the plugins, adapted when the current plugin is found.
* @param string $file The filename for the current plugin, which the filter loops through.
*
- * @return array $links
+ * @return array
*/
public function add_action_link( $links, $file ) {
- if ( WPSEO_BASENAME === $file && WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {
- $settings_link = '' . __( 'Settings', 'wordpress-seo' ) . ' ';
+ if ( $file === WPSEO_BASENAME && WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {
+ if ( is_network_admin() ) {
+ $settings_url = network_admin_url( 'admin.php?page=' . self::PAGE_IDENTIFIER );
+ }
+ else {
+ $settings_url = admin_url( 'admin.php?page=' . self::PAGE_IDENTIFIER );
+ }
+ $settings_link = '' . __( 'Settings', 'wordpress-seo' ) . ' ';
array_unshift( $links, $settings_link );
}
- if ( class_exists( 'WPSEO_Product_Premium' ) ) {
- $product_premium = new WPSEO_Product_Premium();
- $extension_manager = new WPSEO_Extension_Manager();
+ // Add link to docs.
+ $faq_link = '' . __( 'FAQ', 'wordpress-seo' ) . ' ';
+ array_unshift( $links, $faq_link );
- if ( $extension_manager->is_activated( $product_premium->get_slug() ) ) {
+ $addon_manager = new WPSEO_Addon_Manager();
+ if ( YoastSEO()->helpers->product->is_premium() ) {
+
+ // Remove Free 'deactivate' link if Premium is active as well. We don't want users to deactivate Free when Premium is active.
+ unset( $links['deactivate'] );
+ $no_deactivation_explanation = '' . sprintf(
+ /* translators: %s expands to Yoast SEO Premium. */
+ __( 'Required by %s', 'wordpress-seo' ),
+ 'Yoast SEO Premium'
+ ) . ' ';
+
+ array_unshift( $links, $no_deactivation_explanation );
+
+ if ( $addon_manager->has_valid_subscription( WPSEO_Addon_Manager::PREMIUM_SLUG ) ) {
return $links;
}
+
+ // Add link to where premium can be activated.
+ $activation_link = '' . __( 'Activate your subscription', 'wordpress-seo' ) . ' ';
+ array_unshift( $links, $activation_link );
+
+ return $links;
}
- // Add link to premium support landing page.
- $premium_link = '' . __( 'Premium Support', 'wordpress-seo' ) . ' ';
+ // Add link to premium landing page.
+ $premium_link = '' . __( 'Get Premium', 'wordpress-seo' ) . ' ';
array_unshift( $links, $premium_link );
- // Add link to docs.
- $faq_link = '' . __( 'FAQ', 'wordpress-seo' ) . ' ';
- array_unshift( $links, $faq_link );
-
return $links;
}
@@ -226,9 +266,8 @@ class WPSEO_Admin {
*/
public function config_page_scripts() {
$asset_manager = new WPSEO_Admin_Asset_Manager();
- $asset_manager->enqueue_script( 'admin-global-script' );
-
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'wpseoAdminGlobalL10n', $this->localize_admin_global_script() );
+ $asset_manager->enqueue_script( 'admin-global' );
+ $asset_manager->localize_script( 'admin-global', 'wpseoAdminGlobalL10n', $this->localize_admin_global_script() );
}
/**
@@ -240,21 +279,25 @@ class WPSEO_Admin {
}
/**
- * Filter the $contactmethods array and add Facebook, Google+ and Twitter.
+ * Filter the $contactmethods array and add a set of social profiles.
*
* These are used with the Facebook author, rel="author" and Twitter cards implementation.
*
* @param array $contactmethods Currently set contactmethods.
*
- * @return array $contactmethods with added contactmethods.
+ * @return array Contactmethods with added contactmethods.
*/
public function update_contactmethods( $contactmethods ) {
- // Add Google+.
- $contactmethods['googleplus'] = __( 'Google+', 'wordpress-seo' );
- // Add Twitter.
- $contactmethods['twitter'] = __( 'Twitter username (without @)', 'wordpress-seo' );
- // Add Facebook.
- $contactmethods['facebook'] = __( 'Facebook profile URL', 'wordpress-seo' );
+ $contactmethods['facebook'] = __( 'Facebook profile URL', 'wordpress-seo' );
+ $contactmethods['instagram'] = __( 'Instagram profile URL', 'wordpress-seo' );
+ $contactmethods['linkedin'] = __( 'LinkedIn profile URL', 'wordpress-seo' );
+ $contactmethods['myspace'] = __( 'MySpace profile URL', 'wordpress-seo' );
+ $contactmethods['pinterest'] = __( 'Pinterest profile URL', 'wordpress-seo' );
+ $contactmethods['soundcloud'] = __( 'SoundCloud profile URL', 'wordpress-seo' );
+ $contactmethods['tumblr'] = __( 'Tumblr profile URL', 'wordpress-seo' );
+ $contactmethods['twitter'] = __( 'Twitter username (without @)', 'wordpress-seo' );
+ $contactmethods['youtube'] = __( 'YouTube profile URL', 'wordpress-seo' );
+ $contactmethods['wikipedia'] = __( 'Wikipedia page about you', 'wordpress-seo' ) . '' . __( '(if one exists)', 'wordpress-seo' ) . ' ';
return $contactmethods;
}
@@ -263,8 +306,8 @@ class WPSEO_Admin {
* Log the updated timestamp for user profiles when theme is changed.
*/
public function switch_theme() {
- $users = get_users( array( 'who' => 'authors' ) );
- if ( is_array( $users ) && $users !== array() ) {
+ $users = get_users( [ 'who' => 'authors' ] );
+ if ( is_array( $users ) && $users !== [] ) {
foreach ( $users as $user ) {
update_user_meta( $user->ID, '_yoast_wpseo_profile_updated', time() );
}
@@ -277,28 +320,18 @@ class WPSEO_Admin {
* @return array
*/
private function localize_admin_global_script() {
- return array(
- 'dismiss_about_url' => $this->get_dismiss_url( 'wpseo-dismiss-about' ),
- 'dismiss_tagline_url' => $this->get_dismiss_url( 'wpseo-dismiss-tagline-notice' ),
- 'help_video_iframe_title' => __( 'Yoast SEO video tutorial', 'wordpress-seo' ),
+ return [
+ 'isRtl' => is_rtl(),
+ 'variable_warning' => sprintf(
+ /* translators: %1$s: '%%term_title%%' variable used in titles and meta's template that's not compatible with the given template, %2$s: expands to 'HelpScout beacon' */
+ __( 'Warning: the variable %1$s cannot be used in this template. See the %2$s for more info.', 'wordpress-seo' ),
+ '%s',
+ 'HelpScout beacon'
+ ),
+ /* translators: %s: expends to Yoast SEO */
+ 'help_video_iframe_title' => sprintf( __( '%s video tutorial', 'wordpress-seo' ), 'Yoast SEO' ),
'scrollable_table_hint' => __( 'Scroll to see the table content.', 'wordpress-seo' ),
- );
- }
-
- /**
- * Extending the current page URL with two params to be able to ignore the notice.
- *
- * @param string $dismiss_param The param used to dismiss the notification.
- *
- * @return string
- */
- private function get_dismiss_url( $dismiss_param ) {
- $arr_params = array(
- $dismiss_param => '1',
- 'nonce' => wp_create_nonce( $dismiss_param ),
- );
-
- return esc_url( add_query_arg( $arr_params ) );
+ ];
}
/**
@@ -310,219 +343,27 @@ class WPSEO_Admin {
$upsell->initialize();
}
- /**
- * Initializes Whip to show a notice for outdated PHP versions.
- */
- protected function check_php_version() {
- if ( ! current_user_can( 'manage_options' ) ) {
- return;
- }
-
- if ( ! $this->on_dashboard_page() ) {
- return;
- }
-
- whip_wp_check_versions( array(
- 'php' => '>=5.4',
- ) );
- }
-
/**
* Whether we are on the admin dashboard page.
*
- * @returns bool
+ * @return bool
*/
protected function on_dashboard_page() {
- return 'index.php' === $GLOBALS['pagenow'];
+ return $GLOBALS['pagenow'] === 'index.php';
}
/**
* Loads the cornerstone filter.
+ *
+ * @return WPSEO_WordPress_Integration[] The integrations to initialize.
*/
protected function initialize_cornerstone_content() {
if ( ! WPSEO_Options::get( 'enable_cornerstone_content' ) ) {
- return;
+ return [];
}
- $cornerstone = new WPSEO_Cornerstone();
- $cornerstone->register_hooks();
-
- $cornerstone_filter = new WPSEO_Cornerstone_Filter();
- $cornerstone_filter->register_hooks();
+ return [
+ 'cornerstone_filter' => new WPSEO_Cornerstone_Filter(),
+ ];
}
-
- /**
- * Initializes the seo link watcher.
- *
- * @returns WPSEO_WordPress_Integration[]
- */
- protected function initialize_seo_links() {
- $integrations = array();
-
- $link_table_compatibility_notifier = new WPSEO_Link_Compatibility_Notifier();
- $link_table_accessible_notifier = new WPSEO_Link_Table_Accessible_Notifier();
-
- if ( ! WPSEO_Options::get( 'enable_text_link_counter' ) ) {
- $link_table_compatibility_notifier->remove_notification();
-
- return $integrations;
- }
-
- $integrations[] = new WPSEO_Link_Cleanup_Transient();
-
- // Only use the link module for PHP 5.3 and higher and show a notice when version is wrong.
- if ( version_compare( phpversion(), '5.3', '<' ) ) {
- $link_table_compatibility_notifier->add_notification();
-
- return $integrations;
- }
-
- $link_table_compatibility_notifier->remove_notification();
-
- // When the table doesn't exists, just add the notification and return early.
- if ( ! WPSEO_Link_Table_Accessible::is_accessible() ) {
- WPSEO_Link_Table_Accessible::cleanup();
- }
-
- if ( ! WPSEO_Meta_Table_Accessible::is_accessible() ) {
- WPSEO_Meta_Table_Accessible::cleanup();
- }
-
- if ( ! WPSEO_Link_Table_Accessible::is_accessible() || ! WPSEO_Meta_Table_Accessible::is_accessible() ) {
- $link_table_accessible_notifier->add_notification();
-
- return $integrations;
- }
-
- $link_table_accessible_notifier->remove_notification();
-
- $integrations[] = new WPSEO_Link_Columns( new WPSEO_Meta_Storage() );
- $integrations[] = new WPSEO_Link_Reindex_Dashboard();
- $integrations[] = new WPSEO_Link_Notifier();
-
- // Adds a filter to exclude the attachments from the link count.
- add_filter( 'wpseo_link_count_post_types', array( 'WPSEO_Post_Type', 'filter_attachment_post_type' ) );
-
- return $integrations;
- }
-
- /********************** DEPRECATED METHODS **********************/
-
- // @codeCoverageIgnoreStart
- /**
- * Register the menu item and its sub menu's.
- *
- * @deprecated 5.5
- */
- public function register_settings_page() {
- _deprecated_function( __METHOD__, 'WPSEO 5.5.0' );
- }
-
- /**
- * Register the settings page for the Network settings.
- *
- * @deprecated 5.5
- */
- public function register_network_settings_page() {
- _deprecated_function( __METHOD__, 'WPSEO 5.5.0' );
- }
-
- /**
- * Load the form for a WPSEO admin page.
- *
- * @deprecated 5.5
- */
- public function load_page() {
- _deprecated_function( __METHOD__, 'WPSEO 5.5.0' );
- }
-
- /**
- * Loads the form for the network configuration page.
- *
- * @deprecated 5.5
- */
- public function network_config_page() {
- _deprecated_function( __METHOD__, 'WPSEO 5.5.0' );
- }
-
- /**
- * Filters all advanced settings pages from the given pages.
- *
- * @deprecated 5.5
- * @param array $pages The pages to filter.
- */
- public function filter_settings_pages( array $pages ) {
- _deprecated_function( __METHOD__, 'WPSEO 5.5.0' );
- }
-
- /**
- * Cleans stopwords out of the slug, if the slug hasn't been set yet.
- *
- * @deprecated 7.0
- *
- * @return void
- */
- public function remove_stopwords_from_slug() {
- _deprecated_function( __METHOD__, 'WPSEO 7.0' );
- }
-
- /**
- * Filter the stopwords from the slug.
- *
- * @deprecated 7.0
- *
- * @return void
- */
- public function filter_stopwords_from_slug() {
- _deprecated_function( __METHOD__, 'WPSEO 7.0' );
- }
-
- /**
- * Adds contextual help to the titles & metas page.
- *
- * @deprecated 5.6.0
- */
- public function title_metas_help_tab() {
- _deprecated_function( __METHOD__, '5.6.0' );
-
- $screen = get_current_screen();
-
- $screen->set_help_sidebar( '
- ' . __( 'For more information:', 'wordpress-seo' ) . '
- ' . __( 'Title optimization', 'wordpress-seo' ) . '
- ' . __( 'Why Google won\'t display the right page title', 'wordpress-seo' ) . '
'
- );
-
- $screen->add_help_tab(
- array(
- 'id' => 'basic-help',
- 'title' => __( 'Template explanation', 'wordpress-seo' ),
- 'content' => "\n\t\t" . __( 'Template explanation', 'wordpress-seo' ) . " \n\t\t" . '' .
- sprintf(
- /* translators: %1$s expands to Yoast SEO. */
- __( 'The title & metas settings for %1$s are made up of variables that are replaced by specific values from the page when the page is displayed. The tabs on the left explain the available variables.', 'wordpress-seo' ),
- 'Yoast SEO'
- ) .
- '
' . __( 'Note that not all variables can be used in every template.', 'wordpress-seo' ) . '
',
- )
- );
-
- $screen->add_help_tab(
- array(
- 'id' => 'title-vars',
- 'title' => __( 'Basic Variables', 'wordpress-seo' ),
- 'content' => "\n\t\t" . __( 'Basic Variables', 'wordpress-seo' ) . " \n\t\t" . WPSEO_Replace_Vars::get_basic_help_texts(),
- )
- );
-
- $screen->add_help_tab(
- array(
- 'id' => 'title-vars-advanced',
- 'title' => __( 'Advanced Variables', 'wordpress-seo' ),
- 'content' => "\n\t\t" . __( 'Advanced Variables', 'wordpress-seo' ) . " \n\t\t" . WPSEO_Replace_Vars::get_advanced_help_texts(),
- )
- );
- }
-
- // @codeCoverageIgnoreEnd
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-asset.php b/wp-content/plugins/wordpress-seo/admin/class-asset.php
index f593648d..70e22346 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-asset.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-asset.php
@@ -10,62 +10,148 @@
*/
class WPSEO_Admin_Asset {
+ /**
+ * Constant used to identify file type as a JS file.
+ *
+ * @var string
+ */
const TYPE_JS = 'js';
+
+ /**
+ * Constant used to identify file type as a CSS file.
+ *
+ * @var string
+ */
const TYPE_CSS = 'css';
+ /**
+ * The name option identifier.
+ *
+ * @var string
+ */
const NAME = 'name';
+
+ /**
+ * The source option identifier.
+ *
+ * @var string
+ */
const SRC = 'src';
+
+ /**
+ * The dependencies option identifier.
+ *
+ * @var string
+ */
const DEPS = 'deps';
+
+ /**
+ * The version option identifier.
+ *
+ * @var string
+ */
const VERSION = 'version';
- // Style specific.
+ /* Style specific. */
+
+ /**
+ * The media option identifier.
+ *
+ * @var string
+ */
const MEDIA = 'media';
+
+ /**
+ * The rtl option identifier.
+ *
+ * @var string
+ */
const RTL = 'rtl';
- // Script specific.
+ /* Script specific. */
+
+ /**
+ * The "in footer" option identifier.
+ *
+ * @var string
+ */
const IN_FOOTER = 'in_footer';
/**
+ * Asset identifier.
+ *
* @var string
*/
protected $name;
/**
+ * Path to the asset.
+ *
* @var string
*/
protected $src;
/**
+ * Asset dependencies.
+ *
* @var string|array
*/
protected $deps;
/**
+ * Asset version.
+ *
* @var string
*/
protected $version;
/**
+ * For CSS Assets. The type of media for which this stylesheet has been defined.
+ *
+ * See https://www.w3.org/TR/CSS2/media.html#media-types.
+ *
* @var string
*/
protected $media;
/**
- * @var boolean
+ * For JS Assets. Whether or not the script should be loaded in the footer.
+ *
+ * @var bool
*/
protected $in_footer;
/**
- * @var boolean
+ * For CSS Assets. Whether this stylesheet is a right-to-left stylesheet.
+ *
+ * @var bool
*/
protected $rtl;
/**
+ * File suffix.
+ *
* @var string
*/
protected $suffix;
/**
+ * Default asset arguments.
+ *
+ * @var array
+ */
+ private $defaults = [
+ 'deps' => [],
+ 'in_footer' => true,
+ 'rtl' => true,
+ 'media' => 'all',
+ 'version' => '',
+ 'suffix' => '',
+ ];
+
+ /**
+ * Constructs an instance of the WPSEO_Admin_Asset class.
+ *
* @param array $args The arguments for this asset.
*
* @throws InvalidArgumentException Throws when no name or src has been provided.
@@ -79,14 +165,7 @@ class WPSEO_Admin_Asset {
throw new InvalidArgumentException( 'src is a required argument' );
}
- $args = array_merge( array(
- 'deps' => array(),
- 'version' => WPSEO_VERSION,
- 'in_footer' => true,
- 'rtl' => true,
- 'media' => 'all',
- 'suffix' => WPSEO_CSSJS_SUFFIX,
- ), $args );
+ $args = array_merge( $this->defaults, $args );
$this->name = $args['name'];
$this->src = $args['src'];
@@ -99,6 +178,8 @@ class WPSEO_Admin_Asset {
}
/**
+ * Returns the asset identifier.
+ *
* @return string
*/
public function get_name() {
@@ -106,6 +187,8 @@ class WPSEO_Admin_Asset {
}
/**
+ * Returns the path to the asset.
+ *
* @return string
*/
public function get_src() {
@@ -113,6 +196,8 @@ class WPSEO_Admin_Asset {
}
/**
+ * Returns the asset dependencies.
+ *
* @return array|string
*/
public function get_deps() {
@@ -120,13 +205,21 @@ class WPSEO_Admin_Asset {
}
/**
- * @return string
+ * Returns the asset version.
+ *
+ * @return string|null
*/
public function get_version() {
- return $this->version;
+ if ( ! empty( $this->version ) ) {
+ return $this->version;
+ }
+
+ return null;
}
/**
+ * Returns the media type for CSS assets.
+ *
* @return string
*/
public function get_media() {
@@ -134,39 +227,29 @@ class WPSEO_Admin_Asset {
}
/**
- * @return boolean
+ * Returns whether a script asset should be loaded in the footer of the page.
+ *
+ * @return bool
*/
public function is_in_footer() {
return $this->in_footer;
}
/**
- * @return boolean
+ * Returns whether this CSS has a RTL counterpart.
+ *
+ * @return bool
*/
public function has_rtl() {
return $this->rtl;
}
/**
+ * Returns the file suffix.
+ *
* @return string
*/
public function get_suffix() {
return $this->suffix;
}
-
- /**
- * Returns the full URL for this asset based on the path to the plugin file.
- *
- * @param string $type Type of asset.
- * @param string $plugin_file Absolute path to the plugin file.
- *
- * @return string The full URL to the asset.
- */
- public function get_url( $type, $plugin_file ) {
- _deprecated_function( __CLASS__ . '::get_url', '6.2', 'WPSEO_Admin_Asset_SEO_Location::get_url' );
-
- $asset_location = new WPSEO_Admin_Asset_SEO_Location( $plugin_file );
-
- return $asset_location->get_url( $this, $type );
- }
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-bulk-description-editor-list-table.php b/wp-content/plugins/wordpress-seo/admin/class-bulk-description-editor-list-table.php
index 667ba199..3b65304b 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-bulk-description-editor-list-table.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-bulk-description-editor-list-table.php
@@ -19,15 +19,15 @@ class WPSEO_Bulk_Description_List_Table extends WPSEO_Bulk_List_Table {
protected $page_type = 'description';
/**
- * Settings with are used in __construct
+ * Settings with are used in __construct.
*
* @var array
*/
- protected $settings = array(
+ protected $settings = [
'singular' => 'wpseo_bulk_description',
'plural' => 'wpseo_bulk_descriptions',
'ajax' => true,
- );
+ ];
/**
* The field in the database where meta field is saved.
@@ -37,21 +37,21 @@ class WPSEO_Bulk_Description_List_Table extends WPSEO_Bulk_List_Table {
protected $target_db_field = 'metadesc';
/**
- * The columns shown on the table
+ * The columns shown on the table.
*
* @return array
*/
public function get_columns() {
- $columns = array(
+ $columns = [
'col_existing_yoast_seo_metadesc' => __( 'Existing Yoast Meta Description', 'wordpress-seo' ),
'col_new_yoast_seo_metadesc' => __( 'New Yoast Meta Description', 'wordpress-seo' ),
- );
+ ];
return $this->merge_columns( $columns );
}
/**
- * Parse the metadescription
+ * Parse the metadescription.
*
* @param string $column_name Column name.
* @param object $record Data object.
@@ -70,8 +70,11 @@ class WPSEO_Bulk_Description_List_Table extends WPSEO_Bulk_List_Table {
case 'col_existing_yoast_seo_metadesc':
// @todo Inconsistent return/echo behavior R.
+ // I traced the escaping of the attributes to WPSEO_Bulk_List_Table::column_attributes. Alexander.
+ // The output of WPSEO_Bulk_List_Table::parse_meta_data_field is properly escaped.
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $this->parse_meta_data_field( $record->ID, $attributes );
break;
}
}
-} /* End of class */
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php b/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php
index 009660d4..5be8f439 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php
@@ -12,7 +12,7 @@
class WPSEO_Bulk_List_Table extends WP_List_Table {
/**
- * The nonce that was passed with the request
+ * The nonce that was passed with the request.
*
* @var string
*/
@@ -37,38 +37,38 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
*
* @var array
*/
- protected $meta_data = array();
+ protected $meta_data = [];
/**
- * The current requested page_url
+ * The current requested page_url.
*
* @var string
*/
- private $request_url;
+ private $request_url = '';
/**
- * The current page (depending on $_GET['paged']) if current tab is for current page_type, else it will be 1
+ * The current page (depending on $_GET['paged']) if current tab is for current page_type, else it will be 1.
*
- * @var integer
+ * @var int
*/
private $current_page;
/**
- * The current post filter, if is used (depending on $_GET['post_type_filter'])
+ * The current post filter, if is used (depending on $_GET['post_type_filter']).
*
* @var string
*/
private $current_filter;
/**
- * The current post status, if is used (depending on $_GET['post_status'])
+ * The current post status, if is used (depending on $_GET['post_status']).
*
* @var string
*/
private $current_status;
/**
- * The current sorting, if used (depending on $_GET['order'] and $_GET['orderby'])
+ * The current sorting, if used (depending on $_GET['order'] and $_GET['orderby']).
*
* @var string
*/
@@ -83,7 +83,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
/**
* Based on the page_type ($this->page_type) there will be constructed an url part, for subpages and
- * navigation
+ * navigation.
*
* @var string
*/
@@ -97,72 +97,52 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
protected $settings;
/**
+ * Holds the pagination config.
+ *
* @var array
*/
- protected $pagination = array();
+ protected $pagination = [];
/**
- * Class constructor
+ * Holds the sanitized data from the user input.
+ *
+ * @var array
*/
- public function __construct() {
+ protected $input_fields = [];
+
+ /**
+ * Class constructor.
+ *
+ * @param array $args The arguments.
+ */
+ public function __construct( $args = [] ) {
parent::__construct( $this->settings );
- $this->request_url = $_SERVER['REQUEST_URI'];
- $this->current_page = ( ! empty( $_GET['paged'] ) ) ? $_GET['paged'] : 1;
- $this->current_filter = ( ! empty( $_GET['post_type_filter'] ) ) ? $_GET['post_type_filter'] : 1;
- $this->current_status = ( ! empty( $_GET['post_status'] ) ) ? $_GET['post_status'] : 1;
- $this->current_order = array(
- 'order' => ( ! empty( $_GET['order'] ) ) ? $_GET['order'] : 'asc',
- 'orderby' => ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'post_title',
+ $args = wp_parse_args(
+ $args,
+ [
+ 'nonce' => '',
+ 'input_fields' => [],
+ ]
);
- $this->verify_nonce();
+ $this->input_fields = $args['input_fields'];
+ if ( isset( $_SERVER['REQUEST_URI'] ) ) {
+ $this->request_url = sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) );
+ }
- $this->nonce = wp_create_nonce( 'bulk-editor-table' );
+ $this->current_page = ( ! empty( $this->input_fields['paged'] ) ) ? $this->input_fields['paged'] : 1;
+ $this->current_filter = ( ! empty( $this->input_fields['post_type_filter'] ) ) ? $this->input_fields['post_type_filter'] : 1;
+ $this->current_status = ( ! empty( $this->input_fields['post_status'] ) ) ? $this->input_fields['post_status'] : 1;
+ $this->current_order = [
+ 'order' => ( ! empty( $this->input_fields['order'] ) ) ? $this->input_fields['order'] : 'asc',
+ 'orderby' => ( ! empty( $this->input_fields['orderby'] ) ) ? $this->input_fields['orderby'] : 'post_title',
+ ];
+
+ $this->nonce = $args['nonce'];
$this->page_url = "&nonce={$this->nonce}&type={$this->page_type}#top#{$this->page_type}";
$this->populate_editable_post_types();
-
- }
-
- /**
- * Verifies nonce if additional parameters have been sent.
- *
- * Shows an error notification if the nonce check fails.
- */
- private function verify_nonce() {
- if ( $this->should_verify_nonce() && ! wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'bulk-editor-table' ) ) {
- Yoast_Notification_Center::get()->add_notification(
- new Yoast_Notification(
- __( 'You are not allowed to access this page.', 'wordpress-seo' ),
- array( 'type' => Yoast_Notification::ERROR )
- )
- );
- Yoast_Notification_Center::get()->display_notifications();
- die;
- }
- }
-
- /**
- * Checks if additional parameters have been sent to determine if nonce should be checked or not.
- *
- * @return bool
- */
- private function should_verify_nonce() {
- $possible_params = array(
- 'type',
- 'paged',
- 'post_type_filter',
- 'post_status',
- 'order',
- 'orderby',
- );
-
- foreach ( $possible_params as $param_name ) {
- if ( filter_input( INPUT_GET, $param_name ) ) {
- return true;
- }
- }
}
/**
@@ -181,17 +161,17 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
*/
protected function populate_editable_post_types() {
$post_types = get_post_types(
- array(
+ [
'public' => true,
'exclude_from_search' => false,
- ),
+ ],
'object'
);
- $this->all_posts = array();
- $this->own_posts = array();
+ $this->all_posts = [];
+ $this->own_posts = [];
- if ( is_array( $post_types ) && $post_types !== array() ) {
+ if ( is_array( $post_types ) && $post_types !== [] ) {
foreach ( $post_types as $post_type ) {
if ( ! current_user_can( $post_type->cap->edit_posts ) ) {
continue;
@@ -207,9 +187,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
}
}
-
/**
- * Will shown the navigation for the table like pagenavigation and pagefilter;
+ * Will show the navigation for the table like pagenavigation and pagefilter.
*
* @param string $which Table nav location (such as top).
*/
@@ -218,7 +197,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
?>
-
+
- prepare(), passing the current user_id in as the first parameter.
+ * @return string The subquery, which should always be used in $wpdb->prepare(),
+ * passing the current user_id in as the first parameter.
*/
public function get_base_subquery() {
global $wpdb;
@@ -278,41 +258,41 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
return $subquery;
}
-
/**
- * @return array
+ * Gets the views.
+ *
+ * @return array The views.
*/
public function get_views() {
global $wpdb;
- $status_links = array();
-
- $states = get_post_stati( array( 'show_in_admin_all_list' => true ) );
- $states = esc_sql( $states );
- $all_states = "'" . implode( "', '", $states ) . "'";
+ $status_links = [];
+ $states = get_post_stati( [ 'show_in_admin_all_list' => true ] );
$subquery = $this->get_base_subquery();
$total_posts = $wpdb->get_var(
- "
- SELECT COUNT(ID) FROM {$subquery}
- WHERE post_status IN ({$all_states})
- "
+ $wpdb->prepare(
+ "SELECT COUNT(ID) FROM {$subquery}
+ WHERE post_status IN (" .
+ implode( ', ', array_fill( 0, count( $states ), '%s' ) ) .
+ ')',
+ $states
+ )
);
-
- $post_status = filter_input( INPUT_GET, 'post_status' );
- $class = empty( $post_status ) ? ' class="current"' : '';
- $localized_text = sprintf(
+ $post_status = filter_input( INPUT_GET, 'post_status' );
+ $current_link_attributes = empty( $post_status ) ? ' class="current" aria-current="page"' : '';
+ $localized_text = sprintf(
/* translators: %s expands to the number of posts in localized format. */
_nx( 'All (%s) ', 'All (%s) ', $total_posts, 'posts', 'wordpress-seo' ),
number_format_i18n( $total_posts )
);
- $status_links['all'] = '' . $localized_text . ' ';
+ $status_links['all'] = '' . $localized_text . ' ';
- $post_stati = get_post_stati( array( 'show_in_admin_all_list' => true ), 'objects' );
- if ( is_array( $post_stati ) && $post_stati !== array() ) {
+ $post_stati = get_post_stati( [ 'show_in_admin_all_list' => true ], 'objects' );
+ if ( is_array( $post_stati ) && $post_stati !== [] ) {
foreach ( $post_stati as $status ) {
$status_name = esc_sql( $status->name );
@@ -331,26 +311,25 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
continue;
}
- $class = '';
+ $current_link_attributes = '';
if ( $status_name === $post_status ) {
- $class = ' class="current"';
+ $current_link_attributes = ' class="current" aria-current="page"';
}
- $status_links[ $status_name ] = '' . sprintf( translate_nooped_plural( $status->label_count, $total ), number_format_i18n( $total ) ) . ' ';
+ $status_links[ $status_name ] = '' . sprintf( translate_nooped_plural( $status->label_count, $total ), number_format_i18n( $total ) ) . ' ';
}
}
- unset( $post_stati, $status, $status_name, $total, $class );
+ unset( $post_stati, $status, $status_name, $total, $current_link_attributes );
$trashed_posts = $wpdb->get_var(
+ "SELECT COUNT(ID) FROM {$subquery}
+ WHERE post_status IN ('trash')
"
- SELECT COUNT(ID) FROM {$subquery}
- WHERE post_status IN ('trash')
- "
);
- $class = '';
- if ( 'trash' === $post_status ) {
- $class = 'class="current"';
+ $current_link_attributes = '';
+ if ( $post_status === 'trash' ) {
+ $current_link_attributes = 'class="current" aria-current="page"';
}
$localized_text = sprintf(
@@ -359,28 +338,29 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
number_format_i18n( $trashed_posts )
);
- $status_links['trash'] = '' . $localized_text . ' ';
+ $status_links['trash'] = '' . $localized_text . ' ';
return $status_links;
}
-
/**
+ * Outputs extra table navigation.
+ *
* @param string $which Table nav location (such as top).
*/
public function extra_tablenav( $which ) {
- if ( 'top' === $which ) {
+ if ( $which === 'top' ) {
$post_types = get_post_types(
- array(
+ [
'public' => true,
'exclude_from_search' => false,
- )
+ ]
);
$instance_type = esc_attr( $this->page_type );
- if ( is_array( $post_types ) && $post_types !== array() ) {
+ if ( is_array( $post_types ) && $post_types !== [] ) {
global $wpdb;
echo '';
@@ -388,19 +368,19 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
$post_types = esc_sql( $post_types );
$post_types = "'" . implode( "', '", $post_types ) . "'";
- $states = get_post_stati( array( 'show_in_admin_all_list' => true ) );
+ $states = get_post_stati( [ 'show_in_admin_all_list' => true ] );
$states['trash'] = 'trash';
- $states = esc_sql( $states );
- $all_states = "'" . implode( "', '", $states ) . "'";
$subquery = $this->get_base_subquery();
$post_types = $wpdb->get_results(
- "
- SELECT DISTINCT post_type FROM {$subquery}
- WHERE post_status IN ({$all_states})
- ORDER BY 'post_type' ASC
- "
+ $wpdb->prepare(
+ "SELECT DISTINCT post_type FROM {$subquery}
+ WHERE post_status IN (" .
+ implode( ', ', array_fill( 0, count( $states ), '%s' ) ) .
+ ') ORDER BY post_type ASC',
+ $states
+ )
);
$post_type_filter = filter_input( INPUT_GET, 'post_type_filter' );
@@ -408,7 +388,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
$options = '' . esc_html__( 'Show All Content Types', 'wordpress-seo' ) . ' ';
- if ( is_array( $post_types ) && $post_types !== array() ) {
+ if ( is_array( $post_types ) && $post_types !== [] ) {
foreach ( $post_types as $post_type ) {
$obj = get_post_type_object( $post_type->post_type );
$options .= sprintf(
@@ -427,30 +407,34 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
);
printf(
'%1$s ',
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: $options is properly escaped above.
$options,
esc_attr( 'post-type-filter-' . $instance_type )
);
- submit_button( __( 'Filter', 'wordpress-seo' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
+ submit_button( esc_html__( 'Filter', 'wordpress-seo' ), 'button', false, false, [ 'id' => 'post-query-submit' ] );
echo '
';
}
}
}
/**
+ * Gets a list of sortable columns.
+ *
+ * The format is: 'internal-name' => array( 'orderby', bool ).
*
* @return array
*/
public function get_sortable_columns() {
- return array(
- 'col_page_title' => array( 'post_title', true ),
- 'col_post_type' => array( 'post_type', false ),
- 'col_post_date' => array( 'post_date', false ),
- );
+ return [
+ 'col_page_title' => [ 'post_title', true ],
+ 'col_post_type' => [ 'post_type', false ],
+ 'col_post_date' => [ 'post_date', false ],
+ ];
}
/**
- * Sets the correct pagenumber and pageurl for the navigation
+ * Sets the correct pagenumber and pageurl for the navigation.
*/
public function prepare_page_navigation() {
@@ -461,8 +445,11 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
$current_status = $this->current_status;
$current_order = $this->current_order;
- // If current type doesn't compare with objects page_type, than we have to unset some vars in the requested url (which will be use for internal table urls).
- if ( $_GET['type'] !== $this->page_type ) {
+ /*
+ * If current type doesn't compare with objects page_type, then we have to unset
+ * some vars in the requested url (which will be used for internal table urls).
+ */
+ if ( isset( $this->input_fields['type'] ) && $this->input_fields['type'] !== $this->page_type ) {
$request_url = remove_query_arg( 'paged', $request_url ); // Page will be set with value 1 below.
$request_url = remove_query_arg( 'post_type_filter', $request_url );
$request_url = remove_query_arg( 'post_status', $request_url );
@@ -473,10 +460,10 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
$current_page = 1;
$current_filter = '-1';
$current_status = '';
- $current_order = array(
+ $current_order = [
'orderby' => 'post_title',
'order' => 'asc',
- );
+ ];
}
$_SERVER['REQUEST_URI'] = $request_url;
@@ -488,11 +475,10 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
$_GET['post_status'] = $current_status;
$_GET['orderby'] = $current_order['orderby'];
$_GET['order'] = $current_order['order'];
-
}
/**
- * Preparing the requested pagerows and setting the needed variables
+ * Preparing the requested pagerows and setting the needed variables.
*/
public function prepare_items() {
@@ -513,11 +499,10 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
// Get the metadata for the current items ($this->items).
$this->get_meta_data();
-
}
/**
- * Getting the columns for first row
+ * Getting the columns for first row.
*
* @return array
*/
@@ -526,17 +511,17 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
}
/**
- * Setting the column headers
+ * Setting the column headers.
*/
protected function set_column_headers() {
$columns = $this->get_columns();
- $hidden = array();
+ $hidden = [];
$sortable = $this->get_sortable_columns();
- $this->_column_headers = array( $columns, $hidden, $sortable );
+ $this->_column_headers = [ $columns, $hidden, $sortable ];
}
/**
- * Counting total items
+ * Counting total items.
*
* @param string $subquery SQL FROM part.
* @param string $all_states SQL IN part.
@@ -546,19 +531,17 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
*/
protected function count_items( $subquery, $all_states, $post_type_clause ) {
global $wpdb;
- $total_items = $wpdb->get_var(
- "
- SELECT COUNT(ID)
- FROM {$subquery}
- WHERE post_status IN ({$all_states}) $post_type_clause
- "
- );
- return $total_items;
+ return (int) $wpdb->get_var(
+ "SELECT COUNT(ID) FROM {$subquery}
+ WHERE post_status IN ({$all_states})
+ {$post_type_clause}
+ "
+ );
}
/**
- * Getting the post_type_clause filter
+ * Getting the post_type_clause filter.
*
* @return string
*/
@@ -594,18 +577,17 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
}
$this->set_pagination_args(
- array(
+ [
'total_items' => $total_items,
'total_pages' => ceil( $total_items / $per_page ),
'per_page' => $per_page,
- )
+ ]
);
- $this->pagination = array(
+ $this->pagination = [
'per_page' => $per_page,
- 'offset' => ( $paged - 1 ) * $per_page,
- );
-
+ 'offset' => ( ( $paged - 1 ) * $per_page ),
+ ];
}
/**
@@ -634,7 +616,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
// Get all needed results.
$query = "
- SELECT ID, post_title, post_type, post_status, post_modified, post_date
+ SELECT ID, post_title, post_type, post_status, post_modified, post_date
FROM {$subquery}
WHERE post_status IN ({$all_states}) $post_type_clause
ORDER BY {$orderby} {$order}
@@ -645,18 +627,19 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
}
/**
- * Heavily restricts the possible columns by which a user can order the table in the bulk editor, thereby preventing a possible CSRF vulnerability.
+ * Heavily restricts the possible columns by which a user can order the table
+ * in the bulk editor, thereby preventing a possible CSRF vulnerability.
*
* @param string $orderby The column by which we want to order.
*
- * @return string $orderby
+ * @return string
*/
protected function sanitize_orderby( $orderby ) {
- $valid_column_names = array(
+ $valid_column_names = [
'post_title',
'post_type',
'post_date',
- );
+ ];
if ( in_array( $orderby, $valid_column_names, true ) ) {
return $orderby;
@@ -666,14 +649,15 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
}
/**
- * Makes sure the order clause is always ASC or DESC for the bulk editor table, thereby preventing a possible CSRF vulnerability.
+ * Makes sure the order clause is always ASC or DESC for the bulk editor table,
+ * thereby preventing a possible CSRF vulnerability.
*
* @param string $order Whether we want to sort ascending or descending.
*
- * @return string $order SQL order string (ASC, DESC).
+ * @return string SQL order string (ASC, DESC).
*/
protected function sanitize_order( $order ) {
- if ( in_array( strtoupper( $order ), array( 'ASC', 'DESC' ), true ) ) {
+ if ( in_array( strtoupper( $order ), [ 'ASC', 'DESC' ], true ) ) {
return $order;
}
@@ -703,13 +687,15 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
* @return string
*/
protected function get_all_states() {
- $states = get_post_stati( array( 'show_in_admin_all_list' => true ) );
+ global $wpdb;
+
+ $states = get_post_stati( [ 'show_in_admin_all_list' => true ] );
$states['trash'] = 'trash';
- if ( ! empty( $_GET['post_status'] ) ) {
- $requested_state = sanitize_text_field( $_GET['post_status'] );
+ if ( ! empty( $this->input_fields['post_status'] ) ) {
+ $requested_state = $this->input_fields['post_status'];
if ( in_array( $requested_state, $states, true ) ) {
- $states = array( $requested_state );
+ $states = [ $requested_state ];
}
if ( $requested_state !== 'trash' ) {
@@ -717,10 +703,10 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
}
}
- $states = esc_sql( $states );
- $all_states = "'" . implode( "', '", $states ) . "'";
-
- return $all_states;
+ return $wpdb->prepare(
+ implode( ', ', array_fill( 0, count( $states ), '%s' ) ),
+ $states
+ );
}
/**
@@ -732,7 +718,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
- if ( ( is_array( $records ) && $records !== array() ) && ( is_array( $columns ) && $columns !== array() ) ) {
+ if ( ( is_array( $records ) && $records !== [] ) && ( is_array( $columns ) && $columns !== [] ) ) {
foreach ( $records as $rec ) {
@@ -776,14 +762,14 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
protected function column_attributes( $column_name, $hidden, $classes, $column_display_name ) {
$attributes = '';
- $class = array( $column_name, "column-$column_name$classes" );
+ $class = [ $column_name, "column-$column_name$classes" ];
if ( in_array( $column_name, $hidden, true ) ) {
$class[] = 'hidden';
}
if ( ! empty( $class ) ) {
- $attributes = 'class="' . implode( ' ', $class ) . '"';
+ $attributes = 'class="' . esc_attr( implode( ' ', $class ) ) . '"';
}
$attributes .= ' data-colname="' . esc_attr( $column_display_name ) . '"';
@@ -807,9 +793,9 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
$post_type_object = get_post_type_object( $rec->post_type );
$can_edit_post = current_user_can( $post_type_object->cap->edit_post, $rec->ID );
- $actions = array();
+ $actions = [];
- if ( $can_edit_post && 'trash' !== $rec->post_status ) {
+ if ( $can_edit_post && $rec->post_status !== 'trash' ) {
$actions['edit'] = sprintf(
'%s ',
esc_url( get_edit_post_link( $rec->ID, true ) ),
@@ -820,7 +806,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
}
if ( $post_type_object->public ) {
- if ( in_array( $rec->post_status, array( 'pending', 'draft', 'future' ), true ) ) {
+ if ( in_array( $rec->post_status, [ 'pending', 'draft', 'future' ], true ) ) {
if ( $can_edit_post ) {
$actions['view'] = sprintf(
'%s ',
@@ -831,7 +817,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
);
}
}
- elseif ( 'trash' !== $rec->post_status ) {
+ elseif ( $rec->post_status !== 'trash' ) {
$actions['view'] = sprintf(
'%s ',
esc_url( get_permalink( $rec->ID ) ),
@@ -845,7 +831,6 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
$return .= $this->row_actions( $actions );
return $return;
-
}
/**
@@ -907,7 +892,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
/**
* Parse the field where the existing meta-data value is displayed.
*
- * @param integer $record_id Record ID.
+ * @param int $record_id Record ID.
* @param string $attributes HTML attributes.
* @param bool|array $values Optional values data array.
*
@@ -916,7 +901,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
protected function parse_meta_data_field( $record_id, $attributes, $values = false ) {
// Fill meta data if exists in $this->meta_data.
- $meta_data = ( ! empty( $this->meta_data[ $record_id ] ) ) ? $this->meta_data[ $record_id ] : array();
+ $meta_data = ( ! empty( $this->meta_data[ $record_id ] ) ) ? $this->meta_data[ $record_id ] : [];
$meta_key = WPSEO_Meta::$meta_prefix . $this->target_db_field;
$meta_value = ( ! empty( $meta_data[ $meta_key ] ) ) ? $meta_data[ $meta_key ] : '';
@@ -924,7 +909,10 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
$meta_value = $values[ $meta_value ];
}
- return sprintf( '%1$s ', $meta_value, $attributes, $record_id, $this->target_db_field );
+ $id = "wpseo-existing-$this->target_db_field-$record_id";
+
+ // $attributes correctly escaped, verified by Alexander. See WPSEO_Bulk_Description_List_Table::parse_page_specific_column.
+ return sprintf( '%1$s ', esc_html( $meta_value ), $attributes, esc_attr( $id ) );
}
/**
@@ -942,44 +930,41 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
// Little housekeeping.
unset( $post_ids, $meta_data );
-
}
/**
* Getting all post_ids from to $this->items.
*
- * @return string
+ * @return array
*/
protected function get_post_ids() {
- $needed_ids = array();
+ $post_ids = [];
foreach ( $this->items as $item ) {
- $needed_ids[] = $item->ID;
+ $post_ids[] = $item->ID;
}
- $post_ids = "'" . implode( "', '", $needed_ids ) . "'";
-
return $post_ids;
}
/**
* Getting the meta_data from database.
*
- * @param string $post_ids Post IDs string for SQL IN part.
+ * @param array $post_ids Post IDs for SQL IN part.
*
* @return mixed
*/
- protected function get_meta_data_result( $post_ids ) {
+ protected function get_meta_data_result( array $post_ids ) {
global $wpdb;
- $meta_data = $wpdb->get_results(
- "
- SELECT *
- FROM {$wpdb->postmeta}
- WHERE post_id IN({$post_ids}) && meta_key = '" . WPSEO_Meta::$meta_prefix . $this->target_db_field . "'
- "
+ $where = $wpdb->prepare(
+ 'post_id IN (' . implode( ', ', array_fill( 0, count( $post_ids ), '%d' ) ) . ')',
+ $post_ids
);
- return $meta_data;
+ $where .= $wpdb->prepare( ' AND meta_key = %s', WPSEO_Meta::$meta_prefix . $this->target_db_field );
+
+ // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- They are prepared on the lines above.
+ return $wpdb->get_results( "SELECT * FROM {$wpdb->postmeta} WHERE {$where}" );
}
/**
@@ -992,7 +977,6 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
foreach ( $meta_data as $row ) {
$this->meta_data[ $row->post_id ][ $row->meta_key ] = $row->meta_value;
}
-
}
/**
@@ -1002,15 +986,15 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
*
* @return array
*/
- protected function merge_columns( $columns = array() ) {
+ protected function merge_columns( $columns = [] ) {
$columns = array_merge(
- array(
+ [
'col_page_title' => __( 'WP Page Title', 'wordpress-seo' ),
'col_post_type' => __( 'Content Type', 'wordpress-seo' ),
'col_post_status' => __( 'Post Status', 'wordpress-seo' ),
'col_post_date' => __( 'Publication date', 'wordpress-seo' ),
'col_page_slug' => __( 'Page URL/Slug', 'wordpress-seo' ),
- ),
+ ],
$columns
);
@@ -1018,4 +1002,4 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
return $columns;
}
-} /* End of class */
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-bulk-title-editor-list-table.php b/wp-content/plugins/wordpress-seo/admin/class-bulk-title-editor-list-table.php
index 6e47401b..5314fdb5 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-bulk-title-editor-list-table.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-bulk-title-editor-list-table.php
@@ -12,23 +12,22 @@
class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
/**
- * Current type for this class will be title
+ * Current type for this class will be title.
*
* @var string
*/
protected $page_type = 'title';
-
/**
- * Settings with are used in __construct
+ * Settings with are used in __construct.
*
* @var array
*/
- protected $settings = array(
+ protected $settings = [
'singular' => 'wpseo_bulk_title',
'plural' => 'wpseo_bulk_titles',
'ajax' => true,
- );
+ ];
/**
* The field in the database where meta field is saved.
@@ -38,24 +37,24 @@ class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
protected $target_db_field = 'title';
/**
- * The columns shown on the table
+ * The columns shown on the table.
*
* @return array
*/
public function get_columns() {
- $columns = array(
+ $columns = [
/* translators: %1$s expands to Yoast SEO */
'col_existing_yoast_seo_title' => sprintf( __( 'Existing %1$s Title', 'wordpress-seo' ), 'Yoast SEO' ),
/* translators: %1$s expands to Yoast SEO */
'col_new_yoast_seo_title' => sprintf( __( 'New %1$s Title', 'wordpress-seo' ), 'Yoast SEO' ),
- );
+ ];
return $this->merge_columns( $columns );
}
/**
- * Parse the title columns
+ * Parse the title columns.
*
* @param string $column_name Column name.
* @param object $record Data object.
@@ -66,11 +65,14 @@ class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
protected function parse_page_specific_column( $column_name, $record, $attributes ) {
// Fill meta data if exists in $this->meta_data.
- $meta_data = ( ! empty( $this->meta_data[ $record->ID ] ) ) ? $this->meta_data[ $record->ID ] : array();
+ $meta_data = ( ! empty( $this->meta_data[ $record->ID ] ) ) ? $this->meta_data[ $record->ID ] : [];
switch ( $column_name ) {
case 'col_existing_yoast_seo_title':
- // @todo Inconsistent echo/return behavior R.
+ // @todo Inconsistent return/echo behavior R.
+ // I traced the escaping of the attributes to WPSEO_Bulk_List_Table::column_attributes.
+ // The output of WPSEO_Bulk_List_Table::parse_meta_data_field is properly escaped.
+ // phpcs:ignore WordPress.Security.EscapeOutput
echo $this->parse_meta_data_field( $record->ID, $attributes );
break;
@@ -84,4 +86,4 @@ class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
unset( $meta_data );
}
-} /* End of class */
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-collector.php b/wp-content/plugins/wordpress-seo/admin/class-collector.php
index f1ae1e6b..f7687974 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-collector.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-collector.php
@@ -10,8 +10,12 @@
*/
class WPSEO_Collector {
- /** @var WPSEO_Collection[] */
- protected $collections = array();
+ /**
+ * Holds the collections.
+ *
+ * @var WPSEO_Collection[]
+ */
+ protected $collections = [];
/**
* Adds a collection object to the collections.
@@ -28,7 +32,7 @@ class WPSEO_Collector {
* @return array The collected data.
*/
public function collect() {
- $data = array();
+ $data = [];
foreach ( $this->collections as $collection ) {
$data = array_merge( $data, $collection->get() );
@@ -43,6 +47,6 @@ class WPSEO_Collector {
* @return false|string The encode string.
*/
public function get_as_json() {
- return wp_json_encode( $this->collect() );
+ return WPSEO_Utils::format_json_encode( $this->collect() );
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-config.php b/wp-content/plugins/wordpress-seo/admin/class-config.php
index 294b89f8..444ee139 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-config.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-config.php
@@ -5,15 +5,19 @@
* @package WPSEO\Admin
*/
+use Yoast\WP\SEO\Config\Schema_Types;
+
/**
- * Class WPSEO_Admin_Pages
+ * Class WPSEO_Admin_Pages.
*
* Class with functionality for the Yoast SEO admin pages.
*/
class WPSEO_Admin_Pages {
/**
- * @var string $currentoption The option in use for the current admin page.
+ * The option in use for the current admin page.
+ *
+ * @var string
*/
public $currentoption = 'wpseo';
@@ -25,15 +29,15 @@ class WPSEO_Admin_Pages {
private $asset_manager;
/**
- * Class constructor, which basically only hooks the init function on the init hook
+ * Class constructor, which basically only hooks the init function on the init hook.
*/
public function __construct() {
- add_action( 'init', array( $this, 'init' ), 20 );
+ add_action( 'init', [ $this, 'init' ], 20 );
$this->asset_manager = new WPSEO_Admin_Asset_Manager();
}
/**
- * Make sure the needed scripts are loaded for admin pages
+ * Make sure the needed scripts are loaded for admin pages.
*/
public function init() {
if ( filter_input( INPUT_GET, 'wpseo_reset_defaults' ) && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'wpseo_reset_defaults' ) && current_user_can( 'manage_options' ) ) {
@@ -41,23 +45,8 @@ class WPSEO_Admin_Pages {
wp_redirect( admin_url( 'admin.php?page=' . WPSEO_Configuration_Page::PAGE_IDENTIFIER ) );
}
- add_action( 'admin_init', array( $this, 'admin_init' ) );
- add_action( 'admin_enqueue_scripts', array( $this, 'config_page_scripts' ) );
- add_action( 'admin_enqueue_scripts', array( $this, 'config_page_styles' ) );
- }
-
- /**
- * Run admin-specific actions.
- */
- public function admin_init() {
-
- $page = filter_input( INPUT_GET, 'page' );
- $tool = filter_input( INPUT_GET, 'tool' );
- $export_nonce = filter_input( INPUT_POST, WPSEO_Export::NONCE_NAME );
-
- if ( 'wpseo_tools' === $page && 'import-export' === $tool && $export_nonce !== null ) {
- $this->do_yoast_export();
- }
+ add_action( 'admin_enqueue_scripts', [ $this, 'config_page_scripts' ] );
+ add_action( 'admin_enqueue_scripts', [ $this, 'config_page_styles' ] );
}
/**
@@ -69,45 +58,118 @@ class WPSEO_Admin_Pages {
wp_enqueue_style( 'global' );
wp_enqueue_style( 'wp-admin' );
$this->asset_manager->enqueue_style( 'select2' );
-
$this->asset_manager->enqueue_style( 'admin-css' );
+
+ $page = filter_input( INPUT_GET, 'page' );
+ if ( $page === 'wpseo_titles' ) {
+ $this->asset_manager->enqueue_style( 'search-appearance' );
+ }
+
+ if ( $page === 'wpseo_social' || $page === 'wpseo_licenses' ) {
+ $this->asset_manager->enqueue_style( 'monorepo' );
+ }
}
/**
* Loads the required scripts for the config page.
*/
public function config_page_scripts() {
- $this->asset_manager->enqueue_script( 'admin-script' );
- $this->asset_manager->enqueue_script( 'help-center' );
-
+ $this->asset_manager->enqueue_script( 'settings' );
wp_enqueue_script( 'dashboard' );
wp_enqueue_script( 'thickbox' );
+ $alert_dismissal_action = YoastSEO()->classes->get( \Yoast\WP\SEO\Actions\Alert_Dismissal_Action::class );
+ $dismissed_alerts = $alert_dismissal_action->all_dismissed();
+
+ $script_data = [
+ 'userLanguageCode' => WPSEO_Language_Utils::get_language( \get_user_locale() ),
+ 'dismissedAlerts' => $dismissed_alerts,
+ ];
+
$page = filter_input( INPUT_GET, 'page' );
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-script', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) );
+ if ( $page === 'wpseo_titles' ) {
+ $script_data['analysis'] = [
+ 'plugins' => [
+ 'replaceVars' => $this->get_replace_vars_script_data(),
+ ],
+ ];
- if ( in_array( $page, array( 'wpseo_social', WPSEO_Admin::PAGE_IDENTIFIER, 'wpseo_titles' ), true ) ) {
+ $schema_types = new Schema_Types();
+ $script_data['searchAppearance'] = [
+ 'isRtl' => is_rtl(),
+ 'userEditUrl' => add_query_arg( 'user_id', '{user_id}', admin_url( 'user-edit.php' ) ),
+ 'brushstrokeBackgroundURL' => plugins_url( 'images/brushstroke_background.svg', WPSEO_FILE ),
+ 'showLocalSEOUpsell' => $this->should_show_local_seo_upsell(),
+ 'localSEOUpsellURL' => WPSEO_Shortlinker::get( 'https://yoa.st/3mp' ),
+ 'knowledgeGraphCompanyInfoMissing' => WPSEO_Language_Utils::get_knowledge_graph_company_info_missing_l10n(),
+ 'schema' => [
+ 'pageTypeOptions' => $schema_types->get_page_type_options(),
+ 'articleTypeOptions' => $schema_types->get_article_type_options(),
+ ],
+ ];
+
+ /**
+ * Remove the emoji script as it is incompatible with both React and any
+ * contenteditable fields.
+ */
+ remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
+
+ $yoast_components_l10n = new WPSEO_Admin_Asset_Yoast_Components_L10n();
+ $yoast_components_l10n->localize_script( 'settings' );
+ }
+
+ if ( in_array( $page, [ 'wpseo_social', WPSEO_Admin::PAGE_IDENTIFIER, 'wpseo_titles' ], true ) ) {
wp_enqueue_media();
- $this->asset_manager->enqueue_script( 'admin-media' );
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', $this->localize_media_script() );
+ $script_data['media'] = [
+ 'choose_image' => __( 'Use Image', 'wordpress-seo' ),
+ ];
}
- if ( 'wpseo_tools' === $page ) {
+ if ( $page === 'wpseo_tools' ) {
$this->enqueue_tools_scripts();
}
+
+ if ( $page === 'wpseo_social' ) {
+ $script_data['social'] = true;
+ }
+
+ $this->asset_manager->localize_script( 'settings', 'wpseoScriptData', $script_data );
+ $this->asset_manager->enqueue_user_language_script();
}
/**
- * Pass some variables to js for upload module.
+ * Retrieves some variables that are needed for replacing variables in JS.
*
- * @return array
+ * @return array The replacement and recommended replacement variables.
*/
- public function localize_media_script() {
- return array(
- 'choose_image' => __( 'Use Image', 'wordpress-seo' ),
- );
+ public function get_replace_vars_script_data() {
+ $replace_vars = new WPSEO_Replace_Vars();
+ $recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
+ $editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
+ $replace_vars_list = $replace_vars->get_replacement_variables_list();
+
+ return [
+ 'replace_vars' => $replace_vars_list,
+ 'recommended_replace_vars' => $recommended_replace_vars->get_recommended_replacevars(),
+ 'editor_specific_replace_vars' => $editor_specific_replace_vars->get(),
+ 'shared_replace_vars' => $editor_specific_replace_vars->get_generic( $replace_vars_list ),
+ ];
+ }
+
+ /**
+ * Determines whether the Local SEO upsell should be shown.
+ *
+ * The Local SEO upsell should:
+ * - Only be shown in Free, not when Premium is active.
+ * - Not be shown when Local SEO is active.
+ *
+ * @return bool Whether the Local SEO upsell should be shown.
+ */
+ private function should_show_local_seo_upsell() {
+ return ! YoastSEO()->helpers->product->is_premium()
+ && ! ( defined( 'WPSEO_LOCAL_FILE' ) );
}
/**
@@ -120,28 +182,8 @@ class WPSEO_Admin_Pages {
$this->asset_manager->enqueue_script( 'yoast-seo' );
}
- if ( 'bulk-editor' === $tool ) {
+ if ( $tool === 'bulk-editor' ) {
$this->asset_manager->enqueue_script( 'bulk-editor' );
}
}
-
- /**
- * Runs the yoast exporter class to possibly init the file download.
- */
- private function do_yoast_export() {
- check_admin_referer( WPSEO_Export::NONCE_ACTION, WPSEO_Export::NONCE_NAME );
-
- if ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {
- return;
- }
-
- $wpseo_post = filter_input( INPUT_POST, 'wpseo' );
- $include_taxonomy = ! empty( $wpseo_post['include_taxonomy'] );
- $export = new WPSEO_Export( $include_taxonomy );
-
- if ( $export->has_error() ) {
- add_action( 'admin_notices', array( $export, 'set_error_hook' ) );
-
- }
- }
-} /* End of class */
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-cornerstone-field.php b/wp-content/plugins/wordpress-seo/admin/class-cornerstone-field.php
deleted file mode 100644
index 094fbe93..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-cornerstone-field.php
+++ /dev/null
@@ -1,57 +0,0 @@
-',
- WPSEO_Cornerstone::META_NAME,
- checked( $this->get_meta_value( $post->ID ), '1', false )
- );
-
- $return .= sprintf( '', WPSEO_Cornerstone::META_NAME );
-
- $return .= sprintf(
- /* translators: 1: link open tag; 2: link close tag. */
- __( 'This article is %1$scornerstone content%2$s', 'wordpress-seo' ),
- '',
- ' '
- );
- $return .= ' ';
-
- return $return;
- }
-
- /**
- * Gets the meta value from the database.
- *
- * @param int $post_id The post id to get the meta value for.
- *
- * @return null|string The meta value from the database.
- */
- protected function get_meta_value( $post_id ) {
- return get_post_meta( $post_id, WPSEO_Cornerstone::META_NAME, true );
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-cornerstone.php b/wp-content/plugins/wordpress-seo/admin/class-cornerstone.php
deleted file mode 100644
index 167f7766..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-cornerstone.php
+++ /dev/null
@@ -1,92 +0,0 @@
-page_contains_cornerstone_content_field( $pagenow ) ) {
- return;
- }
-
- add_action( 'save_post', array( $this, 'save_meta_value' ) );
- add_filter( 'wpseo_cornerstone_post_types', array( 'WPSEO_Post_Type', 'filter_attachment_post_type' ) );
- }
-
- /**
- * Saves the meta value to the database.
- *
- * @param int $post_id The post id to save the meta value for.
- *
- * @return void
- */
- public function save_meta_value( $post_id ) {
- $is_cornerstone_content = $this->is_cornerstone_content();
-
- if ( $is_cornerstone_content ) {
- $this->update_meta( $post_id, $is_cornerstone_content );
-
- return;
- }
-
- $this->delete_meta( $post_id );
- }
-
- /**
- * Returns the result of the cornerstone content checkbox.
- *
- * @return bool True when checkbox is checked.
- */
- protected function is_cornerstone_content() {
- return filter_input( INPUT_POST, self::META_NAME ) === '1';
- }
-
- /**
- * Checks if the current page matches one of the pages that contains the cornerstone content field.
- *
- * @param string $page The page to check.
- *
- * @return bool True when the page contains the cornerstone content field.
- */
- protected function page_contains_cornerstone_content_field( $page ) {
- return WPSEO_Metabox::is_post_edit( $page );
- }
-
- /**
- * Updates the cornerstone content post meta with the given cornerstone content value.
- *
- * @param int $post_id The post id to save the meta value for.
- * @param bool $is_cornerstone_content Whether or not the post should be considered to be cornerstone content.
- *
- * @return void
- */
- protected function update_meta( $post_id, $is_cornerstone_content ) {
- update_post_meta( $post_id, self::META_NAME, $is_cornerstone_content );
- }
-
- /**
- * Deletes the cornerstone content post meta for the given post id.
- *
- * @param int $post_id The post id to delete the cornerstone content meta value for..
- *
- * @return void
- */
- protected function delete_meta( $post_id ) {
- delete_post_meta( $post_id, self::META_NAME );
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-customizer.php b/wp-content/plugins/wordpress-seo/admin/class-customizer.php
index a22ae6ce..5771e466 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-customizer.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-customizer.php
@@ -11,19 +11,52 @@
class WPSEO_Customizer {
/**
+ * Holds the customize manager.
+ *
* @var WP_Customize_Manager
*/
protected $wp_customize;
+ /**
+ * Template for the setting IDs used for the customizer.
+ *
+ * @var string
+ */
+ private $setting_template = 'wpseo_titles[%s]';
+
+ /**
+ * Default arguments for the breadcrumbs customizer settings object.
+ *
+ * @var array
+ */
+ private $default_setting_args = [
+ 'default' => '',
+ 'type' => 'option',
+ 'transport' => 'refresh',
+ ];
+
+ /**
+ * Default arguments for the breadcrumbs customizer control object.
+ *
+ * @var array
+ */
+ private $default_control_args = [
+ 'label' => '',
+ 'type' => 'text',
+ 'section' => 'wpseo_breadcrumbs_customizer_section',
+ 'settings' => '',
+ 'context' => '',
+ ];
+
/**
* Construct Method.
*/
public function __construct() {
- add_action( 'customize_register', array( $this, 'wpseo_customize_register' ) );
+ add_action( 'customize_register', [ $this, 'wpseo_customize_register' ] );
}
/**
- * Function to support WordPress Customizer
+ * Function to support WordPress Customizer.
*
* @param WP_Customize_Manager $wp_customize Manager class instance.
*/
@@ -35,7 +68,7 @@ class WPSEO_Customizer {
$this->wp_customize = $wp_customize;
$this->breadcrumbs_section();
- $this->breadcrumbs_blog_remove_setting();
+ $this->breadcrumbs_blog_show_setting();
$this->breadcrumbs_separator_setting();
$this->breadcrumbs_home_setting();
$this->breadcrumbs_prefix_setting();
@@ -45,211 +78,152 @@ class WPSEO_Customizer {
}
/**
- * Add the breadcrumbs section to the customizer
+ * Add the breadcrumbs section to the customizer.
*/
private function breadcrumbs_section() {
- $this->wp_customize->add_section(
- 'wpseo_breadcrumbs_customizer_section', array(
- /* translators: %s is the name of the plugin */
- 'title' => sprintf( __( '%s Breadcrumbs', 'wordpress-seo' ), 'Yoast SEO' ),
- 'priority' => 999,
- 'active_callback' => array( $this, 'breadcrumbs_active_callback' ),
- )
- );
+ $section_args = [
+ /* translators: %s is the name of the plugin */
+ 'title' => sprintf( __( '%s Breadcrumbs', 'wordpress-seo' ), 'Yoast SEO' ),
+ 'priority' => 999,
+ 'active_callback' => [ $this, 'breadcrumbs_active_callback' ],
+ ];
+ $this->wp_customize->add_section( 'wpseo_breadcrumbs_customizer_section', $section_args );
}
/**
- * Returns whether or not the breadcrumbs are active
+ * Returns whether or not the breadcrumbs are active.
*
* @return bool
*/
public function breadcrumbs_active_callback() {
- return true === ( current_theme_supports( 'yoast-seo-breadcrumbs' ) || WPSEO_Options::get( 'breadcrumbs-enable' ) );
+ return current_theme_supports( 'yoast-seo-breadcrumbs' ) || WPSEO_Options::get( 'breadcrumbs-enable' );
}
/**
- * Adds the breadcrumbs remove blog checkbox
+ * Adds the breadcrumbs show blog checkbox.
*/
- private function breadcrumbs_blog_remove_setting() {
- $this->wp_customize->add_setting(
- 'wpseo_titles[breadcrumbs-display-blog-page]', array(
- 'default' => '',
- 'type' => 'option',
- 'transport' => 'refresh',
- )
- );
+ private function breadcrumbs_blog_show_setting() {
+ $index = 'breadcrumbs-display-blog-page';
+ $control_args = [
+ 'label' => __( 'Show blog page in breadcrumbs', 'wordpress-seo' ),
+ 'type' => 'checkbox',
+ 'active_callback' => [ $this, 'breadcrumbs_blog_show_active_cb' ],
+ ];
- $this->wp_customize->add_control(
- new WP_Customize_Control(
- $this->wp_customize, 'wpseo-breadcrumbs-display-blog-page', array(
- 'label' => __( 'Remove blog page from breadcrumbs', 'wordpress-seo' ),
- 'type' => 'checkbox',
- 'section' => 'wpseo_breadcrumbs_customizer_section',
- 'settings' => 'wpseo_titles[breadcrumbs-display-blog-page]',
- 'context' => '',
- 'active_callback' => array( $this, 'breadcrumbs_blog_remove_active_cb' ),
- )
- )
- );
+ $this->add_setting_and_control( $index, $control_args );
}
/**
- * Returns whether or not to show the breadcrumbs blog remove option
+ * Returns whether or not to show the breadcrumbs blog show option.
*
* @return bool
*/
- public function breadcrumbs_blog_remove_active_cb() {
- return 'page' === get_option( 'show_on_front' );
+ public function breadcrumbs_blog_show_active_cb() {
+ return get_option( 'show_on_front' ) === 'page';
}
/**
- * Adds the breadcrumbs separator text field
+ * Adds the breadcrumbs separator text field.
*/
private function breadcrumbs_separator_setting() {
- $this->wp_customize->add_setting(
- 'wpseo_titles[breadcrumbs-sep]', array(
- 'default' => '',
- 'type' => 'option',
- 'transport' => 'refresh',
- )
- );
+ $index = 'breadcrumbs-sep';
+ $control_args = [
+ 'label' => __( 'Breadcrumbs separator:', 'wordpress-seo' ),
+ ];
+ $id = 'wpseo-breadcrumbs-separator';
- $this->wp_customize->add_control(
- new WP_Customize_Control(
- $this->wp_customize, 'wpseo-breadcrumbs-separator', array(
- 'label' => __( 'Breadcrumbs separator:', 'wordpress-seo' ),
- 'type' => 'text',
- 'section' => 'wpseo_breadcrumbs_customizer_section',
- 'settings' => 'wpseo_titles[breadcrumbs-sep]',
- 'context' => '',
- )
- )
- );
+ $this->add_setting_and_control( $index, $control_args, $id );
}
/**
- * Adds the breadcrumbs home anchor text field
+ * Adds the breadcrumbs home anchor text field.
*/
private function breadcrumbs_home_setting() {
- $this->wp_customize->add_setting(
- 'wpseo_titles[breadcrumbs-home]', array(
- 'default' => '',
- 'type' => 'option',
- 'transport' => 'refresh',
- )
- );
+ $index = 'breadcrumbs-home';
+ $control_args = [
+ 'label' => __( 'Anchor text for the homepage:', 'wordpress-seo' ),
+ ];
- $this->wp_customize->add_control(
- new WP_Customize_Control(
- $this->wp_customize, 'wpseo-breadcrumbs-home', array(
- 'label' => __( 'Anchor text for the homepage:', 'wordpress-seo' ),
- 'type' => 'text',
- 'section' => 'wpseo_breadcrumbs_customizer_section',
- 'settings' => 'wpseo_titles[breadcrumbs-home]',
- 'context' => '',
- )
- )
- );
+ $this->add_setting_and_control( $index, $control_args );
}
/**
- * Adds the breadcrumbs prefix text field
+ * Adds the breadcrumbs prefix text field.
*/
private function breadcrumbs_prefix_setting() {
- $this->wp_customize->add_setting(
- 'wpseo_titles[breadcrumbs-prefix]', array(
- 'default' => '',
- 'type' => 'option',
- 'transport' => 'refresh',
- )
- );
+ $index = 'breadcrumbs-prefix';
+ $control_args = [
+ 'label' => __( 'Prefix for breadcrumbs:', 'wordpress-seo' ),
+ ];
- $this->wp_customize->add_control(
- new WP_Customize_Control(
- $this->wp_customize, 'wpseo-breadcrumbs-prefix', array(
- 'label' => __( 'Prefix for breadcrumbs:', 'wordpress-seo' ),
- 'type' => 'text',
- 'section' => 'wpseo_breadcrumbs_customizer_section',
- 'settings' => 'wpseo_titles[breadcrumbs-prefix]',
- 'context' => '',
- )
- )
- );
+ $this->add_setting_and_control( $index, $control_args );
}
/**
- * Adds the breadcrumbs archive prefix text field
+ * Adds the breadcrumbs archive prefix text field.
*/
private function breadcrumbs_archiveprefix_setting() {
- $this->wp_customize->add_setting(
- 'wpseo_titles[breadcrumbs-archiveprefix]', array(
- 'default' => '',
- 'type' => 'option',
- 'transport' => 'refresh',
- )
- );
+ $index = 'breadcrumbs-archiveprefix';
+ $control_args = [
+ 'label' => __( 'Prefix for archive pages:', 'wordpress-seo' ),
+ ];
- $this->wp_customize->add_control(
- new WP_Customize_Control(
- $this->wp_customize, 'wpseo-breadcrumbs-archiveprefix', array(
- 'label' => __( 'Prefix for archive pages:', 'wordpress-seo' ),
- 'type' => 'text',
- 'section' => 'wpseo_breadcrumbs_customizer_section',
- 'settings' => 'wpseo_titles[breadcrumbs-archiveprefix]',
- 'context' => '',
- )
- )
- );
+ $this->add_setting_and_control( $index, $control_args );
}
/**
- * Adds the breadcrumbs search prefix text field
+ * Adds the breadcrumbs search prefix text field.
*/
private function breadcrumbs_searchprefix_setting() {
- $this->wp_customize->add_setting(
- 'wpseo_titles[breadcrumbs-searchprefix]', array(
- 'default' => '',
- 'type' => 'option',
- 'transport' => 'refresh',
- )
- );
+ $index = 'breadcrumbs-searchprefix';
+ $control_args = [
+ 'label' => __( 'Prefix for search result pages:', 'wordpress-seo' ),
+ ];
- $this->wp_customize->add_control(
- new WP_Customize_Control(
- $this->wp_customize, 'wpseo-breadcrumbs-searchprefix', array(
- 'label' => __( 'Prefix for search result pages:', 'wordpress-seo' ),
- 'type' => 'text',
- 'section' => 'wpseo_breadcrumbs_customizer_section',
- 'settings' => 'wpseo_titles[breadcrumbs-searchprefix]',
- 'context' => '',
- )
- )
- );
+ $this->add_setting_and_control( $index, $control_args );
}
/**
- * Adds the breadcrumb 404 prefix text field
+ * Adds the breadcrumb 404 prefix text field.
*/
private function breadcrumbs_404_setting() {
- $this->wp_customize->add_setting(
- 'wpseo_titles[breadcrumbs-404crumb]', array(
- 'default' => '',
- 'type' => 'option',
- 'transport' => 'refresh',
- )
- );
+ $index = 'breadcrumbs-404crumb';
+ $control_args = [
+ 'label' => __( 'Breadcrumb for 404 pages:', 'wordpress-seo' ),
+ ];
- $this->wp_customize->add_control(
- new WP_Customize_Control(
- $this->wp_customize, 'wpseo-breadcrumbs-404crumb', array(
- 'label' => __( 'Breadcrumb for 404 pages:', 'wordpress-seo' ),
- 'type' => 'text',
- 'section' => 'wpseo_breadcrumbs_customizer_section',
- 'settings' => 'wpseo_titles[breadcrumbs-404crumb]',
- 'context' => '',
- )
- )
- );
+ $this->add_setting_and_control( $index, $control_args );
+ }
+
+ /**
+ * Adds the customizer setting and control.
+ *
+ * @param string $index Array key index to use for the customizer setting.
+ * @param array $control_args Customizer control object arguments.
+ * Only those different from the default need to be passed.
+ * @param string|null $id Optional. Customizer control object ID.
+ * Will default to 'wpseo-' . $index.
+ * @param array $custom_settings Optional. Customizer setting arguments.
+ * Only those different from the default need to be passed.
+ */
+ private function add_setting_and_control( $index, $control_args, $id = null, $custom_settings = [] ) {
+ $setting = sprintf( $this->setting_template, $index );
+ $control_args = array_merge( $this->default_control_args, $control_args );
+ $control_args['settings'] = $setting;
+
+ $settings_args = $this->default_setting_args;
+ if ( ! empty( $custom_settings ) ) {
+ $settings_args = array_merge( $settings_args, $custom_settings );
+ }
+
+ if ( ! isset( $id ) ) {
+ $id = 'wpseo-' . $index;
+ }
+
+ $this->wp_customize->add_setting( $setting, $settings_args );
+
+ $control = new WP_Customize_Control( $this->wp_customize, $id, $control_args );
+ $this->wp_customize->add_control( $control );
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php b/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php
index f1b06dfd..c4ca791b 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php
@@ -6,33 +6,68 @@
*/
/**
- * Represents the proxy for communicating with the database
+ * Represents the proxy for communicating with the database.
*/
class WPSEO_Database_Proxy {
- /** @var string */
+ /**
+ * Holds the table name.
+ *
+ * @var string
+ */
protected $table_name;
- /** @var bool */
+ /**
+ * Determines whether to suppress errors or not.
+ *
+ * @var bool
+ */
protected $suppress_errors = true;
- /** @var bool */
+ /**
+ * Determines if this table is multisite.
+ *
+ * @var bool
+ */
+ protected $is_multisite_table = false;
+
+ /**
+ * Holds the last suppressed state.
+ *
+ * @var bool
+ */
protected $last_suppressed_state;
- /** @var wpdb */
+ /**
+ * Holds the WordPress database object.
+ *
+ * @var wpdb
+ */
protected $database;
/**
- * Sets the class attributes.
+ * Sets the class attributes and registers the table.
*
- * @param wpdb $database The database object.
- * @param string $table_name The table name that is represented.
- * @param bool $suppress_errors Should the errors be suppressed.
+ * @param wpdb $database The database object.
+ * @param string $table_name The table name that is represented.
+ * @param bool $suppress_errors Should the errors be suppressed.
+ * @param bool $is_multisite_table Should the table be global in multisite.
*/
- public function __construct( $database, $table_name, $suppress_errors = true ) {
- $this->table_name = $table_name;
- $this->suppress_errors = (bool) $suppress_errors;
- $this->database = $database;
+ public function __construct( $database, $table_name, $suppress_errors = true, $is_multisite_table = false ) {
+ $this->table_name = $table_name;
+ $this->suppress_errors = (bool) $suppress_errors;
+ $this->is_multisite_table = (bool) $is_multisite_table;
+ $this->database = $database;
+
+ // If the table prefix was provided, strip it as it's handled automatically.
+ $table_prefix = $this->get_table_prefix();
+ if ( ! empty( $table_prefix ) && strpos( $this->table_name, $table_prefix ) === 0 ) {
+ $this->table_prefix = substr( $this->table_name, strlen( $table_prefix ) );
+ }
+
+ if ( ! $this->is_table_registered() ) {
+ $this->register_table();
+ }
}
/**
@@ -58,7 +93,7 @@ class WPSEO_Database_Proxy {
*
* @param array $data Data to update on the table.
* @param array $where Where condition as key => value array.
- * @param null $format Optional. data prepare format.
+ * @param null $format Optional. Data prepare format.
* @param null $where_format Optional. Where prepare format.
*
* @return false|int False when the update request is invalid, int on number of rows changed.
@@ -76,22 +111,47 @@ class WPSEO_Database_Proxy {
/**
* Upserts data in the database.
*
- * Tries to insert the data first, if this fails an update is attempted.
+ * Performs an insert into and if key is duplicate it will update the existing record.
*
- * @param array $data Data to update on the table.
- * @param array $where Where condition as key => value array.
- * @param null $format Optional. data prepare format.
- * @param null $where_format Optional. Where prepare format.
+ * @param array $data Data to update on the table.
+ * @param array|null $where Unused. Where condition as key => value array.
+ * @param null $format Optional. Data prepare format.
+ * @param null $where_format Deprecated. Where prepare format.
*
* @return false|int False when the upsert request is invalid, int on number of rows changed.
*/
- public function upsert( array $data, array $where, $format = null, $where_format = null ) {
- $result = $this->insert( $data, $format );
-
- if ( false === $result ) {
- $result = $this->update( $data, $where, $format, $where_format );
+ public function upsert( array $data, array $where = null, $format = null, $where_format = null ) {
+ if ( $where_format !== null ) {
+ _deprecated_argument( __METHOD__, '7.7.0', 'The where_format argument is deprecated' );
}
+ $this->pre_execution();
+
+ $update = [];
+ $keys = [];
+ $columns = array_keys( $data );
+ foreach ( $columns as $column ) {
+ $keys[] = '`' . $column . '`';
+ $update[] = sprintf( '`%1$s` = VALUES(`%1$s`)', $column );
+ }
+
+ $query = sprintf(
+ 'INSERT INTO `%1$s` (%2$s) VALUES ( %3$s ) ON DUPLICATE KEY UPDATE %4$s',
+ $this->get_table_name(),
+ implode( ', ', $keys ),
+ implode( ', ', array_fill( 0, count( $data ), '%s' ) ),
+ implode( ', ', $update )
+ );
+
+ $result = $this->database->query(
+ $this->database->prepare(
+ $query,
+ array_values( $data )
+ )
+ );
+
+ $this->post_execution();
+
return $result;
}
@@ -99,7 +159,7 @@ class WPSEO_Database_Proxy {
* Deletes a record from the database.
*
* @param array $where Where clauses for the query.
- * @param null|array $format Formats for the data.
+ * @param array|null $format Formats for the data.
*
* @return false|int
*/
@@ -118,7 +178,7 @@ class WPSEO_Database_Proxy {
*
* @param string $query The query to execute.
*
- * @return array|null|object The resultset
+ * @return array|object|null The resultset
*/
public function get_results( $query ) {
$this->pre_execution();
@@ -138,9 +198,9 @@ class WPSEO_Database_Proxy {
*
* @return bool True when creation is successful.
*/
- public function create_table( array $columns, array $indexes = array() ) {
- $create_table = sprintf( '
- CREATE TABLE IF NOT EXISTS %1$s ( %2$s ) %3$s',
+ public function create_table( array $columns, array $indexes = [] ) {
+ $create_table = sprintf(
+ 'CREATE TABLE IF NOT EXISTS %1$s ( %2$s ) %3$s',
$this->get_table_name(),
implode( ',', array_merge( $columns, $indexes ) ),
$this->database->get_charset_collate()
@@ -183,11 +243,56 @@ class WPSEO_Database_Proxy {
}
/**
- * Returns the set table name.
+ * Returns the full table name.
*
- * @return string
+ * @return string Full table name including prefix.
*/
- protected function get_table_name() {
- return $this->table_name;
+ public function get_table_name() {
+ return $this->get_table_prefix() . $this->table_name;
+ }
+
+ /**
+ * Returns the prefix to use for the table.
+ *
+ * @return string The table prefix depending on the database context.
+ */
+ protected function get_table_prefix() {
+ if ( $this->is_multisite_table ) {
+ return $this->database->base_prefix;
+ }
+
+ return $this->database->get_blog_prefix();
+ }
+
+ /**
+ * Registers the table with WordPress.
+ *
+ * @return void
+ */
+ protected function register_table() {
+ $table_name = $this->table_name;
+ $full_table_name = $this->get_table_name();
+
+ $this->database->$table_name = $full_table_name;
+
+ if ( $this->is_multisite_table ) {
+ $this->database->ms_global_tables[] = $table_name;
+ return;
+ }
+
+ $this->database->tables[] = $table_name;
+ }
+
+ /**
+ * Checks if the table has been registered with WordPress.
+ *
+ * @return bool True if the table is registered, false otherwise.
+ */
+ protected function is_table_registered() {
+ if ( $this->is_multisite_table ) {
+ return in_array( $this->table_name, $this->database->ms_global_tables, true );
+ }
+
+ return in_array( $this->table_name, $this->database->tables, true );
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-export.php b/wp-content/plugins/wordpress-seo/admin/class-export.php
index c1e4402d..a2e38a9d 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-export.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-export.php
@@ -6,131 +6,98 @@
*/
/**
- * Class WPSEO_Export
+ * Class WPSEO_Export.
*
- * Class with functionality to export the WP SEO settings
+ * Class with functionality to export the WP SEO settings.
*/
class WPSEO_Export {
- const ZIP_FILENAME = 'yoast-seo-settings-export.zip';
- const INI_FILENAME = 'settings.ini';
-
+ /**
+ * Holds the nonce action.
+ *
+ * @var string
+ */
const NONCE_ACTION = 'wpseo_export';
- const NONCE_NAME = 'wpseo_export_nonce';
/**
+ * Holds the export data.
+ *
* @var string
*/
private $export = '';
/**
- * @var string
- */
- private $error = '';
-
- /**
- * @var string
- */
- public $export_zip_url = '';
-
- /**
- * @var boolean
+ * Holds whether the export was a success.
+ *
+ * @var bool
*/
public $success;
/**
- * Whether or not the export will include taxonomy metadata
- *
- * @var boolean
+ * Handles the export request.
*/
- private $include_taxonomy;
-
- /**
- * @var array
- */
- private $dir = array();
-
-
- /**
- * Class constructor
- *
- * @param boolean $include_taxonomy Whether to include the taxonomy metadata the plugin creates.
- */
- public function __construct( $include_taxonomy = false ) {
- $this->include_taxonomy = $include_taxonomy;
- $this->dir = wp_upload_dir();
-
+ public function export() {
+ check_admin_referer( self::NONCE_ACTION );
$this->export_settings();
+ $this->output();
}
/**
- * Returns true when the property error has a value.
- *
- * @return bool
+ * Outputs the export.
*/
- public function has_error() {
- return ( $this->error !== '' );
- }
-
- /**
- * Sets the error hook, to display the error to the user.
- */
- public function set_error_hook() {
- /* translators: %1$s expands to Yoast SEO */
- $message = sprintf( __( 'Error creating %1$s export: ', 'wordpress-seo' ), 'Yoast SEO' ) . $this->error;
+ public function output() {
+ if ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {
+ esc_html_e( 'You do not have the required rights to export settings.', 'wordpress-seo' );
+ return;
+ }
+ echo '';
printf(
- '
',
- $message
+ /* translators: %1$s expands to Import settings */
+ esc_html__(
+ 'Copy all these settings to another site\'s %1$s tab and click "%1$s" there.',
+ 'wordpress-seo'
+ ),
+ esc_html__(
+ 'Import settings',
+ 'wordpress-seo'
+ )
);
+ echo '
';
+ /* translators: %1$s expands to Yoast SEO */
+ echo '' . sprintf( __( 'Your %1$s settings:', 'wordpress-seo' ), 'Yoast SEO' ) . ' ';
+ echo '';
}
/**
* Exports the current site's WP SEO settings.
*/
private function export_settings() {
-
$this->export_header();
foreach ( WPSEO_Options::get_option_names() as $opt_group ) {
$this->write_opt_group( $opt_group );
}
-
- $this->taxonomy_metadata();
-
- if ( ! $this->write_settings_file() ) {
- $this->error = __( 'Could not write settings to file.', 'wordpress-seo' );
-
- return;
- }
-
- if ( $this->zip_file() ) {
- // Just exit, because there is a download being served.
- exit;
- }
}
/**
- * Writes the header of the export file.
+ * Writes the header of the export.
*/
private function export_header() {
$header = sprintf(
/* translators: %1$s expands to Yoast SEO, %2$s expands to Yoast.com */
- esc_html__( 'This is a settings export file for the %1$s plugin by %2$s', 'wordpress-seo' ),
+ esc_html__( 'These are settings for the %1$s plugin by %2$s', 'wordpress-seo' ),
'Yoast SEO',
'Yoast.com'
);
- $this->write_line( '; ' . $header . ' - ' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/1yd' ) ) );
- if ( $this->include_taxonomy ) {
- $this->write_line( '; ' . __( 'This export includes taxonomy metadata', 'wordpress-seo' ) );
- }
+ $this->write_line( '; ' . $header );
}
/**
- * Writes a line to the export
+ * Writes a line to the export.
*
- * @param string $line Line string.
- * @param boolean $newline_first Boolean flag whether to prepend with new line.
+ * @param string $line Line string.
+ * @param bool $newline_first Boolean flag whether to prepend with new line.
*/
private function write_line( $line, $newline_first = false ) {
if ( $newline_first ) {
@@ -140,7 +107,7 @@ class WPSEO_Export {
}
/**
- * Writes an entire option group to the export
+ * Writes an entire option group to the export.
*
* @param string $opt_group Option group name.
*/
@@ -157,7 +124,7 @@ class WPSEO_Export {
foreach ( $options as $key => $elem ) {
if ( is_array( $elem ) ) {
$count = count( $elem );
- for ( $i = 0; $i < $count; $i ++ ) {
+ for ( $i = 0; $i < $count; $i++ ) {
$this->write_setting( $key . '[]', $elem[ $i ] );
}
}
@@ -168,7 +135,7 @@ class WPSEO_Export {
}
/**
- * Writes a settings line to the export
+ * Writes a settings line to the export.
*
* @param string $key Key string.
* @param string $val Value string.
@@ -179,109 +146,4 @@ class WPSEO_Export {
}
$this->write_line( $key . ' = ' . $val );
}
-
- /**
- * Adds the taxonomy meta data if there is any
- */
- private function taxonomy_metadata() {
- if ( $this->include_taxonomy ) {
- $taxonomy_meta = get_option( 'wpseo_taxonomy_meta' );
- if ( is_array( $taxonomy_meta ) ) {
- $this->write_line( '[wpseo_taxonomy_meta]', true );
- $this->write_setting( 'wpseo_taxonomy_meta', urlencode( wp_json_encode( $taxonomy_meta ) ) );
- }
- else {
- $this->write_line( '; ' . __( 'No taxonomy metadata found', 'wordpress-seo' ), true );
- }
- }
- }
-
- /**
- * Writes the settings to our temporary settings.ini file
- *
- * @return boolean unsigned
- */
- private function write_settings_file() {
- $handle = fopen( $this->dir['path'] . '/' . self::INI_FILENAME, 'w' );
- if ( ! $handle ) {
- return false;
- }
-
- $res = fwrite( $handle, $this->export );
- if ( ! $res ) {
- return false;
- }
-
- fclose( $handle );
-
- return true;
- }
-
- /**
- * Zips the settings ini file
- *
- * @return bool|null
- */
- private function zip_file() {
- $is_zip_created = $this->create_zip();
-
- // The settings.ini isn't needed, because it's in the zipfile.
- $this->remove_settings_ini();
-
- if ( ! $is_zip_created ) {
- $this->error = __( 'Could not zip settings-file.', 'wordpress-seo' );
-
- return false;
- }
-
- $this->serve_settings_export();
- $this->remove_zip();
-
- return true;
- }
-
- /**
- * Creates the zipfile and returns true if it created successful.
- *
- * @return bool
- */
- private function create_zip() {
- chdir( $this->dir['path'] );
- $zip = new PclZip( './' . self::ZIP_FILENAME );
- if ( 0 === $zip->create( './' . self::INI_FILENAME ) ) {
- return false;
- }
-
- return file_exists( self::ZIP_FILENAME );
- }
-
- /**
- * Downloads the zip file.
- */
- private function serve_settings_export() {
- // Clean any content that has been already output. For example by other plugins or faulty PHP files.
- if ( ob_get_contents() ) {
- ob_clean();
- }
- header( 'Content-Type: application/octet-stream; charset=utf-8' );
- header( 'Content-Transfer-Encoding: Binary' );
- header( 'Content-Disposition: attachment; filename=' . self::ZIP_FILENAME );
- header( 'Content-Length: ' . filesize( self::ZIP_FILENAME ) );
-
- readfile( self::ZIP_FILENAME );
- }
-
- /**
- * Removes the settings ini file.
- */
- private function remove_settings_ini() {
- unlink( './' . self::INI_FILENAME );
- }
-
- /**
- * Removes the files because they are already downloaded.
- */
- private function remove_zip() {
- unlink( './' . self::ZIP_FILENAME );
- }
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-expose-shortlinks.php b/wp-content/plugins/wordpress-seo/admin/class-expose-shortlinks.php
new file mode 100644
index 00000000..3cacce17
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-expose-shortlinks.php
@@ -0,0 +1,115 @@
+ 'https://yoa.st/allow-search-engines',
+ 'shortlinks.advanced.follow_links' => 'https://yoa.st/follow-links',
+ 'shortlinks.advanced.meta_robots' => 'https://yoa.st/meta-robots-advanced',
+ 'shortlinks.advanced.breadcrumbs_title' => 'https://yoa.st/breadcrumbs-title',
+ 'shortlinks.metabox.schema.explanation' => 'https://yoa.st/400',
+ 'shortlinks.metabox.schema.page_type' => 'https://yoa.st/402',
+ 'shortlinks.sidebar.schema.explanation' => 'https://yoa.st/401',
+ 'shortlinks.sidebar.schema.page_type' => 'https://yoa.st/403',
+ 'shortlinks.focus_keyword_info' => 'https://yoa.st/focus-keyword',
+ 'shortlinks.nofollow_sponsored' => 'https://yoa.st/nofollow-sponsored',
+ 'shortlinks.snippet_preview_info' => 'https://yoa.st/snippet-preview',
+ 'shortlinks.cornerstone_content_info' => 'https://yoa.st/1i9',
+ 'shortlinks.upsell.social_previews' => 'https://yoa.st/social-preview-cta',
+ 'shortlinks.upsell.sidebar.focus_keyword_synonyms_link' => 'https://yoa.st/textlink-synonyms-popup-sidebar',
+ 'shortlinks.upsell.sidebar.focus_keyword_synonyms_button' => 'https://yoa.st/keyword-synonyms-popup-sidebar',
+ 'shortlinks.upsell.sidebar.focus_keyword_additional_link' => 'https://yoa.st/textlink-keywords-popup-sidebar',
+ 'shortlinks.upsell.sidebar.focus_keyword_additional_button' => 'https://yoa.st/add-keywords-popup-sidebar',
+ 'shortlinks.upsell.sidebar.additional_link' => 'https://yoa.st/textlink-keywords-sidebar',
+ 'shortlinks.upsell.sidebar.additional_button' => 'https://yoa.st/add-keywords-sidebar',
+ 'shortlinks.upsell.metabox.go_premium' => 'https://yoa.st/pe-premium-page',
+ 'shortlinks.upsell.metabox.focus_keyword_synonyms_link' => 'https://yoa.st/textlink-synonyms-popup-metabox',
+ 'shortlinks.upsell.metabox.focus_keyword_synonyms_button' => 'https://yoa.st/keyword-synonyms-popup',
+ 'shortlinks.upsell.metabox.focus_keyword_additional_link' => 'https://yoa.st/textlink-keywords-popup-metabox',
+ 'shortlinks.upsell.metabox.focus_keyword_additional_button' => 'https://yoa.st/add-keywords-popup',
+ 'shortlinks.upsell.metabox.additional_link' => 'https://yoa.st/textlink-keywords-metabox',
+ 'shortlinks.upsell.metabox.additional_button' => 'https://yoa.st/add-keywords-metabox',
+ 'shortlinks.upsell.gsc.create_redirect_button' => 'https://yoa.st/redirects',
+ 'shortlinks.readability_analysis_info' => 'https://yoa.st/readability-analysis',
+ 'shortlinks.activate_premium_info' => 'https://yoa.st/activate-subscription',
+ 'shortlinks.upsell.sidebar.morphology_upsell_metabox' => 'https://yoa.st/morphology-upsell-metabox',
+ 'shortlinks.upsell.sidebar.morphology_upsell_sidebar' => 'https://yoa.st/morphology-upsell-sidebar',
+ 'shortlinks.semrush.volume_help' => 'https://yoa.st/3-v',
+ 'shortlinks.semrush.trend_help' => 'https://yoa.st/3-v',
+ 'shortlinks.semrush.prices' => 'https://yoa.st/semrush-prices',
+ 'shortlinks.semrush.premium_landing_page' => 'https://yoa.st/413',
+ ];
+
+ /**
+ * Registers all hooks to WordPress.
+ *
+ * @return void
+ */
+ public function register_hooks() {
+ add_filter( 'wpseo_admin_l10n', [ $this, 'expose_shortlinks' ] );
+ }
+
+ /**
+ * Adds shortlinks to the passed array.
+ *
+ * @param array $input The array to add shortlinks to.
+ *
+ * @return array The passed array with the additional shortlinks.
+ */
+ public function expose_shortlinks( $input ) {
+ foreach ( $this->get_shortlinks() as $key => $shortlink ) {
+ $input[ $key ] = WPSEO_Shortlinker::get( $shortlink );
+ }
+
+ $input['default_query_params'] = WPSEO_Shortlinker::get_query_params();
+
+ return $input;
+ }
+
+ /**
+ * Retrieves the shortlinks.
+ *
+ * @return array The shortlinks.
+ */
+ private function get_shortlinks() {
+ if ( ! $this->is_term_edit() ) {
+ return $this->shortlinks;
+ }
+
+ $shortlinks = $this->shortlinks;
+
+ $shortlinks['shortlinks.upsell.metabox.focus_keyword_synonyms_link'] = 'https://yoa.st/textlink-synonyms-popup-metabox-term';
+ $shortlinks['shortlinks.upsell.metabox.focus_keyword_synonyms_button'] = 'https://yoa.st/keyword-synonyms-popup-term';
+ $shortlinks['shortlinks.upsell.metabox.focus_keyword_additional_link'] = 'https://yoa.st/textlink-keywords-popup-metabox-term';
+ $shortlinks['shortlinks.upsell.metabox.focus_keyword_additional_button'] = 'https://yoa.st/add-keywords-popup-term';
+ $shortlinks['shortlinks.upsell.metabox.additional_link'] = 'https://yoa.st/textlink-keywords-metabox-term';
+ $shortlinks['shortlinks.upsell.metabox.additional_button'] = 'https://yoa.st/add-keywords-metabox-term';
+ $shortlinks['shortlinks.upsell.sidebar.morphology_upsell_metabox'] = 'https://yoa.st/morphology-upsell-metabox-term';
+
+ return $shortlinks;
+ }
+
+ /**
+ * Checks if the current page is a term edit page.
+ *
+ * @return bool True when page is term edit.
+ */
+ private function is_term_edit() {
+ global $pagenow;
+
+ return WPSEO_Taxonomy::is_term_edit( $pagenow );
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-extension-manager.php b/wp-content/plugins/wordpress-seo/admin/class-extension-manager.php
deleted file mode 100644
index 835cb586..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-extension-manager.php
+++ /dev/null
@@ -1,140 +0,0 @@
-extensions[ $extension_name ] = $extension;
- }
-
- /**
- * Removes an extension from the manager.
- *
- * @param string $extension_name The name of the extension to remove.
- *
- * @return void
- */
- public function remove( $extension_name ) {
- if ( array_key_exists( $extension_name, $this->extensions ) ) {
- unset( $this->extensions[ $extension_name ] );
- }
- }
-
- /**
- * Returns the extension for the given extension name.
- *
- * @param string $extension_name The name of the extension to get.
- *
- * @return null|WPSEO_Extension The extension object or null when it doesn't exist.
- */
- public function get( $extension_name ) {
- if ( array_key_exists( $extension_name, $this->extensions ) ) {
- return $this->extensions[ $extension_name ];
- }
-
- return null;
- }
-
- /**
- * Returns all set extension.
- *
- * @return WPSEO_Extension[] Array with the extensions.
- */
- public function get_all() {
- return $this->extensions;
- }
-
- /**
- * Checks if the plugin is activated within My Yoast.
- *
- * @param string $extension_name The extension name to check.
- *
- * @return bool True when the plugin is activated.
- */
- public function is_activated( $extension_name ) {
- if ( self::$active_extensions === null ) {
- // Force re-check on license & dashboard pages.
- $current_page = $this->get_current_page();
-
- // Check whether the licenses are valid or whether we need to show notifications.
- $exclude_cache = ( $current_page === 'wpseo_licenses' || $current_page === 'wpseo_dashboard' );
-
- // Fetch transient data on any other page.
- if ( ! $exclude_cache ) {
- self::$active_extensions = $this->get_cached_extensions();
- }
-
- // If the active extensions is still NULL, we need to set it.
- if ( ! is_array( self::$active_extensions ) ) {
- self::$active_extensions = $this->retrieve_active_extensions();
-
- $this->set_cached_extensions( self::$active_extensions );
- }
- }
-
- return in_array( $extension_name, self::$active_extensions, true );
- }
-
- /**
- * Retrieves the active extensions via an external request.
- *
- * @return array Array containing the active extensions.
- */
- protected function retrieve_active_extensions() {
- return (array) apply_filters( 'yoast-active-extensions', array() );
- }
-
- /**
- * Returns the current page.
- *
- * @return string The current page.
- */
- protected function get_current_page() {
- return filter_input( INPUT_GET, 'page' );
- }
-
- /**
- * Gets a cached list of active extensions.
- *
- * @return boolean|array The cached extensions.
- */
- protected function get_cached_extensions() {
- return get_transient( self::TRANSIENT_CACHE_KEY );
- }
-
- /**
- * Sets the active extensions transient for the set duration.
- *
- * @param array $extensions The extensions to add.
- * @param int $duration The duration that the list of extensions needs to remain cached.
- *
- * @return void
- */
- protected function set_cached_extensions( $extensions, $duration = DAY_IN_SECONDS ) {
- set_transient( self::TRANSIENT_CACHE_KEY, $extensions, $duration );
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-extensions.php b/wp-content/plugins/wordpress-seo/admin/class-extensions.php
deleted file mode 100644
index 96969ca2..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-extensions.php
+++ /dev/null
@@ -1,108 +0,0 @@
- array(
- 'slug' => 'yoast-seo-premium',
- 'identifier' => 'wordpress-seo-premium',
- 'classname' => 'WPSEO_Premium',
- ),
- 'News SEO' => array(
- 'slug' => 'news-seo',
- 'identifier' => 'wpseo-news',
- 'classname' => 'WPSEO_News',
- ),
- 'Yoast WooCommerce SEO' => array(
- 'slug' => 'woocommerce-yoast-seo',
- 'identifier' => 'wpseo-woocommerce',
- 'classname' => 'Yoast_WooCommerce_SEO',
- ),
- 'Video SEO' => array(
- 'slug' => 'video-seo-for-wordpress',
- 'identifier' => 'wpseo-video',
- 'classname' => 'WPSEO_Video_Sitemap',
- ),
- 'Local SEO' => array(
- 'slug' => 'local-seo-for-wordpress',
- 'identifier' => 'wpseo-local',
- 'classname' => 'WPSEO_Local_Core',
- ),
- 'Local SEO for WooCommerce' => array(
- 'slug' => 'local-seo-for-woocommerce',
- 'identifier' => 'wpseo-local-woocommerce',
- 'classname' => 'WPSEO_Local_WooCommerce',
- ),
- );
-
- /**
- * Returns the set extensions.
- *
- * @return array All the extension names.
- */
- public function get() {
- return array_keys( $this->extensions );
- }
-
- /**
- * Checks if the extension is valid.
- *
- * @param string $extension The extension to get the name for.
- *
- * @return bool Returns true when valid.
- */
- public function is_valid( $extension ) {
- $extensions = new WPSEO_Extension_Manager();
- return $extensions->is_activated( $this->extensions[ $extension ]['identifier'] );
- }
-
- /**
- * Invalidates the extension by removing its option.
- *
- * @param string $extension The extension to invalidate.
- */
- public function invalidate( $extension ) {
- /*
- * Make sure we clear the current site and multisite options.
- *
- * Because plugins can be site-activated or multi-site activated we need to clear
- * all possible options.
- *
- * If we knew here that the extension in question was network activated
- * we could do this a lot more easily.
- */
- delete_option( $this->get_option_name( $extension ) );
- delete_site_option( $this->get_option_name( $extension ) );
- }
-
- /**
- * Checks if the plugin has been installed.
- *
- * @param string $extension The name of the plugin to check.
- *
- * @return bool Returns true when installed.
- */
- public function is_installed( $extension ) {
- return class_exists( $this->extensions[ $extension ]['classname'] );
- }
-
- /**
- * Converts the extension to the required option name.
- *
- * @param string $extension The extension name to convert.
- *
- * @return string Returns the option name.
- */
- protected function get_option_name( $extension ) {
- return sanitize_title_with_dashes( $this->extensions[ $extension ]['slug'] . '_', null, 'save' ) . 'license';
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-gutenberg-compatibility.php b/wp-content/plugins/wordpress-seo/admin/class-gutenberg-compatibility.php
new file mode 100644
index 00000000..9a2991e8
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-gutenberg-compatibility.php
@@ -0,0 +1,107 @@
+current_version = $this->detect_installed_gutenberg_version();
+ }
+
+ /**
+ * Determines whether or not Gutenberg is installed.
+ *
+ * @return bool Whether or not Gutenberg is installed.
+ */
+ public function is_installed() {
+ return $this->current_version !== '';
+ }
+
+ /**
+ * Determines whether or not the currently installed version of Gutenberg is below the minimum supported version.
+ *
+ * @return bool True if the currently installed version is below the minimum supported version. False otherwise.
+ */
+ public function is_below_minimum() {
+ return version_compare( $this->current_version, $this->get_minimum_supported_version(), '<' );
+ }
+
+ /**
+ * Gets the currently installed version.
+ *
+ * @return string The currently installed version.
+ */
+ public function get_installed_version() {
+ return $this->current_version;
+ }
+
+ /**
+ * Determines whether or not the currently installed version of Gutenberg is the latest, fully compatible version.
+ *
+ * @return bool Whether or not the currently installed version is fully compatible.
+ */
+ public function is_fully_compatible() {
+ return version_compare( $this->current_version, $this->get_latest_release(), '>=' );
+ }
+
+ /**
+ * Gets the latest released version of Gutenberg.
+ *
+ * @return string The latest release.
+ */
+ protected function get_latest_release() {
+ return self::CURRENT_RELEASE;
+ }
+
+ /**
+ * Gets the minimum supported version of Gutenberg.
+ *
+ * @return string The minumum supported release.
+ */
+ protected function get_minimum_supported_version() {
+ return self::MINIMUM_SUPPORTED;
+ }
+
+ /**
+ * Detects the currently installed Gutenberg version.
+ *
+ * @return string The currently installed Gutenberg version. Empty if the version couldn't be detected.
+ */
+ protected function detect_installed_gutenberg_version() {
+ if ( defined( 'GUTENBERG_VERSION' ) ) {
+ return GUTENBERG_VERSION;
+ }
+
+ return '';
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-help-center-item.php b/wp-content/plugins/wordpress-seo/admin/class-help-center-item.php
deleted file mode 100644
index 7816a542..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-help-center-item.php
+++ /dev/null
@@ -1,96 +0,0 @@
-identifier = $identifier;
- $this->label = $label;
- $this->dashicon = $dashicon;
- $this->args = $args;
- }
-
- /**
- * Get the label.
- *
- * @return string
- */
- public function get_label() {
- return $this->label;
- }
-
- /**
- * Get the identifier.
- *
- * @return string
- */
- public function get_identifier() {
- return $this->identifier;
- }
-
- /**
- * Get the dashicon.
- *
- * @return string
- */
- public function get_dashicon() {
- return $this->dashicon;
- }
-
- /**
- * Get the content of this tab.
- *
- * @return mixed|string
- */
- public function get_content() {
- if ( ! empty( $this->args['content'] ) ) {
- return $this->args['content'];
- }
-
- if ( ! empty( $this->args['callback'] ) ) {
- return call_user_func_array( $this->args['callback'], array( $this ) );
- }
-
- if ( ! empty( $this->args['view'] ) ) {
- $view = $this->args['view'];
- if ( substr( $view, - 4 ) === '.php' ) {
- $view = substr( $view, 0, - 4 );
- }
-
- if ( ! empty( $this->args['view_arguments'] ) ) {
- extract( $this->args['view_arguments'] );
- }
-
- include WPSEO_PATH . 'admin/views/' . $view . '.php';
- }
-
- return '';
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-help-center.php b/wp-content/plugins/wordpress-seo/admin/class-help-center.php
deleted file mode 100644
index 79006b19..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-help-center.php
+++ /dev/null
@@ -1,272 +0,0 @@
-premium_support = $premium_support;
-
- $tabs = new WPSEO_Option_Tabs( '' );
-
- if ( $option_tabs instanceof WPSEO_Option_Tabs ) {
- $tabs = $option_tabs;
- }
-
- if ( $option_tabs instanceof WPSEO_Option_Tab ) {
- $tabs = new WPSEO_Option_Tabs( '', $option_tabs->get_name() );
- $tabs->add_tab( $option_tabs );
- }
-
- $this->tabs = $tabs;
- }
-
- /**
- * Localize data required by the help center component.
- */
- public function localize_data() {
- $this->add_contact_support_item();
- $this->enqueue_localized_data( $this->format_data( $this->tabs->get_tabs() ) );
- }
-
- /**
- * Format the required data for localized script.
- *
- * @param WPSEO_Option_Tab[] $tabs Yoast admin pages navigational tabs.
- *
- * @return array Associative array containing data for help center component.
- */
- protected function format_data( array $tabs ) {
- $formatted_data = array( 'tabs' => array() );
-
- foreach ( $tabs as $tab ) {
- $formatted_data['tabs'][ $tab->get_name() ] = array(
- 'label' => $tab->get_label(),
- 'videoUrl' => $tab->get_video_url(),
- 'id' => $tab->get_name(),
- );
- }
-
- $active_tab = $this->tabs->get_active_tab();
- $active_tab = ( null === $active_tab ) ? $tabs[0] : $active_tab;
-
- $formatted_data['mountId'] = $this->identifier;
- $formatted_data['initialTab'] = $active_tab->get_name();
-
- $is_premium = WPSEO_Utils::is_yoast_seo_premium();
-
- // Will translate to either empty string or "1" in localised script.
- $formatted_data['isPremium'] = $is_premium;
- $formatted_data['pluginVersion'] = WPSEO_VERSION;
-
- // Open HelpScout on activating this tab ID.
- $formatted_data['shouldDisplayContactForm'] = $this->premium_support;
-
- $formatted_data['translations'] = self::get_translated_texts();
-
- $formatted_data['videoDescriptions'] = array(
- array(
- 'title' => __( 'Need some help?', 'wordpress-seo' ),
- 'description' => __( 'Go Premium and our experts will be there for you to answer any questions you might have about the setup and use of the plugin.', 'wordpress-seo' ),
- 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/seo-premium-vt' ),
- 'linkText' => __( 'Get Yoast SEO Premium now »', 'wordpress-seo' ),
- ),
- array(
- 'title' => __( 'Want to be a Yoast SEO Expert?', 'wordpress-seo' ),
- 'description' => __( 'Follow our Yoast SEO for WordPress training and become a certified Yoast SEO Expert!', 'wordpress-seo' ),
- 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/wordpress-training-vt' ),
- 'linkText' => __( 'Enroll in the Yoast SEO for WordPress training »', 'wordpress-seo' ),
- ),
- );
-
- $formatted_data['contactSupportParagraphs'] = array(
- array(
- 'image' => array(
- 'src' => esc_url( plugin_dir_url( WPSEO_FILE ) . 'images/support-team.svg' ),
- 'width' => 100,
- 'height' => 100,
- 'alt' => '',
- ),
- 'content' => null,
- ),
- array(
- 'image' => null,
- 'content' => __( 'If you have a problem that you can\'t solve with our video tutorials or knowledge base, you can send a message to our support team. They can be reached 24/7.', 'wordpress-seo' ),
- ),
- array(
- 'image' => null,
- 'content' => __( 'Support requests you create here are sent directly into our support system, which is secured with 256 bit SSL, so communication is 100% secure.', 'wordpress-seo' ),
- ),
- );
-
- $formatted_data['extraTabs'] = $this->get_extra_tabs();
-
- return $formatted_data;
- }
-
- /**
- * Get additional tabs for the help center component.
- *
- * @return array Additional help center tabs.
- */
- protected function get_extra_tabs() {
- $help_center_items = apply_filters( 'wpseo_help_center_items', $this->help_center_items );
-
- return array_map( array( $this, 'format_helpcenter_tab' ), $help_center_items );
- }
-
- /**
- * Convert WPSEO_Help_Center_Item into help center format.
- *
- * @param WPSEO_Help_Center_Item $item The item to convert.
- *
- * @return array Formatted item.
- */
- protected function format_helpcenter_tab( WPSEO_Help_Center_Item $item ) {
- return array(
- 'identifier' => $item->get_identifier(),
- 'label' => $item->get_label(),
- 'content' => $item->get_content(),
- );
- }
-
- /**
- * Enqueue localized script for help center component.
- *
- * @param array $data Data to localize.
- */
- protected function enqueue_localized_data( $data ) {
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'help-center', 'wpseoHelpCenterData', $data );
- }
-
- /**
- * Outputs the help center div.
- */
- public function mount() {
- echo '' . esc_html__( 'Loading help center.', 'wordpress-seo' ) . '
';
- }
-
- /**
- * Add the contact support help center item to the help center.
- */
- private function add_contact_support_item() {
- /* translators: %s: expands to 'Yoast SEO Premium'. */
- $popup_title = sprintf( __( 'Email support is a %s feature', 'wordpress-seo' ), 'Yoast SEO Premium' );
- $popup_content = '' . __( 'Go Premium and our experts will be there for you to answer any questions you might have about the set-up and use of the plug-in!', 'wordpress-seo' ) . '
';
- /* translators: %1$s: expands to 'Yoast SEO Premium'. */
- $popup_content .= '' . sprintf( __( 'Other benefits of %1$s for you:', 'wordpress-seo' ), 'Yoast SEO Premium' ) . '
';
- $popup_content .= '';
- $popup_content .= '' . sprintf(
- // We don't use strong text here, but we do use it in the "Add keyword" popup, this is just to have the same translatable strings.
- /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
- __( '%1$sNo more dead links%2$s: easy redirect manager', 'wordpress-seo' ), '', ''
- ) . ' ';
- $popup_content .= '' . __( 'Superfast internal links suggestions', 'wordpress-seo' ) . ' ';
- $popup_content .= '' . sprintf(
- // We don't use strong text here, but we do use it in the "Add keyword" popup, this is just to have the same translatable strings.
- /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
- __( '%1$sSocial media preview%2$s: Facebook & Twitter', 'wordpress-seo' ), '', ''
- ) . ' ';
- $popup_content .= '' . __( '24/7 support', 'wordpress-seo' ) . ' ';
- $popup_content .= '' . __( 'No ads!', 'wordpress-seo' ) . ' ';
- $popup_content .= ' ';
-
- $premium_popup = new WPSEO_Premium_Popup( 'contact-support', 'h2', $popup_title, $popup_content, WPSEO_Shortlinker::get( 'https://yoa.st/contact-support' ) );
- $contact_support_help_center_item = new WPSEO_Help_Center_Item(
- 'contact-support',
- __( 'Get support', 'wordpress-seo' ),
- array( 'content' => $premium_popup->get_premium_message( false ) ),
- 'dashicons-email-alt'
- );
-
- $this->help_center_items[] = $contact_support_help_center_item;
- }
-
- /**
- * Pass text variables to js for the help center JS module.
- *
- * %s is replaced with %s and replaced again in the javascript with the actual variable.
- *
- * @return array Translated text strings for the help center.
- */
- public static function get_translated_texts() {
- // Esc_html is not needed because React already handles HTML in the (translations of) these strings.
- return array(
- 'locale' => WPSEO_Utils::get_user_locale(),
- 'videoTutorial' => __( 'Video tutorial', 'wordpress-seo' ),
- 'knowledgeBase' => __( 'Knowledge base', 'wordpress-seo' ),
- 'getSupport' => __( 'Get support', 'wordpress-seo' ),
- 'algoliaSearcher.loadingPlaceholder' => __( 'Loading...', 'wordpress-seo' ),
- 'algoliaSearcher.errorMessage' => __( 'Something went wrong. Please try again later.', 'wordpress-seo' ),
- 'searchBar.headingText' => __( 'Search the Yoast Knowledge Base for answers to your questions:', 'wordpress-seo' ),
- 'searchBar.placeholderText' => __( 'Type here to search...', 'wordpress-seo' ),
- 'searchBar.buttonText' => __( 'Search', 'wordpress-seo' ),
- 'searchResultDetail.openButton' => __( 'View in KB', 'wordpress-seo' ),
- 'searchResultDetail.openButtonLabel' => __( 'Open the knowledge base article in a new window or read it in the iframe below', 'wordpress-seo' ),
- 'searchResultDetail.backButton' => __( 'Go back', 'wordpress-seo' ),
- 'searchResultDetail.backButtonLabel' => __( 'Go back to the search results', 'wordpress-seo' ),
- 'searchResultDetail.iframeTitle' => __( 'Knowledge base article', 'wordpress-seo' ),
- 'searchResultDetail.searchResult' => __( 'Search result', 'wordpress-seo' ),
- 'searchResult.noResultsText' => __( 'No results found.', 'wordpress-seo' ),
- 'searchResult.foundResultsText' => sprintf(
- /* translators: %s expands to the number of results found . */
- __( 'Number of results found: %s', 'wordpress-seo' ),
- '{ resultsCount }'
- ),
- 'searchResult.searchResultsHeading' => __( 'Search results', 'wordpress-seo' ),
- 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
- 'contactSupport.button' => __( 'New support request', 'wordpress-seo' ),
- 'helpCenter.buttonText' => __( 'Need help?', 'wordpress-seo' ),
- );
- }
-
- /**
- * Outputs the help center.
- *
- * @deprecated 5.6
- */
- public function output_help_center() {
- _deprecated_function( 'WPSEO_Help_Center::output_help_center', 'WPSEO 5.6.0', 'WPSEO_Help_Center::mount()' );
- $this->mount();
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-helpscout.php b/wp-content/plugins/wordpress-seo/admin/class-helpscout.php
new file mode 100644
index 00000000..aef7057e
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-helpscout.php
@@ -0,0 +1,265 @@
+beacon_id = $beacon_id;
+ $this->pages = $pages;
+ $this->products = $products;
+ $this->ask_consent = $ask_consent;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function register_hooks() {
+ if ( ! $this->is_beacon_page() ) {
+ return;
+ }
+
+ add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_help_scout_script' ] );
+ add_action( 'admin_footer', [ $this, 'output_beacon_js' ] );
+ }
+
+ /**
+ * Enqueues the HelpScout script.
+ */
+ public function enqueue_help_scout_script() {
+ $asset_manager = new WPSEO_Admin_Asset_Manager();
+ $asset_manager->enqueue_script( 'help-scout-beacon' );
+ }
+
+ /**
+ * Outputs a small piece of javascript for the beacon.
+ */
+ public function output_beacon_js() {
+ printf(
+ '',
+ ( $this->ask_consent ) ? 'wpseoHelpScoutBeaconConsent' : 'wpseoHelpScoutBeacon',
+ esc_html( $this->beacon_id ),
+ WPSEO_Utils::format_json_encode( $this->get_session_data() )
+ );
+ }
+
+ /**
+ * Checks if the current page is a page containing the beacon.
+ *
+ * @return bool
+ */
+ private function is_beacon_page() {
+ return in_array( $this->get_current_page(), $this->pages, true );
+ }
+
+ /**
+ * Retrieves the value of the current page.
+ *
+ * @return string The current page.
+ */
+ private function get_current_page() {
+ $page = filter_input( INPUT_GET, 'page' );
+ if ( isset( $page ) && $page !== false ) {
+ return $page;
+ }
+
+ return '';
+ }
+
+ /**
+ * Retrieves the identifying data.
+ *
+ * @return string The data to pass as identifying data.
+ */
+ protected function get_session_data() {
+ /** @noinspection PhpUnusedLocalVariableInspection */
+ // Do not make these strings translatable! They are for our support agents, the user won't see them!
+ $current_user = wp_get_current_user();
+
+ $data = [
+ 'name' => trim( $current_user->user_firstname . ' ' . $current_user->user_lastname ),
+ 'email' => $current_user->user_email,
+ 'WordPress Version' => $this->get_wordpress_version(),
+ 'Server' => $this->get_server_info(),
+ 'Theme ' => $this->get_theme_info(),
+ 'Plugins ' => $this->get_active_plugins(),
+ ];
+
+ if ( ! empty( $this->products ) ) {
+ $addon_manager = new WPSEO_Addon_Manager();
+ foreach ( $this->products as $product ) {
+ $subscription = $addon_manager->get_subscription( $product );
+
+ if ( ! $subscription ) {
+ continue;
+ }
+
+ $data[ $subscription->product->name ] = $this->get_product_info( $subscription );
+ }
+ }
+
+ return WPSEO_Utils::format_json_encode( $data );
+ }
+
+ /**
+ * Returns basic info about the server software.
+ *
+ * @return string
+ */
+ private function get_server_info() {
+ $server_tracking_data = new WPSEO_Tracking_Server_Data();
+ $server_data = $server_tracking_data->get();
+ $server_data = $server_data['server'];
+
+ $fields_to_use = [
+ 'IP' => 'ip',
+ 'Hostname' => 'Hostname',
+ 'OS' => 'os',
+ 'PHP' => 'PhpVersion',
+ 'CURL' => 'CurlVersion',
+ ];
+
+ $server_data['CurlVersion'] = $server_data['CurlVersion']['version'] . '(SSL Support' . $server_data['CurlVersion']['sslSupport'] . ')';
+
+ $server_info = '';
+
+ foreach ( $fields_to_use as $label => $field_to_use ) {
+ if ( isset( $server_data[ $field_to_use ] ) ) {
+ $server_info .= sprintf( '%1$s %2$s ', esc_html( $label ), esc_html( $server_data[ $field_to_use ] ) );
+ }
+ }
+
+ $server_info .= '
';
+
+ return $server_info;
+ }
+
+ /**
+ * Returns info about the Yoast SEO plugin version and license.
+ *
+ * @param object $plugin The plugin.
+ *
+ * @return string The product info.
+ */
+ private function get_product_info( $plugin ) {
+ if ( empty( $plugin ) ) {
+ return '';
+ }
+
+ $product_info = '';
+ $product_info .= 'Version ' . $plugin->product->version . ' ';
+ $product_info .= 'Expiration date ' . $plugin->expiry_date . ' ';
+ $product_info .= '
';
+
+ return $product_info;
+ }
+
+ /**
+ * Returns the WordPress version + a suffix if current WP is multi site.
+ *
+ * @return string The WordPress version string.
+ */
+ private function get_wordpress_version() {
+ global $wp_version;
+
+ $wordpress_version = $wp_version;
+ if ( is_multisite() ) {
+ $wordpress_version .= ' MULTI-SITE';
+ }
+
+ return $wordpress_version;
+ }
+
+ /**
+ * Returns a formatted HTML string for the current theme.
+ *
+ * @return string The theme info as string.
+ */
+ private function get_theme_info() {
+ $theme = wp_get_theme();
+
+ $theme_info = sprintf(
+ '%2$s v%3$s by %4$s',
+ esc_attr( $theme->display( 'ThemeURI' ) ),
+ esc_html( $theme->display( 'Name' ) ),
+ esc_html( $theme->display( 'Version' ) ),
+ esc_html( $theme->display( 'Author' ) )
+ );
+
+ if ( is_child_theme() ) {
+ $theme_info .= sprintf( ' Child theme of: %1$s', esc_html( $theme->display( 'Template' ) ) );
+ }
+
+ return $theme_info;
+ }
+
+ /**
+ * Returns a formatted HTML list of all active plugins.
+ *
+ * @return string The active plugins.
+ */
+ private function get_active_plugins() {
+ $updates_available = get_site_transient( 'update_plugins' );
+
+ $active_plugins = '';
+ foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
+ $plugin_data = get_plugin_data( $plugin );
+ $plugin_file = str_replace( trailingslashit( WP_PLUGIN_DIR ), '', $plugin );
+
+ if ( isset( $updates_available->response[ $plugin_file ] ) ) {
+ $active_plugins .= ' ';
+ }
+
+ $active_plugins .= sprintf(
+ '%2$s v%3$s',
+ esc_attr( $plugin_data['PluginURI'] ),
+ esc_html( $plugin_data['Name'] ),
+ esc_html( $plugin_data['Version'] )
+ );
+ }
+
+ return $active_plugins;
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-license-page-manager.php b/wp-content/plugins/wordpress-seo/admin/class-license-page-manager.php
deleted file mode 100644
index 05f2cabf..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-license-page-manager.php
+++ /dev/null
@@ -1,211 +0,0 @@
-get_version() === self::VERSION_BACKWARDS_COMPATIBILITY ) {
- add_filter( 'yoast-license-valid', '__return_true' );
- add_filter( 'yoast-show-license-notice', '__return_false' );
- add_action( 'admin_init', array( $this, 'validate_extensions' ), 15 );
- }
- else {
- add_action( 'admin_init', array( $this, 'remove_faulty_notifications' ), 15 );
- }
- }
-
- /**
- * Validates the extensions and show a notice for the invalid extensions.
- */
- public function validate_extensions() {
-
- if ( filter_input( INPUT_GET, 'page' ) === WPSEO_Admin::PAGE_IDENTIFIER ) {
- /**
- * Filter: 'yoast-active-extensions' - Collects all active extensions. This hook is implemented in the
- * license manager.
- *
- * @api array $extensions The array with extensions.
- */
- apply_filters( 'yoast-active-extensions', array() );
- }
-
- $extension_list = new WPSEO_Extensions();
- $extensions = $extension_list->get();
-
- $notification_center = Yoast_Notification_Center::get();
-
- foreach ( $extensions as $product_name ) {
- $notification = $this->create_notification( $product_name );
-
- // Add a notification when the installed plugin isn't activated in My Yoast.
- if ( $extension_list->is_installed( $product_name ) && ! $extension_list->is_valid( $product_name ) ) {
- $notification_center->add_notification( $notification );
-
- continue;
- }
-
- $notification_center->remove_notification( $notification );
- }
- }
-
- /**
- * Removes the faulty set notifications.
- */
- public function remove_faulty_notifications() {
- $extension_list = new WPSEO_Extensions();
- $extensions = $extension_list->get();
-
- $notification_center = Yoast_Notification_Center::get();
-
- foreach ( $extensions as $product_name ) {
- $notification = $this->create_notification( $product_name );
- $notification_center->remove_notification( $notification );
- }
- }
-
- /**
- * Handles the response.
- *
- * @param array $response HTTP response.
- * @param array $request_arguments HTTP request arguments. Unused.
- * @param string $url The request URL.
- *
- * @return array The response array.
- */
- public function handle_response( array $response, $request_arguments, $url ) {
- $response_code = wp_remote_retrieve_response_code( $response );
-
- if ( $response_code === 200 && $this->is_expected_endpoint( $url ) ) {
- $response_data = $this->parse_response( $response );
- $this->detect_version( $response_data );
- }
-
- return $response;
- }
-
- /**
- * Returns the license page to use based on the version number.
- *
- * @return string The page to use.
- */
- public function get_license_page() {
- return 'licenses';
- }
-
- /**
- * Returns the version number of the license server.
- *
- * @return int The version number
- */
- protected function get_version() {
- return get_option( $this->get_option_name(), self::VERSION_BACKWARDS_COMPATIBILITY );
- }
-
- /**
- * Returns the option name.
- *
- * @return string The option name.
- */
- protected function get_option_name() {
- return 'wpseo_license_server_version';
- }
-
- /**
- * Sets the version when there is a value in the response.
- *
- * @param array $response The response to extract the version from.
- */
- protected function detect_version( $response ) {
- if ( ! empty( $response['serverVersion'] ) ) {
- $this->set_version( $response['serverVersion'] );
- }
- }
-
- /**
- * Sets the version.
- *
- * @param string $server_version The version number to save.
- */
- protected function set_version( $server_version ) {
- update_option( $this->get_option_name(), $server_version );
- }
-
- /**
- * Parses the response by getting its body and do a unserialize of it.
- *
- * @param array $response The response to parse.
- *
- * @return mixed|string|false The parsed response.
- */
- protected function parse_response( $response ) {
- $response = json_decode( wp_remote_retrieve_body( $response ), true );
- $response = maybe_unserialize( $response );
-
- return $response;
- }
-
- /**
- * Checks if the given url matches the expected endpoint.
- *
- * @param string $url The url to check.
- *
- * @return bool True when url matches the endpoint.
- */
- protected function is_expected_endpoint( $url ) {
- $url_parts = wp_parse_url( $url );
-
- $is_yoast_com = ( in_array( $url_parts['host'], array( 'yoast.com', 'my.yoast.com' ), true ) );
- $is_edd_api = ( isset( $url_parts['path'] ) && $url_parts['path'] === '/edd-sl-api' );
-
- return $is_yoast_com && $is_edd_api;
- }
-
- /**
- * Creates an instance of Yoast_Notification
- *
- * @param string $product_name The product to create the notification for.
- *
- * @return Yoast_Notification The created notification.
- */
- protected function create_notification( $product_name ) {
- $notification_options = array(
- 'type' => Yoast_Notification::ERROR,
- 'id' => 'wpseo-dismiss-' . sanitize_title_with_dashes( $product_name, null, 'save' ),
- 'capabilities' => 'wpseo_manage_options',
- );
-
- $notification = new Yoast_Notification(
- sprintf(
- /* translators: %1$s expands to the product name. %2$s expands to a link to My Yoast */
- __( 'You are not receiving updates or support! Fix this problem by adding this site and enabling %1$s for it in %2$s.', 'wordpress-seo' ),
- $product_name,
- 'My Yoast '
- ),
- $notification_options
- );
-
- return $notification;
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php b/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php
index dc37a32e..dbfd3106 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php
@@ -5,31 +5,54 @@
* @package WPSEO\Admin
*/
+use Yoast\WP\SEO\Context\Meta_Tags_Context;
+use Yoast\WP\SEO\Integrations\Admin\Admin_Columns_Cache_Integration;
+use Yoast\WP\SEO\Surfaces\Values\Meta;
+
/**
- * Class WPSEO_Meta_Columns
+ * Class WPSEO_Meta_Columns.
*/
class WPSEO_Meta_Columns {
/**
+ * Holds the context objects for each indexable.
+ *
+ * @var Meta_Tags_Context[]
+ */
+ protected $context = [];
+
+ /**
+ * Holds the SEO analysis.
+ *
* @var WPSEO_Metabox_Analysis_SEO
*/
private $analysis_seo;
/**
+ * Holds the readability analysis.
+ *
* @var WPSEO_Metabox_Analysis_Readability
*/
private $analysis_readability;
+ /**
+ * Admin columns cache.
+ *
+ * @var Admin_Columns_Cache_Integration
+ */
+ private $admin_columns_cache;
+
/**
* When page analysis is enabled, just initialize the hooks.
*/
public function __construct() {
if ( apply_filters( 'wpseo_use_page_analysis', true ) === true ) {
- add_action( 'admin_init', array( $this, 'setup_hooks' ) );
+ add_action( 'admin_init', [ $this, 'setup_hooks' ] );
}
$this->analysis_seo = new WPSEO_Metabox_Analysis_SEO();
$this->analysis_readability = new WPSEO_Metabox_Analysis_Readability();
+ $this->admin_columns_cache = YoastSEO()->classes->get( Admin_Columns_Cache_Integration::class );
}
/**
@@ -39,14 +62,15 @@ class WPSEO_Meta_Columns {
$this->set_post_type_hooks();
if ( $this->analysis_seo->is_enabled() ) {
- add_action( 'restrict_manage_posts', array( $this, 'posts_filter_dropdown' ) );
+ add_action( 'restrict_manage_posts', [ $this, 'posts_filter_dropdown' ] );
}
if ( $this->analysis_readability->is_enabled() ) {
- add_action( 'restrict_manage_posts', array( $this, 'posts_filter_dropdown_readability' ) );
+ add_action( 'restrict_manage_posts', [ $this, 'posts_filter_dropdown_readability' ] );
}
- add_filter( 'request', array( $this, 'column_sort_orderby' ) );
+ add_filter( 'request', [ $this, 'column_sort_orderby' ] );
+ add_filter( 'default_hidden_columns', [ $this, 'column_hidden' ], 10, 1 );
}
/**
@@ -61,7 +85,7 @@ class WPSEO_Meta_Columns {
return $columns;
}
- $added_columns = array();
+ $added_columns = [];
if ( $this->analysis_seo->is_enabled() ) {
$added_columns['wpseo-score'] = '' . __( 'SEO score', 'wordpress-seo' ) . ' ';
@@ -75,7 +99,7 @@ class WPSEO_Meta_Columns {
$added_columns['wpseo-metadesc'] = __( 'Meta Desc.', 'wordpress-seo' );
if ( $this->analysis_seo->is_enabled() ) {
- $added_columns['wpseo-focuskw'] = __( 'Focus KW', 'wordpress-seo' );
+ $added_columns['wpseo-focuskw'] = __( 'Keyphrase', 'wordpress-seo' );
}
return array_merge( $columns, $added_columns );
@@ -94,27 +118,23 @@ class WPSEO_Meta_Columns {
switch ( $column_name ) {
case 'wpseo-score':
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Correctly escaped in render_score_indicator() method.
echo $this->parse_column_score( $post_id );
return;
case 'wpseo-score-readability':
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Correctly escaped in render_score_indicator() method.
echo $this->parse_column_score_readability( $post_id );
return;
case 'wpseo-title':
- $post = get_post( $post_id, ARRAY_A );
- $title = wpseo_replace_vars( $this->page_title( $post_id ), $post );
- $title = apply_filters( 'wpseo_title', $title );
-
- echo esc_html( $title );
+ echo esc_html( $this->get_meta( $post_id )->title );
return;
case 'wpseo-metadesc':
- $post = get_post( $post_id, ARRAY_A );
- $metadesc_val = wpseo_replace_vars( WPSEO_Meta::get_value( 'metadesc', $post_id ), $post );
- $metadesc_val = apply_filters( 'wpseo_metadesc', $metadesc_val );
+ $metadesc_val = $this->get_meta( $post_id )->meta_description;
- if ( '' === $metadesc_val ) {
+ if ( $metadesc_val === '' ) {
echo '— ',
esc_html__( 'Meta description not set.', 'wordpress-seo' ),
' ';
@@ -127,9 +147,9 @@ class WPSEO_Meta_Columns {
case 'wpseo-focuskw':
$focuskw_val = WPSEO_Meta::get_value( 'focuskw', $post_id );
- if ( '' === $focuskw_val ) {
+ if ( $focuskw_val === '' ) {
echo '— ',
- esc_html__( 'Focus keyword not set.', 'wordpress-seo' ),
+ esc_html__( 'Focus keyphrase not set.', 'wordpress-seo' ),
' ';
return;
}
@@ -163,30 +183,22 @@ class WPSEO_Meta_Columns {
/**
* Hides the SEO title, meta description and focus keyword columns if the user hasn't chosen which columns to hide.
*
- * @param array|false $result The hidden columns.
- * @param string $option The option name used to set which columns should be hidden.
- * @param WP_User $user The User.
+ * @param array $hidden The hidden columns.
*
- * @return array $result Array containing the columns to hide.
+ * @return array Array containing the columns to hide.
*/
- public function column_hidden( $result, $option, $user ) {
- global $wpdb;
-
- if ( $user->has_prop( $wpdb->get_blog_prefix() . $option ) || $user->has_prop( $option ) ) {
- return $result;
+ public function column_hidden( $hidden ) {
+ if ( ! is_array( $hidden ) ) {
+ $hidden = [];
}
- if ( ! is_array( $result ) ) {
- $result = array();
- }
-
- array_push( $result, 'wpseo-title', 'wpseo-metadesc' );
+ array_push( $hidden, 'wpseo-title', 'wpseo-metadesc' );
if ( $this->analysis_seo->is_enabled() ) {
- array_push( $result, 'wpseo-focuskw' );
+ $hidden[] = 'wpseo-focuskw';
}
- return $result;
+ return $hidden;
}
/**
@@ -202,11 +214,13 @@ class WPSEO_Meta_Columns {
echo '' . esc_html__( 'Filter by SEO Score', 'wordpress-seo' ) . ' ';
echo '';
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Output is correctly escaped in the generate_option() method.
echo $this->generate_option( '', __( 'All SEO Scores', 'wordpress-seo' ) );
foreach ( $ranks as $rank ) {
$selected = selected( $this->get_current_seo_filter(), $rank->get_rank(), false );
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Output is correctly escaped in the generate_option() method.
echo $this->generate_option( $rank->get_rank(), $rank->get_drop_down_label(), $selected );
}
@@ -228,11 +242,13 @@ class WPSEO_Meta_Columns {
echo '' . esc_html__( 'Filter by Readability Score', 'wordpress-seo' ) . ' ';
echo '';
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Output is correctly escaped in the generate_option() method.
echo $this->generate_option( '', __( 'All Readability Scores', 'wordpress-seo' ) );
foreach ( $ranks as $rank ) {
$selected = selected( $this->get_current_readability_filter(), $rank->get_rank(), false );
+ // phpcs:ignore WordPress.Security.EscapeOutput -- Output is correctly escaped in the generate_option() method.
echo $this->generate_option( $rank->get_rank(), $rank->get_drop_down_readability_labels(), $selected );
}
@@ -242,9 +258,9 @@ class WPSEO_Meta_Columns {
/**
* Generates an element.
*
- * @param string $value The option's value.
- * @param string $label The option's label.
- * @param string $selected HTML selected attribute for an option.
+ * @param string $value The option's value.
+ * @param string $label The option's label.
+ * @param string $selected HTML selected attribute for an option.
*
* @return string The generated element.
*/
@@ -252,6 +268,19 @@ class WPSEO_Meta_Columns {
return ' ' . esc_html( $label ) . ' ';
}
+ /**
+ * Returns the meta object for a given post ID.
+ *
+ * @param int $post_id The post ID.
+ *
+ * @return Meta The meta object.
+ */
+ protected function get_meta( $post_id ) {
+ $indexable = $this->admin_columns_cache->get_indexable( $post_id );
+
+ return YoastSEO()->meta->for_indexable( $indexable, 'Post_Type' );
+ }
+
/**
* Determines the SEO score filter to be later used in the meta query, based on the passed SEO filter.
*
@@ -294,11 +323,11 @@ class WPSEO_Meta_Columns {
* @return array The keyword filter.
*/
protected function get_keyword_filter( $keyword_filter ) {
- return array(
- 'post_type' => get_query_var( 'post_type', 'post' ),
- 'meta_key' => WPSEO_Meta::$meta_prefix . 'focuskw',
- 'meta_value' => sanitize_text_field( $keyword_filter ),
- );
+ return [
+ 'post_type' => get_query_var( 'post_type', 'post' ),
+ 'key' => WPSEO_Meta::$meta_prefix . 'focuskw',
+ 'value' => sanitize_text_field( $keyword_filter ),
+ ];
}
/**
@@ -318,7 +347,7 @@ class WPSEO_Meta_Columns {
* @return array Array containing all the applicable filters.
*/
protected function collect_filters() {
- $active_filters = array();
+ $active_filters = [];
$seo_filter = $this->get_current_seo_filter();
$readability_filter = $this->get_current_readability_filter();
@@ -371,18 +400,18 @@ class WPSEO_Meta_Columns {
* @return array Array containing the query parameters regarding meta robots.
*/
protected function get_meta_robots_query_values() {
- return array(
+ return [
'relation' => 'OR',
- array(
+ [
'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
'compare' => 'NOT EXISTS',
- ),
- array(
+ ],
+ [
'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
'value' => '1',
'compare' => '!=',
- ),
- );
+ ],
+ ];
}
/**
@@ -394,7 +423,7 @@ class WPSEO_Meta_Columns {
*/
protected function determine_score_filters( $score_filters ) {
if ( count( $score_filters ) > 1 ) {
- return array_merge( array( 'relation' => 'AND' ), $score_filters );
+ return array_merge( [ 'relation' => 'AND' ], $score_filters );
}
return $score_filters;
@@ -439,7 +468,7 @@ class WPSEO_Meta_Columns {
/**
* Uses the vars to create a complete filter query that can later be executed to filter out posts.
*
- * @param array $vars Array containing the variables that will be used in the meta query.
+ * @param array $vars Array containing the variables that will be used in the meta query.
* @param array $filters Array containing the filters that we need to apply in the meta query.
*
* @return array Array containing the complete filter query.
@@ -450,14 +479,14 @@ class WPSEO_Meta_Columns {
return $vars;
}
- $result = array( 'meta_query' => array() );
- $result['meta_query'] = array_merge( $result['meta_query'], array( $this->determine_score_filters( $filters ) ) );
+ $result = [ 'meta_query' => [] ];
+ $result['meta_query'] = array_merge( $result['meta_query'], [ $this->determine_score_filters( $filters ) ] );
$current_seo_filter = $this->get_current_seo_filter();
// This only applies for the SEO score filter because it can because the SEO score can be altered by the no-index option.
- if ( $this->is_valid_filter( $current_seo_filter ) && ! in_array( $current_seo_filter, array( WPSEO_Rank::NO_INDEX, WPSEO_Rank::NO_FOCUS ), true ) ) {
- $result['meta_query'] = array_merge( $result['meta_query'], array( $this->get_meta_robots_query_values() ) );
+ if ( $this->is_valid_filter( $current_seo_filter ) && ! in_array( $current_seo_filter, [ WPSEO_Rank::NO_INDEX, WPSEO_Rank::NO_FOCUS ], true ) ) {
+ $result['meta_query'] = array_merge( $result['meta_query'], [ $this->get_meta_robots_query_values() ] );
}
return array_merge( $vars, $result );
@@ -466,39 +495,39 @@ class WPSEO_Meta_Columns {
/**
* Creates a Readability score filter.
*
- * @param number $low The lower boundary of the score.
+ * @param number $low The lower boundary of the score.
* @param number $high The higher boundary of the score.
*
* @return array The Readability Score filter.
*/
protected function create_readability_score_filter( $low, $high ) {
- return array(
- array(
+ return [
+ [
'key' => WPSEO_Meta::$meta_prefix . 'content_score',
- 'value' => array( $low, $high ),
+ 'value' => [ $low, $high ],
'type' => 'numeric',
'compare' => 'BETWEEN',
- ),
- );
+ ],
+ ];
}
/**
* Creates an SEO score filter.
*
- * @param number $low The lower boundary of the score.
+ * @param number $low The lower boundary of the score.
* @param number $high The higher boundary of the score.
*
* @return array The SEO score filter.
*/
protected function create_seo_score_filter( $low, $high ) {
- return array(
- array(
+ return [
+ [
'key' => WPSEO_Meta::$meta_prefix . 'linkdex',
- 'value' => array( $low, $high ),
+ 'value' => [ $low, $high ],
'type' => 'numeric',
'compare' => 'BETWEEN',
- ),
- );
+ ],
+ ];
}
/**
@@ -507,13 +536,13 @@ class WPSEO_Meta_Columns {
* @return array Array containin the no-index filter.
*/
protected function create_no_index_filter() {
- return array(
- array(
+ return [
+ [
'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
'value' => '1',
'compare' => '=',
- ),
- );
+ ],
+ ];
}
/**
@@ -522,18 +551,18 @@ class WPSEO_Meta_Columns {
* @return array Array containing the no focus keyword filter.
*/
protected function create_no_focus_keyword_filter() {
- return array(
- array(
+ return [
+ [
'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
'value' => 'needs-a-value-anyway',
'compare' => 'NOT EXISTS',
- ),
- array(
+ ],
+ [
'key' => WPSEO_Meta::$meta_prefix . 'linkdex',
'value' => 'needs-a-value-anyway',
'compare' => 'NOT EXISTS',
- ),
- );
+ ],
+ ];
}
/**
@@ -561,7 +590,7 @@ class WPSEO_Meta_Columns {
/**
* Determines whether the given post ID uses the default indexing settings.
*
- * @param integer $post_id The post ID to check.
+ * @param int $post_id The post ID to check.
*
* @return bool Whether or not the default indexing is being used for the post.
*/
@@ -579,25 +608,25 @@ class WPSEO_Meta_Columns {
private function filter_order_by( $order_by ) {
switch ( $order_by ) {
case 'wpseo-metadesc':
- return array(
+ return [
'meta_key' => WPSEO_Meta::$meta_prefix . 'metadesc',
'orderby' => 'meta_value',
- );
+ ];
case 'wpseo-focuskw':
- return array(
+ return [
'meta_key' => WPSEO_Meta::$meta_prefix . 'focuskw',
'orderby' => 'meta_value',
- );
+ ];
}
- return array();
+ return [];
}
/**
* Parses the score column.
*
- * @param integer $post_id The ID of the post for which to show the score.
+ * @param int $post_id The ID of the post for which to show the score.
*
* @return string The HTML for the SEO score indicator.
*/
@@ -613,7 +642,7 @@ class WPSEO_Meta_Columns {
if ( WPSEO_Meta::get_value( 'focuskw', $post_id ) === '' ) {
$rank = new WPSEO_Rank( WPSEO_Rank::NO_FOCUS );
- $title = __( 'Focus keyword not set.', 'wordpress-seo' );
+ $title = __( 'Focus keyphrase not set.', 'wordpress-seo' );
return $this->render_score_indicator( $rank, $title );
}
@@ -645,7 +674,7 @@ class WPSEO_Meta_Columns {
private function set_post_type_hooks() {
$post_types = WPSEO_Post_Type::get_accessible_post_types();
- if ( ! is_array( $post_types ) || $post_types === array() ) {
+ if ( ! is_array( $post_types ) || $post_types === [] ) {
return;
}
@@ -654,18 +683,9 @@ class WPSEO_Meta_Columns {
continue;
}
- add_filter( 'manage_' . $post_type . '_posts_columns', array( $this, 'column_heading' ), 10, 1 );
- add_action( 'manage_' . $post_type . '_posts_custom_column', array( $this, 'column_content' ), 10, 2 );
- add_action( 'manage_edit-' . $post_type . '_sortable_columns', array( $this, 'column_sort' ), 10, 2 );
-
- /*
- * Use the `get_user_option_{$option}` filter to change the output of the get_user_option
- * function for the `manage{$screen}columnshidden` option, which is based on the current
- * admin screen. The admin screen we want to target is the `edit-{$post_type}` screen.
- */
- $filter = sprintf( 'get_user_option_%s', sprintf( 'manage%scolumnshidden', 'edit-' . $post_type ) );
-
- add_filter( $filter, array( $this, 'column_hidden' ), 10, 3 );
+ add_filter( 'manage_' . $post_type . '_posts_columns', [ $this, 'column_heading' ], 10, 1 );
+ add_action( 'manage_' . $post_type . '_posts_custom_column', [ $this, 'column_content' ], 10, 2 );
+ add_action( 'manage_edit-' . $post_type . '_sortable_columns', [ $this, 'column_sort' ], 10, 2 );
}
unset( $post_type );
@@ -677,7 +697,7 @@ class WPSEO_Meta_Columns {
*
* @since 7.0
*
- * @param string $post_type Optional. The post type to test, defaults to the current post post_type.
+ * @param string|null $post_type Optional. The post type to test, defaults to the current post post_type.
*
* @return bool Whether or not the meta box (and associated columns etc) should be hidden.
*/
@@ -692,31 +712,8 @@ class WPSEO_Meta_Columns {
}
/**
- * Retrieve the page title.
+ * Renders the score indicator.
*
- * @param int $post_id Post to retrieve the title for.
- *
- * @return string
- */
- private function page_title( $post_id ) {
- $fixed_title = WPSEO_Meta::get_value( 'title', $post_id );
- if ( $fixed_title !== '' ) {
- return $fixed_title;
- }
-
- $post = get_post( $post_id );
-
- if ( is_object( $post ) && WPSEO_Options::get( 'title-' . $post->post_type, '' ) !== '' ) {
- $title_template = WPSEO_Options::get( 'title-' . $post->post_type );
- $title_template = str_replace( ' %%page%% ', ' ', $title_template );
-
- return wpseo_replace_vars( $title_template, $post );
- }
-
- return wpseo_replace_vars( '%%title%%', $post );
- }
-
- /**
* @param WPSEO_Rank $rank The rank this indicator should have.
* @param string $title Optional. The title for this rank, defaults to the title of the rank.
*
@@ -727,7 +724,7 @@ class WPSEO_Meta_Columns {
$title = $rank->get_label();
}
- return '
' . $title . ' ';
+ return '
' . esc_html( $title ) . ' ';
}
/**
@@ -745,7 +742,7 @@ class WPSEO_Meta_Columns {
}
$screen = get_current_screen();
- if ( null === $screen ) {
+ if ( $screen === null ) {
return false;
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-meta-storage.php b/wp-content/plugins/wordpress-seo/admin/class-meta-storage.php
deleted file mode 100644
index a9bc5f27..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-meta-storage.php
+++ /dev/null
@@ -1,111 +0,0 @@
-get_blog_prefix();
- }
-
- $this->table_prefix = $table_prefix;
- $this->database_proxy = new WPSEO_Database_Proxy( $GLOBALS['wpdb'], $this->get_table_name(), true );
- }
-
- /**
- * Returns the table name to use.
- *
- * @return string The table name.
- */
- public function get_table_name() {
- return $this->table_prefix . self::TABLE_NAME;
- }
-
- /**
- * Creates the database table.
- *
- * @return boolean True if the table was created, false if something went wrong.
- */
- public function install() {
- return $this->database_proxy->create_table(
- array(
- 'object_id bigint(20) UNSIGNED NOT NULL',
- 'internal_link_count int(10) UNSIGNED NULL DEFAULT NULL',
- 'incoming_link_count int(10) UNSIGNED NULL DEFAULT NULL',
- ),
- array(
- 'UNIQUE KEY object_id (object_id)',
- )
- );
- }
-
- /**
- * Saves the link count to the database.
- *
- * @param int $meta_id The id to save the link count for.
- * @param array $meta_data The total amount of links.
- */
- public function save_meta_data( $meta_id, array $meta_data ) {
- $where = array( 'object_id' => $meta_id );
-
- $saved = $this->database_proxy->upsert(
- array_merge( $where, $meta_data ),
- $where
- );
-
- if ( $saved === false ) {
- WPSEO_Meta_Table_Accessible::set_inaccessible();
- }
- }
-
- /**
- * Updates the incoming link count
- *
- * @param array $post_ids The posts to update the incoming link count for.
- * @param WPSEO_Link_Storage $storage The link storage object.
- */
- public function update_incoming_link_count( array $post_ids, WPSEO_Link_Storage $storage ) {
- global $wpdb;
-
- $query = $wpdb->prepare( '
- SELECT COUNT( id ) AS incoming, target_post_id AS post_id
- FROM ' . $storage->get_table_name() . '
- WHERE target_post_id IN(' . implode( ',', array_fill( 0, count( $post_ids ), '%d' ) ) . ')
- GROUP BY target_post_id',
- $post_ids
- );
-
- $results = $wpdb->get_results( $query );
-
- $post_ids_non_zero = array();
- foreach ( $results as $result ) {
- $this->save_meta_data( $result->post_id, array( 'incoming_link_count' => $result->incoming ) );
- $post_ids_non_zero[] = $result->post_id;
- }
-
- $post_ids_zero = array_diff( $post_ids, $post_ids_non_zero );
- foreach ( $post_ids_zero as $post_id ) {
- $this->save_meta_data( $post_id, array( 'incoming_link_count' => 0 ) );
- }
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-meta-table-accessible.php b/wp-content/plugins/wordpress-seo/admin/class-meta-table-accessible.php
deleted file mode 100644
index 67a8f8c5..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-meta-table-accessible.php
+++ /dev/null
@@ -1,103 +0,0 @@
-get_var( 'SHOW TABLES LIKE "' . $storage->get_table_name() . '"' ) !== $storage->get_table_name() ) {
- self::set_inaccessible();
- return false;
- }
-
- self::set_accessible();
- return true;
- }
-
- /**
- * Returns the name of the transient.
- *
- * @return string The name of the transient to use.
- */
- protected static function transient_name() {
- return 'wpseo_meta_table_inaccessible';
- }
-
- /**
- * Checks if the table exists if not, set the transient to indicate the inaccessible table.
- *
- * @deprecated 6.0
- *
- * @return bool True if table is accessible.
- */
- public static function check_table_is_accessible() {
- _deprecated_function( __FUNCTION__, '6.0', __CLASS__ . '::is_accessible' );
- return self::is_accessible();
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php b/wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php
new file mode 100644
index 00000000..5b7366a7
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php
@@ -0,0 +1,209 @@
+is_proxy_page() ) {
+ return;
+ }
+
+ // Register the page for the proxy.
+ add_action( 'admin_menu', [ $this, 'add_proxy_page' ] );
+ add_action( 'admin_init', [ $this, 'handle_proxy_page' ] );
+ }
+
+ /**
+ * Registers the proxy page. It does not actually add a link to the dashboard.
+ *
+ * @codeCoverageIgnore
+ *
+ * @return void
+ */
+ public function add_proxy_page() {
+ add_dashboard_page( '', '', 'read', self::PAGE_IDENTIFIER, '' );
+ }
+
+ /**
+ * Renders the requested proxy page and exits to prevent the WordPress UI from loading.
+ *
+ * @codeCoverageIgnore
+ *
+ * @return void
+ */
+ public function handle_proxy_page() {
+ $this->render_proxy_page();
+
+ // Prevent the WordPress UI from loading.
+ exit;
+ }
+
+ /**
+ * Renders the requested proxy page.
+ *
+ * This is separated from the exits to be able to test it.
+ *
+ * @return void
+ */
+ public function render_proxy_page() {
+ $proxy_options = $this->determine_proxy_options();
+ if ( $proxy_options === [] ) {
+ // Do not accept any other file than implemented.
+ $this->set_header( 'HTTP/1.0 501 Requested file not implemented' );
+ return;
+ }
+
+ // Set the headers before serving the remote file.
+ $this->set_header( 'Content-Type: ' . $proxy_options['content_type'] );
+ $this->set_header( 'Cache-Control: max-age=' . self::CACHE_CONTROL_MAX_AGE );
+
+ try {
+ echo $this->get_remote_url_body( $proxy_options['url'] );
+ }
+ catch ( Exception $e ) {
+ /*
+ * Reset the file headers because the loading failed.
+ *
+ * Note: Due to supporting PHP 5.2 `header_remove` can not be used here.
+ * Overwrite the headers instead.
+ */
+ $this->set_header( 'Content-Type: text/plain' );
+ $this->set_header( 'Cache-Control: max-age=0' );
+
+ $this->set_header( 'HTTP/1.0 500 ' . $e->getMessage() );
+ }
+ }
+
+ /**
+ * Tries to load the given url via `wp_remote_get`.
+ *
+ * @codeCoverageIgnore
+ *
+ * @param string $url The url to load.
+ *
+ * @return string The body of the response.
+ *
+ * @throws Exception When `wp_remote_get` returned an error.
+ * @throws Exception When the response code is not 200.
+ */
+ protected function get_remote_url_body( $url ) {
+ $response = wp_remote_get( $url );
+
+ if ( $response instanceof WP_Error ) {
+ throw new Exception( 'Unable to retrieve file from MyYoast' );
+ }
+
+ if ( wp_remote_retrieve_response_code( $response ) !== 200 ) {
+ throw new Exception( 'Received unexpected response from MyYoast' );
+ }
+
+ return wp_remote_retrieve_body( $response );
+ }
+
+ /**
+ * Determines the proxy options based on the file and plugin version arguments.
+ *
+ * When the file is known it returns an array like this:
+ *
+ * $array = array(
+ * 'content_type' => 'the content type'
+ * 'url' => 'the url, possibly with the plugin version'
+ * )
+ *
+ *
+ * @return array Empty for an unknown file. See format above for known files.
+ */
+ protected function determine_proxy_options() {
+ if ( $this->get_proxy_file() === 'research-webworker' ) {
+ return [
+ 'content_type' => 'text/javascript; charset=UTF-8',
+ 'url' => 'https://my.yoast.com/api/downloads/file/analysis-worker?plugin_version=' . $this->get_plugin_version(),
+ ];
+ }
+
+ return [];
+ }
+
+ /**
+ * Checks if the current page is the MyYoast proxy page.
+ *
+ * @codeCoverageIgnore
+ *
+ * @return bool True when the page request parameter equals the proxy page.
+ */
+ protected function is_proxy_page() {
+ return filter_input( INPUT_GET, 'page' ) === self::PAGE_IDENTIFIER;
+ }
+
+ /**
+ * Returns the proxy file from the HTTP request parameters.
+ *
+ * @codeCoverageIgnore
+ *
+ * @return string The sanitized file request parameter.
+ */
+ protected function get_proxy_file() {
+ return filter_input( INPUT_GET, 'file', FILTER_SANITIZE_STRING );
+ }
+
+ /**
+ * Returns the plugin version from the HTTP request parameters.
+ *
+ * @codeCoverageIgnore
+ *
+ * @return string The sanitized plugin_version request parameter.
+ */
+ protected function get_plugin_version() {
+ $plugin_version = filter_input( INPUT_GET, 'plugin_version', FILTER_SANITIZE_STRING );
+ // Replace slashes to secure against requiring a file from another path.
+ $plugin_version = str_replace( [ '/', '\\' ], '_', $plugin_version );
+
+ return $plugin_version;
+ }
+
+ /**
+ * Sets the HTTP header.
+ *
+ * This is a tiny helper function to enable better testing.
+ *
+ * @codeCoverageIgnore
+ *
+ * @param string $header The header to set.
+ *
+ * @return void
+ */
+ protected function set_header( $header ) {
+ header( $header );
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-option-tab.php b/wp-content/plugins/wordpress-seo/admin/class-option-tab.php
index 332ee344..cc842325 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-option-tab.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-option-tab.php
@@ -6,17 +6,29 @@
*/
/**
- * Class WPSEO_Option_Tab
+ * Class WPSEO_Option_Tab.
*/
class WPSEO_Option_Tab {
- /** @var string Name of the tab */
+ /**
+ * Name of the tab.
+ *
+ * @var string
+ */
private $name;
- /** @var string Label of the tab */
+ /**
+ * Label of the tab.
+ *
+ * @var string
+ */
private $label;
- /** @var array Optional arguments */
+ /**
+ * Optional arguments.
+ *
+ * @var array
+ */
private $arguments;
/**
@@ -26,7 +38,7 @@ class WPSEO_Option_Tab {
* @param string $label Localized label of the tab.
* @param array $arguments Optional arguments.
*/
- public function __construct( $name, $label, array $arguments = array() ) {
+ public function __construct( $name, $label, array $arguments = [] ) {
$this->name = sanitize_title( $name );
$this->label = $label;
$this->arguments = $arguments;
@@ -50,15 +62,6 @@ class WPSEO_Option_Tab {
return $this->label;
}
- /**
- * Gets the video URL.
- *
- * @return string The video url.
- */
- public function get_video_url() {
- return $this->get_argument( 'video_url' );
- }
-
/**
* Retrieves whether the tab needs a save button.
*
diff --git a/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php b/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php
index b2e38833..3425758b 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php
@@ -6,11 +6,13 @@
*/
/**
- * Class WPSEO_Option_Tabs_Formatter
+ * Class WPSEO_Option_Tabs_Formatter.
*/
class WPSEO_Option_Tabs_Formatter {
/**
+ * Retrieves the path to the view of the tab.
+ *
* @param WPSEO_Option_Tabs $option_tabs Option Tabs to get base from.
* @param WPSEO_Option_Tab $tab Tab to get name from.
*
@@ -21,6 +23,8 @@ class WPSEO_Option_Tabs_Formatter {
}
/**
+ * Outputs the option tabs.
+ *
* @param WPSEO_Option_Tabs $option_tabs Option Tabs to get tabs from.
*/
public function run( WPSEO_Option_Tabs $option_tabs ) {
@@ -36,21 +40,37 @@ class WPSEO_Option_Tabs_Formatter {
}
echo '';
- $help_center = new WPSEO_Help_Center( '', $option_tabs, WPSEO_Utils::is_yoast_seo_premium() );
- $help_center->localize_data();
- $help_center->mount();
-
foreach ( $option_tabs->get_tabs() as $tab ) {
$identifier = $tab->get_name();
$class = 'wpseotab ' . ( $tab->has_save_button() ? 'save' : 'nosave' );
printf( '', esc_attr( $identifier ), esc_attr( $class ) );
- // Output the settings view for all tabs.
- $tab_view = $this->get_tab_view( $option_tabs, $tab );
- if ( is_file( $tab_view ) ) {
- $yform = Yoast_Form::get_instance();
- require_once $tab_view;
+ $tab_filter_name = sprintf( '%s_%s', $option_tabs->get_base(), $tab->get_name() );
+
+ /**
+ * Allows to override the content that is display on the specific option tab.
+ *
+ * @internal For internal Yoast SEO use only.
+ *
+ * @api string|null The content that should be displayed for this tab. Leave empty for default behaviour.
+ *
+ * @param WPSEO_Option_Tabs $option_tabs The registered option tabs.
+ * @param WPSEO_Option_Tab $tab The tab that is being displayed.
+ */
+ $option_tab_content = apply_filters( 'wpseo_option_tab-' . $tab_filter_name, null, $option_tabs, $tab );
+ if ( ! empty( $option_tab_content ) ) {
+ echo wp_kses_post( $option_tab_content );
+ }
+
+ if ( empty( $option_tab_content ) ) {
+ // Output the settings view for all tabs.
+ $tab_view = $this->get_tab_view( $option_tabs, $tab );
+
+ if ( is_file( $tab_view ) ) {
+ $yform = Yoast_Form::get_instance();
+ require $tab_view;
+ }
}
echo '
';
diff --git a/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php b/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php
index 706309b1..523943ca 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php
@@ -6,22 +6,36 @@
*/
/**
- * Class WPSEO_Option_Tabs
+ * Class WPSEO_Option_Tabs.
*/
class WPSEO_Option_Tabs {
- /** @var string Tabs base */
+ /**
+ * Tabs base.
+ *
+ * @var string
+ */
private $base;
- /** @var array The tabs in this group */
- private $tabs = array();
+ /**
+ * The tabs in this group.
+ *
+ * @var array
+ */
+ private $tabs = [];
- /** @var string Name of the active tab */
+ /**
+ * Name of the active tab.
+ *
+ * @var string
+ */
private $active_tab = '';
/**
* WPSEO_Option_Tabs constructor.
*
+ * @codeCoverageIgnore
+ *
* @param string $base Base of the tabs.
* @param string $active_tab Currently active tab.
*/
@@ -33,7 +47,7 @@ class WPSEO_Option_Tabs {
}
/**
- * Get the base
+ * Get the base.
*
* @return string
*/
@@ -42,7 +56,7 @@ class WPSEO_Option_Tabs {
}
/**
- * Add a tab
+ * Add a tab.
*
* @param WPSEO_Option_Tab $tab Tab to add.
*
@@ -55,16 +69,16 @@ class WPSEO_Option_Tabs {
}
/**
- * Get active tab
+ * Get active tab.
*
- * @return null|WPSEO_Option_Tab Get the active tab.
+ * @return WPSEO_Option_Tab|null Get the active tab.
*/
public function get_active_tab() {
if ( empty( $this->active_tab ) ) {
return null;
}
- $active_tabs = array_filter( $this->tabs, array( $this, 'is_active_tab' ) );
+ $active_tabs = array_filter( $this->tabs, [ $this, 'is_active_tab' ] );
if ( ! empty( $active_tabs ) ) {
$active_tabs = array_values( $active_tabs );
if ( count( $active_tabs ) === 1 ) {
@@ -76,7 +90,7 @@ class WPSEO_Option_Tabs {
}
/**
- * Is the tab the active tab
+ * Is the tab the active tab.
*
* @param WPSEO_Option_Tab $tab Tab to check for active tab.
*
@@ -87,7 +101,7 @@ class WPSEO_Option_Tabs {
}
/**
- * Get all tabs
+ * Get all tabs.
*
* @return WPSEO_Option_Tab[]
*/
@@ -96,9 +110,9 @@ class WPSEO_Option_Tabs {
}
/**
- * Display the tabs
+ * Display the tabs.
*
- * @param Yoast_Form $yform Yoast Form needed in the views.
+ * @param Yoast_Form $yform Yoast Form needed in the views.
*/
public function display( Yoast_Form $yform ) {
$formatter = new WPSEO_Option_Tabs_Formatter();
diff --git a/wp-content/plugins/wordpress-seo/admin/class-paper-presenter.php b/wp-content/plugins/wordpress-seo/admin/class-paper-presenter.php
new file mode 100644
index 00000000..99550e4a
--- /dev/null
+++ b/wp-content/plugins/wordpress-seo/admin/class-paper-presenter.php
@@ -0,0 +1,141 @@
+ null,
+ 'paper_id_prefix' => 'wpseo-',
+ 'collapsible' => false,
+ 'collapsible_header_class' => '',
+ 'expanded' => false,
+ 'help_text' => '',
+ 'title_after' => '',
+ 'class' => '',
+ 'content' => '',
+ 'view_data' => [],
+ ];
+
+ $this->settings = wp_parse_args( $settings, $defaults );
+ $this->title = $title;
+ $this->view_file = $view_file;
+ }
+
+ /**
+ * Renders the collapsible paper and returns it as a string.
+ *
+ * @return string The rendered paper.
+ */
+ public function get_output() {
+ $view_variables = $this->get_view_variables();
+
+ extract( $view_variables, EXTR_SKIP );
+
+ $content = $this->settings['content'];
+
+ if ( $this->view_file !== null ) {
+ ob_start();
+ require $this->view_file;
+ $content = ob_get_clean();
+ }
+
+ ob_start();
+ require WPSEO_PATH . 'admin/views/paper-collapsible.php';
+ $rendered_output = ob_get_clean();
+
+ return $rendered_output;
+ }
+
+ /**
+ * Retrieves the view variables.
+ *
+ * @return array The view variables.
+ */
+ private function get_view_variables() {
+ if ( $this->settings['help_text'] instanceof WPSEO_Admin_Help_Panel === false ) {
+ $this->settings['help_text'] = new WPSEO_Admin_Help_Panel( '', '', '' );
+ }
+
+ $view_variables = [
+ 'class' => $this->settings['class'],
+ 'collapsible' => $this->settings['collapsible'],
+ 'collapsible_config' => $this->collapsible_config(),
+ 'collapsible_header_class' => $this->settings['collapsible_header_class'],
+ 'title_after' => $this->settings['title_after'],
+ 'help_text' => $this->settings['help_text'],
+ 'view_file' => $this->view_file,
+ 'title' => $this->title,
+ 'paper_id' => $this->settings['paper_id'],
+ 'paper_id_prefix' => $this->settings['paper_id_prefix'],
+ 'yform' => Yoast_Form::get_instance(),
+ ];
+
+ return array_merge( $this->settings['view_data'], $view_variables );
+ }
+
+ /**
+ * Retrieves the collapsible config based on the settings.
+ *
+ * @return array The config.
+ */
+ protected function collapsible_config() {
+ if ( empty( $this->settings['collapsible'] ) ) {
+ return [
+ 'toggle_icon' => '',
+ 'class' => '',
+ 'expanded' => '',
+ ];
+ }
+
+ if ( ! empty( $this->settings['expanded'] ) ) {
+ return [
+ 'toggle_icon' => 'dashicons-arrow-up-alt2',
+ 'class' => 'toggleable-container',
+ 'expanded' => 'true',
+ ];
+ }
+
+ return [
+ 'toggle_icon' => 'dashicons-arrow-down-alt2',
+ 'class' => 'toggleable-container toggleable-container-hidden',
+ 'expanded' => 'false',
+ ];
+ }
+}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php b/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php
index bc225e6b..9e70dfe7 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php
@@ -11,9 +11,11 @@
class WPSEO_Plugin_Availability {
/**
+ * Holds the plugins.
+ *
* @var array
*/
- protected $plugins = array();
+ protected $plugins = [];
/**
* Registers the plugins so we can access them.
@@ -27,8 +29,8 @@ class WPSEO_Plugin_Availability {
* Registers all the available Yoast SEO plugins.
*/
protected function register_yoast_plugins() {
- $this->plugins = array(
- 'yoast-seo-premium' => array(
+ $this->plugins = [
+ 'yoast-seo-premium' => [
'url' => WPSEO_Shortlinker::get( 'https://yoa.st/1y7' ),
'title' => 'Yoast SEO Premium',
'description' => sprintf(
@@ -40,9 +42,9 @@ class WPSEO_Plugin_Availability {
'slug' => 'wordpress-seo-premium/wp-seo-premium.php',
'version_sync' => true,
'premium' => true,
- ),
+ ],
- 'video-seo-for-wordpress-seo-by-yoast' => array(
+ 'video-seo-for-wordpress-seo-by-yoast' => [
'url' => WPSEO_Shortlinker::get( 'https://yoa.st/1y8' ),
'title' => 'Video SEO',
'description' => __( 'Optimize your videos to show them off in search results and get more clicks!', 'wordpress-seo' ),
@@ -50,9 +52,9 @@ class WPSEO_Plugin_Availability {
'slug' => 'wpseo-video/video-seo.php',
'version_sync' => true,
'premium' => true,
- ),
+ ],
- 'yoast-news-seo' => array(
+ 'yoast-news-seo' => [
'url' => WPSEO_Shortlinker::get( 'https://yoa.st/1y9' ),
'title' => 'News SEO',
'description' => __( 'Are you in Google News? Increase your traffic from Google News by optimizing for it!', 'wordpress-seo' ),
@@ -60,9 +62,9 @@ class WPSEO_Plugin_Availability {
'slug' => 'wpseo-news/wpseo-news.php',
'version_sync' => true,
'premium' => true,
- ),
+ ],
- 'local-seo-for-yoast-seo' => array(
+ 'local-seo-for-yoast-seo' => [
'url' => WPSEO_Shortlinker::get( 'https://yoa.st/1ya' ),
'title' => 'Local SEO',
'description' => __( 'Rank better locally and in Google Maps, without breaking a sweat!', 'wordpress-seo' ),
@@ -70,9 +72,9 @@ class WPSEO_Plugin_Availability {
'slug' => 'wordpress-seo-local/local-seo.php',
'version_sync' => true,
'premium' => true,
- ),
+ ],
- 'yoast-woocommerce-seo' => array(
+ 'yoast-woocommerce-seo' => [
'url' => WPSEO_Shortlinker::get( 'https://yoa.st/1o0' ),
'title' => 'Yoast WooCommerce SEO',
'description' => sprintf(
@@ -80,53 +82,17 @@ class WPSEO_Plugin_Availability {
__( 'Seamlessly integrate WooCommerce with %1$s and get extra features!', 'wordpress-seo' ),
'Yoast SEO'
),
- '_dependencies' => array(
- 'WooCommerce' => array(
+ '_dependencies' => [
+ 'WooCommerce' => [
'slug' => 'woocommerce/woocommerce.php',
- ),
- ),
+ ],
+ ],
'installed' => false,
'slug' => 'wpseo-woocommerce/wpseo-woocommerce.php',
'version_sync' => true,
'premium' => true,
- ),
-
- 'yoast-acf-analysis' => array(
- 'url' => 'https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/',
- 'title' => 'ACF Content Analysis for Yoast SEO',
- 'description' => sprintf(
- /* translators: %1$s expands to Yoast SEO, %2$s expands to Advanced Custom Fields */
- __( 'Seamlessly integrate %2$s with %1$s for the content analysis!', 'wordpress-seo' ),
- 'Yoast SEO',
- 'Advanced Custom Fields'
- ),
- 'installed' => false,
- 'slug' => 'acf-content-analysis-for-yoast-seo/yoast-acf-analysis.php',
- '_dependencies' => array(
- 'Advanced Custom Fields' => array(
- 'slug' => 'advanced-custom-fields/acf.php',
- ),
- ),
- 'version_sync' => false,
- ),
-
- 'yoastseo-amp' => array(
- 'url' => 'https://wordpress.org/plugins/glue-for-yoast-seo-amp/',
- 'title' => 'Yoast SEO AMP Glue',
- 'description' => sprintf(
- /* translators: %1$s expands to Yoast SEO */
- __( 'Seamlessly integrate %1$s into your AMP pages!', 'wordpress-seo' ), 'Yoast SEO'
- ),
- 'installed' => false,
- 'slug' => 'glue-for-yoast-seo-amp/yoastseo-amp.php',
- '_dependencies' => array(
- 'AMP' => array(
- 'slug' => 'amp/amp.php',
- ),
- ),
- 'version_sync' => false,
- ),
- );
+ ],
+ ];
}
/**
@@ -151,7 +117,7 @@ class WPSEO_Plugin_Availability {
/**
* Checks whether or not a plugin is known within the Yoast SEO collection.
*
- * @param {string} $plugin The plugin to search for.
+ * @param string $plugin The plugin to search for.
*
* @return bool Whether or not the plugin is exists.
*/
@@ -171,13 +137,13 @@ class WPSEO_Plugin_Availability {
/**
* Gets a specific plugin. Returns an empty array if it cannot be found.
*
- * @param {string} $plugin The plugin to search for.
+ * @param string $plugin The plugin to search for.
*
* @return array The plugin properties.
*/
public function get_plugin( $plugin ) {
if ( ! $this->plugin_exists( $plugin ) ) {
- return array();
+ return [];
}
return $this->plugins[ $plugin ];
@@ -186,7 +152,7 @@ class WPSEO_Plugin_Availability {
/**
* Gets the version of the plugin.
*
- * @param {string} $plugin The plugin to search for.
+ * @param array $plugin The information available about the plugin.
*
* @return string The version associated with the plugin.
*/
@@ -201,7 +167,7 @@ class WPSEO_Plugin_Availability {
/**
* Checks if there are dependencies available for the plugin.
*
- * @param {string} $plugin The plugin to search for.
+ * @param array $plugin The information available about the plugin.
*
* @return bool Whether or not there is a dependency present.
*/
@@ -212,13 +178,13 @@ class WPSEO_Plugin_Availability {
/**
* Gets the dependencies for the plugin.
*
- * @param {string} $plugin The plugin to search for.
+ * @param array $plugin The information available about the plugin.
*
* @return array Array containing all the dependencies associated with the plugin.
*/
public function get_dependencies( $plugin ) {
if ( ! $this->has_dependencies( $plugin ) ) {
- return array();
+ return [];
}
return $plugin['_dependencies'];
@@ -227,7 +193,7 @@ class WPSEO_Plugin_Availability {
/**
* Checks if all dependencies are satisfied.
*
- * @param {string} $plugin The plugin to search for.
+ * @param array $plugin The information available about the plugin.
*
* @return bool Whether or not the dependencies are satisfied.
*/
@@ -237,7 +203,7 @@ class WPSEO_Plugin_Availability {
}
$dependencies = $this->get_dependencies( $plugin );
- $installed_dependencies = array_filter( $dependencies, array( $this, 'is_dependency_available' ) );
+ $installed_dependencies = array_filter( $dependencies, [ $this, 'is_dependency_available' ] );
return count( $installed_dependencies ) === count( $dependencies );
}
@@ -245,7 +211,7 @@ class WPSEO_Plugin_Availability {
/**
* Checks whether or not one of the plugins is properly installed and usable.
*
- * @param {string} $plugin The plugin to search for.
+ * @param array $plugin The information available about the plugin.
*
* @return bool Whether or not the plugin is properly installed.
*/
@@ -263,7 +229,7 @@ class WPSEO_Plugin_Availability {
* @return array The installed plugins.
*/
public function get_installed_plugins() {
- $installed = array();
+ $installed = [];
foreach ( $this->plugins as $plugin_key => $plugin ) {
if ( $this->is_installed( $plugin ) ) {
@@ -277,7 +243,7 @@ class WPSEO_Plugin_Availability {
/**
* Checks for the availability of the plugin.
*
- * @param {string} $plugin The plugin to search for.
+ * @param array $plugin The information available about the plugin.
*
* @return bool Whether or not the plugin is available.
*/
@@ -288,12 +254,12 @@ class WPSEO_Plugin_Availability {
/**
* Checks whether a dependency is available.
*
- * @param {string} $dependency The dependency to look for.
+ * @param array $dependency The information about the dependency to look for.
*
* @return bool Whether or not the dependency is available.
*/
public function is_dependency_available( $dependency ) {
- return in_array( $dependency['slug'], array_keys( get_plugins() ), true );
+ return isset( get_plugins()[ $dependency['slug'] ] );
}
/**
@@ -305,7 +271,7 @@ class WPSEO_Plugin_Availability {
*/
public function get_dependency_names( $plugin ) {
if ( ! $this->has_dependencies( $plugin ) ) {
- return array();
+ return [];
}
return array_keys( $plugin['_dependencies'] );
@@ -317,7 +283,7 @@ class WPSEO_Plugin_Availability {
* @return array Array of the plugins that have dependencies.
*/
public function get_plugins_with_dependencies() {
- return array_filter( $this->plugins, array( $this, 'has_dependencies' ) );
+ return array_filter( $this->plugins, [ $this, 'has_dependencies' ] );
}
/**
diff --git a/wp-content/plugins/wordpress-seo/admin/class-plugin-compatibility.php b/wp-content/plugins/wordpress-seo/admin/class-plugin-compatibility.php
deleted file mode 100644
index 3fe3ca42..00000000
--- a/wp-content/plugins/wordpress-seo/admin/class-plugin-compatibility.php
+++ /dev/null
@@ -1,109 +0,0 @@
-current_wpseo_version = $this->get_major_minor_version( $version );
- $this->availability_checker = $this->retrieve_availability_checker( $availability_checker );
- $this->installed_plugins = $this->availability_checker->get_installed_plugins();
- }
-
- /**
- * Retrieves the availability checker.
- *
- * @param null|object $checker The checker to set.
- *
- * @return WPSEO_Plugin_Availability The checker to use.
- */
- private function retrieve_availability_checker( $checker ) {
- if ( is_null( $checker ) || ! is_object( $checker ) ) {
- $checker = new WPSEO_Plugin_Availability();
- $checker->register();
- }
-
- return $checker;
- }
-
- /**
- * Wraps the availability checker's get_installed_plugins method.
- *
- * @return array Array containing all the installed plugins.
- */
- public function get_installed_plugins() {
- return $this->installed_plugins;
- }
-
- /**
- * Creates a list of installed plugins and whether or not they are compatible.
- *
- * @return array Array containing the installed plugins and compatibility.
- */
- public function get_installed_plugins_compatibility() {
- foreach ( $this->installed_plugins as $key => $plugin ) {
-
- $this->installed_plugins[ $key ]['compatible'] = $this->is_compatible( $key );
- }
-
- return $this->installed_plugins;
- }
-
- /**
- * Checks whether or not a plugin is compatible.
- *
- * @param string $plugin The plugin to look for and match.
- *
- * @return bool Whether or not the plugin is compatible.
- */
- public function is_compatible( $plugin ) {
- $plugin = $this->availability_checker->get_plugin( $plugin );
-
- // If we are not syncing versions, we are always compatible.
- if ( ! isset( $plugin['version_sync'] ) || $plugin['version_sync'] !== true ) {
- return true;
- }
-
- $plugin_version = $this->availability_checker->get_version( $plugin );
- return $this->get_major_minor_version( $plugin_version ) === $this->current_wpseo_version;
- }
-
- /**
- * Gets the major/minor version of the plugin for easier comparing.
- *
- * @param string $version The version to trim.
- *
- * @return string The major/minor version of the plugin.
- */
- protected function get_major_minor_version( $version ) {
- return substr( $version, 0, 3 );
- }
-}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php b/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php
index 7a90b8e1..571a6d02 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php
@@ -18,9 +18,9 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
*
* @var array
*/
- protected $plugins = array(
+ protected $plugins = [
// The plugin which are writing OG metadata.
- 'open_graph' => array(
+ 'open_graph' => [
'2-click-socialmedia-buttons/2-click-socialmedia-buttons.php',
// 2 Click Social Media Buttons.
'add-link-to-facebook/add-link-to-facebook.php', // Add Link to Facebook.
@@ -43,7 +43,6 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
'open-graph-protocol-framework/open-graph-protocol-framework.php',
// Open Graph Protocol Framework.
'seo-facebook-comments/seofacebook.php', // SEO Facebook Comments.
- 'seo-ultimate/seo-ultimate.php', // SEO Ultimate.
'sexybookmarks/sexy-bookmarks.php', // Shareaholic.
'shareaholic/sexy-bookmarks.php', // Shareaholic.
'sharepress/sharepress.php', // SharePress.
@@ -61,8 +60,8 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
'wp-facebook-open-graph-protocol/wp-facebook-ogp.php', // WP Facebook Open Graph protocol.
'wp-ogp/wp-ogp.php', // WP-OGP.
'zoltonorg-social-plugin/zosp.php', // Zolton.org Social Plugin.
- ),
- 'xml_sitemaps' => array(
+ ],
+ 'xml_sitemaps' => [
'google-sitemap-plugin/google-sitemap-plugin.php',
// Google Sitemap (BestWebSoft).
'xml-sitemaps/xml-sitemaps.php',
@@ -93,17 +92,22 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
// Sewn In XML Sitemap (jcow).
'rps-sitemap-generator/rps-sitemap-generator.php',
// RPS Sitemap Generator (redpixelstudios).
- ),
- 'cloaking' => array(
+ ],
+ 'cloaking' => [
'rs-head-cleaner/rs-head-cleaner.php',
// RS Head Cleaner Plus https://wordpress.org/plugins/rs-head-cleaner/.
'rs-head-cleaner-lite/rs-head-cleaner-lite.php',
// RS Head Cleaner Lite https://wordpress.org/plugins/rs-head-cleaner-lite/.
- ),
- );
+ ],
+ 'seo' => [
+ 'all-in-one-seo-pack/all_in_one_seo_pack.php', // All in One SEO Pack.
+ 'seo-ultimate/seo-ultimate.php', // SEO Ultimate.
+ 'seo-by-rank-math/rank-math.php', // Rank Math.
+ ],
+ ];
/**
- * Overrides instance to set with this class as class
+ * Overrides instance to set with this class as class.
*
* @param string $class_name Optional class name.
*
@@ -131,16 +135,16 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
$instance->add_active_plugin( $instance->find_plugin_category( $plugin ), $plugin );
}
- $plugin_sections = array();
+ $plugin_sections = [];
// Only check for open graph problems when they are enabled.
if ( WPSEO_Options::get( 'opengraph' ) ) {
- /* translators: %1$s expands to Yoast SEO, %2%s: 'Facebook' plugin name of possibly conflicting plugin with regard to creating OpenGraph output. */
- $plugin_sections['open_graph'] = __( 'Both %1$s and %2$s create OpenGraph output, which might make Facebook, Twitter, LinkedIn and other social networks use the wrong texts and images when your pages are being shared.', 'wordpress-seo' )
+ /* translators: %1$s expands to Yoast SEO, %2$s: 'Facebook' plugin name of possibly conflicting plugin with regard to creating OpenGraph output. */
+ $plugin_sections['open_graph'] = __( 'Both %1$s and %2$s create Open Graph output, which might make Facebook, Twitter, LinkedIn and other social networks use the wrong texts and images when your pages are being shared.', 'wordpress-seo' )
. ' '
. ''
/* translators: %1$s expands to Yoast SEO. */
- . sprintf( __( 'Configure %1$s\'s OpenGraph settings', 'wordpress-seo' ), 'Yoast SEO' )
+ . sprintf( __( 'Configure %1$s\'s Open Graph settings', 'wordpress-seo' ), 'Yoast SEO' )
. ' ';
}
@@ -158,6 +162,9 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
/* translators: %2$s expands to 'RS Head Cleaner' plugin name of possibly conflicting plugin with regard to differentiating output between search engines and normal users. */
$plugin_sections['cloaking'] = __( 'The plugin %2$s changes your site\'s output and in doing that differentiates between search engines and normal users, a process that\'s called cloaking. We highly recommend that you disable it.', 'wordpress-seo' );
+ /* translators: %1$s expands to Yoast SEO, %2$s: 'SEO' plugin name of possibly conflicting plugin with regard to the creation of duplicate SEO meta. */
+ $plugin_sections['seo'] = __( 'Both %1$s and %2$s manage the SEO of your site. Running two SEO plugins at the same time is detrimental.', 'wordpress-seo' );
+
$instance->check_plugin_conflicts( $plugin_sections );
}
}
diff --git a/wp-content/plugins/wordpress-seo/admin/class-premium-popup.php b/wp-content/plugins/wordpress-seo/admin/class-premium-popup.php
index 6ad0ad5a..372f1179 100644
--- a/wp-content/plugins/wordpress-seo/admin/class-premium-popup.php
+++ b/wp-content/plugins/wordpress-seo/admin/class-premium-popup.php
@@ -6,9 +6,10 @@
*/
/**
- * Class WPSEO_Premium_popup
+ * Class WPSEO_Premium_popup.
*/
class WPSEO_Premium_Popup {
+
/**
* An unique identifier for the popup
*
@@ -19,39 +20,39 @@ class WPSEO_Premium_Popup {
/**
* The heading level of the title of the popup.
*
- * @var String
+ * @var string
*/
private $heading_level = '';
/**
- * The title of the popup
+ * The title of the popup.
*
- * @var String
+ * @var string
*/
private $title = '';
/**
- * The content of the popup
+ * The content of the popup.
*
- * @var String
+ * @var string
*/
private $content = '';
/**
* The URL for where the button should link to.
*
- * @var String
+ * @var string
*/
private $url = '';
/**
* Wpseo_Premium_Popup constructor.
*
- * @param String $identifier An unique identifier for the popup.
- * @param String $heading_level The heading level for the title of the popup.
- * @param String $title The title of the popup.
- * @param String $content The content of the popup.
- * @param String $url The URL for where the button should link to.
+ * @param string $identifier An unique identifier for the popup.
+ * @param string $heading_level The heading level for the title of the popup.
+ * @param string $title The title of the popup.
+ * @param string $content The content of the popup.
+ * @param string $url The URL for where the button should link to.
*/
public function __construct( $identifier, $heading_level, $title, $content, $url ) {
$this->identifier = $identifier;
@@ -77,19 +78,23 @@ class WPSEO_Premium_Popup {
$assets_uri = trailingslashit( plugin_dir_url( WPSEO_FILE ) );
/* translators: %s expands to Yoast SEO Premium */
- $cta_text = sprintf( __( 'Get %s now!', 'wordpress-seo' ), 'Yoast SEO Premium' );
- $classes = '';
+ $cta_text = esc_html( sprintf( __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' ) );
+ $new_tab_message = '' . esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' ) . ' ';
+ $caret_icon = ' ';
+ $classes = '';
if ( $popup ) {
$classes = ' hidden';
}
- $micro_copy = __( '1 year free updates and upgrades included!', 'wordpress-seo' );
+ $micro_copy = __( '1 year free support and updates included!', 'wordpress-seo' );
$popup = <<