~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-includes/script-loader.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 * Register all WordPress scripts.
36
36
 *
37
37
 * Localizes some of them.
38
 
 * args order: $scripts->add( 'handle', 'url', 'dependencies', 'query-string', 1 );
 
38
 * args order: `$scripts->add( 'handle', 'url', 'dependencies', 'query-string', 1 );`
39
39
 * when last arg === 1 queues the script for the footer
40
40
 *
41
41
 * @since 2.6.0
124
124
 
125
125
        $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
126
126
        did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
127
 
                'noPerm' => __('You do not have permission to do that.'),
 
127
                'noPerm' => __('Sorry, you are not allowed to do that.'),
128
128
                'broken' => __('An unidentified error has occurred.')
129
129
        ) );
130
130
 
138
138
        $scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 );
139
139
        did_action( 'init' ) && $scripts->localize( 'heartbeat', 'heartbeatSettings',
140
140
                /**
141
 
                 * Filter the Heartbeat settings.
 
141
                 * Filters the Heartbeat settings.
142
142
                 *
143
143
                 * @since 3.6.0
144
144
                 *
152
152
                'beforeunload' => __('Your session has expired. You can log in again from this page or go to the login page.'),
153
153
 
154
154
                /**
155
 
                 * Filter the authentication check interval.
 
155
                 * Filters the authentication check interval.
156
156
                 *
157
157
                 * @since 3.6.0
158
158
                 *
229
229
                'noResults' => __( 'No search results.' ),
230
230
                /* translators: Number of results found when using jQuery UI Autocomplete */
231
231
                'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ),
 
232
                /* translators: %d: Number of results found when using jQuery UI Autocomplete */
232
233
                'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ),
233
234
        ) );
234
235
 
247
248
 
248
249
        // Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
249
250
        // It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
250
 
        $scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array(), '3.1.2', 1 );
251
 
        $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2', 1 );
 
251
        $scripts->add( 'imagesloaded', "/wp-includes/js/imagesloaded.min.js", array(), '3.2.0', 1 );
 
252
        $scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array( 'imagesloaded' ), '3.3.2', 1 );
 
253
        $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2a', 1 );
252
254
 
253
255
        $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1 );
254
256
        did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array(
333
335
 
334
336
        $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), false, 1 );
335
337
 
336
 
        $scripts->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player.min.js", array('jquery'), '2.18.1-a', 1 );
 
338
        $scripts->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player.min.js", array('jquery'), '2.22.0', 1 );
337
339
        did_action( 'init' ) && $scripts->localize( 'mediaelement', 'mejsL10n', array(
338
340
                'language' => get_bloginfo( 'language' ),
339
341
                'strings'  => array(
340
 
                        'Close'               => __( 'Close' ),
341
 
                        'Fullscreen'          => __( 'Fullscreen' ),
342
 
                        'Download File'       => __( 'Download File' ),
343
 
                        'Download Video'      => __( 'Download Video' ),
344
 
                        'Play/Pause'          => __( 'Play/Pause' ),
345
 
                        'Mute Toggle'         => __( 'Mute Toggle' ),
346
 
                        'None'                => __( 'None' ),
347
 
                        'Turn off Fullscreen' => __( 'Turn off Fullscreen' ),
348
 
                        'Go Fullscreen'       => __( 'Go Fullscreen' ),
349
 
                        'Unmute'              => __( 'Unmute' ),
350
 
                        'Mute'                => __( 'Mute' ),
351
 
                        'Captions/Subtitles'  => __( 'Captions/Subtitles' )
 
342
                        'Close'                   => __( 'Close' ),
 
343
                        'Fullscreen'              => __( 'Fullscreen' ),
 
344
                        'Turn off Fullscreen'     => __( 'Turn off Fullscreen' ),
 
345
                        'Go Fullscreen'           => __( 'Go Fullscreen' ),
 
346
                        'Download File'           => __( 'Download File' ),
 
347
                        'Download Video'          => __( 'Download Video' ),
 
348
                        'Play'                    => __( 'Play' ),
 
349
                        'Pause'                   => __( 'Pause' ),
 
350
                        'Captions/Subtitles'      => __( 'Captions/Subtitles' ),
 
351
                        'None'                    => __( 'None', 'no captions/subtitles' ),
 
352
                        'Time Slider'             => __( 'Time Slider' ),
 
353
                        /* translators: %1: number of seconds (30 by default) */
 
354
                        'Skip back %1 seconds'    => __( 'Skip back %1 seconds' ),
 
355
                        'Video Player'            => __( 'Video Player' ),
 
356
                        'Audio Player'            => __( 'Audio Player' ),
 
357
                        'Volume Slider'           => __( 'Volume Slider' ),
 
358
                        'Mute Toggle'             => __( 'Mute Toggle' ),
 
359
                        'Unmute'                  => __( 'Unmute' ),
 
360
                        'Mute'                    => __( 'Mute' ),
 
361
                        'Use Up/Down Arrow keys to increase or decrease volume.' => __( 'Use Up/Down Arrow keys to increase or decrease volume.' ),
 
362
                        'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ),
352
363
                ),
353
364
        ) );
