PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 11.5
Jetpack – WP Security, Backup, Speed, & Growth v11.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
← All changes | modules/notes.php +19 -2 12.2.311.5 View file →
@@ -16,9 +16,9 @@
16 16
17 17 use Automattic\Jetpack\Connection\Manager as Connection_Manager;
18 18
19 19 if ( ! defined( 'JETPACK_NOTES__CACHE_BUSTER' ) ) {
20 - define( 'JETPACK_NOTES__CACHE_BUSTER', JETPACK__VERSION . '-' . gmdate( 'oW' ) . '-lite' );
20 + define( 'JETPACK_NOTES__CACHE_BUSTER', JETPACK__VERSION . '-' . gmdate( 'oW' ) );
21 21 }
22 22
23 23 /**
24 24 * Notifications class.
@@ -129,11 +129,28 @@
129 129 wp_enqueue_style( 'noticons', $this->wpcom_static_url( '/i/noticons/noticons.css' ), array( 'wpcom-notes-admin-bar' ), JETPACK_NOTES__CACHE_BUSTER );
130 130
131 131 $this->print_js();
132 132
133 + // attempt to use core or plugin libraries if registered.
133 134 $script_handles = array();
134 - wp_register_script( 'wpcom-notes-common', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/notes-common-lite.min.js' ), array(), JETPACK_NOTES__CACHE_BUSTER, true );
135 + if ( ! wp_script_is( 'mustache', 'registered' ) ) {
136 + wp_register_script( 'mustache', $this->wpcom_static_url( '/wp-content/js/mustache.js' ), null, JETPACK_NOTES__CACHE_BUSTER, true );
137 + }
138 + $script_handles[] = 'mustache';
139 + if ( ! wp_script_is( 'underscore', 'registered' ) ) {
140 + wp_register_script( 'underscore', $this->wpcom_static_url( '/wp-includes/js/underscore.min.js' ), null, JETPACK_NOTES__CACHE_BUSTER, true );
141 + }
142 + $script_handles[] = 'underscore';
143 + if ( ! wp_script_is( 'backbone', 'registered' ) ) {
144 + wp_register_script( 'backbone', $this->wpcom_static_url( '/wp-includes/js/backbone.min.js' ), array( 'underscore' ), JETPACK_NOTES__CACHE_BUSTER, true );
145 + }
146 + $script_handles[] = 'backbone';
147 +
148 + wp_register_script( 'wpcom-notes-common', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/notes-common-v2.js' ), array( 'jquery', 'underscore', 'backbone', 'mustache' ), JETPACK_NOTES__CACHE_BUSTER, true );
135 149 $script_handles[] = 'wpcom-notes-common';
150 + $script_handles[] = 'jquery';
151 + $script_handles[] = 'jquery-migrate';
152 + $script_handles[] = 'jquery-core';
136 153 wp_enqueue_script( 'wpcom-notes-admin-bar', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/admin-bar-v2.js' ), array( 'wpcom-notes-common' ), JETPACK_NOTES__CACHE_BUSTER, true );
137 154 $script_handles[] = 'wpcom-notes-admin-bar';
138 155
139 156 if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) {