mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Use meta caps edit_post, read_post, and delete_post directly, rather than consulting the post type object. map_meta_cap() handles that for us. props markjaquith, kovshenin. fixes #23226.
git-svn-id: https://develop.svn.wordpress.org/trunk@24593 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -240,7 +240,7 @@ function wp_link_category_checklist( $link_id = 0 ) {
|
||||
*/
|
||||
function get_inline_data($post) {
|
||||
$post_type_object = get_post_type_object($post->post_type);
|
||||
if ( ! current_user_can($post_type_object->cap->edit_post, $post->ID) )
|
||||
if ( ! current_user_can( 'edit_post', $post->ID ) )
|
||||
return;
|
||||
|
||||
$title = esc_textarea( trim( $post->post_title ) );
|
||||
|
||||
Reference in New Issue
Block a user