354
365
 
359
370
        );
360
371
        did_action( 'init' ) && $scripts->localize( 'mediaelement', '_wpmejsSettings',
361
372
                /**
362
 
                 * Filter the MediaElement configuration settings.
 
373
                 * Filters the MediaElement configuration settings.
363
374
                 *
364
375
                 * @since 4.4.0
365
376
                 *
378
389
 
379
390
        $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 );
380
391
        did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array(
 
392
                'unknown'  => _x( 'Password strength unknown', 'password strength' ),
381
393
                'short'    => _x( 'Very weak', 'password strength' ),
382
394
                'bad'      => _x( 'Weak', 'password strength' ),
383
395
                'good'     => _x( 'Medium', 'password strength' ),
388
400
        $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 );
389
401
        did_action( 'init' ) && $scripts->localize( 'user-profile', 'userProfileL10n', array(
390
402
                'warn'     => __( 'Your new password has not been saved.' ),
 
403
                'warnWeak' => __( 'Confirm use of weak password.' ),
391
404
                'show'     => __( 'Show' ),
392
405
                'hide'     => __( 'Hide' ),
393
406
                'cancel'   => __( 'Cancel' ),
443
456
                'cancel'             => __( 'Cancel' ),
444
457
                'close'              => __( 'Close' ),
445
458
                'cheatin'            => __( 'Cheatin’ uh?' ),
446
 
                'notAllowed'         => __( 'You are not allowed to customize the appearance of this site.' ),
 
459
                'notAllowed'         => __( 'Sorry, you are not allowed to customize this site.' ),
447
460
                'previewIframeTitle' => __( 'Site Preview' ),
448
461
                'loginIframeTitle'   => __( 'Session expired' ),
449
462
                'collapseSidebar'    => __( 'Collapse Sidebar' ),
483
496
        if ( is_admin() ) {
484
497
                $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
485
498
                did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
486
 
                        'noPerm' => __('You do not have permission to do that.'),
 
499
                        'noPerm' => __('Sorry, you are not allowed to do that.'),
487
500
                        'broken' => __('An unidentified error has occurred.')
488
501
                ));
489
502
 
494
507
                        'replyApprove' => __( 'Approve and Reply' ),
495
508
                        'reply' => __( 'Reply' ),
496
509
                        'warnQuickEdit' => __( "Are you sure you want to edit this comment?\nThe changes you made will be lost." ),
 
510
                        'warnCommentChanges' => __( "Are you sure you want to do this?\nThe comment changes you made will be lost." ),
497
511
                        'docTitleComments' => __( 'Comments' ),
498
512
                        /* translators: %s: comments count */
499
513
                        'docTitleCommentsCount' => __( 'Comments (%s)' ),
593
607
                did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
594
608
                        'ajax_nonce' => wp_create_nonce( 'updates' ),
595
609
                        'l10n'       => array(
596
 
                                'updating'          => __( 'Updating...' ), // no ellipsis
597
 
                                'updated'           => __( 'Updated!' ),
598
 
                                'updateFailedShort' => __( 'Update Failed!' ),
599
 
                                /* translators: Error string for a failed update */
600
 
                                'updateFailed'      => __( 'Update Failed: %s' ),
601
 
                                /* translators: Plugin name and version */
602
 
                                'updatingLabel'     => __( 'Updating %s...' ), // no ellipsis
603
 
                                /* translators: Plugin name and version */
604
 
                                'updatedLabel'      => __( '%s updated!' ),
605
 
                                /* translators: Plugin name and version */
606
 
                                'updateFailedLabel' => __( '%s update failed' ),
607
 
                                /* translators: JavaScript accessible string */
608
 
                                'updatingMsg'       => __( 'Updating... please wait.' ), // no ellipsis
609
 
                                /* translators: JavaScript accessible string */
610
 
                                'updatedMsg'        => __( 'Update completed successfully.' ),
611
 
                                /* translators: JavaScript accessible string */
612
 
                                'updateCancel'      => __( 'Update canceled.' ),
613
 
                                'beforeunload'      => __( 'Plugin updates may not complete if you navigate away from this page.' ),
614
 
                        )
 
610
                                /* translators: %s: Search string */
 
611
                                'searchResults'              => __( 'Search results for “%s”' ),
 
612
                                'searchResultsLabel'         => __( 'Search Results' ),
 
613
                                'noPlugins'                  => __( 'You do not appear to have any plugins available at this time.' ),
 
614
                                'noItemsSelected'            => __( 'Please select at least one item to perform this action on.' ),
 
615
                                'updating'                   => __( 'Updating...' ), // No ellipsis.
 
616
                                'updated'                    => __( 'Updated!' ),
 
617
                                'update'                     => __( 'Update' ),
 
618
                                'updateNow'                  => __( 'Update Now' ),
 
619
                                /* translators: %s: Plugin name and version */
 
620
                                'updateNowLabel'             => __( 'Update %s now' ),
 
621
                                'updateFailedShort'          => __( 'Update Failed!' ),
 
622
                                /* translators: %s: Error string for a failed update */
 
623
                                'updateFailed'               => __( 'Update Failed: %s' ),
 
624
                                /* translators: %s: Plugin name and version */
 
625
                                'updatingLabel'              => __( 'Updating %s...' ), // No ellipsis.
 
626
                                /* translators: %s: Plugin name and version */
 
627
                                'updatedLabel'               => __( '%s updated!' ),
 
628
                                /* translators: %s: Plugin name and version */
 
629
                                'updateFailedLabel'          => __( '%s update failed' ),
 
630
                                /* translators: JavaScript accessible string */
 
631
                                'updatingMsg'                => __( 'Updating... please wait.' ), // No ellipsis.
 
632
                                /* translators: JavaScript accessible string */
 
633
                                'updatedMsg'                 => __( 'Update completed successfully.' ),
 
634
                                /* translators: JavaScript accessible string */
 
635
                                'updateCancel'               => __( 'Update canceled.' ),
 
636
                                'beforeunload'               => __( 'Updates may not complete if you navigate away from this page.' ),
 
637
                                'installNow'                 => __( 'Install Now' ),
 
638
                                /* translators: %s: Plugin name */
 
639
                                'installNowLabel'            => __( 'Install %s now' ),
 
640
                                'installing'                 => __( 'Installing...' ),
 
641
                                'installed'                  => __( 'Installed!' ),
 
642
                                'installFailedShort'         => __( 'Install Failed!' ),
 
643
                                /* translators: %s: Error string for a failed installation */
 
644
                                'installFailed'              => __( 'Installation failed: %s' ),
 
645
                                /* translators: %s: Plugin name and version */
 
646
                                'pluginInstallingLabel'      => _x( 'Installing %s...', 'plugin' ), // no ellipsis
 
647
                                /* translators: %s: Theme name and version */
 
648
                                'themeInstallingLabel'       => _x( 'Installing %s...', 'theme' ), // no ellipsis
 
649
                                /* translators: %s: Plugin name and version */
 
650
                                'pluginInstalledLabel'       => _x( '%s installed!', 'plugin' ),
 
651
                                /* translators: %s: Theme name and version */
 
652
                                'themeInstalledLabel'        => _x( '%s installed!', 'theme' ),
 
653
                                /* translators: %s: Plugin name and version */
 
654
                                'pluginInstallFailedLabel'   => _x( '%s installation failed', 'plugin' ),
 
655
                                /* translators: %s: Theme name and version */
 
656
                                'themeInstallFailedLabel'    => _x( '%s installation failed', 'theme' ),
 
657
                                'installingMsg'              => __( 'Installing... please wait.' ),
 
658
                                'installedMsg'               => __( 'Installation completed successfully.' ),
 
659
                                /* translators: %s: Activation URL */
 
660
                                'importerInstalledMsg'       => __( 'Importer installed successfully. <a href="%s">Run importer</a>' ),
 
661
                                /* translators: %s: Theme name */
 
662
                                'aysDelete'                  => __( 'Are you sure you want to delete %s?' ),
 
663
                                /* translators: %s: Plugin name */
 
664
                                'aysDeleteUninstall'         => __( 'Are you sure you want to delete %s and its data?' ),
 
665
                                'aysBulkDelete'              => __( 'Are you sure you want to delete the selected plugins and their data?' ),
 
666
                                'aysBulkDeleteThemes'        => __( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' ),
 
667
                                'deleting'                   => __( 'Deleting...' ),
 
668
                                /* translators: %s: Error string for a failed deletion */
 
669
                                'deleteFailed'               => __( 'Deletion failed: %s' ),
 
670
                                'deleted'                    => __( 'Deleted!' ),
 
671
                                'livePreview'                => __( 'Live Preview' ),
 
672
                                'activatePlugin'             => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ),
 
673
                                'activateTheme'              => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ),
 
