diff --git src/wp-admin/index.php src/wp-admin/index.php
index 76628abbd7..5c73f19008 100644
|
|
|
require_once(ABSPATH . 'wp-admin/includes/dashboard.php'); |
| 15 | 15 | wp_dashboard_setup(); |
| 16 | 16 | |
| 17 | 17 | wp_enqueue_script( 'dashboard' ); |
| 18 | | wp_localize_script( 'dashboard', 'communityEventsData', wp_get_community_events_script_data() ); |
| 19 | 18 | |
| 20 | 19 | if ( current_user_can( 'edit_theme_options' ) ) |
| 21 | 20 | wp_enqueue_script( 'customize-loader' ); |
diff --git src/wp-admin/network/index.php src/wp-admin/network/index.php
index 38acec4b6e..f4a1aa6423 100644
|
|
|
get_current_screen()->set_help_sidebar( |
| 54 | 54 | wp_dashboard_setup(); |
| 55 | 55 | |
| 56 | 56 | wp_enqueue_script( 'dashboard' ); |
| 57 | | wp_localize_script( 'dashboard', 'communityEventsData', wp_get_community_events_script_data() ); |
| 58 | 57 | wp_enqueue_script( 'plugin-install' ); |
| 59 | 58 | add_thickbox(); |
| 60 | 59 | |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index f1eda9ee38..6bb01aee42 100644
|
|
|
require( ABSPATH . WPINC . '/functions.wp-styles.php' ); |
| 47 | 47 | */ |
| 48 | 48 | function wp_default_scripts( &$scripts ) { |
| 49 | 49 | include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version |
| | 50 | global $pagenow; |
| 50 | 51 | |
| 51 | 52 | $develop_src = false !== strpos( $wp_version, '-src' ); |
| 52 | 53 | |
| … |
… |
function wp_default_scripts( &$scripts ) { |
| 733 | 734 | ) ); |
| 734 | 735 | |
| 735 | 736 | $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox', 'wp-util', 'wp-a11y' ), false, 1 ); |
| | 737 | /* |
| | 738 | * Only localize the script on the Network Dashboard and single-site |
| | 739 | * Dashboard screens, because wp_get_community_events_script_data() is |
| | 740 | * too expensive to call on every page load. |
| | 741 | */ |
| | 742 | if ( 'index.php' === $pagenow ) { |
| | 743 | require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); |
| | 744 | $scripts->localize( 'dashboard', 'communityEventsData', wp_get_community_events_script_data() ); |
| | 745 | } |
| 736 | 746 | |
| 737 | 747 | $scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" ); |
| 738 | 748 | |