Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
staylor committed Jun 19, 2015
2 parents 7c42ad1 + 88743c7 commit d55c08a
Show file tree
Hide file tree
Showing 24 changed files with 162 additions and 101 deletions.
15 changes: 11 additions & 4 deletions wp-admin/edit-form-advanced.php
Expand Up @@ -81,6 +81,9 @@
}

$messages = array();
/** This filter is documented in wp-admin/includes/meta-boxes.php */
$post_preview_url = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $permalink ), $post );

$messages['post'] = array(
0 => '', // Unused. Messages start at index 1.
1 => sprintf( __('Post updated. <a href="%s">View post</a>'), esc_url( $permalink ) ),
Expand All @@ -91,12 +94,16 @@
5 => isset($_GET['revision']) ? sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
6 => sprintf( __('Post published. <a href="%s">View post</a>'), esc_url( $permalink ) ),
7 => __('Post saved.'),
8 => sprintf( __('Post submitted. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
8 => sprintf( __('Post submitted. <a target="_blank" href="%s">Preview post</a>'), esc_url( $post_preview_url ) ),
9 => sprintf( __('Post scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview post</a>'),
/* translators: Publish box date format, see http://php.net/date */
date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
10 => sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
10 => sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), esc_url( $post_preview_url ) ),
);

/** This filter is documented in wp-admin/includes/meta-boxes.php */
$page_preview_url = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $permalink ), $post );

$messages['page'] = array(
0 => '', // Unused. Messages start at index 1.
1 => sprintf( __('Page updated. <a href="%s">View page</a>'), esc_url( $permalink ) ),
Expand All @@ -106,9 +113,9 @@
5 => isset($_GET['revision']) ? sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
6 => sprintf( __('Page published. <a href="%s">View page</a>'), esc_url( $permalink ) ),
7 => __('Page saved.'),
8 => sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
8 => sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), esc_url( $page_preview_url ) ),
9 => sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
10 => sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
10 => sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), esc_url( $page_preview_url ) ),
);
$messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now.

Expand Down
66 changes: 38 additions & 28 deletions wp-admin/includes/admin-filters.php
Expand Up @@ -15,44 +15,52 @@
add_action( 'activity_box_end', 'wp_dashboard_quota' );

// Media hooks.
add_filter( 'media_upload_tabs', 'update_gallery_tab' );
add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );
add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' );

add_action( 'media_buttons', 'media_buttons' );

add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
add_action( 'media_upload_image', 'wp_media_upload_handler' );
add_action( 'media_upload_audio', 'wp_media_upload_handler' );
add_action( 'media_upload_video', 'wp_media_upload_handler' );
add_action( 'media_upload_file', 'wp_media_upload_handler' );

add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
add_action( 'post-html-upload-ui', 'media_upload_html_bypass' );

add_action( 'post-html-upload-ui', 'media_upload_html_bypass' );

add_filter( 'async_upload_image', 'get_media_item', 10, 2 );
add_filter( 'async_upload_audio', 'get_media_item', 10, 2 );
add_filter( 'async_upload_video', 'get_media_item', 10, 2 );
add_filter( 'async_upload_file', 'get_media_item', 10, 2 );

add_action( 'media_upload_image', 'wp_media_upload_handler' );
add_action( 'media_upload_audio', 'wp_media_upload_handler' );
add_action( 'media_upload_video', 'wp_media_upload_handler' );
add_action( 'media_upload_file', 'wp_media_upload_handler' );
add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );

add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );

add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );

add_filter( 'media_upload_gallery', 'media_upload_gallery' );
add_filter( 'media_upload_library', 'media_upload_library' );

add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' );
add_filter( 'media_upload_tabs', 'update_gallery_tab' );

// Misc hooks.
add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
add_action( 'admin_head', 'wp_admin_canonical_url' );
add_action( 'admin_head', 'wp_color_scheme_settings' );
add_action( 'admin_head', '_ipad_meta' );
add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 );
add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 );
add_filter( 'heartbeat_received', 'wp_refresh_post_nonces', 10, 3 );
add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
// Run later as we have to set DOING_AUTOSAVE for back-compat
add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
add_action( 'admin_head', '_ipad_meta' );

add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
add_action( 'admin_head', 'wp_admin_canonical_url' );

add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );

add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 );
add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 );
add_filter( 'heartbeat_received', 'wp_refresh_post_nonces', 10, 3 );
add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );

add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );

// Nav Menu hooks.
add_action( 'admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items' );
Expand Down Expand Up @@ -89,17 +97,19 @@