674
                                /* translators: %s: Plugin name */
 
675
                                'activatePluginLabel'        => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ),
 
676
                                /* translators: %s: Theme name */
 
677
                                'activateThemeLabel'         => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ),
 
678
                                'activateImporter'           => __( 'Run Importer' ),
 
679
                                /* translators: %s: Importer name */
 
680
                                'activateImporterLabel'      => __( 'Run %s' ),
 
681
                                'unknownError'               => __( 'An unknown error occurred' ),
 
682
                                'connectionError'            => __( 'Connection lost or the server is busy. Please try again later.' ),
 
683
                                'nonceError'                 => __( 'An error has occurred. Please reload the page and try again.' ),
 
684
                                'pluginsFound'               => __( 'Number of plugins found: %d' ),
 
685
                                'noPluginsFound'             => __( 'No plugins found. Try a different search.' ),
 
686
                        ),
615
687
                ) );
616
688
 
617
689
                $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
695
767
        $styles->text_direction = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr';
696
768
        $styles->default_dirs = array('/wp-admin/', '/wp-includes/css/');
697
769
 
 
770
        // Open Sans is no longer used by core, but may be relied upon by themes and plugins.
698
771
        $open_sans_font_url = '';
699
772
 
700
773
        /* translators: If there are characters in your language that are not supported
741
814
        $styles->add( 'site-icon',           "/wp-admin/css/site-icon$suffix.css" );
742
815
        $styles->add( 'l10n',                "/wp-admin/css/l10n$suffix.css" );
743
816
 
744
 
        $styles->add( 'wp-admin', false, array( 'open-sans', 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) );
 
817
        $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' ) );
745
818
 
746
 
        $styles->add( 'login',               "/wp-admin/css/login$suffix.css", array( 'open-sans', 'dashicons', 'buttons', 'forms', 'l10n' ) );
747
 
        $styles->add( 'install',             "/wp-admin/css/install$suffix.css", array( 'open-sans', 'buttons' ) );
 
819
        $styles->add( 'login',               "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
 
820
        $styles->add( 'install',             "/wp-admin/css/install$suffix.css", array( 'buttons' ) );
748
821
        $styles->add( 'wp-color-picker',     "/wp-admin/css/color-picker$suffix.css" );
749
822
        $styles->add( 'customize-controls',  "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
750
823
        $styles->add( 'customize-widgets',   "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
751
824
        $styles->add( 'customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array( 'wp-admin', 'colors' ) );
752
 
        $styles->add( 'press-this',          "/wp-admin/css/press-this$suffix.css", array( 'open-sans', 'buttons' ) );
 
825
        $styles->add( 'press-this',          "/wp-admin/css/press-this$suffix.css", array( 'buttons' ) );
753
826
 
754
827
        $styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
755
828
        $styles->add_data( 'ie', 'conditional', 'lte IE 7' );
757
830
        // Common dependencies
758
831
        $styles->add( 'buttons',   "/wp-includes/css/buttons$suffix.css" );
759
832
        $styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" );
760
 
        $styles->add( 'open-sans', $open_sans_font_url );
761
833
 
762
834
        // Includes CSS
763
 
        $styles->add( 'admin-bar',            "/wp-includes/css/admin-bar$suffix.css", array( 'open-sans', 'dashicons' ) );
 
835
        $styles->add( 'admin-bar',            "/wp-includes/css/admin-bar$suffix.css", array( 'dashicons' ) );
764
836
        $styles->add( 'wp-auth-check',        "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) );
765
837
        $styles->add( 'editor-buttons',       "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) );
766
838
        $styles->add( 'media-views',          "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) );
772
844
        // External libraries and friends
773
845
        $styles->add( 'imgareaselect',       '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' );
774
846
        $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array( 'dashicons' ) );
775
 
        $styles->add( 'mediaelement',        "/wp-includes/js/mediaelement/mediaelementplayer.min.css", array(), '2.18.1' );
 
847
        $styles->add( 'mediaelement',        "/wp-includes/js/mediaelement/mediaelementplayer.min.css", array(), '2.22.0' );
776
848
        $styles->add( 'wp-mediaelement',     "/wp-includes/js/mediaelement/wp-mediaelement$suffix.css", array( 'mediaelement' ) );
777
849
        $styles->add( 'thickbox',            '/wp-includes/js/thickbox/thickbox.css', array( 'dashicons' ) );
778
850
 
781
853
        $styles->add( 'farbtastic',       "/wp-admin/css/farbtastic$suffix.css", array(), '1.3u1' );
782
854
        $styles->add( 'jcrop',            "/wp-includes/js/jcrop/jquery.Jcrop.min.css", array(), '0.9.12' );
783
855
        $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle.
 
856
        $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6
784
857
 
785
858
        // RTL CSS
786
859
        $rtl_styles = array(
841
914
                'autosaveInterval' => AUTOSAVE_INTERVAL,
842
915
                'blog_id' => get_current_blog_id(),
843
916
        ) );
844
 
 
 
917
}
 
918
 
 
919
/**
 
920
 * Localizes the jQuery UI datepicker.
 
921
 *
 
922
 * @since 4.6.0
 
923
 *
 
924
 * @link http://api.jqueryui.com/datepicker/#options
 
925
 *
 
926
 * @global WP_Locale $wp_locale The WordPress date and time locale object.
 
927
 */
 
