~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/post-new.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
} elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) {
22
22
        $post_type = $_GET['post_type'];
23
23
} else {
24
 
        wp_die( __('Invalid post type') );
 
24
        wp_die( __( 'Invalid post type.' ) );
25
25
}
26
26
$post_type_object = get_post_type_object( $post_type );
27
27
 
57
57
if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) {
58
58
        wp_die(
59
59
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
60
 
                '<p>' . __( 'You are not allowed to create posts as this user.' ) . '</p>',
 
60
                '<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
61
61
                403
62
62
        );
63
63
}