// User hooks.
add_action( 'admin_init', 'default_password_nag_handler' );
add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );

add_action( 'admin_notices', 'default_password_nag' );

add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );

// Update hooks.
add_filter( 'update_footer', 'core_update_footer' );
add_action( 'admin_notices', 'update_nag', 3 );
add_action( 'network_admin_notices', 'update_nag', 3 );
add_action( 'admin_init', 'wp_plugin_update_rows' );
add_action( 'admin_init', 'wp_theme_update_rows' );
add_action( 'admin_notices', 'maintenance_nag' );
add_action( 'network_admin_notices', 'maintenance_nag' );
add_action( 'admin_init', 'wp_theme_update_rows' );

add_action( 'admin_notices', 'update_nag', 3 );
add_action( 'admin_notices', 'maintenance_nag', 10 );

add_filter( 'update_footer', 'core_update_footer' );

// Update Core hooks.
add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/includes/class-wp-posts-list-table.php
Expand Up @@ -1529,11 +1529,11 @@ public function inline_edit() {
}
?>
<p class="submit inline-edit-save">
<a href="#inline-edit" class="button-secondary cancel alignleft"><?php _e( 'Cancel' ); ?></a>
<button type="button" class="button-secondary cancel alignleft"><?php _e( 'Cancel' ); ?></button>
<?php if ( ! $bulk ) {
wp_nonce_field( 'inlineeditnonce', '_inline_edit', false );
?>
<a href="#inline-edit" class="button-primary save alignright"><?php _e( 'Update' ); ?></a>
<button type="button" class="button-primary save alignright"><?php _e( 'Update' ); ?></button>
<span class="spinner"></span>
<?php } else {
submit_button( __( 'Update' ), 'button-primary alignright', 'bulk_edit', false );
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/includes/class-wp-upgrader.php
Expand Up @@ -304,7 +304,7 @@ public function unpack_package( $package, $delete_package = true ) {
*
* @return bool|WP_Error true upon success, {@see WP_Error} on failure.
*/
function clear_destination( $remote_destination ) {
public function clear_destination( $remote_destination ) {
global $wp_filesystem;

if ( ! $wp_filesystem->exists( $remote_destination ) ) {
Expand Down
22 changes: 17 additions & 5 deletions wp-admin/includes/ms-admin-filters.php
Expand Up @@ -7,24 +7,36 @@
* @since 4.3.0
*/

// Media Hooks.
add_filter( 'wp_handle_upload_prefilter', 'check_upload_size' );

add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
// User Hooks
add_action( 'admin_notices', 'new_user_email_admin_notice' );

add_action( 'admin_page_access_denied', '_access_denied_splash', 99 );

add_action( 'add_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );

add_action( 'personal_options_update', 'send_confirmation_on_profile_email' );

add_action( 'admin_notices', 'new_user_email_admin_notice' );
add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );

// Site Hooks.
add_action( 'wpmueditblogaction', 'upload_space_setting' );

// Taxonomy Hooks
add_filter( 'get_term', 'sync_category_tag_slugs', 10, 2 );

add_action( 'admin_page_access_denied', '_access_denied_splash', 99 );
// Post Hooks.
add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 );

// Tools Hooks.
add_filter( 'import_allow_create_users', 'check_import_new_users' );

add_action( 'admin_notices', 'site_admin_notice' );
// Notices Hooks
add_action( 'admin_notices', 'site_admin_notice' );
add_action( 'network_admin_notices', 'site_admin_notice' );

add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 );
// Update Hooks
add_action( 'network_admin_notices', 'update_nag', 3 );
add_action( 'network_admin_notices', 'maintenance_nag', 10 );
6 changes: 3 additions & 3 deletions wp-admin/js/inline-edit-post.js
Expand Up @@ -22,10 +22,10 @@ inlineEditPost = {
}
});

$('a.cancel', qeRow).click(function(){
$( '.cancel', qeRow ).click( function() {
return inlineEditPost.revert();
});
$('a.save', qeRow).click(function(){
$( '.save', qeRow ).click( function() {
return inlineEditPost.save(this);
});
$('td', qeRow).keydown(function(e){
Expand All @@ -34,7 +34,7 @@ inlineEditPost = {
}
});

$('a.cancel', bulkRow).click(function(){
$( '.cancel', bulkRow ).click( function() {
return inlineEditPost.revert();
});

Expand Down

0 comments on commit d55c08a

Please sign in to comment.