From 68dbe860e9e501643cda360b723ffd13424f35eb Mon Sep 17 00:00:00 2001 From: Tony Volpe Date: Thu, 25 Jan 2024 04:11:47 +0000 Subject: [PATCH] Merged in feature/314-dev-dev01 (pull request #24) auto-patch 314-dev-dev01-2024-01-25T04_09_02 * auto-patch 314-dev-dev01-2024-01-25T04_09_02 --- .../admin/admin-settings-changed-listener.php | 4 + .../plugins/wordpress-seo/admin/ajax.php | 24 + .../admin/ajax/class-shortcode-filter.php | 2 + .../ajax/class-yoast-dismissable-notice.php | 10 +- .../ajax/class-yoast-plugin-conflict-ajax.php | 8 + .../class-abstract-capability-manager.php | 4 +- .../class-capability-manager-integration.php | 2 + .../class-admin-asset-dev-server-location.php | 2 +- .../admin/class-admin-asset-manager.php | 32 +- ...ass-admin-editor-specific-replace-vars.php | 2 +- ...n-gutenberg-compatibility-notification.php | 2 +- .../wordpress-seo/admin/class-admin-init.php | 24 +- .../class-admin-recommended-replace-vars.php | 2 +- .../admin/class-admin-user-profile.php | 6 + .../wordpress-seo/admin/class-admin.php | 22 +- .../wordpress-seo/admin/class-asset.php | 18 +- .../admin/class-bulk-editor-list-table.php | 45 +- .../wordpress-seo/admin/class-collector.php | 2 + .../wordpress-seo/admin/class-config.php | 22 +- .../wordpress-seo/admin/class-customizer.php | 20 + .../admin/class-database-proxy.php | 13 +- .../wordpress-seo/admin/class-export.php | 18 +- .../admin/class-gutenberg-compatibility.php | 4 +- .../admin/class-meta-columns.php | 41 +- .../admin/class-my-yoast-proxy.php | 4 +- .../admin/class-option-tabs-formatter.php | 9 +- .../wordpress-seo/admin/class-option-tabs.php | 2 + .../admin/class-plugin-availability.php | 6 + .../admin/class-plugin-conflict.php | 6 +- .../class-premium-upsell-admin-block.php | 18 +- .../admin/class-primary-term-admin.php | 9 +- .../admin/class-product-upsell-notice.php | 22 +- .../admin/class-remote-request.php | 6 +- ...ass-schema-person-upgrade-notification.php | 6 + .../admin/class-wincher-dashboard-widget.php | 8 + .../admin/class-yoast-columns.php | 4 + .../admin/class-yoast-dashboard-widget.php | 12 +- .../wordpress-seo/admin/class-yoast-form.php | 76 ++- .../admin/class-yoast-input-validation.php | 2 + .../admin/class-yoast-network-admin.php | 4 +- .../admin/class-yoast-notification-center.php | 38 +- .../admin/class-yoast-notification.php | 16 +- .../admin/class-yoast-notifications.php | 24 +- .../admin/class-yoast-plugin-conflict.php | 46 +- .../endpoints/class-endpoint-file-size.php | 6 +- .../endpoints/class-endpoint-statistics.php | 8 +- .../filters/class-abstract-post-filter.php | 4 +- .../filters/class-cornerstone-filter.php | 4 +- .../formatter/class-metabox-formatter.php | 6 +- .../class-post-metabox-formatter.php | 9 +- .../class-term-metabox-formatter.php | 2 +- .../admin/google_search_console/class-gsc.php | 2 +- .../admin/import/class-import-detector.php | 2 + .../admin/import/class-import-settings.php | 6 +- .../class-abstract-plugin-importer.php | 6 +- .../import/plugins/class-import-aioseo-v4.php | 16 +- .../import/plugins/class-import-aioseo.php | 2 + .../import/plugins/class-import-rankmath.php | 4 + .../import/plugins/class-import-wpseo.php | 15 +- .../admin/menu/class-admin-menu.php | 4 +- .../wordpress-seo/admin/menu/class-menu.php | 2 +- .../admin/menu/class-replacevar-editor.php | 2 + .../class-abstract-sectioned-metabox-tab.php | 2 + ...ss-metabox-analysis-inclusive-language.php | 6 +- .../class-metabox-collapsibles-section.php | 2 + .../admin/metabox/class-metabox-editor.php | 4 + ...ass-metabox-section-inclusive-language.php | 4 + .../class-metabox-section-readability.php | 4 + .../admin/metabox/class-metabox.php | 71 ++- .../metabox/interface-metabox-section.php | 4 + .../wordpress-seo/admin/pages/tools.php | 13 - .../statistics/class-statistics-service.php | 4 +- .../admin/taxonomy/class-taxonomy-columns.php | 28 +- .../class-taxonomy-fields-presenter.php | 48 +- .../admin/taxonomy/class-taxonomy-fields.php | 2 +- .../admin/taxonomy/class-taxonomy-metabox.php | 2 + .../admin/taxonomy/class-taxonomy.php | 24 +- .../tracking/class-tracking-addon-data.php | 14 +- .../tracking/class-tracking-plugin-data.php | 4 +- .../tracking/class-tracking-settings-data.php | 2 +- .../admin/tracking/class-tracking.php | 6 +- .../views/class-yoast-feature-toggles.php | 2 +- .../admin/views/class-yoast-input-select.php | 6 + .../views/class-yoast-integration-toggles.php | 4 +- .../wordpress-seo/admin/views/licenses.php | 1 - .../wordpress-seo/admin/views/redirects.php | 44 +- .../views/tabs/dashboard/site-analysis.php | 15 - .../views/tabs/network/crawl-settings.php | 4 +- .../admin/views/tabs/network/features.php | 4 +- .../admin/views/tabs/network/integrations.php | 2 +- .../admin/views/tabs/tool/import-seo.php | 12 - .../admin/views/tabs/tool/wpseo-export.php | 2 +- .../admin/views/tool-bulk-editor.php | 2 + .../admin/views/tool-import-export.php | 4 +- .../watchers/class-slug-change-watcher.php | 6 +- .../css/dist/academy-2190-rtl.css | 1 + .../wordpress-seo/css/dist/academy-2190.css | 1 + .../css/dist/admin-global-2190-rtl.css | 1 + .../css/dist/admin-global-2190.css | 1 + .../css/dist/adminbar-2190-rtl.css | 1 + .../wordpress-seo/css/dist/adminbar-2190.css | 1 + .../css/dist/ai-generator-2190-rtl.css | 1 + .../css/dist/ai-generator-2190.css | 1 + .../css/dist/alerts-2190-rtl.css | 1 + .../wordpress-seo/css/dist/alerts-2190.css | 1 + .../css/dist/black-friday-banner-2190-rtl.css | 1 + .../css/dist/black-friday-banner-2190.css | 1 + .../css/dist/dashboard-2190-rtl.css | 1 + .../wordpress-seo/css/dist/dashboard-2190.css | 1 + .../css/dist/edit-page-2190-rtl.css | 1 + .../wordpress-seo/css/dist/edit-page-2190.css | 1 + .../css/dist/elementor-2190-rtl.css | 1 + .../wordpress-seo/css/dist/elementor-2190.css | 1 + .../css/dist/featured-image-2190-rtl.css | 1 + .../css/dist/featured-image-2190.css | 1 + .../css/dist/filter-explanation-2190-rtl.css | 1 + .../css/dist/filter-explanation-2190.css | 1 + .../first-time-configuration-2190-rtl.css | 1 + .../dist/first-time-configuration-2190.css | 1 + .../wordpress-seo/css/dist/icons-2190-rtl.css | 1 + .../wordpress-seo/css/dist/icons-2190.css | 1 + .../css/dist/inside-editor-2190-rtl.css | 1 + .../css/dist/inside-editor-2190.css | 1 + .../css/dist/introductions-2190-rtl.css | 1 + .../css/dist/introductions-2190.css | 1 + .../css/dist/metabox-2190-rtl.css | 1 + .../wordpress-seo/css/dist/metabox-2190.css | 3 + .../metabox-primary-category-2190-rtl.css | 1 + .../dist/metabox-primary-category-2190.css | 1 + .../wordpress-seo/css/dist/modal-2190-rtl.css | 1 + .../wordpress-seo/css/dist/modal-2190.css | 1 + .../css/dist/monorepo-2190-rtl.css | 1 + .../wordpress-seo/css/dist/monorepo-2190.css | 1 + .../css/dist/new-settings-2190-rtl.css | 1 + .../css/dist/new-settings-2190.css | 1 + .../css/dist/notifications-2190-rtl.css | 1 + .../css/dist/notifications-2190.css | 1 + .../css/dist/score_icon-2190-rtl.css | 1 + .../css/dist/score_icon-2190.css | 1 + .../dist/structured-data-blocks-2190-rtl.css | 1 + .../css/dist/structured-data-blocks-2190.css | 1 + .../css/dist/support-2190-rtl.css | 1 + .../wordpress-seo/css/dist/support-2190.css | 1 + .../css/dist/tailwind-2190-rtl.css | 1 + .../wordpress-seo/css/dist/tailwind-2190.css | 1 + .../css/dist/toggle-switch-2190-rtl.css | 1 + .../css/dist/toggle-switch-2190.css | 1 + .../css/dist/tooltips-2190-rtl.css | 1 + .../wordpress-seo/css/dist/tooltips-2190.css | 1 + .../css/dist/workouts-2190-rtl.css | 1 + .../wordpress-seo/css/dist/workouts-2190.css | 1 + .../css/dist/wpseo-dismissible-2190-rtl.css | 1 + .../css/dist/wpseo-dismissible-2190.css | 1 + .../css/dist/yoast-extensions-2190-rtl.css | 1 + .../css/dist/yoast-extensions-2190.css | 1 + .../css/dist/yst_plugin_tools-2190-rtl.css | 1 + .../css/dist/yst_plugin_tools-2190.css | 1 + .../css/dist/yst_seo_score-2190-rtl.css | 1 + .../css/dist/yst_seo_score-2190.css | 1 + .../wordpress-seo/inc/class-addon-manager.php | 36 +- .../wordpress-seo/inc/class-rewrite.php | 2 + .../inc/class-upgrade-history.php | 2 + .../wordpress-seo/inc/class-upgrade.php | 153 ++++- .../inc/class-wpseo-admin-bar-menu.php | 22 +- .../inc/class-wpseo-content-images.php | 7 +- .../inc/class-wpseo-image-utils.php | 8 +- .../inc/class-wpseo-installation.php | 2 + .../wordpress-seo/inc/class-wpseo-meta.php | 8 +- .../inc/class-wpseo-primary-term.php | 2 + .../wordpress-seo/inc/class-wpseo-rank.php | 10 +- .../inc/class-wpseo-replace-vars.php | 63 +- .../inc/class-wpseo-shortlinker.php | 2 + .../wordpress-seo/inc/class-wpseo-utils.php | 56 +- .../inc/class-yoast-dynamic-rewrites.php | 178 ++++++ .../inc/options/class-wpseo-option-titles.php | 18 +- .../inc/options/class-wpseo-option-wpseo.php | 4 +- .../inc/options/class-wpseo-option.php | 11 +- .../inc/options/class-wpseo-options.php | 10 +- .../inc/options/class-wpseo-taxonomy-meta.php | 12 +- .../class-post-type-sitemap-provider.php | 144 ++++- .../inc/sitemaps/class-sitemap-cache-data.php | 2 + .../sitemaps/class-sitemap-image-parser.php | 16 +- .../inc/sitemaps/class-sitemaps-admin.php | 22 +- .../class-sitemaps-cache-validator.php | 17 +- .../inc/sitemaps/class-sitemaps-cache.php | 22 +- .../inc/sitemaps/class-sitemaps-renderer.php | 9 +- .../inc/sitemaps/class-sitemaps-router.php | 52 +- .../inc/sitemaps/class-sitemaps.php | 83 ++- .../class-taxonomy-sitemap-provider.php | 60 +- .../sitemaps/interface-sitemap-cache-data.php | 6 +- .../inc/wpseo-functions-deprecated.php | 1 - .../wordpress-seo/inc/wpseo-functions.php | 2 + .../wordpress-seo/js/dist/admin-modules.js | 2 +- .../wordpress-seo/js/dist/analysis-worker.js | 2 +- .../wordpress-seo/js/dist/block-editor.js | 52 +- .../wordpress-seo/js/dist/classic-editor.js | 48 +- .../wordpress-seo/js/dist/editor-modules.js | 28 +- .../wordpress-seo/js/dist/elementor.js | 34 +- .../js/dist/externals-components.js | 10 +- .../wordpress-seo/js/dist/externals-redux.js | 2 +- .../js/dist/externals/analysis.js | 6 +- .../js/dist/externals/analysisReport.js | 4 +- .../js/dist/externals/chart.js.js | 2 +- .../js/dist/externals/components.js | 10 +- .../js/dist/externals/componentsNew.js | 12 +- .../js/dist/externals/draftJs.js | 2 +- .../js/dist/externals/featureFlag.js | 2 +- .../js/dist/externals/helpers.js | 4 +- .../wordpress-seo/js/dist/externals/jed.js | 2 +- .../js/dist/externals/propTypes.js | 2 +- .../js/dist/externals/reactHelmet.js | 2 +- .../wordpress-seo/js/dist/externals/redux.js | 2 +- .../js/dist/externals/reduxJsToolkit.js | 2 +- .../externals/replacementVariableEditor.js | 6 +- .../dist/externals/searchMetadataPreviews.js | 26 +- .../js/dist/externals/socialMetadataForms.js | 2 +- .../js/dist/externals/styleGuide.js | 4 +- .../js/dist/externals/styledComponents.js | 2 +- .../js/dist/externals/uiLibrary.js | 2 +- .../js/dist/first-time-configuration.js | 2 +- .../js/dist/help-scout-beacon.js | 2 +- .../wordpress-seo/js/dist/indexation.js | 6 +- .../wordpress-seo/js/dist/introductions.js | 2 +- .../wordpress-seo/js/dist/new-settings.js | 6 +- .../wordpress-seo/js/dist/post-edit.js | 6 +- .../plugins/wordpress-seo/js/dist/settings.js | 2 +- .../plugins/wordpress-seo/js/dist/support.js | 2 +- .../wordpress-seo/js/dist/term-edit.js | 2 +- .../js/dist/wincher-dashboard-widget.js | 4 +- .../plugins/wordpress-seo/js/dist/workouts.js | 4 +- .../wordpress-seo/lib/abstract-main.php | 7 +- .../container-registry.php | 4 +- .../wordpress-seo/lib/migrations/adapter.php | 16 +- .../lib/migrations/constants.php | 24 +- .../wordpress-seo/lib/migrations/table.php | 16 +- .../plugins/wordpress-seo/lib/model.php | 19 +- .../plugins/wordpress-seo/lib/orm.php | 77 +-- .../plugins/wordpress-seo/readme.txt | 53 +- .../src/actions/alert-dismissal-action.php | 4 +- .../first-time-configuration-action.php | 22 +- .../abstract-aioseo-importing-action.php | 10 +- ...tract-aioseo-settings-importing-action.php | 12 +- .../aioseo/aioseo-cleanup-action.php | 6 +- ...stom-archive-settings-importing-action.php | 6 +- ...ault-archive-settings-importing-action.php | 6 +- ...oseo-general-settings-importing-action.php | 6 +- .../aioseo/aioseo-posts-importing-action.php | 11 +- ...ype-defaults-settings-importing-action.php | 6 +- ...seo-taxonomy-settings-importing-action.php | 6 +- .../aioseo/aioseo-validate-data-action.php | 6 +- .../deactivate-conflicting-plugins-action.php | 8 +- .../indexing/abstract-indexing-action.php | 4 +- .../abstract-link-indexing-action.php | 2 +- .../indexable-general-indexation-action.php | 2 +- .../indexable-post-indexation-action.php | 6 +- ...le-post-type-archive-indexation-action.php | 6 +- .../indexable-term-indexation-action.php | 6 +- .../indexing/post-link-indexing-action.php | 4 +- .../indexing/term-link-indexing-action.php | 4 +- .../actions/semrush/semrush-login-action.php | 2 + .../semrush/semrush-phrases-action.php | 4 +- .../wincher/wincher-account-action.php | 15 +- .../wincher/wincher-keyphrases-action.php | 10 +- .../missing-indexables-collector.php | 4 +- .../to-be-cleaned-indexables-collector.php | 4 +- .../src/builders/indexable-builder.php | 10 +- .../builders/indexable-hierarchy-builder.php | 2 + .../builders/indexable-home-page-builder.php | 1 - .../src/builders/indexable-link-builder.php | 18 +- .../src/builders/indexable-post-builder.php | 2 + .../builders/indexable-social-image-trait.php | 10 + .../indexable-system-page-builder.php | 2 +- .../src/commands/index-command.php | 2 + .../admin/yoast-admin-conditional.php | 2 +- .../should-index-links-conditional.php | 2 +- .../elementor-edit-conditional.php | 4 +- .../third-party/wpml-wpseo-conditional.php | 2 +- .../wp-cron-enabled-conditional.php | 2 +- .../src/config/badge-group-names.php | 4 +- .../src/config/conflicting-plugins.php | 8 +- .../src/config/indexing-reasons.php | 16 +- .../src/config/migration-status.php | 2 +- .../20171228151840_WpYoastIndexable.php | 4 + .../20171228151841_WpYoastPrimaryTerm.php | 2 + ..._WpYoastDropIndexableMetaTableIfExists.php | 4 + ...191011111109_WpYoastIndexableHierarchy.php | 4 + .../20200408101900_AddCollationToTables.php | 4 + .../20200420073606_AddColumnsToIndexables.php | 4 + ...23747_BreadcrumbTitleAndHierarchyReset.php | 4 + ...428194858_ExpandIndexableColumnLengths.php | 4 + ...20200429105310_TruncateIndexableTables.php | 4 + ...75614_AddIndexableObjectIdAndTypeIndex.php | 4 + .../20200430150130_ClearIndexableTables.php | 4 + ...200507054848_DeleteDuplicateIndexables.php | 4 + ...513133401_ResetIndexableHierarchyTable.php | 4 + .../20200609154515_AddHasAncestorsColumn.php | 4 + .../wordpress-seo/src/config/oauth-client.php | 2 +- .../src/config/researcher-languages.php | 2 +- .../wordpress-seo/src/config/schema-ids.php | 27 +- .../wordpress-seo/src/config/schema-types.php | 26 +- .../src/config/semrush-client.php | 2 +- .../src/config/wincher-client.php | 4 +- .../src/config/wincher-pkce-provider.php | 5 +- ...-type-visibility-dismiss-notifications.php | 16 +- ...ontent-type-visibility-watcher-actions.php | 15 +- ...tent-type-visibility-dismiss-new-route.php | 22 +- .../src/context/meta-tags-context.php | 12 +- .../src/deprecated/admin/class-helpscout.php | 4 + .../src/deprecated/frontend/frontend.php | 4 + .../src/actions/indexables-page-action.php | 2 +- .../actions/settings-introduction-action.php | 4 +- .../src/helpers/indexables-page-helper.php | 16 +- .../admin/indexables-page-integration.php | 2 + .../admin/social-templates-integration.php | 14 + .../src/integrations/schema-blocks.php | 12 +- .../src/integrations/third-party/wincher.php | 4 + .../wordproof-integration-toggle.php | 4 + .../src/routes/indexables-page-route.php | 22 +- .../routes/settings-introduction-route.php | 6 +- .../src/schema-templates/assets/icons.php | 6 +- .../indexable/post-not-built-exception.php | 4 +- .../post-type-not-built-exception.php | 2 +- .../indexable/term-not-built-exception.php | 2 +- .../oauth/tokens/failed-storage-exception.php | 2 +- .../src/generated/assets/externals.php | 2 +- .../src/generated/assets/plugin.php | 2 +- .../wordpress-seo/src/generated/container.php | 112 ---- .../src/generators/breadcrumbs-generator.php | 9 +- .../generators/open-graph-image-generator.php | 10 +- .../open-graph-locale-generator.php | 2 +- .../src/generators/schema-generator.php | 23 +- .../src/generators/schema/article.php | 8 +- .../src/generators/schema/author.php | 2 +- .../src/generators/schema/howto.php | 10 + .../src/generators/schema/organization.php | 2 +- .../src/generators/schema/person.php | 11 +- .../src/generators/schema/webpage.php | 4 +- .../src/generators/schema/website.php | 4 +- .../generators/twitter-image-generator.php | 2 + .../src/helpers/crawl-cleanup-helper.php | 3 +- .../src/helpers/current-page-helper.php | 7 +- .../src/helpers/indexable-helper.php | 4 + .../src/helpers/indexing-helper.php | 6 + .../src/helpers/open-graph/image-helper.php | 7 +- .../src/helpers/options-helper.php | 2 +- .../src/helpers/pagination-helper.php | 4 +- .../wordpress-seo/src/helpers/post-helper.php | 4 +- .../src/helpers/post-type-helper.php | 6 +- .../src/helpers/primary-term-helper.php | 3 +- .../src/helpers/redirect-helper.php | 8 + .../src/helpers/schema/language-helper.php | 3 +- .../helpers/schema/replace-vars-helper.php | 4 +- .../src/helpers/short-link-helper.php | 2 + .../src/helpers/social-profiles-helper.php | 2 +- .../src/helpers/twitter/image-helper.php | 2 +- .../wordpress-seo/src/helpers/wpdb-helper.php | 2 +- .../initializers/crawl-cleanup-permalinks.php | 2 + .../initializers/disable-core-sitemaps.php | 2 + .../src/initializers/woocommerce.php | 4 + .../abstract-exclude-post-type.php | 2 + .../src/integrations/academy-integration.php | 4 +- .../addon-installation/dialog-integration.php | 10 +- .../installation-integration.php | 2 + .../admin/admin-columns-cache-integration.php | 6 + .../admin/background-indexing-integration.php | 13 +- .../admin/crawl-settings-integration.php | 12 +- .../admin/deactivated-premium-integration.php | 4 +- ...isable-concatenate-scripts-integration.php | 2 + .../first-time-configuration-integration.php | 4 + .../fix-news-dependencies-integration.php | 2 + .../integrations/admin/helpscout-beacon.php | 18 +- .../integrations/admin/import-integration.php | 2 + .../indexing-notification-integration.php | 6 +- .../admin/indexing-tool-integration.php | 2 + .../installation-success-integration.php | 6 + .../integrations/admin/integrations-page.php | 4 + .../admin/link-count-columns-integration.php | 8 +- .../admin/menu-badge-integration.php | 4 +- .../admin/old-configuration-integration.php | 4 + .../admin/workouts-integration.php | 4 + .../blocks/structured-data-blocks.php | 12 +- .../integrations/breadcrumbs-integration.php | 2 + .../src/integrations/cleanup-integration.php | 10 +- .../integrations/front-end-integration.php | 19 +- .../front-end/comment-link-fixer.php | 4 +- .../front-end/crawl-cleanup-basic.php | 6 +- .../front-end/crawl-cleanup-rss.php | 10 + .../front-end/crawl-cleanup-searches.php | 2 + .../front-end/force-rewrite-title.php | 4 + .../src/integrations/front-end/handle-404.php | 4 + .../front-end/open-graph-oembed.php | 6 + .../src/integrations/front-end/redirects.php | 14 +- .../front-end/rss-footer-embed.php | 9 +- .../front-end/wp-robots-integration.php | 4 +- .../src/integrations/settings-integration.php | 50 +- .../src/integrations/support-integration.php | 10 +- .../integrations/third-party/elementor.php | 14 +- .../third-party/woocommerce-permalinks.php | 4 + .../integrations/third-party/wordproof.php | 10 +- .../third-party/wpml-wpseo-notification.php | 4 +- .../src/integrations/third-party/wpml.php | 2 + .../watchers/addon-update-watcher.php | 12 +- .../watchers/auto-update-watcher.php | 2 +- .../watchers/indexable-ancestor-watcher.php | 8 +- .../watchers/indexable-author-watcher.php | 2 + .../indexable-category-permalink-watcher.php | 3 + .../indexable-date-archive-watcher.php | 2 + .../watchers/indexable-home-page-watcher.php | 2 + .../watchers/indexable-permalink-watcher.php | 6 + .../watchers/indexable-post-meta-watcher.php | 2 + .../indexable-post-type-archive-watcher.php | 2 + .../indexable-post-type-change-watcher.php | 5 +- .../watchers/indexable-post-watcher.php | 6 + .../indexable-static-home-page-watcher.php | 6 + .../indexable-system-page-watcher.php | 2 + .../indexable-taxonomy-change-watcher.php | 4 +- .../primary-category-quick-edit-watcher.php | 6 + .../watchers/primary-term-watcher.php | 6 + .../search-engines-discouraged-watcher.php | 4 +- .../woocommerce-beta-editor-watcher.php | 6 +- ...s-and-descriptions-introduction-upsell.php | 12 +- .../application/current-page-trait.php | 2 +- .../application/introductions-collector.php | 4 +- .../application/version-trait.php | 5 +- .../domain/invalid-user-id-exception.php | 6 +- .../introductions-seen-repository.php | 16 +- .../wistia-embed-permission-repository.php | 12 +- .../introductions-integration.php | 6 +- .../introductions-seen-route.php | 2 +- .../wistia-embed-permission-route.php | 2 +- .../wordpress-seo/src/loggers/logger.php | 2 +- .../plugins/wordpress-seo/src/main.php | 4 +- .../memoizers/meta-tags-context-memoizer.php | 2 + .../src/memoizers/presentation-memoizer.php | 2 + .../wordpress-seo/src/models/seo-links.php | 8 +- .../presentations/archive-adjacent-trait.php | 2 + .../indexable-post-type-presentation.php | 5 +- .../presentations/indexable-presentation.php | 10 +- .../indexable-term-archive-presentation.php | 8 +- .../abstract-indexable-tag-presenter.php | 8 +- .../presenters/admin/sidebar-presenter.php | 6 +- .../src/presenters/breadcrumbs-presenter.php | 12 +- .../src/presenters/canonical-presenter.php | 3 +- .../debug/marker-close-presenter.php | 2 +- .../debug/marker-open-presenter.php | 4 +- .../presenters/meta-description-presenter.php | 13 +- .../open-graph/article-author-presenter.php | 5 +- .../article-publisher-presenter.php | 5 +- .../open-graph/description-presenter.php | 3 +- .../presenters/open-graph/image-presenter.php | 3 +- .../open-graph/locale-presenter.php | 3 +- .../open-graph/site-name-presenter.php | 3 +- .../presenters/open-graph/title-presenter.php | 3 +- .../presenters/open-graph/type-presenter.php | 3 +- .../presenters/open-graph/url-presenter.php | 3 +- .../src/presenters/rel-next-presenter.php | 5 +- .../src/presenters/rel-prev-presenter.php | 6 +- .../src/presenters/robots-txt-presenter.php | 12 +- .../src/presenters/schema-presenter.php | 3 +- .../slack/enhanced-data-presenter.php | 3 +- .../src/presenters/title-presenter.php | 3 +- .../twitter/description-presenter.php | 5 +- .../presenters/twitter/image-presenter.php | 5 +- .../src/presenters/twitter/site-presenter.php | 3 +- .../presenters/twitter/title-presenter.php | 5 +- .../promotion-manager-interface.php | 4 +- .../application/promotion-manager.php | 8 +- .../src/promotions/domain/time-interval.php | 2 +- .../indexable-cleanup-repository.php | 30 +- .../indexable-hierarchy-repository.php | 2 + .../src/routes/alert-dismissal-route.php | 6 +- .../routes/first-time-configuration-route.php | 16 +- .../src/routes/importing-route.php | 5 +- .../src/routes/indexables-head-route.php | 4 +- .../src/routes/indexing-route.php | 38 +- .../src/routes/integrations-route.php | 4 +- .../src/routes/meta-search-route.php | 2 +- .../src/routes/semrush-route.php | 12 +- .../src/routes/supported-features-route.php | 2 +- .../src/routes/wincher-route.php | 16 +- .../src/routes/workouts-route.php | 10 +- .../src/routes/yoast-head-rest-field.php | 4 +- .../health-check/default-tagline-runner.php | 2 +- .../services/health-check/health-check.php | 4 +- .../services/health-check/report-builder.php | 6 +- .../importing/conflicting-plugins-service.php | 2 + .../importing/importable-detector-service.php | 2 +- .../src/surfaces/meta-surface.php | 4 +- .../user-profiles-additions-ui.php | 8 +- .../indexables/indexable-builder-versions.php | 2 +- .../src/values/open-graph/images.php | 2 + .../src/wrappers/wp-query-wrapper.php | 4 + .../plugins/wordpress-seo/vendor/autoload.php | 2 +- .../vendor/composer/autoload_classmap.php | 10 +- .../vendor/composer/autoload_real.php | 8 +- .../vendor/composer/autoload_static.php | 18 +- .../vendor/composer/installed.php | 4 +- .../guzzle/src/Cookie/CookieJar.php | 2 +- .../guzzle/src/Cookie/SetCookie.php | 4 +- .../guzzle/src/Handler/CurlFactory.php | 2 +- .../guzzlehttp/guzzle/src/RequestOptions.php | 4 +- .../guzzlehttp/guzzle/src/Utils.php | 15 +- .../guzzlehttp/promises/src/Each.php | 7 +- .../guzzlehttp/promises/src/EachPromise.php | 6 +- .../promises/src/RejectionException.php | 2 +- .../guzzlehttp/psr7/src/FnStream.php | 33 +- .../guzzlehttp/psr7/src/Header.php | 2 +- .../guzzlehttp/psr7/src/InflateStream.php | 8 +- .../guzzlehttp/psr7/src/Message.php | 8 +- .../guzzlehttp/psr7/src/MessageTrait.php | 8 +- .../guzzlehttp/psr7/src/MultipartStream.php | 20 +- .../guzzlehttp/psr7/src/PumpStream.php | 6 +- .../guzzlehttp/psr7/src/Request.php | 4 +- .../guzzlehttp/psr7/src/Response.php | 2 +- .../guzzlehttp/psr7/src/ServerRequest.php | 2 +- .../guzzlehttp/psr7/src/Stream.php | 4 +- .../psr7/src/StreamDecoratorTrait.php | 2 +- .../guzzlehttp/psr7/src/StreamWrapper.php | 32 +- .../guzzlehttp/psr7/src/UploadedFile.php | 4 +- .../guzzlehttp/psr7/src/Uri.php | 28 +- .../guzzlehttp/psr7/src/UriNormalizer.php | 10 +- .../guzzlehttp/psr7/src/UriResolver.php | 6 +- .../guzzlehttp/psr7/src/Utils.php | 6 +- .../plugins/wordpress-seo/wp-seo-main.php | 80 ++- .../plugins/wordpress-seo/wp-seo.php | 6 +- .../assets/languages/wp-mail-smtp-vue.php | 100 +-- .../assets/languages/wp-mail-smtp.pot | 574 +++++++++--------- .../wp-mail-smtp/assets/vue/js/wizard.min.js | 2 +- wp/wp-content/plugins/wp-mail-smtp/readme.txt | 6 +- .../wp-mail-smtp/src/Admin/SetupWizard.php | 17 +- .../src/Providers/MailerAbstract.php | 17 + .../src/Providers/Mailgun/Mailer.php | 2 +- .../src/Providers/Postmark/Mailer.php | 22 +- .../src/Providers/SMTPcom/Mailer.php | 2 +- .../src/Providers/Sendgrid/Mailer.php | 2 +- .../src/Providers/Sendinblue/Mailer.php | 2 +- .../src/Providers/Sendlayer/Mailer.php | 2 +- .../src/Providers/SparkPost/Mailer.php | 31 +- .../vendor/composer/installed.php | 12 +- .../plugins/wp-mail-smtp/wp_mail_smtp.php | 4 +- 540 files changed, 3445 insertions(+), 2131 deletions(-) create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/academy-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/academy-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/admin-global-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/admin-global-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/adminbar-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/adminbar-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/ai-generator-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/ai-generator-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/alerts-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/alerts-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/black-friday-banner-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/black-friday-banner-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/dashboard-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/dashboard-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/edit-page-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/edit-page-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/elementor-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/elementor-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/featured-image-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/featured-image-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/filter-explanation-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/filter-explanation-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/first-time-configuration-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/first-time-configuration-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/icons-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/icons-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/inside-editor-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/inside-editor-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/introductions-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/introductions-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/modal-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/modal-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/monorepo-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/monorepo-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/new-settings-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/new-settings-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/notifications-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/notifications-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/score_icon-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/score_icon-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/structured-data-blocks-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/structured-data-blocks-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/support-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/support-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tailwind-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tailwind-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tooltips-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tooltips-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/workouts-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/workouts-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-2190-rtl.css create mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-2190.css create mode 100644 wp/wp-content/plugins/wordpress-seo/inc/class-yoast-dynamic-rewrites.php diff --git a/wp/wp-content/plugins/wordpress-seo/admin/admin-settings-changed-listener.php b/wp/wp-content/plugins/wordpress-seo/admin/admin-settings-changed-listener.php index f3032b09..712c5445 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/admin-settings-changed-listener.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/admin-settings-changed-listener.php @@ -28,6 +28,8 @@ class WPSEO_Admin_Settings_Changed_Listener implements WPSEO_WordPress_Integrati /** * Checks and overwrites the wp_settings_errors global to determine whether the Yoast SEO settings have been saved. + * + * @return void */ public function intercept_save_update_notification() { global $pagenow; @@ -74,6 +76,8 @@ class WPSEO_Admin_Settings_Changed_Listener implements WPSEO_WordPress_Integrati /** * Renders a success message if the Yoast SEO settings have been saved. + * + * @return void */ public function show_success_message() { if ( $this->have_settings_been_saved() ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/ajax.php b/wp/wp-content/plugins/wordpress-seo/admin/ajax.php index a6b6132f..34a6f886 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/ajax.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/ajax.php @@ -15,6 +15,8 @@ if ( ! defined( 'WPSEO_VERSION' ) ) { * Convenience function to JSON encode and echo results and then die. * * @param array $results Results array for encoding. + * + * @return void */ function wpseo_ajax_json_echo_die( $results ) { // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: WPSEO_Utils::format_json_encode is safe. @@ -24,6 +26,8 @@ function wpseo_ajax_json_echo_die( $results ) { /** * Function used from AJAX calls, takes it variables from $_POST, dies on exit. + * + * @return void */ function wpseo_set_option() { if ( ! current_user_can( 'manage_options' ) ) { @@ -54,6 +58,8 @@ add_action( 'wp_ajax_yoast_dismiss_notification', [ 'Yoast_Notification_Center', /** * Function used to remove the admin notices for several purposes, dies on exit. + * + * @return void */ function wpseo_set_ignore() { if ( ! current_user_can( 'manage_options' ) ) { @@ -76,6 +82,8 @@ add_action( 'wp_ajax_wpseo_set_ignore', 'wpseo_set_ignore' ); /** * Save an individual SEO title from the Bulk Editor. + * + * @return void */ function wpseo_save_title() { wpseo_save_what( 'title' ); @@ -85,6 +93,8 @@ add_action( 'wp_ajax_wpseo_save_title', 'wpseo_save_title' ); /** * Save an individual meta description from the Bulk Editor. + * + * @return void */ function wpseo_save_description() { wpseo_save_what( 'metadesc' ); @@ -96,6 +106,8 @@ add_action( 'wp_ajax_wpseo_save_metadesc', 'wpseo_save_description' ); * Save titles & descriptions. * * @param string $what Type of item to save (title, description). + * + * @return void */ function wpseo_save_what( $what ) { check_ajax_referer( 'wpseo-bulk-editor' ); @@ -206,6 +218,8 @@ function wpseo_upsert_meta( $post_id, $new_meta_value, $orig_meta_value, $meta_k /** * Save all titles sent from the Bulk Editor. + * + * @return void */ function wpseo_save_all_titles() { wpseo_save_all( 'title' ); @@ -215,6 +229,8 @@ add_action( 'wp_ajax_wpseo_save_all_titles', 'wpseo_save_all_titles' ); /** * Save all description sent from the Bulk Editor. + * + * @return void */ function wpseo_save_all_descriptions() { wpseo_save_all( 'metadesc' ); @@ -226,6 +242,8 @@ add_action( 'wp_ajax_wpseo_save_all_descriptions', 'wpseo_save_all_descriptions' * Utility function to save values. * * @param string $what Type of item so save. + * + * @return void */ function wpseo_save_all( $what ) { check_ajax_referer( 'wpseo-bulk-editor' ); @@ -264,6 +282,8 @@ function wpseo_upsert_new( $what, $post_id, $new_value, $original ) { /** * Retrieves the post ids where the keyword is used before as well as the types of those posts. + * + * @return void */ function ajax_get_keyword_usage_and_post_types() { check_ajax_referer( 'wpseo-keyword-usage-and-post-types', 'nonce' ); @@ -306,6 +326,8 @@ add_action( 'wp_ajax_get_focus_keyword_usage_and_post_types', 'ajax_get_keyword_ /** * Retrieves the keyword for the keyword doubles of the termpages. + * + * @return void */ function ajax_get_term_keyword_usage() { check_ajax_referer( 'wpseo-keyword-usage', 'nonce' ); @@ -370,6 +392,8 @@ new WPSEO_Taxonomy_Columns(); /** * Retrieves the keyword for the keyword doubles. + * + * @return void */ function ajax_get_keyword_usage() { _deprecated_function( __METHOD__, 'WPSEO 20.4' ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php b/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php index e62435a3..c9f5f3db 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-shortcode-filter.php @@ -21,6 +21,8 @@ class WPSEO_Shortcode_Filter { /** * Parse the shortcodes. + * + * @return void */ public function do_filter() { check_ajax_referer( 'wpseo-filter-shortcodes', 'nonce' ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php b/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php index e6a30c73..c847ba62 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-dismissable-notice.php @@ -16,21 +16,21 @@ class Yoast_Dismissable_Notice_Ajax { * * @var string */ - const FOR_USER = 'user_meta'; + public const FOR_USER = 'user_meta'; /** * Notice type toggle value for network notices. * * @var string */ - const FOR_NETWORK = 'site_option'; + public const FOR_NETWORK = 'site_option'; /** * Notice type toggle value for site notices. * * @var string */ - const FOR_SITE = 'option'; + public const FOR_SITE = 'option'; /** * Name of the notice that will be dismissed. @@ -61,6 +61,8 @@ class Yoast_Dismissable_Notice_Ajax { /** * Handles the dismiss notice request. + * + * @return void */ public function dismiss_notice() { check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name ); @@ -72,6 +74,8 @@ class Yoast_Dismissable_Notice_Ajax { /** * Storing the dismissed value in the database. The target location is based on the set notification type. + * + * @return void */ private function save_dismissed() { if ( $this->notice_type === self::FOR_SITE ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php b/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php index f0fd8fd8..9778c5e7 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/ajax/class-yoast-plugin-conflict-ajax.php @@ -33,6 +33,8 @@ class Yoast_Plugin_Conflict_Ajax { /** * Handles the dismiss notice request. + * + * @return void */ public function dismiss_notice() { check_ajax_referer( 'dismiss-plugin-conflict' ); @@ -89,6 +91,8 @@ class Yoast_Plugin_Conflict_Ajax { * Storing the conflicting plugins as an user option in the database. * * @param string $plugin_section Plugin conflict type (such as Open Graph or sitemap). + * + * @return void */ private function save_dismissed_conflicts( $plugin_section ) { $dismissed_conflicts = $this->get_dismissed_option(); @@ -102,6 +106,8 @@ class Yoast_Plugin_Conflict_Ajax { * Loop through the plugins to compare them with the already stored dismissed plugin conflicts. * * @param array $posted_plugins Plugin set to check. + * + * @return void */ public function compare_plugins( array $posted_plugins ) { foreach ( $posted_plugins as $posted_plugin ) { @@ -113,6 +119,8 @@ class Yoast_Plugin_Conflict_Ajax { * 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. + * + * @return void */ private function compare_plugin( $posted_plugin ) { if ( ! in_array( $posted_plugin, $this->dismissed_conflicts, true ) ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/capabilities/class-abstract-capability-manager.php b/wp/wp-content/plugins/wordpress-seo/admin/capabilities/class-abstract-capability-manager.php index 29e81605..8f290d81 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/capabilities/class-abstract-capability-manager.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/capabilities/class-abstract-capability-manager.php @@ -23,6 +23,8 @@ abstract class WPSEO_Abstract_Capability_Manager implements WPSEO_Capability_Man * @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. + * + * @return void */ public function register( $capability, array $roles, $overwrite = false ) { if ( $overwrite || ! isset( $this->capabilities[ $capability ] ) ) { @@ -75,7 +77,7 @@ abstract class WPSEO_Abstract_Capability_Manager implements WPSEO_Capability_Man /** * Filter: Allow changing roles that a capability is added to. * - * @api array $roles The default roles to be filtered. + * @param array $roles The default roles to be filtered. */ $filtered = apply_filters( $capability . '_roles', $roles ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-integration.php b/wp/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-integration.php index ec8df74a..6f8d58b7 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-integration.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-integration.php @@ -61,6 +61,8 @@ class WPSEO_Capability_Manager_Integration implements WPSEO_WordPress_Integratio * Add capabilities to its own group in the Members plugin. * * @see members_register_cap_group() + * + * @return void */ public function action_members_register_cap_group() { if ( ! function_exists( 'members_register_cap_group' ) ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php index 3138af57..cf67ae74 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php @@ -15,7 +15,7 @@ final class WPSEO_Admin_Asset_Dev_Server_Location implements WPSEO_Admin_Asset_L * * @var string */ - const DEFAULT_URL = 'http://localhost:8080'; + public const DEFAULT_URL = 'http://localhost:8080'; /** * Holds the url where the server is located. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php index 5904b2d5..55dab491 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php @@ -18,7 +18,7 @@ class WPSEO_Admin_Asset_Manager { * * @var string */ - const PREFIX = 'yoast-seo-'; + public const PREFIX = 'yoast-seo-'; /** * Class that manages the assets' location. @@ -40,7 +40,7 @@ class WPSEO_Admin_Asset_Manager { * @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, $prefix = self::PREFIX ) { + public function __construct( ?WPSEO_Admin_Asset_Location $asset_location = null, $prefix = self::PREFIX ) { if ( $asset_location === null ) { $asset_location = self::create_default_location(); } @@ -53,6 +53,8 @@ class WPSEO_Admin_Asset_Manager { * Enqueues scripts. * * @param string $script The name of the script to enqueue. + * + * @return void */ public function enqueue_script( $script ) { wp_enqueue_script( $this->prefix . $script ); @@ -62,6 +64,8 @@ class WPSEO_Admin_Asset_Manager { * Enqueues styles. * * @param string $style The name of the style to enqueue. + * + * @return void */ public function enqueue_style( $style ) { wp_enqueue_style( $this->prefix . $style ); @@ -69,6 +73,8 @@ class WPSEO_Admin_Asset_Manager { /** * Enqueues the appropriate language for the user. + * + * @return void */ public function enqueue_user_language_script() { $this->enqueue_script( 'language-' . YoastSEO()->helpers->language->get_researcher_language() ); @@ -78,6 +84,8 @@ class WPSEO_Admin_Asset_Manager { * Registers scripts based on it's parameters. * * @param WPSEO_Admin_Asset $script The script to register. + * + * @return void */ public function register_script( WPSEO_Admin_Asset $script ) { $url = $script->get_src() ? $this->get_url( $script, WPSEO_Admin_Asset::TYPE_JS ) : false; @@ -99,6 +107,8 @@ class WPSEO_Admin_Asset_Manager { * Registers styles based on it's parameters. * * @param WPSEO_Admin_Asset $style The style to register. + * + * @return void */ public function register_style( WPSEO_Admin_Asset $style ) { wp_register_style( @@ -112,6 +122,8 @@ class WPSEO_Admin_Asset_Manager { /** * Calls the functions that register scripts and styles with the scripts and styles to be registered as arguments. + * + * @return void */ public function register_assets() { $this->register_scripts( $this->scripts_to_be_registered() ); @@ -122,6 +134,8 @@ class WPSEO_Admin_Asset_Manager { * Registers all the scripts passed to it. * * @param array $scripts The scripts passed to it. + * + * @return void */ public function register_scripts( $scripts ) { foreach ( $scripts as $script ) { @@ -134,6 +148,8 @@ class WPSEO_Admin_Asset_Manager { * Registers all the styles it receives. * * @param array $styles Styles that need to be registered. + * + * @return void */ public function register_styles( $styles ) { foreach ( $styles as $style ) { @@ -148,9 +164,11 @@ class WPSEO_Admin_Asset_Manager { * @param string $handle The script handle. * @param string $object_name The object name. * @param array $data The l10n data. + * + * @return void */ public function localize_script( $handle, $object_name, $data ) { - \wp_localize_script( $this->prefix . $handle, $object_name, $data ); + wp_localize_script( $this->prefix . $handle, $object_name, $data ); } /** @@ -159,9 +177,11 @@ class WPSEO_Admin_Asset_Manager { * @param string $handle The script handle. * @param string $data The l10n data. * @param string $position Optional. Whether to add the inline script before the handle or after. + * + * @return void */ public function add_inline_script( $handle, $data, $position = 'after' ) { - \wp_add_inline_script( $this->prefix . $handle, $data, $position ); + wp_add_inline_script( $this->prefix . $handle, $data, $position ); } /** @@ -219,7 +239,7 @@ class WPSEO_Admin_Asset_Manager { * @return bool True when the script is enqueued. */ public function is_script_enqueued( $script ) { - return \wp_script_is( $this->prefix . $script ); + return wp_script_is( $this->prefix . $script ); } /** @@ -351,7 +371,7 @@ class WPSEO_Admin_Asset_Manager { 'name' => 'post-edit-classic', 'src' => $scripts['post-edit']['src'], 'deps' => array_map( - static function( $dep ) { + static function ( $dep ) { if ( $dep === self::PREFIX . 'block-editor' ) { return self::PREFIX . 'classic-editor'; } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-editor-specific-replace-vars.php b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-editor-specific-replace-vars.php index 4bcd1684..781ce099 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-editor-specific-replace-vars.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-editor-specific-replace-vars.php @@ -59,7 +59,7 @@ class WPSEO_Admin_Editor_Specific_Replace_Vars { /** * Filter: Adds the possibility to add extra editor specific replacement variables. * - * @api array $replacement_variables Array of editor specific replace vars. + * @param array $replacement_variables Array of editor specific replace vars. */ $replacement_variables = apply_filters( 'wpseo_editor_specific_replace_vars', diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-gutenberg-compatibility-notification.php b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-gutenberg-compatibility-notification.php index 44d1957d..8f521de3 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-gutenberg-compatibility-notification.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-gutenberg-compatibility-notification.php @@ -58,7 +58,7 @@ class WPSEO_Admin_Gutenberg_Compatibility_Notification implements WPSEO_WordPres * Filter: 'yoast_display_gutenberg_compat_notification' - Allows developer to disable the Gutenberg compatibility * notification. * - * @api bool + * @param bool $display_notification */ $display_notification = apply_filters( 'yoast_display_gutenberg_compat_notification', true ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-init.php b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-init.php index 2e9c241d..168e789a 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-init.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-init.php @@ -53,6 +53,8 @@ class WPSEO_Admin_Init { /** * Enqueue our styling for dismissible yoast notifications. + * + * @return void */ public function enqueue_dismissible() { $this->asset_manager->enqueue_style( 'dismissible' ); @@ -132,7 +134,7 @@ class WPSEO_Admin_Init { * the WPSEO metaboxes are only registered on the typical pages (lean loading) or always * registered when in admin. * - * @api bool Whether to always register the metaboxes or not. Defaults to false. + * @param bool $register_metaboxes Whether to always register the metaboxes or not. Defaults to false. */ if ( apply_filters( 'wpseo_always_register_metaboxes_on_admin', false ) ) { return true; @@ -153,6 +155,8 @@ class WPSEO_Admin_Init { /** * Determine whether we should load the meta box class and if so, load it. + * + * @return void */ private function load_meta_boxes() { if ( $this->should_load_meta_boxes() ) { @@ -163,6 +167,8 @@ class WPSEO_Admin_Init { /** * Determine if we should load our taxonomy edit class and if so, load it. + * + * @return void */ private function load_taxonomy_class() { if ( @@ -177,6 +183,8 @@ class WPSEO_Admin_Init { * Determine if we should load our admin pages class and if so, load it. * * Loads admin page class for all admin pages starting with `wpseo_`. + * + * @return void */ private function load_admin_user_class() { if ( in_array( $this->pagenow, [ 'user-edit.php', 'profile.php' ], true ) @@ -190,6 +198,8 @@ class WPSEO_Admin_Init { * Determine if we should load our admin pages class and if so, load it. * * Loads admin page class for all admin pages starting with `wpseo_`. + * + * @return void */ private function load_admin_page_class() { @@ -214,6 +224,8 @@ class WPSEO_Admin_Init { /** * Loads the plugin suggestions. + * + * @return void */ private function load_plugin_suggestions() { $suggestions = new WPSEO_Suggested_Plugins( new WPSEO_Plugin_Availability(), Yoast_Notification_Center::get() ); @@ -234,6 +246,8 @@ class WPSEO_Admin_Init { /** * See if we should start our XML Sitemaps Admin class. + * + * @return void */ private function load_xml_sitemaps_admin() { if ( WPSEO_Options::get( 'enable_xml_sitemap', false ) ) { @@ -243,6 +257,8 @@ class WPSEO_Admin_Init { /** * Shows deprecation warnings to the user if a plugin has registered a filter we have deprecated. + * + * @return void */ public function show_hook_deprecation_warnings() { global $wp_filter; @@ -317,6 +333,8 @@ class WPSEO_Admin_Init { /** * Shows a notice on the permalink settings page. + * + * @return void */ public function permalink_settings_notice() { global $pagenow; @@ -341,7 +359,7 @@ class WPSEO_Admin_Init { /** * Adds a custom Yoast section within the Classic Editor publish box. * - * @param \WP_Post $post The current post object. + * @param WP_Post $post The current post object. * * @return void */ @@ -353,7 +371,7 @@ class WPSEO_Admin_Init { /** * Fires after the post time/date setting in the Publish meta box. * - * @api \WP_Post The current post object. + * @param WP_Post $post The current post object. */ do_action( 'wpseo_publishbox_misc_actions', $post ); } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-recommended-replace-vars.php b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-recommended-replace-vars.php index b8474970..21378619 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-recommended-replace-vars.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-recommended-replace-vars.php @@ -149,7 +149,7 @@ class WPSEO_Admin_Recommended_Replace_Vars { /** * Filter: Adds the possibility to add extra recommended replacement variables. * - * @api array $additional_replace_vars Empty array to add the replacevars to. + * @param array $additional_replace_vars Empty array to add the replacevars to. */ $recommended_replace_vars = apply_filters( 'wpseo_recommended_replace_vars', $this->recommended_replace_vars ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php index a36f71e8..b1dc4a4b 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php @@ -31,6 +31,8 @@ class WPSEO_Admin_User_Profile { * @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. + * + * @return void */ public function clear_author_sitemap_cache( $meta_id, $object_id, $meta_key ) { if ( $meta_key === '_yoast_wpseo_profile_updated' ) { @@ -42,6 +44,8 @@ class WPSEO_Admin_User_Profile { * Updates the user metas that (might) have been set on the user profile page. * * @param int $user_id User ID of the updated user. + * + * @return void */ public function process_user_option_update( $user_id ) { update_user_meta( $user_id, '_yoast_wpseo_profile_updated', time() ); @@ -69,6 +73,8 @@ class WPSEO_Admin_User_Profile { * Add the inputs needed for SEO values to the User Profile page. * * @param WP_User $user User instance to output for. + * + * @return void */ public function user_profile( $user ) { wp_nonce_field( 'wpseo_user_profile_update', 'wpseo_nonce' ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-admin.php b/wp/wp-content/plugins/wordpress-seo/admin/class-admin.php index b2a0ca24..da0caaa1 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-admin.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-admin.php @@ -19,7 +19,7 @@ class WPSEO_Admin { * * @var string */ - const PAGE_IDENTIFIER = 'wpseo_dashboard'; + public const PAGE_IDENTIFIER = 'wpseo_dashboard'; /** * Array of classes that add admin functionality. @@ -117,6 +117,8 @@ class WPSEO_Admin { /** * Schedules a rewrite flush to happen at shutdown. + * + * @return void */ public function schedule_rewrite_flush() { // Bail if this is a multisite installation and the site has been switched. @@ -138,6 +140,8 @@ class WPSEO_Admin { /** * Register assets needed on admin pages. + * + * @return void */ public function enqueue_assets() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form data. @@ -157,13 +161,15 @@ class WPSEO_Admin { /** * Filter: 'wpseo_manage_options_capability' - Allow changing the capability users need to view the settings pages. * - * @api string unsigned The capability. + * @param string $capability The capability. */ return apply_filters( 'wpseo_manage_options_capability', 'wpseo_manage_options' ); } /** * Maps the manage_options cap on saving an options page to wpseo_manage_options. + * + * @return void */ public function map_manage_options_cap() { // phpcs:ignore WordPress.Security -- The variable is only used in strpos and thus safe to not unslash or sanitize. @@ -177,6 +183,8 @@ class WPSEO_Admin { /** * Adds the ability to choose how many posts are displayed per page * on the bulk edit pages. + * + * @return void */ public function bulk_edit_options() { $option = 'per_page'; @@ -214,7 +222,7 @@ class WPSEO_Admin { * @return array */ public function add_action_link( $links, $file ) { - $first_time_configuration_notice_helper = \YoastSEO()->helpers->first_time_configuration_notice; + $first_time_configuration_notice_helper = YoastSEO()->helpers->first_time_configuration_notice; if ( $file === WPSEO_BASENAME && WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) { if ( is_network_admin() ) { @@ -272,6 +280,8 @@ class WPSEO_Admin { /** * Enqueues the (tiny) global JS needed for the plugin. + * + * @return void */ public function config_page_scripts() { $asset_manager = new WPSEO_Admin_Asset_Manager(); @@ -281,6 +291,8 @@ class WPSEO_Admin { /** * Enqueues the (tiny) global stylesheet needed for the plugin. + * + * @return void */ public function enqueue_global_style() { $asset_manager = new WPSEO_Admin_Asset_Manager(); @@ -313,6 +325,8 @@ class WPSEO_Admin { /** * Log the updated timestamp for user profiles when theme is changed. + * + * @return void */ public function switch_theme() { @@ -351,6 +365,8 @@ class WPSEO_Admin { /** * Sets the upsell notice. + * + * @return void */ protected function set_upsell_notice() { $upsell = new WPSEO_Product_Upsell_Notice(); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-asset.php b/wp/wp-content/plugins/wordpress-seo/admin/class-asset.php index 70e22346..8cbf0c1f 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-asset.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-asset.php @@ -15,42 +15,42 @@ class WPSEO_Admin_Asset { * * @var string */ - const TYPE_JS = 'js'; + public const TYPE_JS = 'js'; /** * Constant used to identify file type as a CSS file. * * @var string */ - const TYPE_CSS = 'css'; + public const TYPE_CSS = 'css'; /** * The name option identifier. * * @var string */ - const NAME = 'name'; + public const NAME = 'name'; /** * The source option identifier. * * @var string */ - const SRC = 'src'; + public const SRC = 'src'; /** * The dependencies option identifier. * * @var string */ - const DEPS = 'deps'; + public const DEPS = 'deps'; /** * The version option identifier. * * @var string */ - const VERSION = 'version'; + public const VERSION = 'version'; /* Style specific. */ @@ -59,14 +59,14 @@ class WPSEO_Admin_Asset { * * @var string */ - const MEDIA = 'media'; + public const MEDIA = 'media'; /** * The rtl option identifier. * * @var string */ - const RTL = 'rtl'; + public const RTL = 'rtl'; /* Script specific. */ @@ -75,7 +75,7 @@ class WPSEO_Admin_Asset { * * @var string */ - const IN_FOOTER = 'in_footer'; + public const IN_FOOTER = 'in_footer'; /** * Asset identifier. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php b/wp/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php index 57891a63..6c5b0798 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-bulk-editor-list-table.php @@ -110,6 +110,15 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { */ protected $input_fields = []; + /** + * The field in the database where meta field is saved. + * + * Should be set in the child class. + * + * @var string + */ + protected $target_db_field = ''; + /** * Class constructor. * @@ -147,6 +156,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { /** * Prepares the data and renders the page. + * + * @return void */ public function show_page() { $this->prepare_page_navigation(); @@ -158,6 +169,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { /** * Used in the constructor to build a reference list of post types the current user can edit. + * + * @return void */ protected function populate_editable_post_types() { $post_types = get_post_types( @@ -191,6 +204,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { * Will show the navigation for the table like page navigation and page filter. * * @param string $which Table nav location (such as top). + * + * @return void */ public function display_tablenav( $which ) { // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. @@ -279,9 +294,9 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { $total_posts = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$subquery} - WHERE post_status IN (" . - implode( ', ', array_fill( 0, count( $states ), '%s' ) ) . - ')', + WHERE post_status IN (" + . implode( ', ', array_fill( 0, count( $states ), '%s' ) ) + . ')', $states ) ); @@ -352,6 +367,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { * Outputs extra table navigation. * * @param string $which Table nav location (such as top). + * + * @return void */ public function extra_tablenav( $which ) { @@ -381,9 +398,9 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { $post_types = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT post_type FROM {$subquery} - WHERE post_status IN (" . - implode( ', ', array_fill( 0, count( $states ), '%s' ) ) . - ') ORDER BY post_type ASC', + WHERE post_status IN (" + . implode( ', ', array_fill( 0, count( $states ), '%s' ) ) + . ') ORDER BY post_type ASC', $states ) ); @@ -441,6 +458,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { /** * Sets the correct pagenumber and pageurl for the navigation. + * + * @return void */ public function prepare_page_navigation() { @@ -485,6 +504,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { /** * Preparing the requested pagerows and setting the needed variables. + * + * @return void */ public function prepare_items() { @@ -518,6 +539,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { /** * Setting the column headers. + * + * @return void */ protected function set_column_headers() { $columns = $this->get_columns(); @@ -570,6 +593,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { * Total items is the number of all visible items. * * @param int $total_items Total items counts. + * + * @return void */ protected function set_pagination( $total_items ) { // Calculate items per page. @@ -679,6 +704,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { * Getting all the items. * * @param string $query SQL query to use. + * + * @return void */ protected function get_items( $query ) { global $wpdb; @@ -722,6 +749,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { /** * Based on $this->items and the defined columns, the table rows will be displayed. + * + * @return void */ public function display_rows() { @@ -931,6 +960,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { * * This method will loop through the current items ($this->items) for getting the post_id. With this data * ($needed_ids) the method will query the meta-data table for getting the title. + * + * @return void */ protected function get_meta_data() { @@ -982,6 +1013,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table { * Setting $this->meta_data. * * @param array $meta_data Meta data set. + * + * @return void */ protected function parse_meta_data( $meta_data ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-collector.php b/wp/wp-content/plugins/wordpress-seo/admin/class-collector.php index f7687974..e49e872c 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-collector.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-collector.php @@ -21,6 +21,8 @@ class WPSEO_Collector { * Adds a collection object to the collections. * * @param WPSEO_Collection $collection The collection object to add. + * + * @return void */ public function add_collection( WPSEO_Collection $collection ) { $this->collections[] = $collection; diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-config.php b/wp/wp-content/plugins/wordpress-seo/admin/class-config.php index 69d99529..63a49b0b 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-config.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-config.php @@ -5,10 +5,12 @@ * @package WPSEO\Admin */ +use Yoast\WP\SEO\Actions\Alert_Dismissal_Action; +use Yoast\WP\SEO\Conditionals\WooCommerce_Conditional; use Yoast\WP\SEO\Integrations\Academy_Integration; use Yoast\WP\SEO\Integrations\Settings_Integration; use Yoast\WP\SEO\Integrations\Support_Integration; -use Yoast\WP\SEO\Conditionals\WooCommerce_Conditional; +use Yoast\WP\SEO\Promotions\Application\Promotion_Manager; /** * Class WPSEO_Admin_Pages. @@ -42,11 +44,13 @@ class WPSEO_Admin_Pages { /** * Make sure the needed scripts are loaded for admin pages. + * + * @return void */ public function init() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. $page = isset( $_GET['page'] ) && is_string( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; - if ( \in_array( $page, [ Settings_Integration::PAGE, Academy_Integration::PAGE, Support_Integration::PAGE ], true ) ) { + if ( in_array( $page, [ Settings_Integration::PAGE, Academy_Integration::PAGE, Support_Integration::PAGE ], true ) ) { // Bail, this is managed in the applicable integration. return; } @@ -57,6 +61,8 @@ class WPSEO_Admin_Pages { /** * Loads the required styles for the config page. + * + * @return void */ public function config_page_styles() { wp_enqueue_style( 'dashboard' ); @@ -75,27 +81,29 @@ class WPSEO_Admin_Pages { /** * Loads the required scripts for the config page. + * + * @return void */ public function config_page_scripts() { $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 ); + $alert_dismissal_action = YoastSEO()->classes->get( Alert_Dismissal_Action::class ); $dismissed_alerts = $alert_dismissal_action->all_dismissed(); $woocommerce_conditional = new WooCommerce_Conditional(); $script_data = [ - 'userLanguageCode' => WPSEO_Language_Utils::get_language( \get_user_locale() ), + 'userLanguageCode' => WPSEO_Language_Utils::get_language( get_user_locale() ), 'dismissedAlerts' => $dismissed_alerts, 'isRtl' => is_rtl(), 'isPremium' => YoastSEO()->helpers->product->is_premium(), 'isWooCommerceActive' => $woocommerce_conditional->is_met(), - 'currentPromotions' => YoastSEO()->classes->get( Yoast\WP\SEO\Promotions\Application\Promotion_Manager::class )->get_current_promotions(), + 'currentPromotions' => YoastSEO()->classes->get( Promotion_Manager::class )->get_current_promotions(), 'webinarIntroSettingsUrl' => WPSEO_Shortlinker::get( 'https://yoa.st/webinar-intro-settings' ), 'webinarIntroFirstTimeConfigUrl' => $this->get_webinar_shortlink(), 'linkParams' => WPSEO_Shortlinker::get_query_params(), - 'pluginUrl' => \plugins_url( '', \WPSEO_FILE ), + 'pluginUrl' => plugins_url( '', WPSEO_FILE ), ]; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. @@ -145,6 +153,8 @@ class WPSEO_Admin_Pages { /** * Enqueues and handles all the tool dependencies. + * + * @return void */ private function enqueue_tools_scripts() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-customizer.php b/wp/wp-content/plugins/wordpress-seo/admin/class-customizer.php index 5771e466..bc6b9e8c 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-customizer.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-customizer.php @@ -59,6 +59,8 @@ class WPSEO_Customizer { * Function to support WordPress Customizer. * * @param WP_Customize_Manager $wp_customize Manager class instance. + * + * @return void */ public function wpseo_customize_register( $wp_customize ) { if ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) { @@ -79,6 +81,8 @@ class WPSEO_Customizer { /** * Add the breadcrumbs section to the customizer. + * + * @return void */ private function breadcrumbs_section() { $section_args = [ @@ -102,6 +106,8 @@ class WPSEO_Customizer { /** * Adds the breadcrumbs show blog checkbox. + * + * @return void */ private function breadcrumbs_blog_show_setting() { $index = 'breadcrumbs-display-blog-page'; @@ -125,6 +131,8 @@ class WPSEO_Customizer { /** * Adds the breadcrumbs separator text field. + * + * @return void */ private function breadcrumbs_separator_setting() { $index = 'breadcrumbs-sep'; @@ -138,6 +146,8 @@ class WPSEO_Customizer { /** * Adds the breadcrumbs home anchor text field. + * + * @return void */ private function breadcrumbs_home_setting() { $index = 'breadcrumbs-home'; @@ -150,6 +160,8 @@ class WPSEO_Customizer { /** * Adds the breadcrumbs prefix text field. + * + * @return void */ private function breadcrumbs_prefix_setting() { $index = 'breadcrumbs-prefix'; @@ -162,6 +174,8 @@ class WPSEO_Customizer { /** * Adds the breadcrumbs archive prefix text field. + * + * @return void */ private function breadcrumbs_archiveprefix_setting() { $index = 'breadcrumbs-archiveprefix'; @@ -174,6 +188,8 @@ class WPSEO_Customizer { /** * Adds the breadcrumbs search prefix text field. + * + * @return void */ private function breadcrumbs_searchprefix_setting() { $index = 'breadcrumbs-searchprefix'; @@ -186,6 +202,8 @@ class WPSEO_Customizer { /** * Adds the breadcrumb 404 prefix text field. + * + * @return void */ private function breadcrumbs_404_setting() { $index = 'breadcrumbs-404crumb'; @@ -206,6 +224,8 @@ class WPSEO_Customizer { * Will default to 'wpseo-' . $index. * @param array $custom_settings Optional. Customizer setting arguments. * Only those different from the default need to be passed. + * + * @return void */ private function add_setting_and_control( $index, $control_args, $id = null, $custom_settings = [] ) { $setting = sprintf( $this->setting_template, $index ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php b/wp/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php index c16847eb..89ec64d3 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-database-proxy.php @@ -45,6 +45,13 @@ class WPSEO_Database_Proxy { */ protected $database; + /** + * Holds the table prefix. + * + * @var string + */ + protected $table_prefix; + /** * Sets the class attributes and registers the table. * @@ -120,7 +127,7 @@ class WPSEO_Database_Proxy { * * @return false|int False when the upsert request is invalid, int on number of rows changed. */ - public function upsert( array $data, array $where = null, $format = null, $where_format = null ) { + 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' ); } @@ -226,6 +233,8 @@ class WPSEO_Database_Proxy { /** * Executed before a query will be ran. + * + * @return void */ protected function pre_execution() { if ( $this->suppress_errors ) { @@ -235,6 +244,8 @@ class WPSEO_Database_Proxy { /** * Executed after a query has been ran. + * + * @return void */ protected function post_execution() { if ( $this->suppress_errors ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-export.php b/wp/wp-content/plugins/wordpress-seo/admin/class-export.php index 0eaa8e46..6e769b04 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-export.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-export.php @@ -17,7 +17,7 @@ class WPSEO_Export { * * @var string */ - const NONCE_ACTION = 'wpseo_export'; + public const NONCE_ACTION = 'wpseo_export'; /** * Holds the export data. @@ -35,6 +35,8 @@ class WPSEO_Export { /** * Handles the export request. + * + * @return void */ public function export() { check_admin_referer( self::NONCE_ACTION ); @@ -44,6 +46,8 @@ class WPSEO_Export { /** * Outputs the export. + * + * @return void */ public function output() { if ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) { @@ -71,6 +75,8 @@ class WPSEO_Export { /** * Exports the current site's WP SEO settings. + * + * @return void */ private function export_settings() { $this->export_header(); @@ -82,6 +88,8 @@ class WPSEO_Export { /** * Writes the header of the export. + * + * @return void */ private function export_header() { $header = sprintf( @@ -98,6 +106,8 @@ class WPSEO_Export { * * @param string $line Line string. * @param bool $newline_first Boolean flag whether to prepend with new line. + * + * @return void */ private function write_line( $line, $newline_first = false ) { if ( $newline_first ) { @@ -110,6 +120,8 @@ class WPSEO_Export { * Writes an entire option group to the export. * * @param string $opt_group Option group name. + * + * @return void */ private function write_opt_group( $opt_group ) { @@ -125,7 +137,7 @@ class WPSEO_Export { if ( is_array( $elem ) ) { $count = count( $elem ); for ( $i = 0; $i < $count; $i++ ) { - $elem_check = isset( $elem[ $i ] ) ? $elem[ $i ] : null; + $elem_check = ( $elem[ $i ] ?? null ); $this->write_setting( $key . '[]', $elem_check ); } } @@ -140,6 +152,8 @@ class WPSEO_Export { * * @param string $key Key string. * @param string $val Value string. + * + * @return void */ private function write_setting( $key, $val ) { if ( is_string( $val ) ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-gutenberg-compatibility.php b/wp/wp-content/plugins/wordpress-seo/admin/class-gutenberg-compatibility.php index fc1f6f93..84d99427 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-gutenberg-compatibility.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-gutenberg-compatibility.php @@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility { * * @var string */ - const CURRENT_RELEASE = '17.4.0'; + public const CURRENT_RELEASE = '17.5.0'; /** * The minimally supported version of Gutenberg by the plugin. * * @var string */ - const MINIMUM_SUPPORTED = '17.4.0'; + public const MINIMUM_SUPPORTED = '17.5.0'; /** * Holds the current version. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php b/wp/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php index 1f348cee..7b2108fb 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-meta-columns.php @@ -66,6 +66,8 @@ class WPSEO_Meta_Columns { /** * Sets up up the hooks. + * + * @return void */ public function setup_hooks() { $this->set_post_type_hooks(); @@ -97,19 +99,19 @@ class WPSEO_Meta_Columns { $added_columns = []; if ( $this->analysis_seo->is_enabled() ) { - $added_columns['wpseo-score'] = '' . - __( 'SEO score', 'wordpress-seo' ) . - ''; + $added_columns['wpseo-score'] = '' + . __( 'SEO score', 'wordpress-seo' ) + . ''; } if ( $this->analysis_readability->is_enabled() ) { - $added_columns['wpseo-score-readability'] = '' . - __( 'Readability score', 'wordpress-seo' ) . - ''; + $added_columns['wpseo-score-readability'] = '' + . __( 'Readability score', 'wordpress-seo' ) + . ''; } $added_columns['wpseo-title'] = __( 'SEO Title', 'wordpress-seo' ); @@ -127,6 +129,8 @@ class WPSEO_Meta_Columns { * * @param string $column_name Column to display the content for. * @param int $post_id Post to display the column content for. + * + * @return void */ public function column_content( $column_name, $post_id ) { if ( $this->display_metabox() === false ) { @@ -240,6 +244,8 @@ class WPSEO_Meta_Columns { /** * Adds a dropdown that allows filtering on the posts SEO Quality. + * + * @return void */ public function posts_filter_dropdown() { if ( ! $this->can_display_filter() ) { @@ -412,17 +418,16 @@ class WPSEO_Meta_Columns { * * @internal * - * @api array $keyword_filter The current keyword filter. - * - * @param array $keyphrase The keyphrase used in the filter. + * @param array $keyphrase The keyphrase used in the filter. + * @param array $keyword_filter The current keyword filter. */ - $keyphrase_filter = \apply_filters( + $keyphrase_filter = apply_filters( 'wpseo_change_keyphrase_filter_in_request', $this->get_keyword_filter( $current_keyword_filter ), $current_keyword_filter ); - if ( \is_array( $keyphrase_filter ) ) { + if ( is_array( $keyphrase_filter ) ) { $active_filters = array_merge( $active_filters, [ $keyphrase_filter ] @@ -437,7 +442,7 @@ class WPSEO_Meta_Columns { * * @param array $active_filters The current applicable filters. */ - return \apply_filters( 'wpseo_change_applicable_filters', $active_filters ); + return apply_filters( 'wpseo_change_applicable_filters', $active_filters ); } /** @@ -463,7 +468,7 @@ class WPSEO_Meta_Columns { * @param array $order_by The current order by. * @param string $order_by_column The current order by column. */ - $order_by = \apply_filters( 'wpseo_change_order_by', $order_by, $order_by_column ); + $order_by = apply_filters( 'wpseo_change_order_by', $order_by, $order_by_column ); $vars = array_merge( $vars, $order_by ); } @@ -767,6 +772,8 @@ class WPSEO_Meta_Columns { /** * Sets up the hooks for the post_types. + * + * @return void */ private function set_post_type_hooks() { $post_types = WPSEO_Post_Type::get_accessible_post_types(); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php b/wp/wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php index 2614aff9..53659c12 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php @@ -18,14 +18,14 @@ class WPSEO_MyYoast_Proxy implements WPSEO_WordPress_Integration { * * @var string */ - const PAGE_IDENTIFIER = 'wpseo_myyoast_proxy'; + public const PAGE_IDENTIFIER = 'wpseo_myyoast_proxy'; /** * The cache control's max age. Used in the header of a successful proxy response. * * @var int */ - const CACHE_CONTROL_MAX_AGE = DAY_IN_SECONDS; + public const CACHE_CONTROL_MAX_AGE = DAY_IN_SECONDS; /** * Registers the hooks when the user is on the right page. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php b/wp/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php index 2b0ff623..5a54266f 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-option-tabs-formatter.php @@ -29,6 +29,8 @@ class WPSEO_Option_Tabs_Formatter { * Outputs the option tabs. * * @param WPSEO_Option_Tabs $option_tabs Option Tabs to get tabs from. + * + * @return void */ public function run( WPSEO_Option_Tabs $option_tabs ) { @@ -66,10 +68,9 @@ class WPSEO_Option_Tabs_Formatter { * * @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. + * @param string|null $tab_contents 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 ) ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php b/wp/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php index 8e5a87d1..fb0c4512 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-option-tabs.php @@ -114,6 +114,8 @@ class WPSEO_Option_Tabs { * Display the tabs. * * @param Yoast_Form $yform Yoast Form needed in the views. + * + * @return void */ public function display( Yoast_Form $yform ) { $formatter = new WPSEO_Option_Tabs_Formatter(); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php b/wp/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php index 9e70dfe7..300eaadc 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-plugin-availability.php @@ -19,6 +19,8 @@ class WPSEO_Plugin_Availability { /** * Registers the plugins so we can access them. + * + * @return void */ public function register() { $this->register_yoast_plugins(); @@ -27,6 +29,8 @@ class WPSEO_Plugin_Availability { /** * Registers all the available Yoast SEO plugins. + * + * @return void */ protected function register_yoast_plugins() { $this->plugins = [ @@ -97,6 +101,8 @@ class WPSEO_Plugin_Availability { /** * Sets certain plugin properties based on WordPress' status. + * + * @return void */ protected function register_yoast_plugins_status() { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php b/wp/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php index 3a46a7dc..76658075 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-plugin-conflict.php @@ -20,7 +20,7 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict { * * NOTE: when changing this array, be sure to update the array in Conflicting_Plugins_Service too. * - * @var array + * @var array> */ protected $plugins = [ // The plugin which are writing OG metadata. @@ -37,7 +37,7 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict { * * @return Yoast_Plugin_Conflict */ - public static function get_instance( $class_name = __CLASS__ ) { + public static function get_instance( $class_name = self::class ) { return parent::get_instance( $class_name ); } @@ -47,6 +47,8 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict { * If the activated plugin is conflicting with ours a notice will be shown. * * @param string|bool $plugin Optional plugin basename to check. + * + * @return void */ public static function hook_check_for_plugin_conflicts( $plugin = false ) { // The instance of the plugin. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-premium-upsell-admin-block.php b/wp/wp-content/plugins/wordpress-seo/admin/class-premium-upsell-admin-block.php index ac0229f5..143d08be 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-premium-upsell-admin-block.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-premium-upsell-admin-block.php @@ -97,10 +97,10 @@ class WPSEO_Premium_Upsell_Admin_Block { $class = $this->get_html_class(); /* translators: %s expands to Yoast SEO Premium */ - $button_text = YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ? \esc_html__( 'Claim your 30% off now!', 'wordpress-seo' ) : sprintf( esc_html__( 'Explore %s now!', 'wordpress-seo' ), 'Yoast SEO Premium' ); + $button_text = YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ? esc_html__( 'Claim your 30% off now!', 'wordpress-seo' ) : sprintf( esc_html__( 'Explore %s now!', 'wordpress-seo' ), 'Yoast SEO Premium' ); /* translators: Hidden accessibility text. */ - $button_text .= '' . esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' ) . '' . - ''; + $button_text .= '' . esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' ) . '' + . ''; $upgrade_button = sprintf( '%3$s', @@ -112,20 +112,20 @@ class WPSEO_Premium_Upsell_Admin_Block { echo '
'; if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) { - $bf_label = \esc_html__( 'BLACK FRIDAY', 'wordpress-seo' ); - $sale_label = \esc_html__( '30% OFF', 'wordpress-seo' ); + $bf_label = esc_html__( 'BLACK FRIDAY', 'wordpress-seo' ); + $sale_label = esc_html__( '30% OFF', 'wordpress-seo' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Already escaped above. echo "
$bf_label $sale_label
"; } echo '
'; - echo '

' . - sprintf( + echo '

' + . sprintf( /* translators: %s expands to Yoast SEO Premium */ esc_html__( 'Upgrade to %s', 'wordpress-seo' ), 'Yoast SEO Premium' - ) . - '

'; + ) + . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Correctly escaped in $this->get_argument_html() method. echo '
    ' . $arguments_html . '
'; diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-primary-term-admin.php b/wp/wp-content/plugins/wordpress-seo/admin/class-primary-term-admin.php index 3ec671c9..85c0c888 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-primary-term-admin.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-primary-term-admin.php @@ -12,6 +12,8 @@ class WPSEO_Primary_Term_Admin implements WPSEO_WordPress_Integration { /** * Constructor. + * + * @return void */ public function register_hooks() { add_filter( 'wpseo_content_meta_section_content', [ $this, 'add_input_fields' ] ); @@ -94,6 +96,8 @@ class WPSEO_Primary_Term_Admin implements WPSEO_WordPress_Integration { /** * Adds primary term templates. + * + * @return void */ public function wp_footer() { $taxonomies = $this->get_primary_term_taxonomies(); @@ -173,6 +177,8 @@ class WPSEO_Primary_Term_Admin implements WPSEO_WordPress_Integration { /** * Includes templates file. + * + * @return void */ protected function include_js_templates() { include_once WPSEO_PATH . 'admin/views/js-templates-primary-term.php'; @@ -193,8 +199,7 @@ class WPSEO_Primary_Term_Admin implements WPSEO_WordPress_Integration { /** * Filters which taxonomies for which the user can choose the primary term. * - * @api array $taxonomies An array of taxonomy objects that are primary_term enabled. - * + * @param array $taxonomies An array of taxonomy objects that are primary_term enabled. * @param string $post_type The post type for which to filter the taxonomies. * @param array $all_taxonomies All taxonomies for this post types, even ones that don't have primary term * enabled. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-product-upsell-notice.php b/wp/wp-content/plugins/wordpress-seo/admin/class-product-upsell-notice.php index 97092b95..e5149c17 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-product-upsell-notice.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-product-upsell-notice.php @@ -17,14 +17,14 @@ class WPSEO_Product_Upsell_Notice { * * @var string */ - const USER_META_DISMISSED = 'wpseo-remove-upsell-notice'; + public const USER_META_DISMISSED = 'wpseo-remove-upsell-notice'; /** * Holds the option name. * * @var string */ - const OPTION_NAME = 'wpseo'; + public const OPTION_NAME = 'wpseo'; /** * Holds the options. @@ -42,6 +42,8 @@ class WPSEO_Product_Upsell_Notice { /** * Checks if the notice should be added or removed. + * + * @return void */ public function initialize() { $this->remove_notification(); @@ -49,6 +51,8 @@ class WPSEO_Product_Upsell_Notice { /** * Sets the upgrade notice. + * + * @return void */ public function set_upgrade_notice() { @@ -62,9 +66,11 @@ class WPSEO_Product_Upsell_Notice { /** * Listener for the upsell notice. + * + * @return void */ public function dismiss_notice_listener() { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are validating a nonce here. + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are validating a nonce here. if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'dismiss-5star-upsell' ) ) { return; } @@ -102,6 +108,8 @@ class WPSEO_Product_Upsell_Notice { /** * Sets the first activated on. + * + * @return void */ protected function set_first_activated_on() { $this->options['first_activated_on'] = strtotime( '-2weeks' ); @@ -111,6 +119,8 @@ class WPSEO_Product_Upsell_Notice { /** * Adds a notification to the notification center. + * + * @return void */ protected function add_notification() { $notification_center = Yoast_Notification_Center::get(); @@ -119,6 +129,8 @@ class WPSEO_Product_Upsell_Notice { /** * Removes a notification to the notification center. + * + * @return void */ protected function remove_notification() { $notification_center = Yoast_Notification_Center::get(); @@ -192,6 +204,8 @@ class WPSEO_Product_Upsell_Notice { /** * Dismisses the notice. + * + * @return void */ protected function dismiss_notice() { update_user_meta( get_current_user_id(), self::USER_META_DISMISSED, true ); @@ -208,6 +222,8 @@ class WPSEO_Product_Upsell_Notice { /** * Saves the options to the database. + * + * @return void */ protected function save_options() { update_option( self::OPTION_NAME, $this->options ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-remote-request.php b/wp/wp-content/plugins/wordpress-seo/admin/class-remote-request.php index 19d57a88..e54757a7 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-remote-request.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-remote-request.php @@ -15,14 +15,14 @@ class WPSEO_Remote_Request { * * @var string */ - const METHOD_POST = 'post'; + public const METHOD_POST = 'post'; /** * Holds the get method. * * @var string */ - const METHOD_GET = 'get'; + public const METHOD_GET = 'get'; /** * Holds the endpoint to send the request to. @@ -70,6 +70,8 @@ class WPSEO_Remote_Request { * Sets the request body. * * @param mixed $body The body to set. + * + * @return void */ public function set_body( $body ) { $this->args['body'] = $body; diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-schema-person-upgrade-notification.php b/wp/wp-content/plugins/wordpress-seo/admin/class-schema-person-upgrade-notification.php index 397b3b86..c2332c4e 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-schema-person-upgrade-notification.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-schema-person-upgrade-notification.php @@ -22,6 +22,8 @@ class WPSEO_Schema_Person_Upgrade_Notification implements WPSEO_WordPress_Integr /** * Handles if the notification should be added or removed. + * + * @return void */ public function handle_notification() { $company_or_person_user_id = WPSEO_Options::get( 'company_or_person_user_id', false ); @@ -35,6 +37,8 @@ class WPSEO_Schema_Person_Upgrade_Notification implements WPSEO_WordPress_Integr /** * Adds a notification to the notification center. + * + * @return void */ protected function add_notification() { $notification_center = Yoast_Notification_Center::get(); @@ -43,6 +47,8 @@ class WPSEO_Schema_Person_Upgrade_Notification implements WPSEO_WordPress_Integr /** * Removes a notification to the notification center. + * + * @return void */ protected function remove_notification() { $notification_center = Yoast_Notification_Center::get(); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-wincher-dashboard-widget.php b/wp/wp-content/plugins/wordpress-seo/admin/class-wincher-dashboard-widget.php index 5907162c..5f9c793b 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-wincher-dashboard-widget.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-wincher-dashboard-widget.php @@ -26,6 +26,8 @@ class Wincher_Dashboard_Widget implements WPSEO_WordPress_Integration { /** * Register WordPress hooks. + * + * @return void */ public function register_hooks() { add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_wincher_dashboard_assets' ] ); @@ -45,6 +47,8 @@ class Wincher_Dashboard_Widget implements WPSEO_WordPress_Integration { /** * Adds the Wincher dashboard widget to WordPress. + * + * @return void */ public function add_wincher_dashboard_widget() { add_filter( 'postbox_classes_dashboard_wpseo-wincher-dashboard-overview', [ $this, 'wpseo_wincher_dashboard_overview_class' ] ); @@ -70,6 +74,8 @@ class Wincher_Dashboard_Widget implements WPSEO_WordPress_Integration { /** * Displays the Wincher dashboard widget. + * + * @return void */ public function display_wincher_dashboard_widget() { echo '
'; @@ -77,6 +83,8 @@ class Wincher_Dashboard_Widget implements WPSEO_WordPress_Integration { /** * Enqueues assets for the dashboard if the current page is the dashboard. + * + * @return void */ public function enqueue_wincher_dashboard_assets() { if ( ! $this->is_dashboard_screen() ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-columns.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-columns.php index 5651c17e..989f87b8 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-columns.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-columns.php @@ -12,6 +12,8 @@ class WPSEO_Yoast_Columns implements WPSEO_WordPress_Integration { /** * Registers all hooks to WordPress. + * + * @return void */ public function register_hooks() { add_action( 'load-edit.php', [ $this, 'add_help_tab' ] ); @@ -19,6 +21,8 @@ class WPSEO_Yoast_Columns implements WPSEO_WordPress_Integration { /** * Adds the help tab to the help center for current screen. + * + * @return void */ public function add_help_tab() { $link_columns_present = $this->display_links(); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-dashboard-widget.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-dashboard-widget.php index 7f73d6ac..7b07fd99 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-dashboard-widget.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-dashboard-widget.php @@ -15,7 +15,7 @@ class Yoast_Dashboard_Widget implements WPSEO_WordPress_Integration { * * @var string */ - const CACHE_TRANSIENT_KEY = 'wpseo-dashboard-totals'; + public const CACHE_TRANSIENT_KEY = 'wpseo-dashboard-totals'; /** * Holds an instance of the admin asset manager. @@ -36,7 +36,7 @@ class Yoast_Dashboard_Widget implements WPSEO_WordPress_Integration { * * @param WPSEO_Statistics|null $statistics WPSEO_Statistics instance. */ - public function __construct( WPSEO_Statistics $statistics = null ) { + public function __construct( ?WPSEO_Statistics $statistics = null ) { if ( $statistics === null ) { $statistics = new WPSEO_Statistics(); } @@ -47,6 +47,8 @@ class Yoast_Dashboard_Widget implements WPSEO_WordPress_Integration { /** * Register WordPress hooks. + * + * @return void */ public function register_hooks() { add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_dashboard_assets' ] ); @@ -66,6 +68,8 @@ class Yoast_Dashboard_Widget implements WPSEO_WordPress_Integration { /** * Adds dashboard widget to WordPress. + * + * @return void */ public function add_dashboard_widget() { add_filter( 'postbox_classes_dashboard_wpseo-dashboard-overview', [ $this, 'wpseo_dashboard_overview_class' ] ); @@ -91,6 +95,8 @@ class Yoast_Dashboard_Widget implements WPSEO_WordPress_Integration { /** * Displays the dashboard widget. + * + * @return void */ public function display_dashboard_widget() { echo '
'; @@ -98,6 +104,8 @@ class Yoast_Dashboard_Widget implements WPSEO_WordPress_Integration { /** * Enqueues assets for the dashboard if the current page is the dashboard. + * + * @return void */ public function enqueue_dashboard_assets() { if ( ! $this->is_dashboard_screen() ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-form.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-form.php index 970331dc..a4ad63f8 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-form.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-form.php @@ -63,6 +63,8 @@ class Yoast_Form { * @param string $option The short name of the option to use for the current page. * @param bool $contains_files Whether the form should allow for file uploads. * @param bool $option_long_name Group name of the option. + * + * @return void */ public function admin_header( $form = true, $option = 'wpseo', $contains_files = false, $option_long_name = false ) { if ( ! $option_long_name ) { @@ -97,12 +99,12 @@ class Yoast_Form { $hidden_fields_cb = 'settings_fields'; } - echo '
'; + echo ''; call_user_func( $hidden_fields_cb, $option_long_name ); } $this->set_option( $option ); @@ -114,6 +116,8 @@ class Yoast_Form { * @since 2.0 * * @param string $option_name Option key. + * + * @return void */ public function set_option( $option_name ) { $this->option_name = $option_name; @@ -131,6 +135,8 @@ class Yoast_Form { * * @param bool $submit Whether or not a submit button and form end tag should be shown. * @param bool $show_sidebar Whether or not to show the banner sidebar - used by premium plugins to disable it. + * + * @return void */ public function admin_footer( $submit = true, $show_sidebar = true ) { if ( $submit ) { @@ -182,6 +188,8 @@ class Yoast_Form { * Generates the sidebar for admin pages. * * @since 2.0 + * + * @return void */ public function admin_sidebar() { // No banners in Premium. @@ -202,6 +210,8 @@ class Yoast_Form { * * @param string $text Label text string, which can contain escaped html. * @param array $attr HTML attributes set. + * + * @return void */ public function label( $text, $attr ) { $defaults = [ @@ -231,6 +241,8 @@ class Yoast_Form { * * @param string $text Legend text string. * @param array $attr HTML attributes set. + * + * @return void */ public function legend( $text, $attr ) { $defaults = [ @@ -253,6 +265,8 @@ class Yoast_Form { * @param string $label The label to show for the variable. * @param bool $label_left Whether the label should be left (true) or right (false). * @param array $attr Extra attributes to add to the checkbox. + * + * @return void */ public function checkbox( $variable, $label, $label_left = false, $attr = [] ) { $val = $this->get_field_value( $variable, false ); @@ -294,6 +308,8 @@ class Yoast_Form { * @param string $variable The variables within the option to create the checkbox list for. * @param string $labels The labels to show for the variable. * @param array $attr Extra attributes to add to the checkbox list. + * + * @return void */ public function checkbox_list( $variable, $labels, $attr = [] ) { $defaults = [ @@ -335,6 +351,8 @@ class Yoast_Form { * @param bool $strong Whether the visual label is displayed in strong text. Default is false. * Starting from Yoast SEO 16.5, the visual label is forced to bold via CSS. * @param array $attr Extra attributes to add to the light switch. + * + * @return void */ public function light_switch( $variable, $label, $buttons = [], $reverse = true, $help = '', $strong = false, $attr = [] ) { $val = $this->get_field_value( $variable, false ); @@ -375,6 +393,8 @@ class Yoast_Form { * @param string $variable The variable within the option to create the text input field for. * @param string $label The label to show for the variable. * @param array|string $attr Extra attributes to add to the input field. Can be class, disabled, autocomplete. + * + * @return void */ public function textinput( $variable, $label, $attr = [] ) { $type = 'text'; @@ -424,6 +444,8 @@ class Yoast_Form { * @param string $variable The variable within the option to create the text input field for. * @param string $label The label to show for the variable. * @param array|string $attr Extra attributes to add to the input field. Can be class, disabled, autocomplete. + * + * @return void */ public function number( $variable, $label, $attr = [] ) { $type = 'number'; @@ -475,7 +497,7 @@ class Yoast_Form { 'disabled' => false, ]; - $attr = \wp_parse_args( $attr, $defaults ); + $attr = wp_parse_args( $attr, $defaults ); $val = $this->get_field_value( $variable, '' ); if ( isset( $attr['type'] ) && $attr['type'] === 'url' ) { @@ -508,13 +530,13 @@ class Yoast_Form { printf( '', $type, - \esc_attr( $this->option_name . '[' . $variable . ']' ), - \esc_attr( $variable ), - \esc_attr( $attr['class'] ), - isset( $attr['placeholder'] ) ? ' placeholder="' . \esc_attr( $attr['placeholder'] ) . '"' : '', - isset( $attr['autocomplete'] ) ? ' autocomplete="' . \esc_attr( $attr['autocomplete'] ) . '"' : '', + esc_attr( $this->option_name . '[' . $variable . ']' ), + esc_attr( $variable ), + esc_attr( $attr['class'] ), + isset( $attr['placeholder'] ) ? ' placeholder="' . esc_attr( $attr['placeholder'] ) . '"' : '', + isset( $attr['autocomplete'] ) ? ' autocomplete="' . esc_attr( $attr['autocomplete'] ) . '"' : '', $aria_attributes, - \esc_attr( $val ), + esc_attr( $val ), $this->get_disabled_attribute( $variable, $attr ) ); // phpcs:enable @@ -530,6 +552,8 @@ class Yoast_Form { * @param string $variable The variable within the option to create the textarea for. * @param string $label The label to show for the variable. * @param string|array $attr The CSS class or an array of attributes to assign to the textarea. + * + * @return void */ public function textarea( $variable, $label, $attr = [] ) { if ( ! is_array( $attr ) ) { @@ -569,6 +593,8 @@ class Yoast_Form { * @param string $variable The variable within the option to create the hidden input for. * @param string $id The ID of the element. * @param mixed $val Optional. The value to set in the input field. Otherwise the value from the options will be used. + * + * @return void */ public function hidden( $variable, $id = '', $val = null ) { if ( is_null( $val ) ) { @@ -598,6 +624,8 @@ class Yoast_Form { * @param bool $show_label Whether or not to show the label, if not, it will be applied as an aria-label. * @param array $attr Extra attributes to add to the select. * @param string $help Optional. Inline Help HTML that will be printed after the label. Default is empty. + * + * @return void */ public function select( $variable, $label, array $select_options, $styled = 'unstyled', $show_label = true, $attr = [], $help = '' ) { if ( empty( $select_options ) ) { @@ -658,6 +686,8 @@ class Yoast_Form { * @param string $variable The variable within the option to create the file upload field for. * @param string $label The label to show for the variable. * @param array $attr Extra attributes to add to the file upload input. + * + * @return void */ public function file_upload( $variable, $label, $attr = [] ) { $val = $this->get_field_value( $variable, '' ); @@ -701,6 +731,8 @@ class Yoast_Form { * @param string $variable Option name. * @param string $label Label message. * @param array $attr Extra attributes to add to the media input and buttons. + * + * @return void */ public function media_input( $variable, $label, $attr = [] ) { $val = $this->get_field_value( $variable, '' ); @@ -771,6 +803,8 @@ class Yoast_Form { * @param string $legend Optional. The legend to show for the field set, if any. * @param array $legend_attr Optional. The attributes for the legend, if any. * @param array $attr Extra attributes to add to the radio button. + * + * @return void */ public function radio( $variable, $values, $legend = '', $legend_attr = [], $attr = [] ) { if ( ! is_array( $values ) || $values === [] ) { @@ -805,8 +839,8 @@ class Yoast_Form { $aria_label = ''; if ( is_array( $value ) ) { - $label = isset( $value['label'] ) ? $value['label'] : ''; - $aria_label = isset( $value['aria_label'] ) ? $value['aria_label'] : ''; + $label = ( $value['label'] ?? '' ); + $aria_label = ( $value['aria_label'] ?? '' ); } $key_esc = esc_attr( $key ); @@ -839,6 +873,8 @@ class Yoast_Form { * @param string $label The visual label for the radio buttons group, used as the fieldset legend. * @param string $help Inline Help that will be printed out before the visible toggles text. * @param array $attr Extra attributes to add to the toggle switch. + * + * @return void */ public function toggle_switch( $variable, $values, $label, $help = '', $attr = [] ) { if ( ! is_array( $values ) || $values === [] ) { @@ -909,12 +945,12 @@ class Yoast_Form { $upsell_button = ''; if ( $has_premium_upsell ) { - $upsell_button = '' . - esc_html__( 'Unlock with Premium!', 'wordpress-seo' ) . + $upsell_button = '' + . esc_html__( 'Unlock with Premium!', 'wordpress-seo' ) /* translators: Hidden accessibility text. */ - '' . esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' ) . '' . - ''; + . '' . esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' ) . '' + . ''; } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- All variable output is escaped above. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-input-validation.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-input-validation.php index 3d26623c..573840e6 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-input-validation.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-input-validation.php @@ -99,6 +99,8 @@ class Yoast_Input_Validation { * * @param array $descriptions An associative array of error descriptions. * For each entry, the key must be the setting variable. + * + * @return void */ public static function set_error_descriptions( $descriptions = [] ) { $defaults = [ diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-network-admin.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-network-admin.php index 75e4be72..01f8f2f3 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-network-admin.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-network-admin.php @@ -15,14 +15,14 @@ class Yoast_Network_Admin implements WPSEO_WordPress_AJAX_Integration, WPSEO_Wor * * @var string */ - const UPDATE_OPTIONS_ACTION = 'yoast_handle_network_options'; + public const UPDATE_OPTIONS_ACTION = 'yoast_handle_network_options'; /** * Action identifier for restoring a site. * * @var string */ - const RESTORE_SITE_ACTION = 'yoast_restore_site'; + public const RESTORE_SITE_ACTION = 'yoast_restore_site'; /** * Gets the available sites as choices, e.g. for a dropdown. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php index 404e00e3..fcbc734d 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notification-center.php @@ -17,19 +17,19 @@ class Yoast_Notification_Center { * * @var string */ - const STORAGE_KEY = 'yoast_notifications'; + public const STORAGE_KEY = 'yoast_notifications'; /** * The singleton instance of this object. * - * @var \Yoast_Notification_Center + * @var Yoast_Notification_Center */ private static $instance = null; /** * Holds the notifications. * - * @var \Yoast_Notification[][] + * @var Yoast_Notification[][] */ private $notifications = []; @@ -99,6 +99,8 @@ class Yoast_Notification_Center { /** * Dismiss a notification. + * + * @return void */ public static function ajax_dismiss_notification() { $notification_center = self::get(); @@ -304,6 +306,8 @@ class Yoast_Notification_Center { * Add notification to the cookie. * * @param Yoast_Notification $notification Notification object instance. + * + * @return void */ public function add_notification( Yoast_Notification $notification ) { @@ -411,6 +415,8 @@ class Yoast_Notification_Center { * * @param Yoast_Notification $notification Notification to remove. * @param bool $resolve Resolve as fixed. + * + * @return void */ public function remove_notification( Yoast_Notification $notification, $resolve = true ) { @@ -523,12 +529,14 @@ class Yoast_Notification_Center { /** * AJAX display notifications. + * + * @return void */ public function ajax_get_notifications() { $echo = false; - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form data. + // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form data. if ( isset( $_POST['version'] ) && is_string( $_POST['version'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are only comparing the variable in a condition. + // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are only comparing the variable in a condition. $echo = wp_unslash( $_POST['version'] ) === '2'; } @@ -541,6 +549,8 @@ class Yoast_Notification_Center { /** * Remove storage when the plugin is deactivated. + * + * @return void */ public function deactivate_hook() { @@ -606,7 +616,7 @@ class Yoast_Notification_Center { /** * Filter: 'yoast_notifications_before_storage' - Allows developer to filter notifications before saving them. * - * @api Yoast_Notification[] $notifications + * @param Yoast_Notification[] $notifications */ $filtered_merged_notifications = apply_filters( 'yoast_notifications_before_storage', $merged_notifications ); @@ -693,18 +703,16 @@ class Yoast_Notification_Center { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.NonceVerification.Missing -- Reason: We are not processing form information and only using this variable in a comparison. $request_method = isset( $_SERVER['REQUEST_METHOD'] ) && is_string( $_SERVER['REQUEST_METHOD'] ) ? strtoupper( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) : ''; // phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: This function does not sanitize variables. - // phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing -- Reason: This function does not verify a nonce. + // phpcs:disable WordPress.Security.NonceVerification.Recommended,WordPress.Security.NonceVerification.Missing -- Reason: This function does not verify a nonce. if ( $request_method === 'POST' ) { if ( isset( $_POST[ $key ] ) && is_string( $_POST[ $key ] ) ) { return wp_unslash( $_POST[ $key ] ); } } - else { - if ( isset( $_GET[ $key ] ) && is_string( $_GET[ $key ] ) ) { - return wp_unslash( $_GET[ $key ] ); - } + elseif ( isset( $_GET[ $key ] ) && is_string( $_GET[ $key ] ) ) { + return wp_unslash( $_GET[ $key ] ); } - // phpcs:enable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + // phpcs:enable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized return ''; } @@ -769,6 +777,8 @@ class Yoast_Notification_Center { /** * Clear local stored notifications. + * + * @return void */ private function clear_notifications() { @@ -836,7 +846,7 @@ class Yoast_Notification_Center { } if ( isset( $notification_data['message'] ) - && \is_subclass_of( $notification_data['message'], Abstract_Presenter::class, false ) + && is_subclass_of( $notification_data['message'], Abstract_Presenter::class, false ) ) { $notification_data['message'] = $notification_data['message']->present(); } @@ -899,6 +909,8 @@ class Yoast_Notification_Center { * * @param callable $callback Callback that performs the transaction. * @param array $args Arguments to pass to the callback. + * + * @return void */ private function add_transaction_to_queue( $callback, $args ) { $this->queued_transactions[] = [ $callback, $args ]; diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notification.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notification.php index 6b0182ed..3191827b 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notification.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notification.php @@ -16,35 +16,35 @@ class Yoast_Notification { * * @var string */ - const MATCH_ALL = 'all'; + public const MATCH_ALL = 'all'; /** * Type of capability check. * * @var string */ - const MATCH_ANY = 'any'; + public const MATCH_ANY = 'any'; /** * Notification type. * * @var string */ - const ERROR = 'error'; + public const ERROR = 'error'; /** * Notification type. * * @var string */ - const WARNING = 'warning'; + public const WARNING = 'warning'; /** * Notification type. * * @var string */ - const UPDATED = 'updated'; + public const UPDATED = 'updated'; /** * Options of this Notification. @@ -118,7 +118,7 @@ class Yoast_Notification { * @return WP_User The user to show this notification for. */ public function get_user() { - \_deprecated_function( __METHOD__, 'Yoast SEO 21.6' ); + _deprecated_function( __METHOD__, 'Yoast SEO 21.6' ); return null; } @@ -148,6 +148,8 @@ class Yoast_Notification { /** * Make sure the nonce is up to date. + * + * @return void */ public function refresh_nonce() { if ( $this->options['id'] ) { @@ -418,6 +420,8 @@ class Yoast_Notification { * * @param string $value Attribute value. * @param string $key Attribute name. + * + * @return void */ private function parse_attributes( &$value, $key ) { $value = sprintf( '%s="%s"', sanitize_key( $key ), esc_attr( $value ) ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notifications.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notifications.php index ba167846..c3847e01 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notifications.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-notifications.php @@ -15,7 +15,7 @@ class Yoast_Notifications { * * @var string */ - const ADMIN_PAGE = 'wpseo_dashboard'; + public const ADMIN_PAGE = 'wpseo_dashboard'; /** * Total notifications count. @@ -76,6 +76,8 @@ class Yoast_Notifications { /** * Add hooks + * + * @return void */ private function add_hooks() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. @@ -88,7 +90,7 @@ class Yoast_Notifications { } // Needed for adminbar and Notifications page. - add_action( 'admin_init', [ __CLASS__, 'collect_notifications' ], 99 ); + add_action( 'admin_init', [ self::class, 'collect_notifications' ], 99 ); // Add AJAX hooks. add_action( 'wp_ajax_yoast_dismiss_notification', [ $this, 'ajax_dismiss_notification' ] ); @@ -97,6 +99,8 @@ class Yoast_Notifications { /** * Enqueue assets. + * + * @return void */ public function enqueue_assets() { $asset_manager = new WPSEO_Admin_Asset_Manager(); @@ -106,6 +110,8 @@ class Yoast_Notifications { /** * Handle ajax request to dismiss a notification. + * + * @return void */ public function ajax_dismiss_notification() { @@ -122,6 +128,8 @@ class Yoast_Notifications { /** * Handle ajax request to restore a notification. + * + * @return void */ public function ajax_restore_notification() { @@ -140,6 +148,8 @@ class Yoast_Notifications { * Create AJAX response data. * * @param string $type Notification type. + * + * @return void */ private function output_ajax_response( $type ) { @@ -215,6 +225,8 @@ class Yoast_Notifications { /** * Collect the notifications and group them together. + * + * @return void */ public static function collect_notifications() { @@ -223,12 +235,12 @@ class Yoast_Notifications { $notifications = $notification_center->get_sorted_notifications(); self::$notification_count = count( $notifications ); - self::$errors = array_filter( $notifications, [ __CLASS__, 'filter_error_notifications' ] ); - self::$dismissed_errors = array_filter( self::$errors, [ __CLASS__, 'filter_dismissed_notifications' ] ); + self::$errors = array_filter( $notifications, [ self::class, 'filter_error_notifications' ] ); + self::$dismissed_errors = array_filter( self::$errors, [ self::class, 'filter_dismissed_notifications' ] ); self::$active_errors = array_diff( self::$errors, self::$dismissed_errors ); - self::$warnings = array_filter( $notifications, [ __CLASS__, 'filter_warning_notifications' ] ); - self::$dismissed_warnings = array_filter( self::$warnings, [ __CLASS__, 'filter_dismissed_notifications' ] ); + self::$warnings = array_filter( $notifications, [ self::class, 'filter_warning_notifications' ] ); + self::$dismissed_warnings = array_filter( self::$warnings, [ self::class, 'filter_dismissed_notifications' ] ); self::$active_warnings = array_diff( self::$warnings, self::$dismissed_warnings ); } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-plugin-conflict.php b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-plugin-conflict.php index 1bbc9125..302cd495 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-plugin-conflict.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/class-yoast-plugin-conflict.php @@ -54,7 +54,7 @@ class Yoast_Plugin_Conflict { if ( is_null( self::$instance ) ) { if ( ! is_string( $class_name ) || $class_name === '' ) { - $class_name = __CLASS__; + $class_name = self::class; } self::$instance = new $class_name(); @@ -75,7 +75,7 @@ class Yoast_Plugin_Conflict { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['action'] ) && is_string( $_GET['action'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information and only comparing the variable in a condition. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information and only comparing the variable in a condition. $action = wp_unslash( $_GET['action'] ); if ( $action === 'deactivate' ) { $this->remove_deactivated_plugin(); @@ -106,7 +106,7 @@ class Yoast_Plugin_Conflict { $sections_checked = []; } - if ( ! \in_array( $plugin_section, $sections_checked, true ) ) { + if ( ! in_array( $plugin_section, $sections_checked, true ) ) { $sections_checked[] = $plugin_section; return ( ! empty( $this->active_conflicting_plugins[ $plugin_section ] ) ); } @@ -118,6 +118,8 @@ class Yoast_Plugin_Conflict { * Checks for given $plugin_sections for conflicts. * * @param array $plugin_sections Set of sections. + * + * @return void */ public function check_plugin_conflicts( $plugin_sections ) { foreach ( $plugin_sections as $plugin_section => $readable_plugin_section ) { @@ -128,9 +130,9 @@ class Yoast_Plugin_Conflict { } // List of all active sections. - $sections = \array_keys( $plugin_sections ); + $sections = array_keys( $plugin_sections ); // List of all sections. - $all_plugin_sections = \array_keys( $this->plugins ); + $all_plugin_sections = array_keys( $this->plugins ); /* * Get all sections that are inactive. @@ -138,10 +140,10 @@ class Yoast_Plugin_Conflict { * * This happens when Sitemaps or OpenGraph implementations toggle active/disabled. */ - $inactive_sections = \array_diff( $all_plugin_sections, $sections ); + $inactive_sections = array_diff( $all_plugin_sections, $sections ); if ( ! empty( $inactive_sections ) ) { foreach ( $inactive_sections as $section ) { - \array_walk( $this->plugins[ $section ], [ $this, 'clear_error' ] ); + array_walk( $this->plugins[ $section ], [ $this, 'clear_error' ] ); } } @@ -152,10 +154,10 @@ class Yoast_Plugin_Conflict { // If there are active plugins, filter them from being cleared. if ( isset( $this->active_conflicting_plugins[ $section ] ) ) { - $inactive_plugins = \array_diff( $this->plugins[ $section ], $this->active_conflicting_plugins[ $section ] ); + $inactive_plugins = array_diff( $this->plugins[ $section ], $this->active_conflicting_plugins[ $section ] ); } - \array_walk( $inactive_plugins, [ $this, 'clear_error' ] ); + array_walk( $inactive_plugins, [ $this, 'clear_error' ] ); } } @@ -164,6 +166,8 @@ class Yoast_Plugin_Conflict { * * @param string $plugin_section Type of conflict group (such as Open Graph or sitemap). * @param string $readable_plugin_section This is the value for the translation. + * + * @return void */ protected function set_error( $plugin_section, $readable_plugin_section ) { @@ -200,6 +204,8 @@ class Yoast_Plugin_Conflict { * Clear the notification for a plugin. * * @param string $plugin_file Clear the optional notification for this plugin. + * + * @return void */ public function clear_error( $plugin_file ) { $identifier = $this->get_notification_identifier( $plugin_file ); @@ -212,6 +218,8 @@ class Yoast_Plugin_Conflict { * Loop through the $this->plugins to check if one of the plugins is active. * * This method will store the active plugins in $this->active_plugins. + * + * @return void */ protected function search_active_plugins() { foreach ( $this->plugins as $plugin_section => $plugins ) { @@ -224,6 +232,8 @@ class Yoast_Plugin_Conflict { * * @param array $plugins Set of plugins. * @param string $plugin_section Type of conflict group (such as Open Graph or sitemap). + * + * @return void */ protected function check_plugins_active( $plugins, $plugin_section ) { foreach ( $plugins as $plugin ) { @@ -241,7 +251,7 @@ class Yoast_Plugin_Conflict { * @return bool */ protected function check_plugin_is_active( $plugin ) { - return \in_array( $plugin, $this->all_active_plugins, true ); + return in_array( $plugin, $this->all_active_plugins, true ); } /** @@ -252,13 +262,15 @@ class Yoast_Plugin_Conflict { * * @param string $plugin_section Type of conflict group (such as Open Graph or sitemap). * @param string $plugin Plugin basename string. + * + * @return void */ protected function add_active_plugin( $plugin_section, $plugin ) { - if ( ! \array_key_exists( $plugin_section, $this->active_conflicting_plugins ) ) { + if ( ! array_key_exists( $plugin_section, $this->active_conflicting_plugins ) ) { $this->active_conflicting_plugins[ $plugin_section ] = []; } - if ( ! \in_array( $plugin, $this->active_conflicting_plugins[ $plugin_section ], true ) ) { + if ( ! in_array( $plugin, $this->active_conflicting_plugins[ $plugin_section ], true ) ) { $this->active_conflicting_plugins[ $plugin_section ][] = $plugin; } } @@ -274,7 +286,7 @@ class Yoast_Plugin_Conflict { */ protected function find_plugin_category( $plugin ) { foreach ( $this->plugins as $plugin_section => $plugins ) { - if ( \in_array( $plugin, $plugins, true ) ) { + if ( in_array( $plugin, $plugins, true ) ) { return $plugin_section; } } @@ -288,7 +300,7 @@ class Yoast_Plugin_Conflict { * @return string|bool Plugin name or false when no name is set. */ protected function get_plugin_name( $plugin ) { - $plugin_details = \get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); + $plugin_details = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); if ( $plugin_details['Name'] !== '' ) { return $plugin_details['Name']; @@ -299,6 +311,8 @@ class Yoast_Plugin_Conflict { /** * When being in the deactivation process the currently deactivated plugin has to be removed. + * + * @return void */ private function remove_deactivated_plugin() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: On the deactivation screen the nonce is already checked by WordPress itself. @@ -308,7 +322,7 @@ class Yoast_Plugin_Conflict { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: On the deactivation screen the nonce is already checked by WordPress itself. $deactivated_plugin = sanitize_text_field( wp_unslash( $_GET['plugin'] ) ); - $key_to_remove = \array_search( $deactivated_plugin, $this->all_active_plugins, true ); + $key_to_remove = array_search( $deactivated_plugin, $this->all_active_plugins, true ); if ( $key_to_remove !== false ) { unset( $this->all_active_plugins[ $key_to_remove ] ); @@ -323,6 +337,6 @@ class Yoast_Plugin_Conflict { * @return string */ private function get_notification_identifier( $plugin_file ) { - return \md5( $plugin_file ); + return md5( $plugin_file ); } } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-file-size.php b/wp/wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-file-size.php index 03977762..9f2bec07 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-file-size.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-file-size.php @@ -15,21 +15,21 @@ class WPSEO_Endpoint_File_Size implements WPSEO_Endpoint { * * @var string */ - const REST_NAMESPACE = 'yoast/v1'; + public const REST_NAMESPACE = 'yoast/v1'; /** * The route of the endpoint to retrieve the file size. * * @var string */ - const ENDPOINT_SINGULAR = 'file_size'; + public const ENDPOINT_SINGULAR = 'file_size'; /** * The name of the capability needed to retrieve data using the endpoints. * * @var string */ - const CAPABILITY_RETRIEVE = 'manage_options'; + public const CAPABILITY_RETRIEVE = 'manage_options'; /** * The service provider. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-statistics.php b/wp/wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-statistics.php index c744377a..392d1c13 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-statistics.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/endpoints/class-endpoint-statistics.php @@ -15,21 +15,21 @@ class WPSEO_Endpoint_Statistics implements WPSEO_Endpoint { * * @var string */ - const REST_NAMESPACE = 'yoast/v1'; + public const REST_NAMESPACE = 'yoast/v1'; /** * The route of the statistics endpoint. * * @var string */ - const ENDPOINT_RETRIEVE = 'statistics'; + public const ENDPOINT_RETRIEVE = 'statistics'; /** * The name of the capability needed to retrieve data using the endpoints. * * @var string */ - const CAPABILITY_RETRIEVE = 'read'; + public const CAPABILITY_RETRIEVE = 'read'; /** * Service to use. @@ -49,6 +49,8 @@ class WPSEO_Endpoint_Statistics implements WPSEO_Endpoint { /** * Registers the REST routes that are available on the endpoint. + * + * @return void */ public function register() { // Register fetch config. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/filters/class-abstract-post-filter.php b/wp/wp-content/plugins/wordpress-seo/admin/filters/class-abstract-post-filter.php index a63abbf3..b339a9dc 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/filters/class-abstract-post-filter.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/filters/class-abstract-post-filter.php @@ -15,7 +15,7 @@ abstract class WPSEO_Abstract_Post_Filter implements WPSEO_WordPress_Integration * * @var string */ - const FILTER_QUERY_ARG = 'yoast_filter'; + public const FILTER_QUERY_ARG = 'yoast_filter'; /** * Modify the query based on the FILTER_QUERY_ARG variable in $_GET. @@ -49,6 +49,8 @@ abstract class WPSEO_Abstract_Post_Filter implements WPSEO_WordPress_Integration /** * Registers the hooks. + * + * @return void */ public function register_hooks() { add_action( 'admin_init', [ $this, 'add_filter_links' ], 11 ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/filters/class-cornerstone-filter.php b/wp/wp-content/plugins/wordpress-seo/admin/filters/class-cornerstone-filter.php index 69e6cda4..19831289 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/filters/class-cornerstone-filter.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/filters/class-cornerstone-filter.php @@ -15,7 +15,7 @@ class WPSEO_Cornerstone_Filter extends WPSEO_Abstract_Post_Filter { * * @var string */ - const META_NAME = 'is_cornerstone'; + public const META_NAME = 'is_cornerstone'; /** * Registers the hooks. @@ -138,7 +138,7 @@ class WPSEO_Cornerstone_Filter extends WPSEO_Abstract_Post_Filter { /** * Filter: 'wpseo_cornerstone_post_types' - Filters post types to exclude the cornerstone feature for. * - * @api array - The accessible post types to filter. + * @param array $post_types The accessible post types to filter. */ $post_types = apply_filters( 'wpseo_cornerstone_post_types', parent::get_post_types() ); if ( ! is_array( $post_types ) ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-metabox-formatter.php b/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-metabox-formatter.php index d7689f45..5a27831b 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-metabox-formatter.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-metabox-formatter.php @@ -71,7 +71,7 @@ class WPSEO_Metabox_Formatter { 'keywordTab' => __( 'Keyphrase:', 'wordpress-seo' ), 'removeKeyword' => __( 'Remove keyphrase', 'wordpress-seo' ), 'contentLocale' => get_locale(), - 'userLocale' => \get_user_locale(), + 'userLocale' => get_user_locale(), 'translations' => $this->get_translations(), 'keyword_usage' => [], 'title_template' => '', @@ -231,7 +231,7 @@ class WPSEO_Metabox_Formatter { private function get_content_analysis_component_translations() { // Esc_html is not needed because React already handles HTML in the (translations of) these strings. return [ - 'locale' => \get_user_locale(), + 'locale' => get_user_locale(), 'content-analysis.errors' => __( 'Errors', 'wordpress-seo' ), 'content-analysis.problems' => __( 'Problems', 'wordpress-seo' ), 'content-analysis.improvements' => __( 'Improvements', 'wordpress-seo' ), @@ -251,7 +251,7 @@ class WPSEO_Metabox_Formatter { * @return array */ private function get_translations() { - $locale = \get_user_locale(); + $locale = get_user_locale(); $file = WPSEO_PATH . 'languages/wordpress-seo-' . $locale . '.json'; if ( file_exists( $file ) ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-post-metabox-formatter.php b/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-post-metabox-formatter.php index 3401f72e..aa4eb2f2 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-post-metabox-formatter.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-post-metabox-formatter.php @@ -91,11 +91,10 @@ class WPSEO_Post_Metabox_Formatter implements WPSEO_Metabox_Formatter_Interface /** * Filter: 'wpseo_post_edit_values' - Allows changing the values Yoast SEO uses inside the post editor. * - * @api array $values The key-value map Yoast SEO uses inside the post editor. - * - * @param WP_Post $post The post opened in the editor. + * @param array $values The key-value map Yoast SEO uses inside the post editor. + * @param WP_Post $post The post opened in the editor. */ - return \apply_filters( 'wpseo_post_edit_values', $values, $this->post ); + return apply_filters( 'wpseo_post_edit_values', $values, $this->post ); } /** @@ -295,7 +294,7 @@ class WPSEO_Post_Metabox_Formatter implements WPSEO_Metabox_Formatter_Interface * @param string $template_option_name The subname of the option in which the template you want to get is saved. * @param string $post_type The name of the post type. */ - return \apply_filters( 'wpseo_social_template_post_type', '', $template_option_name, $this->post->post_type ); + return apply_filters( 'wpseo_social_template_post_type', '', $template_option_name, $this->post->post_type ); } /** diff --git a/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-term-metabox-formatter.php b/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-term-metabox-formatter.php index 1d03a213..aa596cdc 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-term-metabox-formatter.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/formatter/class-term-metabox-formatter.php @@ -241,7 +241,7 @@ class WPSEO_Term_Metabox_Formatter implements WPSEO_Metabox_Formatter_Interface * @param string $template_option_name The subname of the option in which the template you want to get is saved. * @param string $taxonomy The name of the taxonomy. */ - return \apply_filters( 'wpseo_social_template_taxonomy', '', $template_option_name, $this->term->taxonomy ); + return apply_filters( 'wpseo_social_template_taxonomy', '', $template_option_name, $this->term->taxonomy ); } /** diff --git a/wp/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc.php b/wp/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc.php index 3e3369b3..73393dab 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/google_search_console/class-gsc.php @@ -15,7 +15,7 @@ class WPSEO_GSC { * * @var string */ - const OPTION_WPSEO_GSC = 'wpseo-gsc'; + public const OPTION_WPSEO_GSC = 'wpseo-gsc'; /** * Outputs the HTML for the redirect page. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/import/class-import-detector.php b/wp/wp-content/plugins/wordpress-seo/admin/import/class-import-detector.php index 89fc80cf..48d31cc1 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/import/class-import-detector.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/import/class-import-detector.php @@ -21,6 +21,8 @@ class WPSEO_Import_Plugins_Detector { /** * Detects whether we need to import anything. + * + * @return void */ public function detect() { foreach ( WPSEO_Plugin_Importers::get() as $importer_class ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/import/class-import-settings.php b/wp/wp-content/plugins/wordpress-seo/admin/import/class-import-settings.php index 704e72d8..3bec4c8f 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/import/class-import-settings.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/import/class-import-settings.php @@ -17,7 +17,7 @@ class WPSEO_Import_Settings { * * @var string */ - const NONCE_ACTION = 'wpseo-import-settings'; + public const NONCE_ACTION = 'wpseo-import-settings'; /** * Holds the import status instance. @@ -91,6 +91,8 @@ class WPSEO_Import_Settings { * @param string $name Name string. * @param array $option_group Option group data. * @param array $options Options data. + * + * @return void */ protected function parse_option_group( $name, $option_group, $options ) { // Make sure that the imported options are cleaned/converted on import. @@ -104,6 +106,8 @@ class WPSEO_Import_Settings { * Imports the options if found. * * @param array $options The options parsed from the provided settings. + * + * @return void */ protected function import_options( $options ) { if ( isset( $options['wpseo']['version'] ) && $options['wpseo']['version'] !== '' ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-abstract-plugin-importer.php b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-abstract-plugin-importer.php index 94741778..6f5674f2 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-abstract-plugin-importer.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-abstract-plugin-importer.php @@ -240,7 +240,7 @@ abstract class WPSEO_Plugin_Importer { */ protected function meta_keys_clone( $clone_keys ) { foreach ( $clone_keys as $clone_key ) { - $result = $this->meta_key_clone( $clone_key['old_key'], $clone_key['new_key'], isset( $clone_key['convert'] ) ? $clone_key['convert'] : [] ); + $result = $this->meta_key_clone( $clone_key['old_key'], $clone_key['new_key'], ( $clone_key['convert'] ?? [] ) ); if ( ! $result ) { return false; } @@ -250,6 +250,8 @@ abstract class WPSEO_Plugin_Importer { /** * Sets the import status to false and returns a message about why it failed. + * + * @return void */ protected function set_missing_db_rights_status() { $this->status->set_status( false ); @@ -279,6 +281,8 @@ abstract class WPSEO_Plugin_Importer { * @param string $new_key The key to save. * @param mixed $value The value to set the key to. * @param int $post_id The Post to save the meta for. + * + * @return void */ protected function maybe_save_post_meta( $new_key, $value, $post_id ) { // Big. Fat. Sigh. Mostly used for _yst_is_cornerstone, but might be useful for other hidden meta's. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-aioseo-v4.php b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-aioseo-v4.php index 464b62e9..122ce46d 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-aioseo-v4.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-aioseo-v4.php @@ -107,7 +107,7 @@ class WPSEO_Import_AIOSEO_V4 extends WPSEO_Plugin_Importer { // Now, we'll also loop through the replace_vars array, which holds the mappings between the AiOSEO variables and the Yoast variables. // We'll replace all the AiOSEO variables in the temporary table with their Yoast equivalents. foreach ( $this->replace_vars as $aioseo_variable => $yoast_variable ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: We need this query and this is done at many other places as well, for example class-import-rankmath. + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: We need this query and this is done at many other places as well, for example class-import-rankmath. $wpdb->query( $wpdb->prepare( 'UPDATE tmp_meta_table SET meta_value = REPLACE( meta_value, %s, %s )', @@ -146,7 +146,7 @@ class WPSEO_Import_AIOSEO_V4 extends WPSEO_Plugin_Importer { foreach ( $meta_values as $meta_value ) { // Find all custom field replace vars, store them in `$matches`. - \preg_match_all( + preg_match_all( "/#$aioseo_prefix-([\w-]+)/", $meta_value, $matches @@ -159,11 +159,11 @@ class WPSEO_Import_AIOSEO_V4 extends WPSEO_Plugin_Importer { $custom_fields_or_taxonomies = $matches[1]; foreach ( $custom_fields_or_taxonomies as $custom_field_or_taxonomy ) { - $unique_custom_fields_or_taxonomies[ \trim( $custom_field_or_taxonomy ) ] = 1; + $unique_custom_fields_or_taxonomies[ trim( $custom_field_or_taxonomy ) ] = 1; } } - return \array_keys( $unique_custom_fields_or_taxonomies ); + return array_keys( $unique_custom_fields_or_taxonomies ); } /** @@ -176,13 +176,15 @@ class WPSEO_Import_AIOSEO_V4 extends WPSEO_Plugin_Importer { * @param string $aioseo_prefix The AiOSEO prefix to use * (e.g. `custom-field` for custom fields or `tax_name` for custom taxonomies). * @param string $yoast_prefix The Yoast prefix to use (e.g. `cf` for custom fields). + * + * @return void */ protected function replace_custom_field_or_taxonomy_replace_vars( $unique_custom_fields_or_taxonomies, $wpdb, $aioseo_prefix, $yoast_prefix ) { foreach ( $unique_custom_fields_or_taxonomies as $unique_custom_field_or_taxonomy ) { $aioseo_variable = "#{$aioseo_prefix}-{$unique_custom_field_or_taxonomy}"; $yoast_variable = "%%{$yoast_prefix}_{$unique_custom_field_or_taxonomy}%%"; - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->query( $wpdb->prepare( 'UPDATE tmp_meta_table SET meta_value = REPLACE( meta_value, %s, %s )', @@ -193,7 +195,7 @@ class WPSEO_Import_AIOSEO_V4 extends WPSEO_Plugin_Importer { } } - // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching /** * Retrieve all the meta values from the temporary meta table that contain @@ -214,7 +216,7 @@ class WPSEO_Import_AIOSEO_V4 extends WPSEO_Plugin_Importer { ); } - // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching /** * Detects whether there is AIOSEO data to import by looking whether the AIOSEO data have been cleaned up. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-aioseo.php b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-aioseo.php index 2a11dae6..cf7ab491 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-aioseo.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-aioseo.php @@ -96,6 +96,8 @@ class WPSEO_Import_AIOSEO extends WPSEO_Plugin_Importer { * Imports the OpenGraph and Twitter settings for a single post. * * @param int $post_id Post ID. + * + * @return void */ private function import_post_opengraph( $post_id ) { $meta = get_post_meta( $post_id, '_aioseop_opengraph_settings', true ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-rankmath.php b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-rankmath.php index 9007f0fc..68e7c0c1 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-rankmath.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-rankmath.php @@ -109,6 +109,8 @@ class WPSEO_Import_RankMath extends WPSEO_Plugin_Importer { /** * RankMath stores robots meta quite differently, so we have to parse it out. + * + * @return void */ private function import_meta_robots() { global $wpdb; @@ -132,6 +134,8 @@ class WPSEO_Import_RankMath extends WPSEO_Plugin_Importer { /** * Imports some of the RankMath settings. + * + * @return void */ private function import_settings() { $settings = [ diff --git a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-wpseo.php b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-wpseo.php index f8dfe347..0d138f2b 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-wpseo.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/import/plugins/class-import-wpseo.php @@ -193,7 +193,12 @@ class WPSEO_Import_WPSEO extends WPSEO_Plugin_Importer { * @return void */ private function import_taxonomy_metas() { - $terms = get_terms( get_taxonomies(), [ 'hide_empty' => false ] ); + $terms = get_terms( + [ + 'taxonomy' => get_taxonomies(), + 'hide_empty' => false, + ] + ); $tax_meta = get_option( 'wpseo_taxonomy_meta' ); foreach ( $terms as $term ) { @@ -291,7 +296,13 @@ class WPSEO_Import_WPSEO extends WPSEO_Plugin_Importer { * @return void */ private function cleanup_term_meta() { - $terms = get_terms( get_taxonomies(), [ 'hide_empty' => false ] ); + $terms = get_terms( + [ + 'taxonomy' => get_taxonomies(), + 'hide_empty' => false, + ] + ); + foreach ( $terms as $term ) { $this->delete_taxonomy_metas( $term->taxonomy, $term->term_id ); } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/menu/class-admin-menu.php b/wp/wp-content/plugins/wordpress-seo/admin/menu/class-admin-menu.php index 53d037e3..5c5dce74 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/menu/class-admin-menu.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/menu/class-admin-menu.php @@ -22,6 +22,8 @@ class WPSEO_Admin_Menu extends WPSEO_Base_Menu { /** * Registers the menu item submenus. + * + * @return void */ public function register_settings_page() { $manage_capability = $this->get_manage_capability(); @@ -99,7 +101,7 @@ class WPSEO_Admin_Menu extends WPSEO_Base_Menu { /** * Filter: 'wpseo_submenu_pages' - Collects all submenus that need to be shown. * - * @api array $submenu_pages List with all submenu pages. + * @param array $submenu_pages List with all submenu pages. */ return (array) apply_filters( 'wpseo_submenu_pages', $submenu_pages ); } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/menu/class-menu.php b/wp/wp-content/plugins/wordpress-seo/admin/menu/class-menu.php index a15ef97a..bc3ab3e0 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/menu/class-menu.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/menu/class-menu.php @@ -17,7 +17,7 @@ class WPSEO_Menu implements WPSEO_WordPress_Integration { * * @var string */ - const PAGE_IDENTIFIER = 'wpseo_dashboard'; + public const PAGE_IDENTIFIER = 'wpseo_dashboard'; /** * List of classes that add admin functionality. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/menu/class-replacevar-editor.php b/wp/wp-content/plugins/wordpress-seo/admin/menu/class-replacevar-editor.php index 9924ee36..7f3b8201 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/menu/class-replacevar-editor.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/menu/class-replacevar-editor.php @@ -132,6 +132,8 @@ class WPSEO_Replacevar_Editor { * @param array $arguments The arguments to validate. * * @throws InvalidArgumentException Thrown when not all required arguments are present. + * + * @return void */ protected function validate_arguments( array $arguments ) { $required_arguments = [ diff --git a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-abstract-sectioned-metabox-tab.php b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-abstract-sectioned-metabox-tab.php index be32c1f6..29ec6e90 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-abstract-sectioned-metabox-tab.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-abstract-sectioned-metabox-tab.php @@ -72,6 +72,8 @@ abstract class WPSEO_Abstract_Metabox_Tab_With_Sections implements WPSEO_Metabox /** * Outputs the section link if any section has been added. + * + * @return void */ public function display_link() { if ( $this->has_sections() ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-analysis-inclusive-language.php b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-analysis-inclusive-language.php index 24abbaed..1fe2a1fd 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-analysis-inclusive-language.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-analysis-inclusive-language.php @@ -17,7 +17,7 @@ class WPSEO_Metabox_Analysis_Inclusive_Language implements WPSEO_Metabox_Analysi */ public function is_enabled() { return $this->is_globally_enabled() && $this->is_user_enabled() && $this->is_current_version_supported() - && YoastSEO()->helpers->language->has_inclusive_language_support( \WPSEO_Language_Utils::get_language( \get_locale() ) ); + && YoastSEO()->helpers->language->has_inclusive_language_support( WPSEO_Language_Utils::get_language( get_locale() ) ); } /** @@ -52,7 +52,7 @@ class WPSEO_Metabox_Analysis_Inclusive_Language implements WPSEO_Metabox_Analysi $premium_version = YoastSEO()->helpers->product->get_premium_version(); return ! $is_premium - || \version_compare( $premium_version, '19.6-RC0', '>=' ) - || \version_compare( $premium_version, '19.2', '==' ); + || version_compare( $premium_version, '19.6-RC0', '>=' ) + || version_compare( $premium_version, '19.2', '==' ); } } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-collapsibles-section.php b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-collapsibles-section.php index 3fde30a4..14e8638e 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-collapsibles-section.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-collapsibles-section.php @@ -34,6 +34,8 @@ class WPSEO_Metabox_Collapsibles_Sections extends WPSEO_Abstract_Metabox_Tab_Wit /** * Outputs the section content if any tab has been added. + * + * @return void */ public function display_content() { if ( $this->has_sections() ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-editor.php b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-editor.php index 37cc2880..4d689177 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-editor.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-editor.php @@ -14,6 +14,8 @@ class WPSEO_Metabox_Editor { * Registers hooks to WordPress. * * @codeCoverageIgnore + * + * @return void */ public function register_hooks() { // For the Classic editor. @@ -51,6 +53,8 @@ class WPSEO_Metabox_Editor { /** * Enqueues the CSS to use in the TinyMCE editor. + * + * @return void */ public function add_editor_styles() { $asset_manager = new WPSEO_Admin_Asset_Manager(); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-inclusive-language.php b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-inclusive-language.php index bd34d74f..1fddff4a 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-inclusive-language.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-inclusive-language.php @@ -19,6 +19,8 @@ class WPSEO_Metabox_Section_Inclusive_Language implements WPSEO_Metabox_Section /** * Outputs the section link. + * + * @return void */ public function display_link() { printf( @@ -31,6 +33,8 @@ class WPSEO_Metabox_Section_Inclusive_Language implements WPSEO_Metabox_Section /** * Outputs the section content. + * + * @return void */ public function display_content() { printf( diff --git a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-readability.php b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-readability.php index 9ee8f3ff..cbfea907 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-readability.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-section-readability.php @@ -19,6 +19,8 @@ class WPSEO_Metabox_Section_Readability implements WPSEO_Metabox_Section { /** * Outputs the section link. + * + * @return void */ public function display_link() { printf( @@ -31,6 +33,8 @@ class WPSEO_Metabox_Section_Readability implements WPSEO_Metabox_Section { /** * Outputs the section content. + * + * @return void */ public function display_content() { printf( diff --git a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php index 12cbfceb..b40cd48d 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php @@ -12,6 +12,7 @@ use Yoast\WP\SEO\Conditionals\WooCommerce_Conditional; use Yoast\WP\SEO\Introductions\Infrastructure\Wistia_Embed_Permission_Repository; use Yoast\WP\SEO\Presenters\Admin\Alert_Presenter; use Yoast\WP\SEO\Presenters\Admin\Meta_Fields_Presenter; +use Yoast\WP\SEO\Promotions\Application\Promotion_Manager; /** * This class generates the metabox on the edit post / page as well as contains all page analysis functionality. @@ -116,6 +117,8 @@ class WPSEO_Metabox extends WPSEO_Meta { /** * Adds an alternative metabox for internet explorer users. + * + * @return void */ public function internet_explorer_metabox() { $post_types = WPSEO_Post_Type::get_accessible_post_types(); @@ -166,6 +169,8 @@ class WPSEO_Metabox extends WPSEO_Meta { * * IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to * the main meta box definition array in the class WPSEO_Meta() as well!!!! + * + * @return void */ public static function translate_meta_boxes() { WPSEO_Meta::$meta_fields['general']['title']['title'] = __( 'SEO title', 'wordpress-seo' ); @@ -337,6 +342,8 @@ class WPSEO_Metabox extends WPSEO_Meta { /** * Outputs the meta box. + * + * @return void */ public function meta_box() { $this->render_hidden_fields(); @@ -370,7 +377,7 @@ class WPSEO_Metabox extends WPSEO_Meta { /** * Filter: 'wpseo_content_meta_section_content' - Allow filtering the metabox content before outputting. * - * @api string $post_content The metabox content string. + * @param string $post_content The metabox content string. */ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output should be escaped in the filter. echo apply_filters( 'wpseo_content_meta_section_content', '' ); @@ -632,28 +639,28 @@ class WPSEO_Metabox extends WPSEO_Meta { break; case 'upload': - $content .= ' '; - $content .= ' '; - $content .= ''; + $content .= ' '; + $content .= ' '; + $content .= ''; break; } @@ -830,6 +837,8 @@ class WPSEO_Metabox extends WPSEO_Meta { * Enqueues all the needed JS and CSS. * * @todo [JRF => whomever] Create css/metabox-mp6.css file and add it to the below allowed colors array when done. + * + * @return void */ public function enqueue() { global $pagenow; @@ -894,7 +903,7 @@ class WPSEO_Metabox extends WPSEO_Meta { ], 'shortcodes' => [ 'wpseo_shortcode_tags' => $this->get_valid_shortcode_tags(), - 'wpseo_filter_shortcodes_nonce' => \wp_create_nonce( 'wpseo-filter-shortcodes' ), + 'wpseo_filter_shortcodes_nonce' => wp_create_nonce( 'wpseo-filter-shortcodes' ), ], ]; @@ -917,28 +926,28 @@ class WPSEO_Metabox extends WPSEO_Meta { // @todo replace this translation with JavaScript translations. 'media' => [ 'choose_image' => __( 'Use Image', 'wordpress-seo' ) ], 'metabox' => $this->get_metabox_script_data(), - 'userLanguageCode' => WPSEO_Language_Utils::get_language( \get_user_locale() ), + 'userLanguageCode' => WPSEO_Language_Utils::get_language( get_user_locale() ), 'isPost' => true, 'isBlockEditor' => $is_block_editor, 'postId' => $post_id, 'postStatus' => get_post_status( $post_id ), 'postType' => get_post_type( $post_id ), - 'usedKeywordsNonce' => \wp_create_nonce( 'wpseo-keyword-usage-and-post-types' ), + 'usedKeywordsNonce' => wp_create_nonce( 'wpseo-keyword-usage-and-post-types' ), 'analysis' => [ 'plugins' => $plugins_script_data, 'worker' => $worker_script_data, ], 'dismissedAlerts' => $dismissed_alerts, - 'currentPromotions' => YoastSEO()->classes->get( Yoast\WP\SEO\Promotions\Application\Promotion_Manager::class )->get_current_promotions(), + 'currentPromotions' => YoastSEO()->classes->get( Promotion_Manager::class )->get_current_promotions(), 'webinarIntroBlockEditorUrl' => WPSEO_Shortlinker::get( 'https://yoa.st/webinar-intro-block-editor' ), - 'blackFridayBlockEditorUrl' => ( YoastSEO()->classes->get( Yoast\WP\SEO\Promotions\Application\Promotion_Manager::class )->is( 'black-friday-2023-checklist' ) ) ? WPSEO_Shortlinker::get( 'https://yoa.st/black-friday-checklist' ) : '', + 'blackFridayBlockEditorUrl' => ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-checklist' ) ) ? WPSEO_Shortlinker::get( 'https://yoa.st/black-friday-checklist' ) : '', 'isJetpackBoostActive' => ( $is_block_editor ) ? YoastSEO()->classes->get( Jetpack_Boost_Active_Conditional::class )->is_met() : false, 'isJetpackBoostNotPremium' => ( $is_block_editor ) ? YoastSEO()->classes->get( Jetpack_Boost_Not_Premium_Conditional::class )->is_met() : false, 'isWooCommerceActive' => $woocommerce_active, 'woocommerceUpsell' => get_post_type( $post_id ) === 'product' && ! $woocommerce_seo_active && $woocommerce_active, 'linkParams' => WPSEO_Shortlinker::get_query_params(), - 'pluginUrl' => \plugins_url( '', \WPSEO_FILE ), - 'wistiaEmbedPermission' => YoastSEO()->classes->get( Wistia_Embed_Permission_Repository::class )->get_value_for_user( \get_current_user_id() ), + 'pluginUrl' => plugins_url( '', WPSEO_FILE ), + 'wistiaEmbedPermission' => YoastSEO()->classes->get( Wistia_Embed_Permission_Repository::class )->get_value_for_user( get_current_user_id() ), ]; if ( post_type_supports( get_post_type(), 'thumbnail' ) ) { @@ -966,7 +975,7 @@ class WPSEO_Metabox extends WPSEO_Meta { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['post'] ) && is_string( $_GET['post'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, Sanitization happens in the validate_int function. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, Sanitization happens in the validate_int function. $post_id = (int) WPSEO_Utils::validate_int( wp_unslash( $_GET['post'] ) ); $this->post = get_post( $post_id ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/metabox/interface-metabox-section.php b/wp/wp-content/plugins/wordpress-seo/admin/metabox/interface-metabox-section.php index 389c125e..59fa943c 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/metabox/interface-metabox-section.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/metabox/interface-metabox-section.php @@ -12,11 +12,15 @@ interface WPSEO_Metabox_Section { /** * Outputs the section link. + * + * @return void */ public function display_link(); /** * Outputs the section content. + * + * @return void */ public function display_content(); } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/pages/tools.php b/wp/wp-content/plugins/wordpress-seo/admin/pages/tools.php index 45f2e833..e4b5d31b 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/pages/tools.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/pages/tools.php @@ -71,19 +71,6 @@ if ( $tool_page === '' ) { */ do_action( 'wpseo_tools_overview_list_items_internal' ); - /** - * Action: 'wpseo_tools_overview_list_items' - Hook to add additional tools to the overview. - * - * @deprecated 19.10 No replacement available. - */ - do_action_deprecated( - 'wpseo_tools_overview_list_items', - [], - '19.10', - '', - 'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.' - ); - echo ''; } else { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/statistics/class-statistics-service.php b/wp/wp-content/plugins/wordpress-seo/admin/statistics/class-statistics-service.php index f4bc49af..352e29e0 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/statistics/class-statistics-service.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/statistics/class-statistics-service.php @@ -15,7 +15,7 @@ class WPSEO_Statistics_Service { * * @var string */ - const CACHE_TRANSIENT_KEY = 'wpseo-statistics-totals'; + public const CACHE_TRANSIENT_KEY = 'wpseo-statistics-totals'; /** * Class that generates interesting statistics about things. @@ -47,7 +47,7 @@ class WPSEO_Statistics_Service { */ public function get_statistics() { // Switch to the user locale with fallback to the site locale. - switch_to_locale( \get_user_locale() ); + switch_to_locale( get_user_locale() ); $this->labels = $this->labels(); $statistics = $this->statistic_items(); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-columns.php b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-columns.php index 6e3304d4..fda2f19c 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-columns.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-columns.php @@ -84,13 +84,13 @@ class WPSEO_Taxonomy_Columns { $new_columns[ $column_name ] = $column_value; if ( $column_name === 'description' && $this->analysis_seo->is_enabled() ) { - $new_columns['wpseo-score'] = '' . - __( 'SEO score', 'wordpress-seo' ) . ''; + $new_columns['wpseo-score'] = '' + . __( 'SEO score', 'wordpress-seo' ) . ''; } if ( $column_name === 'description' && $this->analysis_readability->is_enabled() ) { - $new_columns['wpseo-score-readability'] = '' . - __( 'Readability score', 'wordpress-seo' ) . ''; + $new_columns['wpseo-score-readability'] = '' + . __( 'Readability score', 'wordpress-seo' ) . ''; } } @@ -125,18 +125,16 @@ class WPSEO_Taxonomy_Columns { * @return string|null The current taxonomy or null when it is not set. */ public function get_current_taxonomy() { - // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. + // phpcs:disable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( ! empty( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST' ) { if ( isset( $_POST['taxonomy'] ) && is_string( $_POST['taxonomy'] ) ) { return sanitize_text_field( wp_unslash( $_POST['taxonomy'] ) ); } } - else { - if ( isset( $_GET['taxonomy'] ) && is_string( $_GET['taxonomy'] ) ) { - return sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); - } + elseif ( isset( $_GET['taxonomy'] ) && is_string( $_GET['taxonomy'] ) ) { + return sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); } - // phpcs:enable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended + // phpcs:enable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended return null; } @@ -146,18 +144,16 @@ class WPSEO_Taxonomy_Columns { * @return string|null */ private function get_taxonomy() { - // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. + // phpcs:disable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( wp_doing_ajax() ) { if ( isset( $_POST['taxonomy'] ) && is_string( $_POST['taxonomy'] ) ) { return sanitize_text_field( wp_unslash( $_POST['taxonomy'] ) ); } } - else { - if ( isset( $_GET['taxonomy'] ) && is_string( $_GET['taxonomy'] ) ) { - return sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); - } + elseif ( isset( $_GET['taxonomy'] ) && is_string( $_GET['taxonomy'] ) ) { + return sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); } - // phpcs:enable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended + // phpcs:enable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended return null; } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields-presenter.php b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields-presenter.php index 933be47b..9ab28b0c 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields-presenter.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields-presenter.php @@ -60,8 +60,8 @@ class WPSEO_Taxonomy_Fields_Presenter { $label = $this->get_label( $field_configuration['label'], $esc_field_name ); $field = $this->get_field( $field_configuration['type'], $esc_field_name, $this->get_field_value( $field_name ), $options ); - $help_content = isset( $field_configuration['options']['help'] ) ? $field_configuration['options']['help'] : ''; - $help_button_text = isset( $field_configuration['options']['help-button'] ) ? $field_configuration['options']['help-button'] : ''; + $help_content = ( $field_configuration['options']['help'] ?? '' ); + $help_button_text = ( $field_configuration['options']['help-button'] ?? '' ); $help = new WPSEO_Admin_Help_Panel( $field_name, $help_button_text, $help_content ); return $this->parse_row( $label, $help, $field ); @@ -110,28 +110,28 @@ class WPSEO_Taxonomy_Fields_Presenter { $field .= ''; break; case 'upload': - $field .= ' '; - $field .= ' '; - $field .= ''; + $field .= ' '; + $field .= ' '; + $field .= ''; break; case 'select': if ( is_array( $options ) && $options !== [] ) { diff --git a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields.php b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields.php index df7aa6af..9da698ef 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-fields.php @@ -98,7 +98,7 @@ class WPSEO_Taxonomy_Fields { /** * Filter: 'wpseo_taxonomy_content_fields' - Adds the possibility to register additional content fields. * - * @api array - The additional fields. + * @param array $additional_fields The additional fields. */ $additional_fields = apply_filters( 'wpseo_taxonomy_content_fields', [] ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-metabox.php b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-metabox.php index 63a26eb6..d7b1fff6 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-metabox.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy-metabox.php @@ -70,6 +70,8 @@ class WPSEO_Taxonomy_Metabox { /** * Shows the Yoast SEO metabox for the term. + * + * @return void */ public function display() { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $this->get_product_title() returns a hard-coded string. diff --git a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy.php b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy.php index 4fa581c4..a0dc5737 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/taxonomy/class-taxonomy.php @@ -60,6 +60,8 @@ class WPSEO_Taxonomy { /** * Add hooks late enough for taxonomy object to be available for checks. + * + * @return void */ public function admin_init() { @@ -80,6 +82,8 @@ class WPSEO_Taxonomy { * Show the SEO inputs for term. * * @param stdClass|WP_Term $term Term to show the edit boxes for. + * + * @return void */ public function term_metabox( $term ) { if ( WPSEO_Metabox::is_internet_explorer() ) { @@ -121,6 +125,8 @@ class WPSEO_Taxonomy { * Queue assets for taxonomy screens. * * @since 1.5.0 + * + * @return void */ public function admin_enqueue_scripts() { @@ -165,7 +171,7 @@ class WPSEO_Taxonomy { ], 'shortcodes' => [ 'wpseo_shortcode_tags' => $this->get_valid_shortcode_tags(), - 'wpseo_filter_shortcodes_nonce' => \wp_create_nonce( 'wpseo-filter-shortcodes' ), + 'wpseo_filter_shortcodes_nonce' => wp_create_nonce( 'wpseo-filter-shortcodes' ), ], ], 'worker' => [ @@ -180,10 +186,10 @@ class WPSEO_Taxonomy { 'choose_image' => __( 'Use Image', 'wordpress-seo' ), ], 'metabox' => $this->localize_term_scraper_script( $tag_id ), - 'userLanguageCode' => WPSEO_Language_Utils::get_language( \get_user_locale() ), + 'userLanguageCode' => WPSEO_Language_Utils::get_language( get_user_locale() ), 'isTerm' => true, 'postId' => $tag_id, - 'usedKeywordsNonce' => \wp_create_nonce( 'wpseo-keyword-usage' ), + 'usedKeywordsNonce' => wp_create_nonce( 'wpseo-keyword-usage' ), 'linkParams' => WPSEO_Shortlinker::get_query_params(), ]; $asset_manager->localize_script( 'term-edit', 'wpseoScriptData', $script_data ); @@ -201,6 +207,8 @@ class WPSEO_Taxonomy { * @param int $term_id ID of the term to save data for. * @param int $tt_id The taxonomy_term_id for the term. * @param string $taxonomy The taxonomy the term belongs to. + * + * @return void */ public function update_term( $term_id, $tt_id, $taxonomy ) { // Bail if this is a multisite installation and the site has been switched. @@ -213,8 +221,8 @@ class WPSEO_Taxonomy { foreach ( WPSEO_Taxonomy_Meta::$defaults_per_term as $key => $default ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Reason: Nonce is already checked by WordPress before executing this action. if ( isset( $_POST[ $key ] ) && is_string( $_POST[ $key ] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: $data is getting sanitized later. - $data = \wp_unslash( $_POST[ $key ] ); + // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: $data is getting sanitized later. + $data = wp_unslash( $_POST[ $key ] ); $new_meta_data[ $key ] = ( $key !== 'wpseo_canonical' ) ? WPSEO_Utils::sanitize_text_field( $data ) : WPSEO_Utils::sanitize_url( $data ); } @@ -252,6 +260,8 @@ class WPSEO_Taxonomy { /** * Allows post-kses-filtered HTML in term descriptions. + * + * @return void */ public function custom_category_descriptions_allow_html() { remove_filter( 'term_description', 'wp_kses_data' ); @@ -262,6 +272,8 @@ class WPSEO_Taxonomy { /** * Output the WordPress editor. + * + * @return void */ public function custom_category_description_editor() { wp_editor( '', 'description' ); @@ -389,7 +401,7 @@ class WPSEO_Taxonomy { private static function get_tag_id() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['tag_ID'] ) && is_string( $_GET['tag_ID'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are casting to an integer. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are casting to an integer. $tag_id = (int) wp_unslash( $_GET['tag_ID'] ); if ( $tag_id > 0 ) { return $tag_id; diff --git a/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-addon-data.php b/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-addon-data.php index 124e9dcc..0cbc27c7 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-addon-data.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-addon-data.php @@ -85,11 +85,11 @@ class WPSEO_Tracking_Addon_Data implements WPSEO_Collection { * @return array */ public function get_addon_settings( array $addon_settings, $source_name, $slug, $option_include_list ) { - $source_options = \get_option( $source_name, [] ); - if ( ! \is_array( $source_options ) || empty( $source_options ) ) { + $source_options = get_option( $source_name, [] ); + if ( ! is_array( $source_options ) || empty( $source_options ) ) { return $addon_settings; } - $addon_settings[ $slug ] = \array_intersect_key( $source_options, \array_flip( $option_include_list ) ); + $addon_settings[ $slug ] = array_intersect_key( $source_options, array_flip( $option_include_list ) ); return $addon_settings; } @@ -107,13 +107,13 @@ class WPSEO_Tracking_Addon_Data implements WPSEO_Collection { * @return array */ public function get_local_addon_settings( array $addon_settings, $source_name, $slug, $option_include_list ) { - $source_options = \get_option( $source_name, [] ); - if ( ! \is_array( $source_options ) || empty( $source_options ) ) { + $source_options = get_option( $source_name, [] ); + if ( ! is_array( $source_options ) || empty( $source_options ) ) { return $addon_settings; } - $addon_settings[ $slug ] = \array_intersect_key( $source_options, \array_flip( $option_include_list ) ); + $addon_settings[ $slug ] = array_intersect_key( $source_options, array_flip( $option_include_list ) ); - if ( \array_key_exists( 'use_multiple_locations', $source_options ) && \array_key_exists( 'business_type', $addon_settings[ $slug ] ) && $source_options['use_multiple_locations'] === 'on' && $source_options['multiple_locations_shared_business_info'] === 'off' ) { + if ( array_key_exists( 'use_multiple_locations', $source_options ) && array_key_exists( 'business_type', $addon_settings[ $slug ] ) && $source_options['use_multiple_locations'] === 'on' && $source_options['multiple_locations_shared_business_info'] === 'off' ) { $addon_settings[ $slug ]['business_type'] = 'multiple_locations'; } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-plugin-data.php b/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-plugin-data.php index bb6a5619..2c585e1d 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-plugin-data.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-plugin-data.php @@ -61,7 +61,7 @@ class WPSEO_Tracking_Plugin_Data implements WPSEO_Collection { public function set_auto_update_plugin_list() { $auto_update_plugins = []; - $auto_update_plugin_files = \get_option( 'auto_update_plugins' ); + $auto_update_plugin_files = get_option( 'auto_update_plugins' ); if ( $auto_update_plugin_files ) { foreach ( $auto_update_plugin_files as $auto_update_plugin ) { $data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $auto_update_plugin ); @@ -84,7 +84,7 @@ class WPSEO_Tracking_Plugin_Data implements WPSEO_Collection { return [ 'name' => $plugin['Name'], 'version' => $plugin['Version'], - 'auto_updating' => \array_key_exists( $plugin['Name'], $this->auto_update_plugin_list ), + 'auto_updating' => array_key_exists( $plugin['Name'], $this->auto_update_plugin_list ), ]; } } diff --git a/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-settings-data.php b/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-settings-data.php index 0af71efe..bf3e7a78 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-settings-data.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking-settings-data.php @@ -246,7 +246,7 @@ class WPSEO_Tracking_Settings_Data implements WPSEO_Collection { /** * Filter: 'wpseo_tracking_settings_include_list' - Allow filtering the settings included in tracking. * - * @api string $include_list the list with included setting names. + * @param string $include_list The list with included setting names. */ $this->include_list = apply_filters( 'wpseo_tracking_settings_include_list', $this->include_list ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking.php b/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking.php index b7ca705b..58bfdff3 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/tracking/class-tracking.php @@ -59,6 +59,8 @@ class WPSEO_Tracking implements WPSEO_WordPress_Integration { /** * Registers all hooks to WordPress. + * + * @return void */ public function register_hooks() { if ( ! $this->tracking_enabled() ) { @@ -110,6 +112,8 @@ class WPSEO_Tracking implements WPSEO_WordPress_Integration { * * @param bool $force Whether to send the tracking data ignoring the two * weeks time threshold. Default false. + * + * @return void */ public function send( $force = false ) { if ( ! $this->should_send_tracking( $force ) ) { @@ -216,7 +220,7 @@ class WPSEO_Tracking implements WPSEO_WordPress_Integration { /** * Filter: 'wpseo_enable_tracking' - Enables the data tracking of Yoast SEO Premium and add-ons. * - * @api string $is_enabled The enabled state. Default is false. + * @param string $is_enabled The enabled state. Default is false. */ $tracking = apply_filters( 'wpseo_enable_tracking', false ); diff --git a/wp/wp-content/plugins/wordpress-seo/admin/views/class-yoast-feature-toggles.php b/wp/wp-content/plugins/wordpress-seo/admin/views/class-yoast-feature-toggles.php index b5e2fc7f..a4efc0d5 100644 --- a/wp/wp-content/plugins/wordpress-seo/admin/views/class-yoast-feature-toggles.php +++ b/wp/wp-content/plugins/wordpress-seo/admin/views/class-yoast-feature-toggles.php @@ -238,7 +238,7 @@ class Yoast_Feature_Toggles { $out = '