mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Posts, Post Types: Use an existing string for "Invalid post type" error message.
Props ramiy. Fixes #39171. git-svn-id: https://develop.svn.wordpress.org/trunk@39756 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -52,7 +52,7 @@ if ( ! current_user_can( 'upload_files' ) ) {
|
||||
if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
|
||||
$post = get_post( $id );
|
||||
if ( 'attachment' != $post->post_type )
|
||||
wp_die( __( 'Unknown post type.' ) );
|
||||
wp_die( __( 'Invalid post type.' ) );
|
||||
if ( ! current_user_can( 'edit_post', $id ) )
|
||||
wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user