Make WordPress Core

Ticket #39171: 39171.patch

File 39171.patch, 2.8 KB (added by ramiy, 8 years ago)
  • wp-admin/async-upload.php

     
    5252if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
    5353        $post = get_post( $id );
    5454        if ( 'attachment' != $post->post_type )
    55                 wp_die( __( 'Unknown post type.' ) );
     55                wp_die( __( 'Invalid post type.' ) );
    5656        if ( ! current_user_can( 'edit_post', $id ) )
    5757                wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
    5858
  • wp-admin/post.php

     
    107107                wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) );
    108108
    109109        if ( ! $post_type_object )
    110                 wp_die( __( 'Unknown post type.' ) );
     110                wp_die( __( 'Invalid post type.' ) );
    111111
    112112        if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
    113113                wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
     
    208208                wp_die( __( 'The item you are trying to move to the Trash no longer exists.' ) );
    209209
    210210        if ( ! $post_type_object )
    211                 wp_die( __( 'Unknown post type.' ) );
     211                wp_die( __( 'Invalid post type.' ) );
    212212
    213213        if ( ! current_user_can( 'delete_post', $post_id ) )
    214214                wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
     
    231231                wp_die( __( 'The item you are trying to restore from the Trash no longer exists.' ) );
    232232
    233233        if ( ! $post_type_object )
    234                 wp_die( __( 'Unknown post type.' ) );
     234                wp_die( __( 'Invalid post type.' ) );
    235235
    236236        if ( ! current_user_can( 'delete_post', $post_id ) )
    237237                wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
     
    249249                wp_die( __( 'This item has already been deleted.' ) );
    250250
    251251        if ( ! $post_type_object )
    252                 wp_die( __( 'Unknown post type.' ) );
     252                wp_die( __( 'Invalid post type.' ) );
    253253
    254254        if ( ! current_user_can( 'delete_post', $post_id ) )
    255255                wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
  • wp-includes/class-wp-customize-nav-menus.php

     
    788788         */
    789789        public function insert_auto_draft_post( $postarr ) {
    790790                if ( ! isset( $postarr['post_type'] ) || ! post_type_exists( $postarr['post_type'] )  ) {
    791                         return new WP_Error( 'unknown_post_type', __( 'Unknown post type' ) );
     791                        return new WP_Error( 'unknown_post_type', __( 'Invalid post type.' ) );
    792792                }
    793793                if ( empty( $postarr['post_title'] ) ) {
    794794                        return new WP_Error( 'empty_title', __( 'Empty title' ) );