WordPress.org

Make WordPress Core

Ticket #17115: 17115.diff

File 17115.diff, 1.8 KB (added by ericmann, 6 years ago)

Simplified message patch.

  • wp-admin/edit-form-advanced.php

     
    4848                // translators: Publish box date format, see http://php.net/date
    4949                date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
    5050        10 => sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
     51        11 => __( 'You attempted to save or publish an empty post. Provide some content before saving.' ),
    5152);
    5253$messages['page'] = array(
    5354         0 => '', // Unused. Messages start at index 1.
     
    6162         8 => sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
    6263         9 => sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
    6364        10 => sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
     65        11 => __( 'You attempted to save or publish an empty page. Provide some content before saving.' ),
    6466);
    6567$messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now.
    6668
  • wp-admin/post.php

     
    5050                                case 'future':
    5151                                        $message = 9;
    5252                                        break;
     53                                case 'auto-draft':
     54                                        $message = 11;
     55                                        break;
    5356                                default:
    5457                                        $message = 6;
    5558                        }