Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme Tools: Deprecate theme tool devicepx #37116

Merged
merged 6 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ public static function init() {
add_action( 'amp_post_template_footer', array( 'Jetpack_AMP_Support', 'add_stats_pixel' ) );
}

/**
* Remove this during the init hook in case users have enabled it during
* the after_setup_theme hook, which triggers before init.
*/
remove_theme_support( 'jetpack-devicepx' );

// Sharing.
add_filter( 'jetpack_sharing_display_markup', array( 'Jetpack_AMP_Support', 'render_sharing_html' ), 10, 2 );
add_filter( 'sharing_enqueue_scripts', array( 'Jetpack_AMP_Support', 'amp_disable_sharedaddy_css' ) );
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: compat

Theme tools: deprecated devicepx functionality
1 change: 0 additions & 1 deletion projects/plugins/jetpack/modules/module-extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
'theme-tools/site-breadcrumbs.php',
'theme-tools/social-menu.php',
'theme-tools/content-options.php',
'theme-tools/devicepx.php',
// Needed for VideoPress, so videos keep working in existing posts/pages when the module is deactivated.
'videopress/class.videopress-gutenberg.php',
);
Expand Down
3 changes: 3 additions & 0 deletions projects/plugins/jetpack/modules/theme-tools/devicepx.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @package automattic/jetpack
*/

_deprecated_file( __FILE__, 'jetpack-$$next-version$$' );
/**
* Enqueue the devicepx JS library, if enabled. The feature must
* be enabled earlier during `after_setup_theme`.
Expand All @@ -20,6 +21,7 @@
*/
function jetpack_devicepx_init() {
if ( current_theme_supports( 'jetpack-devicepx' ) ) {
_deprecated_function( __FUNCTION__, 'jetpack-$$next-version$$' );
add_action( 'wp_enqueue_scripts', 'jetpack_devicepx_enqueue' );
add_action( 'customize_controls_enqueue_scripts', 'jetpack_devicepx_enqueue' );
add_action( 'admin_enqueue_scripts', 'jetpack_devicepx_enqueue' );
Expand All @@ -35,5 +37,6 @@ function jetpack_devicepx_init() {
* @uses wp_enqueue_script
*/
function jetpack_devicepx_enqueue() {
_deprecated_function( __FUNCTION__, 'jetpack-$$next-version$$' );
wp_enqueue_script( 'devicepx', 'https://s0.wp.com/wp-content/js/devicepx-jetpack.js', array(), gmdate( 'oW' ), true );
}
3 changes: 0 additions & 3 deletions projects/plugins/jetpack/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@
<file>tests/php/sync/test_class.jetpack-sync-base.php</file>
<file>tests/php/sync/test_class.jetpack-sync-full.php</file>
</testsuite>
<testsuite name="theme-tools">
<directory prefix="test_" suffix=".php">tests/php/modules/theme-tools</directory>
</testsuite>
<testsuite name="uninstall">
<directory prefix="test_" suffix=".php">tests/php/uninstall</directory>
</testsuite>
Expand Down
3 changes: 0 additions & 3 deletions projects/plugins/jetpack/tests/php.multisite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
<directory prefix="test_" suffix=".php">php/sync</directory>
<exclude>php/sync/test_class.jetpack-sync-full.php</exclude>
</testsuite>
<testsuite name="theme-tools">
<directory prefix="test_" suffix=".php">php/modules/theme-tools</directory>
</testsuite>
<testsuite name="uninstall">
<directory prefix="test_" suffix=".php">php/uninstall</directory>
</testsuite>
Expand Down

This file was deleted.

Loading