WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/10/2017 02:40:00 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Use an existing string for "Invalid post type" error message.

Props ramiy.
Fixes #39171.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/post.php

    r37914 r39756  
    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 ) ) ) ) {
     
    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 ) )
     
    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 ) )
     
    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 ) )
Note: See TracChangeset for help on using the changeset viewer.