PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 13.5
Jetpack – WP Security, Backup, Speed, & Growth v13.5
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / modules / theme-tools / devicepx.php
devicepx.php
43 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Loads the devicepx library which improves the resolution of gravatars and
4 * wordpress.com uploads on hi-res and zoomed browsers.
5 *
6 * This feature will only be activated for themes that declare their support.
7 * This can be done by adding code similar to the following during the
8 * 'after_setup_theme' action:
9 *
10 * add_theme_support( 'jetpack-devicepx' );
11 *
12 * @package automattic/jetpack
13 */
14
15 _deprecated_file( __FILE__, 'jetpack-13.4' );
16 /**
17 * Enqueue the devicepx JS library, if enabled. The feature must
18 * be enabled earlier during `after_setup_theme`.
19 *
20 * @uses current_theme_supports, add_action
21 */
22 function jetpack_devicepx_init() {
23 if ( current_theme_supports( 'jetpack-devicepx' ) ) {
24 _deprecated_function( __FUNCTION__, 'jetpack-13.4' );
25 add_action( 'wp_enqueue_scripts', 'jetpack_devicepx_enqueue' );
26 add_action( 'customize_controls_enqueue_scripts', 'jetpack_devicepx_enqueue' );
27 add_action( 'admin_enqueue_scripts', 'jetpack_devicepx_enqueue' );
28 }
29 }
30
31 // Use a late priority to ensure that plugins and themes can enable or disable this feature.
32 add_action( 'init', 'jetpack_devicepx_init', 99 );
33
34 /**
35 * Enqueue the devicepx JS library.
36 *
37 * @uses wp_enqueue_script
38 */
39 function jetpack_devicepx_enqueue() {
40 _deprecated_function( __FUNCTION__, 'jetpack-13.4' );
41 wp_enqueue_script( 'devicepx', 'https://s0.wp.com/wp-content/js/devicepx-jetpack.js', array(), gmdate( 'oW' ), true );
42 }
43