Script-loader: remove 'heartbeat' dependency for post.js and inline-edit-post.js, fix dependencies for autosave.js. Fixes #30008

Built from https://develop.svn.wordpress.org/trunk@29989


git-svn-id: http://core.svn.wordpress.org/trunk@29731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-10-22 03:41:18 +00:00
parent f64d9a10df
commit 34ea8f9a5d
2 changed files with 4 additions and 3 deletions

View File

@ -158,6 +158,7 @@ if ( $doaction ) {
$wp_list_table->prepare_items(); $wp_list_table->prepare_items();
wp_enqueue_script('inline-edit-post'); wp_enqueue_script('inline-edit-post');
wp_enqueue_script('heartbeat');
$title = $post_type_object->labels->name; $title = $post_type_object->labels->name;

View File

@ -114,7 +114,7 @@ function wp_default_scripts( &$scripts ) {
'dismiss' => __('Dismiss'), 'dismiss' => __('Dismiss'),
) ); ) );
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), false, 1 ); $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('heartbeat'), false, 1 );
$scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 ); $scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 );
did_action( 'init' ) && $scripts->localize( 'heartbeat', 'heartbeatSettings', did_action( 'init' ) && $scripts->localize( 'heartbeat', 'heartbeatSettings',
@ -436,7 +436,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 ); $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox', 'heartbeat'), false, 1 ); $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), false, 1 );
did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array( did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array(
'ok' => __('OK'), 'ok' => __('OK'),
'cancel' => __('Cancel'), 'cancel' => __('Cancel'),
@ -479,7 +479,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone' ), false, 1 ); $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone' ), false, 1 );
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest', 'heartbeat' ), false, 1 ); $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), false, 1 );
did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
'error' => __('Error while saving the changes.'), 'error' => __('Error while saving the changes.'),
'ntdeltitle' => __('Remove From Bulk Edit'), 'ntdeltitle' => __('Remove From Bulk Edit'),