関数 author_can()
2014/12/11
定義ファイル :/blog/wp-includes/capabilities.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function author_can( $post, $capability ) { if ( !$post = get_post($post) ) return false; $author = get_userdata( $post->post_author ); if ( ! $author ) return false; $args = array_slice( func_get_args(), 2 ); $args = array_merge( array( $capability ), $args ); return call_user_func_array( array( $author, 'has_cap' ), $args ); } |