Making WordPress.org

Changeset 12160


Ignore:
Timestamp:
10/31/2022 03:27:30 AM (2 years ago)
Author:
dd32
Message:

Theme Directory: Force-enable the SEO jetpack module, instead of directly including the Jetpack files.

See #6551.

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r12084 r12160  
    14591459// Theme Directory doesn't support pagination.
    14601460add_filter( 'wporg_rel_next_pages', '__return_zero' );
     1461
     1462// Force-enable Jetpack SEO
     1463function wporg_themes_jetpack_seo_enable( $modules ) {
     1464    return array_values( array_merge( $modules, array( 'seo-tools' ) ) );
     1465}
     1466add_filter( 'jetpack_active_modules', 'wporg_themes_jetpack_seo_enable' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r12159 r12160  
    485485}
    486486
    487 if ( class_exists( 'Jetpack' ) ) {
    488 //  include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo.php';
    489 //  include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo-posts.php';
    490 //  include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo-titles.php';
    491 //  include_once WP_CONTENT_DIR . '/plugins/jetpack/modules/seo-tools/jetpack-seo-utils.php';
    492 
    493     if ( class_exists( 'Jetpack_SEO' ) ) {
    494         new Jetpack_SEO;
    495     }
    496 }
    497 
    498487/**
    499488 * Prints markup information in the head of a page.
Note: See TracChangeset for help on using the changeset viewer.