77 'secure' => (string) ( 'https' === parse_url( site_url(), PHP_URL_SCHEME ) ), |
75 'secure' => (string) ( 'https' === parse_url( site_url(), PHP_URL_SCHEME ) ), |
78 ) ); |
76 ) ); |
79 |
77 |
80 $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 ); |
78 $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 ); |
81 did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array( |
79 did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array( |
82 'warnDelete' => __( "You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete." ), |
80 'warnDelete' => __( "You are about to permanently delete these items from your site.\nThis action cannot be undone.\n 'Cancel' to stop, 'OK' to delete." ), |
83 'dismiss' => __( 'Dismiss this notice.' ), |
81 'dismiss' => __( 'Dismiss this notice.' ), |
|
82 'collapseMenu' => __( 'Collapse Main menu' ), |
|
83 'expandMenu' => __( 'Expand Main menu' ), |
84 ) ); |
84 ) ); |
85 |
85 |
86 $scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 ); |
86 $scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 ); |
87 |
87 |
88 $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 ); |
88 $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 ); |
89 |
89 |
90 $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1 ); |
90 $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1 ); |
91 did_action( 'init' ) && $scripts->localize( 'quicktags', 'quicktagsL10n', array( |
91 did_action( 'init' ) && $scripts->localize( 'quicktags', 'quicktagsL10n', array( |
92 'closeAllOpenTags' => esc_attr__( 'Close all open tags' ), |
92 'closeAllOpenTags' => __( 'Close all open tags' ), |
93 'closeTags' => esc_attr__( 'close tags' ), |
93 'closeTags' => __( 'close tags' ), |
94 'enterURL' => __( 'Enter the URL' ), |
94 'enterURL' => __( 'Enter the URL' ), |
95 'enterImageURL' => __( 'Enter the URL of the image' ), |
95 'enterImageURL' => __( 'Enter the URL of the image' ), |
96 'enterImageDescription' => __( 'Enter a description of the image' ), |
96 'enterImageDescription' => __( 'Enter a description of the image' ), |
97 'fullscreen' => __( 'fullscreen' ), |
97 'textdirection' => __( 'text direction' ), |
98 'toggleFullscreen' => esc_attr__( 'Toggle fullscreen mode' ), |
98 'toggleTextdirection' => __( 'Toggle Editor Text Direction' ), |
99 'textdirection' => esc_attr__( 'text direction' ), |
99 'dfw' => __( 'Distraction-free writing mode' ), |
100 'toggleTextdirection' => esc_attr__( 'Toggle Editor Text Direction' ), |
100 'strong' => __( 'Bold' ), |
101 'dfw' => esc_attr__( 'Distraction-free writing mode' ) |
101 'strongClose' => __( 'Close bold tag' ), |
|
102 'em' => __( 'Italic' ), |
|
103 'emClose' => __( 'Close italic tag' ), |
|
104 'link' => __( 'Insert link' ), |
|
105 'blockquote' => __( 'Blockquote' ), |
|
106 'blockquoteClose' => __( 'Close blockquote tag' ), |
|
107 'del' => __( 'Deleted text (strikethrough)' ), |
|
108 'delClose' => __( 'Close deleted text tag' ), |
|
109 'ins' => __( 'Inserted text' ), |
|
110 'insClose' => __( 'Close inserted text tag' ), |
|
111 'image' => __( 'Insert image' ), |
|
112 'ul' => __( 'Bulleted list' ), |
|
113 'ulClose' => __( 'Close bulleted list tag' ), |
|
114 'ol' => __( 'Numbered list' ), |
|
115 'olClose' => __( 'Close numbered list tag' ), |
|
116 'li' => __( 'List item' ), |
|
117 'liClose' => __( 'Close list item tag' ), |
|
118 'code' => __( 'Code' ), |
|
119 'codeClose' => __( 'Close code tag' ), |
|
120 'more' => __( 'Insert Read More tag' ), |
102 ) ); |
121 ) ); |
103 |
122 |
104 $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' ); |
123 $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' ); |
105 |
124 |
106 $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), false, 1 ); |
125 $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), false, 1 ); |
107 |
126 |
108 $scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), false, 1 ); |
127 // Back-compat for old DFW. To-do: remove at the end of 2016. |
|
128 $scripts->add( 'wp-fullscreen-stub', "/wp-admin/js/wp-fullscreen-stub$suffix.js", array(), false, 1 ); |
109 |
129 |
110 $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 ); |
130 $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 ); |
111 did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array( |
131 did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array( |
112 'noPerm' => __('You do not have permission to do that.'), |
132 'noPerm' => __('Sorry, you are not allowed to do that.'), |
113 'broken' => __('An unidentified error has occurred.') |
133 'broken' => __('Something went wrong.') |
|
134 ) ); |
|
135 |
|
136 $scripts->add( 'wp-api-request', "/wp-includes/js/api-request$suffix.js", array( 'jquery' ), false, 1 ); |
|
137 // `wpApiSettings` is also used by `wp-api`, which depends on this script. |
|
138 did_action( 'init' ) && $scripts->localize( 'wp-api-request', 'wpApiSettings', array( |
|
139 'root' => esc_url_raw( get_rest_url() ), |
|
140 'nonce' => ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' ), |
|
141 'versionString' => 'wp/v2/', |
114 ) ); |
142 ) ); |
115 |
143 |
116 $scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129a', 1 ); |
144 $scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129a', 1 ); |
117 did_action( 'init' ) && $scripts->localize( 'wp-pointer', 'wpPointerL10n', array( |
145 did_action( 'init' ) && $scripts->localize( 'wp-pointer', 'wpPointerL10n', array( |
118 'dismiss' => __('Dismiss'), |
146 'dismiss' => __('Dismiss'), |
207 $scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array( 'jquery-ui-button' ), '1.11.4', 1 ); |
235 $scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array( 'jquery-ui-button' ), '1.11.4', 1 ); |
208 $scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 ); |
236 $scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 ); |
209 $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 ); |
237 $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 ); |
210 $scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11.4', 1 ); |
238 $scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11.4', 1 ); |
211 |
239 |
|
240 // Strings for 'jquery-ui-autocomplete' live region messages |
|
241 did_action( 'init' ) && $scripts->localize( 'jquery-ui-autocomplete', 'uiAutocompleteL10n', array( |
|
242 'noResults' => __( 'No results found.' ), |
|
243 /* translators: Number of results found when using jQuery UI Autocomplete */ |
|
244 'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ), |
|
245 /* translators: %d: Number of results found when using jQuery UI Autocomplete */ |
|
246 'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ), |
|
247 'itemSelected' => __( 'Item selected.' ), |
|
248 ) ); |
|
249 |
212 // deprecated, not used in core, most functionality is included in jQuery 1.3 |
250 // deprecated, not used in core, most functionality is included in jQuery 1.3 |
213 $scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '3.37.0', 1 ); |
251 $scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '4.2.1', 1 ); |
214 |
252 |
215 // jQuery plugins |
253 // jQuery plugins |
216 $scripts->add( 'jquery-color', "/wp-includes/js/jquery/jquery.color.min.js", array('jquery'), '2.1.1', 1 ); |
254 $scripts->add( 'jquery-color', "/wp-includes/js/jquery/jquery.color.min.js", array('jquery'), '2.1.1', 1 ); |
217 $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20110113', 1 ); |
|
218 $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m', 1 ); |
255 $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m', 1 ); |
219 $scripts->add( 'jquery-query', "/wp-includes/js/jquery/jquery.query.js", array('jquery'), '2.1.7', 1 ); |
256 $scripts->add( 'jquery-query', "/wp-includes/js/jquery/jquery.query.js", array('jquery'), '2.1.7', 1 ); |
220 $scripts->add( 'jquery-serialize-object', "/wp-includes/js/jquery/jquery.serialize-object.js", array('jquery'), '0.2', 1 ); |
257 $scripts->add( 'jquery-serialize-object', "/wp-includes/js/jquery/jquery.serialize-object.js", array('jquery'), '0.2', 1 ); |
221 $scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m', 1 ); |
258 $scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m', 1 ); |
222 $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 ); |
259 $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 ); |
223 $scripts->add( 'jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 ); |
260 $scripts->add( 'jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 ); |
224 |
261 |
|
262 // Not used any more, registered for backwards compatibility. |
|
263 $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20110113', 1 ); |
|
264 |
225 // Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv. |
265 // Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv. |
226 // It sets jQuery as a dependency, as the theme may have been implicitly loading it this way. |
266 // It sets jQuery as a dependency, as the theme may have been implicitly loading it this way. |
227 $scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array(), '3.1.2', 1 ); |
267 $scripts->add( 'imagesloaded', "/wp-includes/js/imagesloaded.min.js", array(), '3.2.0', 1 ); |
228 $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2', 1 ); |
268 $scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array( 'imagesloaded' ), '3.3.2', 1 ); |
|
269 $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2b', 1 ); |
229 |
270 |
230 $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1 ); |
271 $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1 ); |
231 did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array( |
272 did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array( |
232 'next' => __('Next >'), |
273 'next' => __('Next >'), |
233 'prev' => __('< Prev'), |
274 'prev' => __('< Prev'), |
234 'image' => __('Image'), |
275 'image' => __('Image'), |
235 'of' => __('of'), |
276 'of' => __('of'), |
236 'close' => __('Close'), |
277 'close' => __('Close'), |
237 'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'), |
278 'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'), |
238 'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'), |
279 'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'), |
239 ) ); |
280 ) ); |
240 |
281 |
241 $scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.js", array('jquery'), '0.9.12'); |
282 $scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.js", array('jquery'), '0.9.12'); |
242 |
283 |
243 $scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", array(), '2.2-20120417'); |
284 $scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", array(), '2.2-20120417'); |
244 |
285 |
245 // error message for both plupload and swfupload |
286 // Error messages for Plupload. |
246 $uploader_l10n = array( |
287 $uploader_l10n = array( |
247 'queue_limit_exceeded' => __('You have attempted to queue too many files.'), |
288 'queue_limit_exceeded' => __('You have attempted to queue too many files.'), |
248 'file_exceeds_size_limit' => __('%s exceeds the maximum upload size for this site.'), |
289 'file_exceeds_size_limit' => __('%s exceeds the maximum upload size for this site.'), |
249 'zero_byte_file' => __('This file is empty. Please try another.'), |
290 'zero_byte_file' => __('This file is empty. Please try another.'), |
250 'invalid_filetype' => __('This file type is not allowed. Please try another.'), |
291 'invalid_filetype' => __('Sorry, this file type is not permitted for security reasons.'), |
251 'not_an_image' => __('This file is not an image. Please try another.'), |
292 'not_an_image' => __('This file is not an image. Please try another.'), |
252 'image_memory_exceeded' => __('Memory exceeded. Please try another smaller file.'), |
293 'image_memory_exceeded' => __('Memory exceeded. Please try another smaller file.'), |
253 'image_dimensions_exceeded' => __('This is larger than the maximum size. Please try another.'), |
294 'image_dimensions_exceeded' => __('This is larger than the maximum size. Please try another.'), |
254 'default_error' => __('An error occurred in the upload. Please try again later.'), |
295 'default_error' => __('An error occurred in the upload. Please try again later.'), |
255 'missing_upload_url' => __('There was a configuration error. Please contact the server administrator.'), |
296 'missing_upload_url' => __('There was a configuration error. Please contact the server administrator.'), |
256 'upload_limit_exceeded' => __('You may only upload 1 file.'), |
297 'upload_limit_exceeded' => __('You may only upload 1 file.'), |
257 'http_error' => __('HTTP error.'), |
298 'http_error' => __('HTTP error.'), |
258 'upload_failed' => __('Upload failed.'), |
299 'upload_failed' => __('Upload failed.'), |
|
300 /* translators: 1: Opening link tag, 2: Closing link tag */ |
259 'big_upload_failed' => __('Please try uploading this file with the %1$sbrowser uploader%2$s.'), |
301 'big_upload_failed' => __('Please try uploading this file with the %1$sbrowser uploader%2$s.'), |
260 'big_upload_queued' => __('%s exceeds the maximum upload size for the multi-file uploader when used in your browser.'), |
302 'big_upload_queued' => __('%s exceeds the maximum upload size for the multi-file uploader when used in your browser.'), |
261 'io_error' => __('IO error.'), |
303 'io_error' => __('IO error.'), |
262 'security_error' => __('Security error.'), |
304 'security_error' => __('Security error.'), |
263 'file_cancelled' => __('File canceled.'), |
305 'file_cancelled' => __('File canceled.'), |
280 $scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 ); |
323 $scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 ); |
281 did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n ); |
324 did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n ); |
282 |
325 |
283 // keep 'swfupload' for back-compat. |
326 // keep 'swfupload' for back-compat. |
284 $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', array(), '2201-20110113'); |
327 $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', array(), '2201-20110113'); |
285 $scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload', 'swfobject'), '2201a'); |
328 $scripts->add( 'swfupload-all', false, array( 'swfupload' ), '2201' ); |
286 $scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201'); |
|
287 $scripts->add( 'swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201'); |
|
288 $scripts->add( 'swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201'); |
|
289 $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524'); |
329 $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524'); |
290 did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n ); |
330 did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n ); |
291 |
331 |
292 $scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 ); |
332 $scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 ); |
293 |
333 |
294 $scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", array(), '2011-02-23' ); |
334 $scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", array(), '2015-05-03' ); |
295 did_action( 'init' ) && $scripts->add_data( 'json2', 'conditional', 'lt IE 8' ); |
335 did_action( 'init' ) && $scripts->add_data( 'json2', 'conditional', 'lt IE 8' ); |
296 |
336 |
297 $scripts->add( 'underscore', "/wp-includes/js/underscore$dev_suffix.js", array(), '1.6.0', 1 ); |
337 $scripts->add( 'underscore', "/wp-includes/js/underscore$dev_suffix.js", array(), '1.8.3', 1 ); |
298 $scripts->add( 'backbone', "/wp-includes/js/backbone$dev_suffix.js", array( 'underscore','jquery' ), '1.1.2', 1 ); |
338 $scripts->add( 'backbone', "/wp-includes/js/backbone$dev_suffix.js", array( 'underscore','jquery' ), '1.2.3', 1 ); |
299 |
339 |
300 $scripts->add( 'wp-util', "/wp-includes/js/wp-util$suffix.js", array('underscore', 'jquery'), false, 1 ); |
340 $scripts->add( 'wp-util', "/wp-includes/js/wp-util$suffix.js", array('underscore', 'jquery'), false, 1 ); |
301 did_action( 'init' ) && $scripts->localize( 'wp-util', '_wpUtilSettings', array( |
341 did_action( 'init' ) && $scripts->localize( 'wp-util', '_wpUtilSettings', array( |
302 'ajax' => array( |
342 'ajax' => array( |
303 'url' => admin_url( 'admin-ajax.php', 'relative' ), |
343 'url' => admin_url( 'admin-ajax.php', 'relative' ), |
304 ), |
344 ), |
305 ) ); |
345 ) ); |
306 |
346 |
|
347 $scripts->add( 'wp-sanitize', "/wp-includes/js/wp-sanitize$suffix.js", array('jquery'), false, 1 ); |
|
348 |
307 $scripts->add( 'wp-backbone', "/wp-includes/js/wp-backbone$suffix.js", array('backbone', 'wp-util'), false, 1 ); |
349 $scripts->add( 'wp-backbone', "/wp-includes/js/wp-backbone$suffix.js", array('backbone', 'wp-util'), false, 1 ); |
308 |
350 |
309 $scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'wp-backbone', 'jquery-ui-slider', 'hoverIntent' ), false, 1 ); |
351 $scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'wp-backbone', 'jquery-ui-slider', 'hoverIntent' ), false, 1 ); |
310 |
352 |
311 $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), '0.9.10', 1 ); |
353 $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), false, 1 ); |
312 |
354 |
313 $scripts->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player.min.js", array('jquery'), '2.16.2', 1 ); |
355 $scripts->add( 'mediaelement', false, array( 'jquery', 'mediaelement-core', 'mediaelement-migrate' ), '4.2.6-78496d1' ); |
314 did_action( 'init' ) && $scripts->localize( 'mediaelement', 'mejsL10n', array( |
356 $scripts->add( 'mediaelement-core', "/wp-includes/js/mediaelement/mediaelement-and-player$suffix.js", array(), '4.2.6-78496d1', 1 ); |
315 'language' => get_bloginfo( 'language' ), |
357 $scripts->add( 'mediaelement-migrate', "/wp-includes/js/mediaelement/mediaelement-migrate$suffix.js", array(), false, 1); |
|
358 |
|
359 did_action( 'init' ) && $scripts->add_inline_script( 'mediaelement-core', sprintf( 'var mejsL10n = %s;', wp_json_encode( array( |
|
360 'language' => strtolower( strtok( is_admin() ? get_user_locale() : get_locale(), '_-' ) ), |
316 'strings' => array( |
361 'strings' => array( |
317 'Close' => __( 'Close' ), |
362 'mejs.install-flash' => __( 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/' ), |
318 'Fullscreen' => __( 'Fullscreen' ), |
363 'mejs.fullscreen-off' => __( 'Turn off Fullscreen' ), |
319 'Download File' => __( 'Download File' ), |
364 'mejs.fullscreen-on' => __( 'Go Fullscreen' ), |
320 'Download Video' => __( 'Download Video' ), |
365 'mejs.download-video' => __( 'Download Video' ), |
321 'Play/Pause' => __( 'Play/Pause' ), |
366 'mejs.fullscreen' => __( 'Fullscreen' ), |
322 'Mute Toggle' => __( 'Mute Toggle' ), |
367 'mejs.time-jump-forward' => array( __( 'Jump forward 1 second' ), __( 'Jump forward %1 seconds' ) ), |
323 'None' => __( 'None' ), |
368 'mejs.loop' => __( 'Toggle Loop' ), |
324 'Turn off Fullscreen' => __( 'Turn off Fullscreen' ), |
369 'mejs.play' => __( 'Play' ), |
325 'Go Fullscreen' => __( 'Go Fullscreen' ), |
370 'mejs.pause' => __( 'Pause' ), |
326 'Unmute' => __( 'Unmute' ), |
371 'mejs.close' => __( 'Close' ), |
327 'Mute' => __( 'Mute' ), |
372 'mejs.time-slider' => __( 'Time Slider' ), |
328 'Captions/Subtitles' => __( 'Captions/Subtitles' ) |
373 'mejs.time-help-text' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ), |
|
374 'mejs.time-skip-back' => array( __( 'Skip back 1 second' ), __( 'Skip back %1 seconds' ) ), |
|
375 'mejs.captions-subtitles' => __( 'Captions/Subtitles' ), |
|
376 'mejs.captions-chapters' => __( 'Chapters' ), |
|
377 'mejs.none' => __( 'None' ), |
|
378 'mejs.mute-toggle' => __( 'Mute Toggle' ), |
|
379 'mejs.volume-help-text' => __( 'Use Up/Down Arrow keys to increase or decrease volume.' ), |
|
380 'mejs.unmute' => __( 'Unmute' ), |
|
381 'mejs.mute' => __( 'Mute' ), |
|
382 'mejs.volume-slider' => __( 'Volume Slider' ), |
|
383 'mejs.video-player' => __( 'Video Player' ), |
|
384 'mejs.audio-player' => __( 'Audio Player' ), |
|
385 'mejs.ad-skip' => __( 'Skip ad' ), |
|
386 'mejs.ad-skip-info' => array( __( 'Skip in 1 second' ), __( 'Skip in %1 seconds' ) ), |
|
387 'mejs.source-chooser' => __( 'Source Chooser' ), |
|
388 'mejs.stop' => __( 'Stop' ), |
|
389 'mejs.speed-rate' => __( 'Speed Rate' ), |
|
390 'mejs.live-broadcast' => __( 'Live Broadcast' ), |
|
391 'mejs.afrikaans' => __( 'Afrikaans' ), |
|
392 'mejs.albanian' => __( 'Albanian' ), |
|
393 'mejs.arabic' => __( 'Arabic' ), |
|
394 'mejs.belarusian' => __( 'Belarusian' ), |
|
395 'mejs.bulgarian' => __( 'Bulgarian' ), |
|
396 'mejs.catalan' => __( 'Catalan' ), |
|
397 'mejs.chinese' => __( 'Chinese' ), |
|
398 'mejs.chinese-simplified' => __( 'Chinese (Simplified)' ), |
|
399 'mejs.chinese-traditional' => __( 'Chinese (Traditional)' ), |
|
400 'mejs.croatian' => __( 'Croatian' ), |
|
401 'mejs.czech' => __( 'Czech' ), |
|
402 'mejs.danish' => __( 'Danish' ), |
|
403 'mejs.dutch' => __( 'Dutch' ), |
|
404 'mejs.english' => __( 'English' ), |
|
405 'mejs.estonian' => __( 'Estonian' ), |
|
406 'mejs.filipino' => __( 'Filipino' ), |
|
407 'mejs.finnish' => __( 'Finnish' ), |
|
408 'mejs.french' => __( 'French' ), |
|
409 'mejs.galician' => __( 'Galician' ), |
|
410 'mejs.german' => __( 'German' ), |
|
411 'mejs.greek' => __( 'Greek' ), |
|
412 'mejs.haitian-creole' => __( 'Haitian Creole' ), |
|
413 'mejs.hebrew' => __( 'Hebrew' ), |
|
414 'mejs.hindi' => __( 'Hindi' ), |
|
415 'mejs.hungarian' => __( 'Hungarian' ), |
|
416 'mejs.icelandic' => __( 'Icelandic' ), |
|
417 'mejs.indonesian' => __( 'Indonesian' ), |
|
418 'mejs.irish' => __( 'Irish' ), |
|
419 'mejs.italian' => __( 'Italian' ), |
|
420 'mejs.japanese' => __( 'Japanese' ), |
|
421 'mejs.korean' => __( 'Korean' ), |
|
422 'mejs.latvian' => __( 'Latvian' ), |
|
423 'mejs.lithuanian' => __( 'Lithuanian' ), |
|
424 'mejs.macedonian' => __( 'Macedonian' ), |
|
425 'mejs.malay' => __( 'Malay' ), |
|
426 'mejs.maltese' => __( 'Maltese' ), |
|
427 'mejs.norwegian' => __( 'Norwegian' ), |
|
428 'mejs.persian' => __( 'Persian' ), |
|
429 'mejs.polish' => __( 'Polish' ), |
|
430 'mejs.portuguese' => __( 'Portuguese' ), |
|
431 'mejs.romanian' => __( 'Romanian' ), |
|
432 'mejs.russian' => __( 'Russian' ), |
|
433 'mejs.serbian' => __( 'Serbian' ), |
|
434 'mejs.slovak' => __( 'Slovak' ), |
|
435 'mejs.slovenian' => __( 'Slovenian' ), |
|
436 'mejs.spanish' => __( 'Spanish' ), |
|
437 'mejs.swahili' => __( 'Swahili' ), |
|
438 'mejs.swedish' => __( 'Swedish' ), |
|
439 'mejs.tagalog' => __( 'Tagalog' ), |
|
440 'mejs.thai' => __( 'Thai' ), |
|
441 'mejs.turkish' => __( 'Turkish' ), |
|
442 'mejs.ukrainian' => __( 'Ukrainian' ), |
|
443 'mejs.vietnamese' => __( 'Vietnamese' ), |
|
444 'mejs.welsh' => __( 'Welsh' ), |
|
445 'mejs.yiddish' => __( 'Yiddish' ), |
|
446 ), |
|
447 ) ) ), 'before' ); |
|
448 |
|
449 |
|
450 $scripts->add( 'mediaelement-vimeo', "/wp-includes/js/mediaelement/renderers/vimeo.min.js", array('mediaelement'), '4.2.6-78496d1', 1 ); |
|
451 $scripts->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.js", array('mediaelement'), false, 1 ); |
|
452 $mejs_settings = array( |
|
453 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ), |
|
454 'classPrefix' => 'mejs-', |
|
455 'stretching' => 'responsive', |
|
456 ); |
|
457 did_action( 'init' ) && $scripts->localize( 'mediaelement', '_wpmejsSettings', |
|
458 /** |
|
459 * Filters the MediaElement configuration settings. |
|
460 * |
|
461 * @since 4.4.0 |
|
462 * |
|
463 * @param array $mejs_settings MediaElement settings array. |
|
464 */ |
|
465 apply_filters( 'mejs_settings', $mejs_settings ) |
|
466 ); |
|
467 |
|
468 $scripts->add( 'wp-codemirror', '/wp-includes/js/codemirror/codemirror.min.js', array(), '5.29.1-alpha-ee20357' ); |
|
469 $scripts->add( 'csslint', '/wp-includes/js/codemirror/csslint.js', array(), '1.0.5' ); |
|
470 $scripts->add( 'jshint', '/wp-includes/js/codemirror/jshint.js', array(), '2.9.5.999' ); |
|
471 $scripts->add( 'jsonlint', '/wp-includes/js/codemirror/jsonlint.js', array(), '1.6.2' ); |
|
472 $scripts->add( 'htmlhint', '/wp-includes/js/codemirror/htmlhint.js', array(), '0.9.14-xwp' ); |
|
473 $scripts->add( 'htmlhint-kses', '/wp-includes/js/codemirror/htmlhint-kses.js', array( 'htmlhint' ) ); |
|
474 $scripts->add( 'code-editor', "/wp-admin/js/code-editor$suffix.js", array( 'jquery', 'wp-codemirror', 'underscore' ) ); |
|
475 $scripts->add( 'wp-theme-plugin-editor', "/wp-admin/js/theme-plugin-editor$suffix.js", array( 'wp-util', 'wp-sanitize', 'jquery', 'jquery-ui-core', 'wp-a11y', 'underscore' ) ); |
|
476 did_action( 'init' ) && $scripts->add_inline_script( 'wp-theme-plugin-editor', sprintf( 'wp.themePluginEditor.l10n = %s;', wp_json_encode( array( |
|
477 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
|
478 'saveError' => __( 'Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.' ), |
|
479 'lintError' => array( |
|
480 /* translators: %d: error count */ |
|
481 'singular' => _n( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.', 1 ), |
|
482 /* translators: %d: error count */ |
|
483 'plural' => _n( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. |
329 ), |
484 ), |
330 ) ); |
485 ) ) ) ); |
331 |
486 |
332 |
487 $scripts->add( 'wp-playlist', "/wp-includes/js/mediaelement/wp-playlist$suffix.js", array( 'wp-util', 'backbone', 'mediaelement' ), false, 1 ); |
333 $scripts->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.js", array('mediaelement'), false, 1 ); |
|
334 did_action( 'init' ) && $scripts->localize( 'mediaelement', '_wpmejsSettings', array( |
|
335 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ), |
|
336 ) ); |
|
337 |
|
338 $scripts->add( 'froogaloop', "/wp-includes/js/mediaelement/froogaloop.min.js", array(), '2.0' ); |
|
339 $scripts->add( 'wp-playlist', "/wp-includes/js/mediaelement/wp-playlist.js", array( 'wp-util', 'backbone', 'mediaelement' ), false, 1 ); |
|
340 |
488 |
341 $scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' ); |
489 $scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' ); |
342 did_action( 'init' ) && $scripts->localize( 'zxcvbn-async', '_zxcvbnSettings', array( |
490 did_action( 'init' ) && $scripts->localize( 'zxcvbn-async', '_zxcvbnSettings', array( |
343 'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js', |
491 'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js', |
344 ) ); |
492 ) ); |
345 |
493 |
346 $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 ); |
494 $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 ); |
347 did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array( |
495 did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array( |
348 'empty' => __('Strength indicator'), |
496 'unknown' => _x( 'Password strength unknown', 'password strength' ), |
349 'short' => __('Very weak'), |
497 'short' => _x( 'Very weak', 'password strength' ), |
350 'bad' => __('Weak'), |
498 'bad' => _x( 'Weak', 'password strength' ), |
351 /* translators: password strength */ |
499 'good' => _x( 'Medium', 'password strength' ), |
352 'good' => _x('Medium', 'password strength'), |
500 'strong' => _x( 'Strong', 'password strength' ), |
353 'strong' => __('Strong'), |
501 'mismatch' => _x( 'Mismatch', 'password mismatch' ), |
354 'mismatch' => __('Mismatch') |
|
355 ) ); |
502 ) ); |
356 |
503 |
357 $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 ); |
504 $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 ); |
|
505 did_action( 'init' ) && $scripts->localize( 'user-profile', 'userProfileL10n', array( |
|
506 'warn' => __( 'Your new password has not been saved.' ), |
|
507 'warnWeak' => __( 'Confirm use of weak password' ), |
|
508 'show' => __( 'Show' ), |
|
509 'hide' => __( 'Hide' ), |
|
510 'cancel' => __( 'Cancel' ), |
|
511 'ariaShow' => esc_attr__( 'Show password' ), |
|
512 'ariaHide' => esc_attr__( 'Hide password' ), |
|
513 ) ); |
|
514 |
358 $scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 ); |
515 $scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 ); |
359 |
516 |
360 $scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 ); |
517 $scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 ); |
361 |
518 |
362 $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 ); |
519 $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 ); |
363 |
520 |
364 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery' ), false, 1 ); |
521 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); |
365 did_action( 'init' ) && $scripts->localize( 'wplink', 'wpLinkL10n', array( |
522 did_action( 'init' ) && $scripts->localize( 'wplink', 'wpLinkL10n', array( |
366 'title' => __('Insert/edit link'), |
523 'title' => __('Insert/edit link'), |
367 'update' => __('Update'), |
524 'update' => __('Update'), |
368 'save' => __('Add Link'), |
525 'save' => __('Add Link'), |
369 'noTitle' => __('(no title)'), |
526 'noTitle' => __('(no title)'), |
370 'noMatchesFound' => __('No results found.') |
527 'noMatchesFound' => __('No results found.'), |
|
528 'linkSelected' => __( 'Link selected.' ), |
|
529 'linkInserted' => __( 'Link inserted.' ), |
371 ) ); |
530 ) ); |
372 |
531 |
373 $scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 ); |
532 $scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 ); |
374 |
533 |
375 $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), false, 1 ); |
534 $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1 ); |
376 did_action( 'init' ) && $scripts->localize( 'word-count', 'wordCountL10n', array( |
|
377 /* translators: If your word count is based on single characters (East Asian characters), |
|
378 enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */ |
|
379 'type' => 'characters' == _x( 'words', 'word count: words or characters?' ) ? 'c' : 'w', |
|
380 ) ); |
|
381 |
535 |
382 $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode' ), false, 1 ); |
536 $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode' ), false, 1 ); |
383 |
537 |
384 $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), '1.8.1', 1 ); |
538 $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), '1.8.1', 1 ); |
385 |
539 |
386 $scripts->add( 'customize-base', "/wp-includes/js/customize-base$suffix.js", array( 'jquery', 'json2', 'underscore', 'wp-a11y' ), false, 1 ); |
540 $scripts->add( 'customize-base', "/wp-includes/js/customize-base$suffix.js", array( 'jquery', 'json2', 'underscore' ), false, 1 ); |
387 $scripts->add( 'customize-loader', "/wp-includes/js/customize-loader$suffix.js", array( 'customize-base' ), false, 1 ); |
541 $scripts->add( 'customize-loader', "/wp-includes/js/customize-loader$suffix.js", array( 'customize-base' ), false, 1 ); |
388 $scripts->add( 'customize-preview', "/wp-includes/js/customize-preview$suffix.js", array( 'customize-base' ), false, 1 ); |
542 $scripts->add( 'customize-preview', "/wp-includes/js/customize-preview$suffix.js", array( 'wp-a11y', 'customize-base' ), false, 1 ); |
389 $scripts->add( 'customize-models', "/wp-includes/js/customize-models.js", array( 'underscore', 'backbone' ), false, 1 ); |
543 $scripts->add( 'customize-models', "/wp-includes/js/customize-models.js", array( 'underscore', 'backbone' ), false, 1 ); |
390 $scripts->add( 'customize-views', "/wp-includes/js/customize-views.js", array( 'jquery', 'underscore', 'imgareaselect', 'customize-models' ), false, 1 ); |
544 $scripts->add( 'customize-views', "/wp-includes/js/customize-views.js", array( 'jquery', 'underscore', 'imgareaselect', 'customize-models', 'media-editor', 'media-views' ), false, 1 ); |
391 $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base' ), false, 1 ); |
545 $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y', 'wp-util', 'jquery-ui-core' ), false, 1 ); |
392 did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array( |
546 did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array( |
393 'activate' => __( 'Save & Activate' ), |
547 'activate' => __( 'Activate & Publish' ), |
394 'save' => __( 'Save & Publish' ), |
548 'save' => __( 'Save & Publish' ), // @todo Remove as not required. |
|
549 'publish' => __( 'Publish' ), |
|
550 'published' => __( 'Published' ), |
|
551 'saveDraft' => __( 'Save Draft' ), |
|
552 'draftSaved' => __( 'Draft Saved' ), |
|
553 'updating' => __( 'Updating' ), |
|
554 'schedule' => _x( 'Schedule', 'customizer changeset action/button label' ), |
|
555 'scheduled' => _x( 'Scheduled', 'customizer changeset status' ), |
|
556 'invalid' => __( 'Invalid' ), |
|
557 'saveBeforeShare' => __( 'Please save your changes in order to share the preview.' ), |
|
558 'futureDateError' => __( 'You must supply a future date to schedule.' ), |
395 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
559 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
396 'saved' => __( 'Saved' ), |
560 'saved' => __( 'Saved' ), |
397 'cancel' => __( 'Cancel' ), |
561 'cancel' => __( 'Cancel' ), |
398 'close' => __( 'Close' ), |
562 'close' => __( 'Close' ), |
399 'cheatin' => __( 'Cheatin’ uh?' ), |
563 'action' => __( 'Action' ), |
|
564 'discardChanges' => __( 'Discard changes' ), |
|
565 'cheatin' => __( 'Something went wrong.' ), |
|
566 'notAllowedHeading' => __( 'You need a higher level of permission.' ), |
|
567 'notAllowed' => __( 'Sorry, you are not allowed to customize this site.' ), |
400 'previewIframeTitle' => __( 'Site Preview' ), |
568 'previewIframeTitle' => __( 'Site Preview' ), |
401 'loginIframeTitle' => __( 'Session expired' ), |
569 'loginIframeTitle' => __( 'Session expired' ), |
402 |
570 'collapseSidebar' => _x( 'Hide Controls', 'label for hide controls button without length constraints' ), |
|
571 'expandSidebar' => _x( 'Show Controls', 'label for hide controls button without length constraints' ), |
|
572 'untitledBlogName' => __( '(Untitled)' ), |
|
573 'unknownRequestFail' => __( 'Looks like something’s gone wrong. Wait a couple seconds, and then try again.' ), |
|
574 'themeDownloading' => __( 'Downloading your new theme…' ), |
|
575 'themePreviewWait' => __( 'Setting up your live preview. This may take a bit.' ), |
|
576 'revertingChanges' => __( 'Reverting unpublished changes…' ), |
|
577 'trashConfirm' => __( 'Are you sure you’d like to discard your unpublished changes?' ), |
|
578 /* translators: %s: Display name of the user who has taken over the changeset in customizer. */ |
|
579 'takenOverMessage' => __( '%s has taken over and is currently customizing.' ), |
|
580 /* translators: %s: URL to the Customizer to load the autosaved version */ |
|
581 'autosaveNotice' => __( 'There is a more recent autosave of your changes than the one you are previewing. <a href="%s">Restore the autosave</a>' ), |
|
582 'videoHeaderNotice' => __( 'This theme doesn’t support video headers on this page. Navigate to the front page or another page that supports video headers.' ), |
403 // Used for overriding the file types allowed in plupload. |
583 // Used for overriding the file types allowed in plupload. |
404 'allowedFiles' => __( 'Allowed Files' ), |
584 'allowedFiles' => __( 'Allowed Files' ), |
405 ) ); |
585 'customCssError' => array( |
|
586 /* translators: %d: error count */ |
|
587 'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ), |
|
588 /* translators: %d: error count */ |
|
589 'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. |
|
590 ), |
|
591 'pageOnFrontError' => __( 'Homepage and posts page must be different.' ), |
|
592 'saveBlockedError' => array( |
|
593 /* translators: %s: number of invalid settings */ |
|
594 'singular' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 1 ), |
|
595 /* translators: %s: number of invalid settings */ |
|
596 'plural' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. |
|
597 ), |
|
598 'scheduleDescription' => __( 'Schedule your customization changes to publish ("go live") at a future date.' ), |
|
599 'themePreviewUnavailable' => __( 'Sorry, you can’t preview new themes when you have changes scheduled or saved as a draft. Please publish your changes, or wait until they publish to preview new themes.' ), |
|
600 'themeInstallUnavailable' => sprintf( |
|
601 /* translators: %s: URL to Add Themes admin screen */ |
|
602 __( 'You won’t be able to install new themes from here yet since your install requires SFTP credentials. For now, please <a href="%s">add themes in the admin</a>.' ), |
|
603 esc_url( admin_url( 'theme-install.php' ) ) |
|
604 ), |
|
605 'publishSettings' => __( 'Publish Settings' ), |
|
606 'invalidDate' => __( 'Invalid date.' ), |
|
607 'invalidValue' => __( 'Invalid value.' ), |
|
608 ) ); |
|
609 $scripts->add( 'customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 ); |
406 |
610 |
407 $scripts->add( 'customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls' ), false, 1 ); |
611 $scripts->add( 'customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls' ), false, 1 ); |
408 $scripts->add( 'customize-preview-widgets', "/wp-includes/js/customize-preview-widgets$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 ); |
612 $scripts->add( 'customize-preview-widgets', "/wp-includes/js/customize-preview-widgets$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 ); |
|
613 |
|
614 $scripts->add( 'customize-nav-menus', "/wp-admin/js/customize-nav-menus$suffix.js", array( 'jquery', 'wp-backbone', 'customize-controls', 'accordion', 'nav-menu' ), false, 1 ); |
|
615 $scripts->add( 'customize-preview-nav-menus', "/wp-includes/js/customize-preview-nav-menus$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 ); |
|
616 |
|
617 $scripts->add( 'wp-custom-header', "/wp-includes/js/wp-custom-header$suffix.js", array( 'wp-a11y' ), false, 1 ); |
409 |
618 |
410 $scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 ); |
619 $scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 ); |
411 |
620 |
412 $scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 ); |
621 $scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 ); |
413 $scripts->add( 'media-models', "/wp-includes/js/media-models$suffix.js", array( 'wp-backbone' ), false, 1 ); |
622 $scripts->add( 'media-models', "/wp-includes/js/media-models$suffix.js", array( 'wp-backbone' ), false, 1 ); |
416 'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ), |
625 'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ), |
417 'post' => array( 'id' => 0 ), |
626 'post' => array( 'id' => 0 ), |
418 ), |
627 ), |
419 ) ); |
628 ) ); |
420 |
629 |
|
630 $scripts->add( 'wp-embed', "/wp-includes/js/wp-embed$suffix.js" ); |
|
631 |
421 // To enqueue media-views or media-editor, call wp_enqueue_media(). |
632 // To enqueue media-views or media-editor, call wp_enqueue_media(). |
422 // Both rely on numerous settings, styles, and templates to operate correctly. |
633 // Both rely on numerous settings, styles, and templates to operate correctly. |
423 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement' ), false, 1 ); |
634 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request' ), false, 1 ); |
424 $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 ); |
635 $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 ); |
425 $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 ); |
636 $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 ); |
426 $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models', 'media-audiovideo', 'wp-playlist' ), false, 1 ); |
637 $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 ); |
|
638 |
|
639 $scripts->add( 'wp-api', "/wp-includes/js/wp-api$suffix.js", array( 'jquery', 'backbone', 'underscore', 'wp-api-request' ), false, 1 ); |
427 |
640 |
428 if ( is_admin() ) { |
641 if ( is_admin() ) { |
429 $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 ); |
642 $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 ); |
430 did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array( |
643 did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array( |
431 'noPerm' => __('You do not have permission to do that.'), |
644 'noPerm' => __('Sorry, you are not allowed to do that.'), |
432 'broken' => __('An unidentified error has occurred.') |
645 'broken' => __('Something went wrong.') |
433 )); |
646 )); |
434 |
647 |
435 $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'quicktags', 'jquery-query'), false, 1 ); |
648 $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'quicktags', 'jquery-query'), false, 1 ); |
436 did_action( 'init' ) && $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( |
649 did_action( 'init' ) && $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( |
437 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), |
650 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), |
438 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']), |
651 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']), |
439 'replyApprove' => __( 'Approve and Reply' ), |
652 'replyApprove' => __( 'Approve and Reply' ), |
440 'reply' => __( 'Reply' ) |
653 'reply' => __( 'Reply' ), |
|
654 'warnQuickEdit' => __( "Are you sure you want to edit this comment?\nThe changes you made will be lost." ), |
|
655 'warnCommentChanges' => __( "Are you sure you want to do this?\nThe comment changes you made will be lost." ), |
|
656 'docTitleComments' => __( 'Comments' ), |
|
657 /* translators: %s: comments count */ |
|
658 'docTitleCommentsCount' => __( 'Comments (%s)' ), |
441 ) ); |
659 ) ); |
442 |
660 |
443 $scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), false, 1 ); |
661 $scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), false, 1 ); |
|
662 did_action( 'init' ) && $scripts->localize( |
|
663 'xfn', 'privacyToolsL10n', array( |
|
664 'noDataFound' => __( 'No personal data was found for this user.' ), |
|
665 'foundAndRemoved' => __( 'All of the personal data found for this user was erased.' ), |
|
666 'noneRemoved' => __( 'Personal data was found for this user but was not erased.' ), |
|
667 'someNotRemoved' => __( 'Personal data was found for this user but some of the personal data found was not erased.' ), |
|
668 'removalError' => __( 'An error occurred while attempting to find and erase personal data.' ), |
|
669 'noExportFile' => __( 'No personal data export file was generated.' ), |
|
670 'exportError' => __( 'An error occurred while attempting to export personal data.' ), |
|
671 ) |
|
672 ); |
444 |
673 |
445 $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 ); |
674 $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 ); |
446 |
675 did_action( 'init' ) && $scripts->localize( 'postbox', 'postBoxL10n', array( |
447 $scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'suggest' ), false, 1 ); |
676 'postBoxEmptyString' => __( 'Drag boxes here' ), |
448 did_action( 'init' ) && $scripts->localize( 'tags-box', 'tagsBoxL10n', array( |
677 ) ); |
|
678 |
|
679 $scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'tags-suggest' ), false, 1 ); |
|
680 |
|
681 $scripts->add( 'tags-suggest', "/wp-admin/js/tags-suggest$suffix.js", array( 'jquery-ui-autocomplete', 'wp-a11y' ), false, 1 ); |
|
682 did_action( 'init' ) && $scripts->localize( 'tags-suggest', 'tagsSuggestL10n', array( |
449 'tagDelimiter' => _x( ',', 'tag delimiter' ), |
683 'tagDelimiter' => _x( ',', 'tag delimiter' ), |
|
684 'removeTerm' => __( 'Remove term:' ), |
|
685 'termSelected' => __( 'Term selected.' ), |
|
686 'termAdded' => __( 'Term added.' ), |
|
687 'termRemoved' => __( 'Term removed.' ), |
450 ) ); |
688 ) ); |
451 |
689 |
452 $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box' ), false, 1 ); |
690 $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y' ), false, 1 ); |
453 did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array( |
691 did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array( |
454 'ok' => __('OK'), |
692 'ok' => __('OK'), |
455 'cancel' => __('Cancel'), |
693 'cancel' => __('Cancel'), |
456 'publishOn' => __('Publish on:'), |
694 'publishOn' => __('Publish on:'), |
457 'publishOnFuture' => __('Schedule for:'), |
695 'publishOnFuture' => __('Schedule for:'), |
458 'publishOnPast' => __('Published on:'), |
696 'publishOnPast' => __('Published on:'), |
459 /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ |
697 /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ |
460 'dateFormat' => __('%1$s %2$s, %3$s @ %4$s : %5$s'), |
698 'dateFormat' => __('%1$s %2$s, %3$s @ %4$s:%5$s'), |
461 'showcomm' => __('Show more comments'), |
699 'showcomm' => __('Show more comments'), |
462 'endcomm' => __('No more comments found.'), |
700 'endcomm' => __('No more comments found.'), |
463 'publish' => __('Publish'), |
701 'publish' => __('Publish'), |
464 'schedule' => __('Schedule'), |
702 'schedule' => _x('Schedule', 'post action/button label'), |
465 'update' => __('Update'), |
703 'update' => __('Update'), |
466 'savePending' => __('Save as Pending'), |
704 'savePending' => __('Save as Pending'), |
467 'saveDraft' => __('Save Draft'), |
705 'saveDraft' => __('Save Draft'), |
468 'private' => __('Private'), |
706 'private' => __('Private'), |
469 'public' => __('Public'), |
707 'public' => __('Public'), |
471 'password' => __('Password Protected'), |
709 'password' => __('Password Protected'), |
472 'privatelyPublished' => __('Privately Published'), |
710 'privatelyPublished' => __('Privately Published'), |
473 'published' => __('Published'), |
711 'published' => __('Published'), |
474 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'), |
712 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'), |
475 'savingText' => __('Saving Draft…'), |
713 'savingText' => __('Saving Draft…'), |
|
714 'permalinkSaved' => __( 'Permalink saved' ), |
476 ) ); |
715 ) ); |
477 |
716 |
478 $scripts->add( 'press-this', "/wp-admin/js/press-this$suffix.js", array( 'jquery', 'tags-box' ), false, 1 ); |
717 $scripts->add( 'editor-expand', "/wp-admin/js/editor-expand$suffix.js", array( 'jquery', 'underscore' ), false, 1 ); |
479 did_action( 'init' ) && $scripts->localize( 'press-this', 'pressThisL10n', array( |
|
480 'newPost' => __( 'Title' ), |
|
481 'serverError' => __( 'Connection lost or the server is busy. Please try again later.' ), |
|
482 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
|
483 /* translators: %d: nth embed found in a post */ |
|
484 'suggestedEmbedAlt' => __( 'Suggested embed #%d' ), |
|
485 /* translators: %d: nth image found in a post */ |
|
486 'suggestedImgAlt' => __( 'Suggested image #%d' ), |
|
487 ) ); |
|
488 |
|
489 $scripts->add( 'editor-expand', "/wp-admin/js/editor-expand$suffix.js", array( 'jquery' ), false, 1 ); |
|
490 |
718 |
491 $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 ); |
719 $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 ); |
492 |
720 |
493 $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ) ); |
721 $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ) ); |
494 $scripts->add_data( 'comment', 'group', 1 ); |
722 $scripts->add_data( 'comment', 'group', 1 ); |
495 did_action( 'init' ) && $scripts->localize( 'comment', 'commentL10n', array( |
723 did_action( 'init' ) && $scripts->localize( 'comment', 'commentL10n', array( |
496 'submittedOn' => __('Submitted on:') |
724 'submittedOn' => __( 'Submitted on:' ), |
|
725 /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ |
|
726 'dateFormat' => __( '%1$s %2$s, %3$s @ %4$s:%5$s' ) |
497 ) ); |
727 ) ); |
498 |
728 |
499 $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) ); |
729 $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) ); |
500 |
730 |
501 $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 ); |
731 $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 ); |
502 |
732 did_action( 'init' ) && $scripts->add_inline_script( 'admin-widgets', sprintf( 'wpWidgets.l10n = %s;', wp_json_encode( array( |
503 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y' ), false, 1 ); |
733 'save' => __( 'Save' ), |
504 |
734 'saved' => __( 'Saved' ), |
505 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), false, 1 ); |
735 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
|
736 ) ) ) ); |
|
737 |
|
738 $scripts->add( 'media-widgets', "/wp-admin/js/widgets/media-widgets$suffix.js", array( 'jquery', 'media-models', 'media-views', 'wp-api-request' ) ); |
|
739 $scripts->add_inline_script( 'media-widgets', 'wp.mediaWidgets.init();', 'after' ); |
|
740 |
|
741 $scripts->add( 'media-audio-widget', "/wp-admin/js/widgets/media-audio-widget$suffix.js", array( 'media-widgets', 'media-audiovideo' ) ); |
|
742 $scripts->add( 'media-image-widget', "/wp-admin/js/widgets/media-image-widget$suffix.js", array( 'media-widgets' ) ); |
|
743 $scripts->add( 'media-gallery-widget', "/wp-admin/js/widgets/media-gallery-widget$suffix.js", array( 'media-widgets' ) ); |
|
744 $scripts->add( 'media-video-widget', "/wp-admin/js/widgets/media-video-widget$suffix.js", array( 'media-widgets', 'media-audiovideo', 'wp-api-request' ) ); |
|
745 $scripts->add( 'text-widgets', "/wp-admin/js/widgets/text-widgets$suffix.js", array( 'jquery', 'backbone', 'editor', 'wp-util', 'wp-a11y' ) ); |
|
746 $scripts->add( 'custom-html-widgets', "/wp-admin/js/widgets/custom-html-widgets$suffix.js", array( 'jquery', 'backbone', 'wp-util', 'jquery-ui-core', 'wp-a11y' ) ); |
|
747 |
|
748 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y', 'customize-base' ), false, 1 ); |
|
749 |
|
750 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'tags-suggest', 'wp-a11y' ), false, 1 ); |
506 did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( |
751 did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( |
507 'error' => __('Error while saving the changes.'), |
752 'error' => __( 'Error while saving the changes.' ), |
508 'ntdeltitle' => __('Remove From Bulk Edit'), |
753 'ntdeltitle' => __( 'Remove From Bulk Edit' ), |
509 'notitle' => __('(no title)'), |
754 'notitle' => __( '(no title)' ), |
510 'comma' => trim( _x( ',', 'tag delimiter' ) ), |
755 'comma' => trim( _x( ',', 'tag delimiter' ) ), |
|
756 'saved' => __( 'Changes saved.' ), |
511 ) ); |
757 ) ); |
512 |
758 |
513 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery' ), false, 1 ); |
759 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); |
514 did_action( 'init' ) && $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array( |
760 did_action( 'init' ) && $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array( |
515 'error' => __('Error while saving the changes.') |
761 'error' => __( 'Error while saving the changes.' ), |
|
762 'saved' => __( 'Changes saved.' ), |
516 ) ); |
763 ) ); |
517 |
764 |
518 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), false, 1 ); |
765 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 ); |
519 did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array( |
766 did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array( |
520 'plugin_information' => __('Plugin Information:'), |
767 'plugin_information' => __( 'Plugin:' ), |
|
768 'plugin_modal_label' => __( 'Plugin details' ), |
521 'ays' => __('Are you sure you want to install this plugin?') |
769 'ays' => __('Are you sure you want to install this plugin?') |
522 ) ); |
770 ) ); |
523 |
771 |
524 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ) ); |
772 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); |
525 did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array( |
773 did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array( |
526 'ajax_nonce' => wp_create_nonce( 'updates' ), |
774 'ajax_nonce' => wp_create_nonce( 'updates' ), |
527 'l10n' => array( |
775 'l10n' => array( |
528 'updating' => __( 'Updating...' ), |
776 /* translators: %s: Search string */ |
529 'updated' => __( 'Updated!' ), |
777 'searchResults' => __( 'Search results for “%s”' ), |
530 'updateFailed' => __( 'Update Failed' ), |
778 'searchResultsLabel' => __( 'Search Results' ), |
531 /* translators: Plugin name and version */ |
779 'noPlugins' => __( 'You do not appear to have any plugins available at this time.' ), |
532 'updatingLabel' => __( 'Updating %s...' ), |
780 'noItemsSelected' => __( 'Please select at least one item to perform this action on.' ), |
533 /* translators: Plugin name and version */ |
781 'updating' => __( 'Updating...' ), // No ellipsis. |
534 'updatedLabel' => __( '%s updated!' ), |
782 'pluginUpdated' => _x( 'Updated!', 'plugin' ), |
535 /* translators: Plugin name and version */ |
783 'themeUpdated' => _x( 'Updated!', 'theme' ), |
536 'updateFailedLabel' => __( '%s update failed' ), |
784 'update' => __( 'Update' ), |
537 /* translators: JavaScript accessible string */ |
785 'updateNow' => __( 'Update Now' ), |
538 'updatingMsg' => __( 'Updating... please wait.' ), |
786 /* translators: %s: Plugin name and version */ |
539 /* translators: JavaScript accessible string */ |
787 'pluginUpdateNowLabel' => _x( 'Update %s now', 'plugin' ), |
540 'updatedMsg' => __( 'Update completed successfully.' ), |
788 'updateFailedShort' => __( 'Update Failed!' ), |
541 /* translators: JavaScript accessible string */ |
789 /* translators: %s: Error string for a failed update */ |
542 'updateCancel' => __( 'Update canceled.' ), |
790 'updateFailed' => __( 'Update Failed: %s' ), |
543 'beforeunload' => __( 'Plugin updates may not complete if you navigate away from this page.' ), |
791 /* translators: %s: Plugin name and version */ |
544 ) |
792 'pluginUpdatingLabel' => _x( 'Updating %s...', 'plugin' ), // No ellipsis. |
|
793 /* translators: %s: Plugin name and version */ |
|
794 'pluginUpdatedLabel' => _x( '%s updated!', 'plugin' ), |
|
795 /* translators: %s: Plugin name and version */ |
|
796 'pluginUpdateFailedLabel' => _x( '%s update failed', 'plugin' ), |
|
797 /* translators: Accessibility text */ |
|
798 'updatingMsg' => __( 'Updating... please wait.' ), // No ellipsis. |
|
799 /* translators: Accessibility text */ |
|
800 'updatedMsg' => __( 'Update completed successfully.' ), |
|
801 /* translators: Accessibility text */ |
|
802 'updateCancel' => __( 'Update canceled.' ), |
|
803 'beforeunload' => __( 'Updates may not complete if you navigate away from this page.' ), |
|
804 'installNow' => __( 'Install Now' ), |
|
805 /* translators: %s: Plugin name */ |
|
806 'pluginInstallNowLabel' => _x( 'Install %s now', 'plugin' ), |
|
807 'installing' => __( 'Installing...' ), |
|
808 'pluginInstalled' => _x( 'Installed!', 'plugin' ), |
|
809 'themeInstalled' => _x( 'Installed!', 'theme' ), |
|
810 'installFailedShort' => __( 'Installation Failed!' ), |
|
811 /* translators: %s: Error string for a failed installation */ |
|
812 'installFailed' => __( 'Installation failed: %s' ), |
|
813 /* translators: %s: Plugin name and version */ |
|
814 'pluginInstallingLabel' => _x( 'Installing %s...', 'plugin' ), // no ellipsis |
|
815 /* translators: %s: Theme name and version */ |
|
816 'themeInstallingLabel' => _x( 'Installing %s...', 'theme' ), // no ellipsis |
|
817 /* translators: %s: Plugin name and version */ |
|
818 'pluginInstalledLabel' => _x( '%s installed!', 'plugin' ), |
|
819 /* translators: %s: Theme name and version */ |
|
820 'themeInstalledLabel' => _x( '%s installed!', 'theme' ), |
|
821 /* translators: %s: Plugin name and version */ |
|
822 'pluginInstallFailedLabel' => _x( '%s installation failed', 'plugin' ), |
|
823 /* translators: %s: Theme name and version */ |
|
824 'themeInstallFailedLabel' => _x( '%s installation failed', 'theme' ), |
|
825 'installingMsg' => __( 'Installing... please wait.' ), |
|
826 'installedMsg' => __( 'Installation completed successfully.' ), |
|
827 /* translators: %s: Activation URL */ |
|
828 'importerInstalledMsg' => __( 'Importer installed successfully. <a href="%s">Run importer</a>' ), |
|
829 /* translators: %s: Theme name */ |
|
830 'aysDelete' => __( 'Are you sure you want to delete %s?' ), |
|
831 /* translators: %s: Plugin name */ |
|
832 'aysDeleteUninstall' => __( 'Are you sure you want to delete %s and its data?' ), |
|
833 'aysBulkDelete' => __( 'Are you sure you want to delete the selected plugins and their data?' ), |
|
834 'aysBulkDeleteThemes' => __( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' ), |
|
835 'deleting' => __( 'Deleting...' ), |
|
836 /* translators: %s: Error string for a failed deletion */ |
|
837 'deleteFailed' => __( 'Deletion failed: %s' ), |
|
838 'pluginDeleted' => _x( 'Deleted!', 'plugin' ), |
|
839 'themeDeleted' => _x( 'Deleted!', 'theme' ), |
|
840 'livePreview' => __( 'Live Preview' ), |
|
841 'activatePlugin' => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ), |
|
842 'activateTheme' => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ), |
|
843 /* translators: %s: Plugin name */ |
|
844 'activatePluginLabel' => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ), |
|
845 /* translators: %s: Theme name */ |
|
846 'activateThemeLabel' => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ), |
|
847 'activateImporter' => __( 'Run Importer' ), |
|
848 /* translators: %s: Importer name */ |
|
849 'activateImporterLabel' => __( 'Run %s' ), |
|
850 'unknownError' => __( 'Something went wrong.' ), |
|
851 'connectionError' => __( 'Connection lost or the server is busy. Please try again later.' ), |
|
852 'nonceError' => __( 'An error has occurred. Please reload the page and try again.' ), |
|
853 'pluginsFound' => __( 'Number of plugins found: %d' ), |
|
854 'noPluginsFound' => __( 'No plugins found. Try a different search.' ), |
|
855 ), |
545 ) ); |
856 ) ); |
546 |
857 |
547 $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' ); |
858 $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' ); |
548 |
859 |
549 $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 ); |
860 $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 ); |
550 $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 ); |
861 $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 ); |
551 did_action( 'init' ) && $scripts->localize( 'wp-color-picker', 'wpColorPickerL10n', array( |
862 did_action( 'init' ) && $scripts->localize( 'wp-color-picker', 'wpColorPickerL10n', array( |
552 'clear' => __( 'Clear' ), |
863 'clear' => __( 'Clear' ), |
553 'defaultString' => __( 'Default' ), |
864 'clearAriaLabel' => __( 'Clear color' ), |
554 'pick' => __( 'Select Color' ), |
865 'defaultString' => __( 'Default' ), |
555 'current' => __( 'Current Color' ), |
866 'defaultAriaLabel' => __( 'Select default color' ), |
|
867 'pick' => __( 'Select Color' ), |
|
868 'defaultLabel' => __( 'Color value' ), |
556 ) ); |
869 ) ); |
557 |
870 |
558 $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), false, 1 ); |
871 $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox', 'wp-util', 'wp-a11y' ), false, 1 ); |
559 |
872 |
560 $scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" ); |
873 $scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" ); |
561 |
874 |
562 $scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 ); |
875 $scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 ); |
563 $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 ); |
876 $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 ); |
645 } elseif ( 'vietnamese' == $subset ) { |
959 } elseif ( 'vietnamese' == $subset ) { |
646 $subsets .= ',vietnamese'; |
960 $subsets .= ',vietnamese'; |
647 } |
961 } |
648 |
962 |
649 // Hotlink Open Sans, for now |
963 // Hotlink Open Sans, for now |
650 $open_sans_font_url = "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets"; |
964 $open_sans_font_url = "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets"; |
651 } |
965 } |
652 |
966 |
653 // Register a stylesheet for the selected admin color scheme. |
967 // Register a stylesheet for the selected admin color scheme. |
654 $styles->add( 'colors', true, array( 'wp-admin', 'buttons', 'open-sans', 'dashicons' ) ); |
968 $styles->add( 'colors', true, array( 'wp-admin', 'buttons' ) ); |
655 |
969 |
656 $suffix = SCRIPT_DEBUG ? '' : '.min'; |
970 $suffix = SCRIPT_DEBUG ? '' : '.min'; |
657 |
971 |
658 // Admin CSS |
972 // Admin CSS |
659 $styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array( 'open-sans', 'dashicons' ) ); |
973 $styles->add( 'common', "/wp-admin/css/common$suffix.css" ); |
660 $styles->add( 'login', "/wp-admin/css/login$suffix.css", array( 'buttons', 'open-sans', 'dashicons' ) ); |
974 $styles->add( 'forms', "/wp-admin/css/forms$suffix.css" ); |
661 $styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'buttons', 'open-sans' ) ); |
975 $styles->add( 'admin-menu', "/wp-admin/css/admin-menu$suffix.css" ); |
662 $styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" ); |
976 $styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css" ); |
663 $styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) ); |
977 $styles->add( 'list-tables', "/wp-admin/css/list-tables$suffix.css" ); |
664 $styles->add( 'customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) ); |
978 $styles->add( 'edit', "/wp-admin/css/edit$suffix.css" ); |
665 $styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array( 'open-sans', 'buttons' ) ); |
979 $styles->add( 'revisions', "/wp-admin/css/revisions$suffix.css" ); |
666 |
980 $styles->add( 'media', "/wp-admin/css/media$suffix.css" ); |
667 $styles->add( 'ie', "/wp-admin/css/ie$suffix.css" ); |
981 $styles->add( 'themes', "/wp-admin/css/themes$suffix.css" ); |
|
982 $styles->add( 'about', "/wp-admin/css/about$suffix.css" ); |
|
983 $styles->add( 'nav-menus', "/wp-admin/css/nav-menus$suffix.css" ); |
|
984 $styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array( 'wp-pointer' ) ); |
|
985 $styles->add( 'site-icon', "/wp-admin/css/site-icon$suffix.css" ); |
|
986 $styles->add( 'l10n', "/wp-admin/css/l10n$suffix.css" ); |
|
987 $styles->add( 'code-editor', "/wp-admin/css/code-editor$suffix.css", array( 'wp-codemirror' ) ); |
|
988 |
|
989 $styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) ); |
|
990 |
|
991 $styles->add( 'login', "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) ); |
|
992 $styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'buttons' ) ); |
|
993 $styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" ); |
|
994 $styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) ); |
|
995 $styles->add( 'customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) ); |
|
996 $styles->add( 'customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array( 'wp-admin', 'colors' ) ); |
|
997 |
|
998 $styles->add( 'ie', "/wp-admin/css/ie$suffix.css" ); |
668 $styles->add_data( 'ie', 'conditional', 'lte IE 7' ); |
999 $styles->add_data( 'ie', 'conditional', 'lte IE 7' ); |
669 |
1000 |
670 // Common dependencies |
1001 // Common dependencies |
671 $styles->add( 'buttons', "/wp-includes/css/buttons$suffix.css" ); |
1002 $styles->add( 'buttons', "/wp-includes/css/buttons$suffix.css" ); |
672 $styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" ); |
1003 $styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" ); |
673 $styles->add( 'open-sans', $open_sans_font_url ); |
|
674 |
1004 |
675 // Includes CSS |
1005 // Includes CSS |
676 $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array( 'open-sans', 'dashicons' ) ); |
1006 $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array( 'dashicons' ) ); |
677 $styles->add( 'wp-auth-check', "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) ); |
1007 $styles->add( 'wp-auth-check', "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) ); |
678 $styles->add( 'editor-buttons', "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) ); |
1008 $styles->add( 'editor-buttons', "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) ); |
679 $styles->add( 'media-views', "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) ); |
1009 $styles->add( 'media-views', "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) ); |
680 $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) ); |
1010 $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) ); |
|
1011 $styles->add( 'customize-preview', "/wp-includes/css/customize-preview$suffix.css", array( 'dashicons' ) ); |
|
1012 $styles->add( 'wp-embed-template-ie', "/wp-includes/css/wp-embed-template-ie$suffix.css" ); |
|
1013 $styles->add_data( 'wp-embed-template-ie', 'conditional', 'lte IE 8' ); |
681 |
1014 |
682 // External libraries and friends |
1015 // External libraries and friends |
683 $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' ); |
1016 $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' ); |
684 $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array( 'dashicons' ) ); |
1017 $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array( 'dashicons' ) ); |
685 $styles->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelementplayer.min.css", array(), '2.16.2' ); |
1018 $styles->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css", array(), '4.2.6-78496d1' ); |
686 $styles->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.css", array( 'mediaelement' ) ); |
1019 $styles->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.css", array( 'mediaelement' ) ); |
687 $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array( 'dashicons' ) ); |
1020 $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array( 'dashicons' ) ); |
|
1021 $styles->add( 'wp-codemirror', '/wp-includes/js/codemirror/codemirror.min.css', array(), '5.29.1-alpha-ee20357' ); |
688 |
1022 |
689 // Deprecated CSS |
1023 // Deprecated CSS |
690 $styles->add( 'media', "/wp-admin/css/deprecated-media$suffix.css" ); |
1024 $styles->add( 'deprecated-media', "/wp-admin/css/deprecated-media$suffix.css" ); |
691 $styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.3u1' ); |
1025 $styles->add( 'farbtastic', "/wp-admin/css/farbtastic$suffix.css", array(), '1.3u1' ); |
692 $styles->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.css", array(), '0.9.12' ); |
1026 $styles->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.css", array(), '0.9.12' ); |
693 $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle. |
1027 $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle. |
|
1028 $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6 |
694 |
1029 |
695 // RTL CSS |
1030 // RTL CSS |
696 $rtl_styles = array( |
1031 $rtl_styles = array( |
697 // wp-admin |
1032 // wp-admin |
698 'wp-admin', 'install', 'wp-color-picker', 'customize-controls', 'customize-widgets', 'ie', 'login', 'press-this', |
1033 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', |
|
1034 'widgets', 'site-icon', 'l10n', 'install', 'wp-color-picker', 'customize-controls', 'customize-widgets', 'customize-nav-menus', 'customize-preview', |
|
1035 'ie', 'login', |
699 // wp-includes |
1036 // wp-includes |
700 'buttons', 'admin-bar', 'wp-auth-check', 'editor-buttons', 'media-views', 'wp-pointer', |
1037 'buttons', 'admin-bar', 'wp-auth-check', 'editor-buttons', 'media-views', 'wp-pointer', |
701 'wp-jquery-ui-dialog', |
1038 'wp-jquery-ui-dialog', |
702 // deprecated |
1039 // deprecated |
703 'media', 'farbtastic', |
1040 'deprecated-media', 'farbtastic', |
704 ); |
1041 ); |
705 |
1042 |
706 foreach ( $rtl_styles as $rtl_style ) { |
1043 foreach ( $rtl_styles as $rtl_style ) { |
707 $styles->add_data( $rtl_style, 'rtl', 'replace' ); |
1044 $styles->add_data( $rtl_style, 'rtl', 'replace' ); |
708 if ( $suffix ) { |
1045 if ( $suffix ) { |