~canonical-sysadmins/wordpress/4.9.1

« back to all changes in this revision

Viewing changes to wp-admin/post.php

  • Committer: Barry Price
  • Date: 2017-06-09 02:09:58 UTC
  • mfrom: (1.1.26 upstream)
  • Revision ID: barry.price@canonical.com-20170609020958-838whhwt2196f2vk
Merge WP4.8 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
                wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) );
108
108
 
109
109
        if ( ! $post_type_object )
110
 
                wp_die( __( 'Unknown post type.' ) );
 
110
                wp_die( __( 'Invalid post type.' ) );
111
111
 
112
112
        if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
113
113
                wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
208
208
                wp_die( __( 'The item you are trying to move to the Trash no longer exists.' ) );
209
209
 
210
210
        if ( ! $post_type_object )
211
 
                wp_die( __( 'Unknown post type.' ) );
 
211
                wp_die( __( 'Invalid post type.' ) );
212
212
 
213
213
        if ( ! current_user_can( 'delete_post', $post_id ) )
214
214
                wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
231
231
                wp_die( __( 'The item you are trying to restore from the Trash no longer exists.' ) );
232
232
 
233
233
        if ( ! $post_type_object )
234
 
                wp_die( __( 'Unknown post type.' ) );
 
234
                wp_die( __( 'Invalid post type.' ) );
235
235
 
236
236
        if ( ! current_user_can( 'delete_post', $post_id ) )
237
237
                wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
249
249
                wp_die( __( 'This item has already been deleted.' ) );
250
250
 
251
251
        if ( ! $post_type_object )
252
 
                wp_die( __( 'Unknown post type.' ) );
 
252
                wp_die( __( 'Invalid post type.' ) );
253
253
 
254
254
        if ( ! current_user_can( 'delete_post', $post_id ) )
255
255
                wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );