Skip to content

Commit

Permalink
Merge pull request #21360 from Yoast/deprecate-wpseo-customizer
Browse files Browse the repository at this point in the history
 Removes the Yoast SEO Breadcrumbs panel from the Customizer
  • Loading branch information
igorschoester committed May 7, 2024
2 parents 4cf3a4d + 72c241e commit 640f7b1
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 254 deletions.
6 changes: 6 additions & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@
<exclude-pattern>/inc/wpseo-functions-deprecated\.php$</exclude-pattern>
</rule>

<!-- Ignore unused variables in deprecated functionality. -->
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable">
<exclude-pattern>/src/deprecated/*</exclude-pattern>
<exclude-pattern>/inc/wpseo-functions-deprecated\.php$</exclude-pattern>
</rule>

<!-- Exclude deprecated code from select sniffs regarding naming conventions.
These classes are still available to prevent BC-breaks and renaming them would
create a BC-break. -->
Expand Down
249 changes: 0 additions & 249 deletions admin/class-customizer.php

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"Yoast\\WP\\SEO\\Composer\\Actions::check_coding_standards"
],
"check-cs-thresholds": [
"@putenv YOASTCS_THRESHOLD_ERRORS=2549",
"@putenv YOASTCS_THRESHOLD_WARNINGS=267",
"@putenv YOASTCS_THRESHOLD_ERRORS=2545",
"@putenv YOASTCS_THRESHOLD_WARNINGS=253",
"Yoast\\WP\\SEO\\Composer\\Actions::check_cs_thresholds"
],
"check-cs": [
Expand Down
72 changes: 72 additions & 0 deletions src/deprecated/admin/class-customizer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Customizer
*/

/**
* Class with functionality to support WP SEO settings in WordPress Customizer.
*
* @codeCoverageIgnore
* @deprecated 22.8
*/
class WPSEO_Customizer {

/**
* Holds the customize manager.
*
* @deprecated 22.8
*
* @var WP_Customize_Manager
*/
protected $wp_customize;

/**
* Construct Method.
*
* @codeCoverageIgnore
* @deprecated 22.8
*/
public function __construct() {
_deprecated_function( __METHOD__, 'Yoast SEO 22.8' );
}

/**
* Function to support WordPress Customizer.
*
* @param WP_Customize_Manager $wp_customize Manager class instance.
*
* @codeCoverageIgnore
* @deprecated 22.8
*
* @return void
*/
public function wpseo_customize_register( $wp_customize ) {
_deprecated_function( __METHOD__, 'Yoast SEO 22.8' );
}

/**
* Returns whether or not the breadcrumbs are active.
*
* @codeCoverageIgnore
* @deprecated 22.8
*
* @return void
*/
public function breadcrumbs_active_callback() {
_deprecated_function( __METHOD__, 'Yoast SEO 22.8' );
}

/**
* Returns whether or not to show the breadcrumbs blog show option.
*
* @codeCoverageIgnore
* @deprecated 22.8
*
* @return void
*/
public function breadcrumbs_blog_show_active_cb() {
_deprecated_function( __METHOD__, 'Yoast SEO 22.8' );
}
}
3 changes: 0 additions & 3 deletions wp-seo-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,6 @@ function wpseo_init() {
require_once WPSEO_PATH . 'inc/wpseo-non-ajax-functions.php';
}

// Init it here because the filter must be present on the frontend as well or it won't work in the customizer.
new WPSEO_Customizer();

$integrations = [];
$integrations[] = new WPSEO_Slug_Change_Watcher();

Expand Down

0 comments on commit 640f7b1

Please sign in to comment.