Skip to content

Commit 9b511b2

Browse files
committed
Cleaned up more code. Removed defunct Headway theme support.
1 parent f7f1d8c commit 9b511b2

16 files changed

+16
-46
lines changed

autodescription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: The SEO Framework
44
* Plugin URI: https://theseoframework.com/
55
* Description: An automated, advanced, accessible, unbranded and extremely fast SEO solution for your WordPress website.
6-
* Version: 5.1.3-dev-17
6+
* Version: 5.1.3-dev-19
77
* Author: Sybre Waaijer
88
* Author URI: https://theseoframework.com/
99
* Troy: https://repo.theseoframework.com/

bootstrap/init-compat.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2626
*/
2727

28-
// Disable Headway theme SEO. We should remove this in 2025 or so; it's abandoned.
29-
\add_filter( 'headway_seo_disabled', '__return_true' );
30-
3128
foreach (
3229
array_intersect_key(
3330
[

inc/compat/plugin-bbpress.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/**
33
* @package The_SEO_Framework\Compat\Plugin\bbPress
44
* @subpackage The_SEO_Framework\Compatibility
5+
* @access private
56
*/
67

78
namespace The_SEO_Framework;
@@ -194,7 +195,6 @@ function _bbpress_filter_title( $title, $args ) {
194195
*
195196
* @hook the_seo_framework_seo_column_keys_order 10
196197
* @since 2.8.0
197-
* @access private
198198
*
199199
* @param array $current_keys The current column keys TSF looks for.
200200
* @return array Expanded keyset.
@@ -215,7 +215,6 @@ function _bbpress_filter_order_keys( $current_keys = [] ) {
215215
*
216216
* @hook the_seo_framework_do_adjust_archive_query 10
217217
* @since 3.0.3
218-
* @access private
219218
* @link <https://bbpress.trac.wordpress.org/ticket/2607> (regression)
220219
*
221220
* @param bool $adjust Whether to adjust the query.
@@ -243,7 +242,6 @@ function _bbpress_filter_do_adjust_query( $adjust, $wp_query ) {
243242
*
244243
* @hook the_seo_framework_robots_meta_array 10
245244
* @since 4.2.8
246-
* @access private
247245
*
248246
* @param array $meta {
249247
* The parsed robots meta.
@@ -312,7 +310,6 @@ function _bbpress_filter_robots( $meta, $args ) {
312310
*
313311
* @hook the_seo_framework_seo_bar 10
314312
* @since 4.2.8
315-
* @access private
316313
*
317314
* @param string $interpreter The interpreter class name.
318315
* @param object $builder The builder's class instance.

inc/compat/plugin-buddypress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/**
33
* @package The_SEO_Framework\Compat\Plugin\BuddyPress
44
* @subpackage The_SEO_Framework\Compatibility
5+
* @access private
56
*/
67

78
namespace The_SEO_Framework;
@@ -15,7 +16,6 @@
1516
*
1617
* @hook the_seo_framework_meta_generator_pools 10
1718
* @since 5.0.0
18-
* @access private
1919
*
2020
* @param string[] $generator_pools A list of tag pools requested for the current query.
2121
* The tag pool names correspond directly to the classes'.

inc/compat/plugin-edd.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/**
33
* @package The_SEO_Framework\Compat\Plugin\EDD
44
* @subpackage The_SEO_Framework\Compatibility
5+
* @access private
56
*/
67

78
namespace The_SEO_Framework;
@@ -18,7 +19,6 @@
1819
*
1920
* @hook the_seo_framework_is_product 10
2021
* @since 4.0.5
21-
* @access private
2222
*
2323
* @param bool $is_product Whether this is a product page.
2424
* @param int|WP_Post|null $post Post ID or post object.
@@ -40,7 +40,6 @@ function _set_edd_is_product( $is_product, $post ) {
4040
*
4141
* @hook the_seo_framework_is_product_admin 10
4242
* @since 4.0.5
43-
* @access private
4443
* @TODO is this redundant for TSF?
4544
*
4645
* @param bool $is_product_admin Whether this is a product admin query.

inc/compat/plugin-elementor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/**
33
* @package The_SEO_Framework\Compat\Plugin\Elementor
44
* @subpackage The_SEO_Framework\Compatibility
5+
* @access private
56
*/
67

78
namespace The_SEO_Framework;

inc/compat/plugin-jetpack.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/**
33
* @package The_SEO_Framework\Compat\Plugin\Jetpack
44
* @subpackage The_SEO_Framework\Compatibility
5+
* @access private
56
*/
67

78
namespace The_SEO_Framework;

inc/compat/plugin-polylang.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/**
33
* @package The_SEO_Framework\Compat\Plugin\PolyLang
44
* @subpackage The_SEO_Framework\Compatibility
5+
* @access private
56
*/
67

78
namespace The_SEO_Framework;
@@ -107,7 +108,6 @@ function _polylang_register_sitemap_languages( $list ) {
107108
*
108109
* @hook the_seo_framework_sitemap_header 10
109110
* @since 4.1.2
110-
* @access private
111111
*/
112112
function _polylang_set_sitemap_language() {
113113

@@ -156,7 +156,6 @@ function _polylang_set_sitemap_language() {
156156
* in this case we can use term_id since we're specifying the taxonomy directly.
157157
* WordPress 4.4.0 and later also rectifies term_id/term_taxonomy_id stratification, which is
158158
* why we couldn't find an issue whilst introducing this filter.
159-
* @access private
160159
*
161160
* @param array $args The query arguments.
162161
* @return array The augmented query arguments.
@@ -205,7 +204,6 @@ function _polylang_sitemap_append_non_translatables( $args ) {
205204
* @hook the_seo_framework_generated_description 10
206205
* @hook the_seo_framework_custom_field_description 10
207206
* @since 3.1.0
208-
* @access private
209207
*
210208
* @param string $string The title or description
211209
* @return string
@@ -228,7 +226,6 @@ function pll__( $string ) {
228226
* @since 4.0.5
229227
* @since 5.0.0 Removed clearing once-per-request restriction.
230228
* @global \wpdb $wpdb
231-
* @access private
232229
*/
233230
function _polylang_flush_sitemap() {
234231
global $wpdb;

inc/compat/plugin-ultimatemember.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/**
33
* @package The_SEO_Framework\Compat\Plugin\UltimateMember
44
* @subpackage The_SEO_Framework\Compatibility
5+
* @access private
56
*/
67

78
namespace The_SEO_Framework;
@@ -17,7 +18,6 @@
1718
*
1819
* @hook template_redirect 100000
1920
* @since 4.2.0
20-
* @access private
2121
*/
2222
function _um_reinstate_title_support() {
2323

@@ -41,7 +41,6 @@ function _um_reinstate_title_support() {
4141
*
4242
* @hook the_seo_framework_query_supports_seo 10
4343
* @since 4.2.0
44-
* @access private
4544
*
4645
* @param bool $supported Whether the query supports SEO.
4746
* @return bool Whether the query is supported.

inc/compat/plugin-woocommerce.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/**
33
* @package The_SEO_Framework\Compat\Plugin\WooCommerce
44
* @subpackage The_SEO_Framework\Compatibility
5+
* @access private
56
*/
67

78
namespace The_SEO_Framework;
@@ -38,7 +39,6 @@
3839
* @since 4.1.4 1. Now unbinds wc_page_noindex action.
3940
* 2. Now unbinds wc_page_no_robots filter.
4041
* 3. Now modifies the SEO Bar.
41-
* @access private
4242
*/
4343
function _init_wc_compat() {
4444
// Adjust the product link acknowledging the primary category.
@@ -57,7 +57,6 @@ function _init_wc_compat() {
5757
* Helper function for other methods to determine if there's a shop ID.
5858
*
5959
* @since 5.0.0
60-
* @access private
6160
*
6261
* @return int The shop page ID. 0 on failure.
6362
*/
@@ -79,7 +78,6 @@ function _get_shop_page_id() {
7978
* Helper function for other methods to determine if we're dealing with a shop.
8079
*
8180
* @since 4.2.0
82-
* @access private
8381
*
8482
* @param int|WP_Post|null $post Post ID or post object.
8583
* @return bool
@@ -106,7 +104,6 @@ function _is_shop( $post = null ) {
106104
*
107105
* @hook the_seo_framework_real_id 10
108106
* @since 4.0.5
109-
* @access private
110107
*
111108
* @param int $id The current ID.
112109
* @return int
@@ -121,7 +118,6 @@ function _set_real_id_wc_shop( $id ) {
121118
*
122119
* @hook the_seo_framework_is_singular_archive 10
123120
* @since 4.0.5
124-
* @access private
125121
*
126122
* @param bool $is_singular_archive Whether the post ID is a singular archive.
127123
* @param int|null $id The supplied post ID. Null when in the loop.
@@ -138,7 +134,6 @@ function _set_shop_singular_archive( $is_singular_archive, $id ) {
138134
* @hook the_seo_framework_is_shop 10
139135
* @since 4.0.5
140136
* @since 4.1.4 Now handles the assertion fully.
141-
* @access private
142137
* @TODO is this redundant for TSF? -> yes. lol. It's used nowhere, for now...
143138
*
144139
* @param bool $is_shop Whether this is a shop page.
@@ -177,7 +172,6 @@ function _set_wc_is_product( $is_product, $post ) {
177172
* @hook the_seo_framework_is_product_admin 10
178173
* @since 4.0.5
179174
* @since 4.1.4 Now handles the assertion fully.
180-
* @access private
181175
* @TODO is this redundant for TSF? Yup. This very much is because we do not show an interface for OG types.
182176
*
183177
* @param bool $is_product_admin Whether this is a product admin query.
@@ -196,7 +190,6 @@ function _set_wc_is_product_admin( $is_product_admin ) {
196190
* @hook the_seo_framework_robots_meta_array 10
197191
* @since 4.1.4
198192
* @since 4.2.8 Now uses `Query::is_singular()` instead of `is_singular()` (for debug support).
199-
* @access private
200193
*
201194
* @param array $meta {
202195
* The parsed robots meta.
@@ -261,7 +254,6 @@ function _set_wc_noindex_defaults( $meta, $args, $options ) {
261254
*
262255
* @hook the_seo_framework_seo_bar 10
263256
* @since 4.1.4
264-
* @access private
265257
*
266258
* @param string $interpreter The interpreter class name.
267259
* @param object $builder The builder's class instance.
@@ -297,7 +289,6 @@ function _assert_wc_noindex_defaults_seo_bar( $interpreter, $builder ) {
297289
* @since 4.0.5 (introduced @ 4.0.0, renamed to prevent conflict).
298290
* @since 4.2.0 Now supports the `$args['pta']` index.
299291
* @since 4.2.8 Fixed the taxonomy query for the admin area.
300-
* @access private
301292
*
302293
* @param array $params {
303294
* The image generation parameters.
@@ -347,7 +338,6 @@ function _adjust_wc_image_generation_params( $params, $args ) {
347338
* @hook the_seo_framework_public_post_type_archives 10
348339
* @since 4.0.0
349340
* @since 4.2.0 Now supports the `$args['pta']` index.
350-
* @access private
351341
* @generator
352342
*
353343
* @param array|null $args The query arguments. Accepts 'id', 'tax', 'pta', and 'uid'.
@@ -396,7 +386,6 @@ function _get_product_gallery_image_details( $args = null, $size = 'full' ) {
396386
* Generates image URL and ID from the WooCommerce product category thumbnail entries.
397387
*
398388
* @since 4.0.0
399-
* @access private
400389
* @generator
401390
*
402391
* @param array|null $args The query arguments. Accepts 'id', 'tax', 'pta', and 'uid'.
@@ -436,7 +425,6 @@ function _get_product_category_thumbnail_image_details( $args = null, $size = 'f
436425
*
437426
* @hook the_seo_framework_public_post_type_archives 10
438427
* @since 4.2.8
439-
* @access private
440428
*
441429
* @param string[] $post_types The public post type archive names.
442430
* @return string[] The filtered post type archive names.
@@ -455,7 +443,6 @@ function _filter_public_wc_post_type_archives( $post_types ) {
455443
*
456444
* @filter the_seo_framework_generated_archive_title_items 10
457445
* @since 5.0.0
458-
* @access private
459446
*
460447
* @param String[title,prefix,title_without_prefix] $items The generated archive title items.
461448
* @param \WP_Term|\WP_User|\WP_Post_Type|null $object The archive object.

0 commit comments

Comments
 (0)