| @@ 644-650 (lines=7) @@ | ||
| 641 | * @param WP_Post $post post object |
|
| 642 | * @return array array of post-level permissions; 'publish_post', 'delete_post', 'edit_post' |
|
| 643 | */ |
|
| 644 | function get_current_user_capabilities( $post ) { |
|
| 645 | return array( |
|
| 646 | 'publish_post' => current_user_can( 'publish_post', $post ), |
|
| 647 | 'delete_post' => current_user_can( 'delete_post', $post ), |
|
| 648 | 'edit_post' => current_user_can( 'edit_post', $post ) |
|
| 649 | ); |
|
| 650 | } |
|
| 651 | ||
| 652 | /** |
|
| 653 | * Get post ID by name |
|
| @@ 659-665 (lines=7) @@ | ||
| 656 | * @param WP_Post $post post object |
|
| 657 | * @return array array of post-level permissions; 'publish_post', 'delete_post', 'edit_post' |
|
| 658 | */ |
|
| 659 | function get_current_user_capabilities( $post ) { |
|
| 660 | return array( |
|
| 661 | 'publish_post' => current_user_can( 'publish_post', $post ), |
|
| 662 | 'delete_post' => current_user_can( 'delete_post', $post ), |
|
| 663 | 'edit_post' => current_user_can( 'edit_post', $post ) |
|
| 664 | ); |
|
| 665 | } |
|
| 666 | ||
| 667 | /** |
|
| 668 | * Get extra post permalink suggestions |
|