928
function wp_localize_jquery_ui_datepicker() {
 
929
        global $wp_locale;
 
930
 
 
931
        if ( ! wp_script_is( 'jquery-ui-datepicker', 'enqueued' ) ) {
 
932
                return;
 
933
        }
 
934
 
 
935
        // Convert the PHP date format into jQuery UI's format.
 
936
        $datepicker_date_format = str_replace(
 
937
                array(
 
938
                        'd', 'j', 'l', 'z', // Day.
 
939
                        'F', 'M', 'n', 'm', // Month.
 
940
                        'Y', 'y'            // Year.
 
941
                ),
 
942
                array(
 
943
                        'dd', 'd', 'DD', 'o',
 
944
                        'MM', 'M', 'm', 'mm',
 
945
                        'yy', 'y'
 
946
                ),
 
947
                get_option( 'date_format' )
 
948
        );
 
949
 
 
950
        $datepicker_defaults = wp_json_encode( array(
 
951
                'closeText'       => __( 'Close' ),
 
952
                'currentText'     => __( 'Today' ),
 
953
                'monthNames'      => array_values( $wp_locale->month ),
 
954
                'monthNamesShort' => array_values( $wp_locale->month_abbrev ),
 
955
                'nextText'        => __( 'Next' ),
 
956
                'prevText'        => __( 'Previous' ),
 
957
                'dayNames'        => array_values( $wp_locale->weekday ),
 
958
                'dayNamesShort'   => array_values( $wp_locale->weekday_abbrev ),
 
959
                'dayNamesMin'     => array_values( $wp_locale->weekday_initial ),
 
960
                'dateFormat'      => $datepicker_date_format,
 
961
                'firstDay'        => absint( get_option( 'start_of_week' ) ),
 
962
                'isRTL'           => $wp_locale->is_rtl(),
 
963
        ) );
 
964
 
 
965
        wp_add_inline_script( 'jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({$datepicker_defaults});});" );
845
966
}
846
967
 
847
968
/**
924
1045
        $wp_scripts->do_head_items();
925
1046
 
926
1047
        /**
927
 
         * Filter whether to print the head scripts.
 
1048
         * Filters whether to print the head scripts.
928
1049
         *
929
1050
         * @since 2.8.0
930
1051
         *
959
1080
        $wp_scripts->do_footer_items();
960
1081
 
961
1082
        /**
962
 
         * Filter whether to print the footer scripts.
 
1083
         * Filters whether to print the footer scripts.
963
1084
         *
964
1085
         * @since 2.8.0
965
1086
         *
1095
1216
        $wp_styles->do_items(false);
1096
1217
 
1097
1218
        /**
1098
 
         * Filter whether to print the admin styles.
 
1219
         * Filters whether to print the admin styles.
1099
1220
         *
1100
1221
         * @since 2.8.0
1101
1222
         *
1131
1252
        $wp_styles->do_footer_items();
1132
1253
 
1133
1254
        /**
1134
 
         * Filter whether to print the styles queued too late for the HTML head.
 
1255
         * Filters whether to print the styles queued too late for the HTML head.
1135
1256
         *
1136
1257
         * @since 3.3.0
1137
1258
         *