diff --git a/projects/packages/classic-theme-helper/changelog/update-load-relevant-theme-compat-classic-theme-helper b/projects/packages/classic-theme-helper/changelog/update-load-relevant-theme-compat-classic-theme-helper new file mode 100644 index 0000000000000..6cde753c1cbf5 --- /dev/null +++ b/projects/packages/classic-theme-helper/changelog/update-load-relevant-theme-compat-classic-theme-helper @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Theme tools: Load theme compat functionality relevant to features in Classic Theme Helper package, from this package. diff --git a/projects/packages/classic-theme-helper/src/class-main.php b/projects/packages/classic-theme-helper/src/class-main.php index 782a940322055..e354a40ab86fa 100644 --- a/projects/packages/classic-theme-helper/src/class-main.php +++ b/projects/packages/classic-theme-helper/src/class-main.php @@ -43,10 +43,8 @@ public static function init() { if ( ! self::$instance ) { self::$instance = new Main(); self::$instance->load_modules(); - // TODO Commenting below since we still load them from theme-tools module add_action( 'init', array( __CLASS__, 'jetpack_load_theme_tools' ), 30 ); - // phpcs:ignore Squiz.PHP.CommentedOutCode.Found - // add_action( 'after_setup_theme', array( __CLASS__, 'jetpack_load_theme_compat' ), -1 ); + add_action( 'after_setup_theme', array( __CLASS__, 'classic_theme_helper_load_theme_compat' ), -1 ); } return self::$instance; @@ -78,15 +76,15 @@ public static function jetpack_load_theme_tools() { /** * Load theme compat file if it exists. */ - public static function jetpack_load_theme_compat() { + public static function classic_theme_helper_load_theme_compat() { /** * Filter theme compat files. * * Themes can add their own compat files here if they like. For example: * - * add_filter( 'jetpack_theme_compat_files', 'mytheme_jetpack_compat_file' ); - * function mytheme_jetpack_compat_file( $files ) { + * add_filter( 'classic_theme_helper_theme_compat_files', 'mytheme_classic_theme_helper_theme_compat_file' ); + * function mytheme_classic_theme_helper_theme_compat_file( $files ) { * $files['mytheme'] = locate_template( 'jetpack-compat.php' ); * return $files; * } @@ -96,7 +94,7 @@ public static function jetpack_load_theme_compat() { * @param array Associative array of theme compat files to load. */ $compat_files = apply_filters( - 'jetpack_theme_compat_files', + 'classic_theme_helper_theme_compat_files', array( 'twentyfourteen' => __DIR__ . '/compat/twentyfourteen.php', 'twentyfifteen' => __DIR__ . '/compat/twentyfifteen.php', @@ -107,10 +105,10 @@ public static function jetpack_load_theme_compat() { ) ); - self::jetpack_require_compat_file( get_stylesheet(), $compat_files ); + self::classic_theme_helper_require_compat_file( get_stylesheet(), $compat_files ); if ( is_child_theme() ) { - self::jetpack_require_compat_file( get_template(), $compat_files ); + self::classic_theme_helper_require_compat_file( get_template(), $compat_files ); } } @@ -121,7 +119,7 @@ public static function jetpack_load_theme_compat() { * @param array $files Array of files to check in. * @return void|WP_Error */ - private static function jetpack_require_compat_file( $key, $files ) { + private static function classic_theme_helper_require_compat_file( $key, $files ) { if ( ! is_string( $key ) ) { return new WP_Error( 'key_not_string', 'The specified key is not actually a string.', compact( 'key' ) ); } diff --git a/projects/plugins/classic-theme-helper-plugin/changelog/update-load-relevant-theme-compat-classic-theme-helper b/projects/plugins/classic-theme-helper-plugin/changelog/update-load-relevant-theme-compat-classic-theme-helper new file mode 100644 index 0000000000000..6cde753c1cbf5 --- /dev/null +++ b/projects/plugins/classic-theme-helper-plugin/changelog/update-load-relevant-theme-compat-classic-theme-helper @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Theme tools: Load theme compat functionality relevant to features in Classic Theme Helper package, from this package. diff --git a/projects/plugins/jetpack/changelog/update-load-relevant-theme-compat-classic-theme-helper b/projects/plugins/jetpack/changelog/update-load-relevant-theme-compat-classic-theme-helper new file mode 100644 index 0000000000000..8e2c2275912eb --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-load-relevant-theme-compat-classic-theme-helper @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Theme tools: Load theme compat functionality relevant to features in Classic Theme Helper package, from this package. diff --git a/projects/plugins/mu-wpcom-plugin/changelog/update-load-relevant-theme-compat-classic-theme-helper b/projects/plugins/mu-wpcom-plugin/changelog/update-load-relevant-theme-compat-classic-theme-helper new file mode 100644 index 0000000000000..6cde753c1cbf5 --- /dev/null +++ b/projects/plugins/mu-wpcom-plugin/changelog/update-load-relevant-theme-compat-classic-theme-helper @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Theme tools: Load theme compat functionality relevant to features in Classic Theme Helper package, from this package. diff --git a/projects/plugins/wpcomsh/changelog/update-load-relevant-theme-compat-classic-theme-helper b/projects/plugins/wpcomsh/changelog/update-load-relevant-theme-compat-classic-theme-helper new file mode 100644 index 0000000000000..6cde753c1cbf5 --- /dev/null +++ b/projects/plugins/wpcomsh/changelog/update-load-relevant-theme-compat-classic-theme-helper @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Theme tools: Load theme compat functionality relevant to features in Classic Theme Helper package, from this package.