Skip to content

Refactor restrict_post_edit function.

Choose a tag to compare

@niemenmaa niemenmaa released this 24 Aug 17:52
· 93 commits to master since this release

Can prevent editing and other capabilities.

    /**
     * @param array $blocked_posts List of blocked posts.
     * @param string $capability Capability to restrict: etc. 'delete_post'. Defaults to 'edit_post'.
     */
    public function restrict_post_edit( $blocked_posts, $capability = 'edit_post' )