@@ 24-30 (lines=7) @@ | ||
21 | wp_die( __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) ); |
|
22 | } |
|
23 | ||
24 | if ( ! current_user_can( $tax->cap->manage_terms ) ) { |
|
25 | wp_die( |
|
26 | '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
27 | '<p>' . __( 'Sorry, you are not allowed to manage terms in this taxonomy.' ) . '</p>', |
|
28 | 403 |
|
29 | ); |
|
30 | } |
|
31 | ||
32 | /** |
|
33 | * $post_type is set when the WP_Terms_List_Table instance is created |
|
@@ 73-79 (lines=7) @@ | ||
70 | case 'add-tag': |
|
71 | check_admin_referer( 'add-tag', '_wpnonce_add-tag' ); |
|
72 | ||
73 | if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
|
74 | wp_die( |
|
75 | '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
76 | '<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>', |
|
77 | 403 |
|
78 | ); |
|
79 | } |
|
80 | ||
81 | $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); |
|
82 | if ( $ret && !is_wp_error( $ret ) ) |
|
@@ 117-123 (lines=7) @@ | ||
114 | case 'bulk-delete': |
|
115 | check_admin_referer( 'bulk-tags' ); |
|
116 | ||
117 | if ( ! current_user_can( $tax->cap->delete_terms ) ) { |
|
118 | wp_die( |
|
119 | '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
120 | '<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>', |
|
121 | 403 |
|
122 | ); |
|
123 | } |
|
124 | ||
125 | $tags = (array) $_REQUEST['delete_tags']; |
|
126 | foreach ( $tags as $tag_ID ) { |
@@ 37-43 (lines=7) @@ | ||
34 | if ( ! $post_type_object ) |
|
35 | wp_die( __( 'Invalid post type.' ) ); |
|
36 | ||
37 | if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) { |
|
38 | wp_die( |
|
39 | '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
40 | '<p>' . __( 'Sorry, you are not allowed to edit posts in this post type.' ) . '</p>', |
|
41 | 403 |
|
42 | ); |
|
43 | } |
|
44 | ||
45 | $wp_list_table = _get_list_table('WP_Posts_List_Table'); |
|
46 | $pagenum = $wp_list_table->get_pagenum(); |
@@ 57-63 (lines=7) @@ | ||
54 | ||
55 | $editing = true; |
|
56 | ||
57 | if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) { |
|
58 | wp_die( |
|
59 | '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . |
|
60 | '<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>', |
|
61 | 403 |
|
62 | ); |
|
63 | } |
|
64 | ||
65 | // Schedule auto-draft cleanup |
|
66 | if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) ) |