PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 9.2
Jetpack – WP Security, Backup, Speed, & Growth v9.2
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
← All changes | modules/widgets.php +8 -26 14.4.29.2 View file →
@@ -8,19 +8,14 @@
8 8 * Auto Activate: No
9 9 * Module Tags: Social, Appearance
10 10 * Feature: Appearance
11 11 * Additional Search Queries: widget, widgets, facebook, gallery, twitter, gravatar, image, rss
12 - *
13 - * @package automattic/jetpack
14 12 */
15 13
16 -/**
17 - * Load Jetpack widget files.
18 - */
19 14 function jetpack_load_widgets() {
20 15 $widgets_include = array();
21 16
22 - foreach ( Jetpack::glob_php( __DIR__ . '/widgets' ) as $file ) {
17 + foreach ( Jetpack::glob_php( dirname( __FILE__ ) . '/widgets' ) as $file ) {
23 18 $widgets_include[] = $file;
24 19 }
25 20 /**
26 21 * Modify which Jetpack Widgets to register.
@@ -32,17 +27,18 @@
32 27 * @param array $widgets_include An array of widgets to be registered.
33 28 */
34 29 $widgets_include = apply_filters( 'jetpack_widgets_to_include', $widgets_include );
35 30
36 - foreach ( $widgets_include as $include ) {
31 + foreach( $widgets_include as $include ) {
37 32 include_once $include;
38 33 }
34 +
35 + include_once dirname( __FILE__ ) . '/widgets/migrate-to-core/image-widget.php';
36 + include_once dirname( __FILE__ ) . '/widgets/migrate-to-core/gallery-widget.php';
39 37 }
40 38
41 39 add_action( 'jetpack_modules_loaded', 'jetpack_widgets_loaded' );
42 -/**
43 - * Actions to perform after Jetpack widgets are loaded.
44 - */
40 +
45 41 function jetpack_widgets_loaded() {
46 42 Jetpack::enable_module_configurable( __FILE__ );
47 43 add_filter( 'jetpack_module_configuration_url_widgets', 'jetpack_widgets_configuration_url' );
48 44 }
@@ -64,15 +60,9 @@
64 60 *
65 61 * @since 4.4.0
66 62 */
67 63 function jetpack_widgets_customizer_assets_preview() {
68 - wp_enqueue_script(
69 - 'jetpack-customizer-widget-utils',
70 - plugins_url( '/widgets/customizer-utils.js', __FILE__ ),
71 - array( 'jquery', 'customize-base' ),
72 - JETPACK__VERSION,
73 - false
74 - );
64 + wp_enqueue_script( 'jetpack-customizer-widget-utils', plugins_url( '/widgets/customizer-utils.js', __FILE__ ), array( 'customize-base' ) );
75 65 }
76 66 add_action( 'customize_preview_init', 'jetpack_widgets_customizer_assets_preview' );
77 67
78 68 /**
@@ -80,20 +70,12 @@
80 70 *
81 71 * @since 4.4.0
82 72 */
83 73 function jetpack_widgets_customizer_assets_controls() {
84 - wp_enqueue_style(
85 - 'jetpack-customizer-widget-controls',
86 - plugins_url( '/widgets/customizer-controls.css', __FILE__ ),
87 - array( 'customize-widgets' ),
88 - JETPACK__VERSION
89 - );
74 + wp_enqueue_style( 'jetpack-customizer-widget-controls', plugins_url( '/widgets/customizer-controls.css', __FILE__ ), array( 'customize-widgets' ) );
90 75 }
91 76 add_action( 'customize_controls_enqueue_scripts', 'jetpack_widgets_customizer_assets_controls' );
92 77
93 -/**
94 - * Cleanup old Jetpack widgets data.
95 - */
96 78 function jetpack_widgets_remove_old_widgets() {
97 79 $old_widgets = array(
98 80 'googleplus-badge',
99 81 );