mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed. - Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js. - Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced. - Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins. - Updates DFW, wp-admin/js/wp-fullscreen.js. See #24067. git-svn-id: https://develop.svn.wordpress.org/trunk@26876 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1787,16 +1787,8 @@ function wp_ajax_wp_fullscreen_save_post() {
|
||||
|
||||
$post_id = edit_post();
|
||||
|
||||
if ( is_wp_error($post_id) ) {
|
||||
if ( $post_id->get_error_message() )
|
||||
$message = $post_id->get_error_message();
|
||||
else
|
||||
$message = __('Save failed');
|
||||
|
||||
echo json_encode( array( 'message' => $message, 'last_edited' => '' ) );
|
||||
wp_die();
|
||||
} else {
|
||||
$message = __('Saved.');
|
||||
if ( is_wp_error( $post_id ) ) {
|
||||
wp_send_json_error();
|
||||
}
|
||||
|
||||
if ( $post ) {
|
||||
@@ -1807,15 +1799,14 @@ function wp_ajax_wp_fullscreen_save_post() {
|
||||
$last_time = date_i18n( get_option('time_format') );
|
||||
}
|
||||
|
||||
if ( $last_id = get_post_meta($post_id, '_edit_last', true) ) {
|
||||
$last_user = get_userdata($last_id);
|
||||
if ( $last_id = get_post_meta( $post_id, '_edit_last', true ) ) {
|
||||
$last_user = get_userdata( $last_id );
|
||||
$last_edited = sprintf( __('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), $last_date, $last_time );
|
||||
} else {
|
||||
$last_edited = sprintf( __('Last edited on %1$s at %2$s'), $last_date, $last_time );
|
||||
}
|
||||
|
||||
echo json_encode( array( 'message' => $message, 'last_edited' => $last_edited ) );
|
||||
wp_die();
|
||||
wp_send_json_success( array( 'last_edited' => $last_edited ) );
|
||||
}
|
||||
|
||||
function wp_ajax_wp_remove_post_lock() {
|
||||
@@ -1839,9 +1830,9 @@ function wp_ajax_wp_remove_post_lock() {
|
||||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @param int $interval The interval in seconds the post lock duration should last, plus 5 seconds. Default 120.
|
||||
* @param int $interval The interval in seconds the post lock duration should last, plus 5 seconds. Default 150.
|
||||
*/
|
||||
$new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', 120 ) + 5 ) . ':' . $active_lock[1];
|
||||
$new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', 150 ) + 5 ) . ':' . $active_lock[1];
|
||||
update_post_meta( $post_id, '_edit_lock', $new_lock, implode( ':', $active_lock ) );
|
||||
wp_die( 1 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user