Docs: Switch more docs over to typed array notation, plus some fixes.

See #48303, #41756

Built from https://develop.svn.wordpress.org/trunk@46596


git-svn-id: http://core.svn.wordpress.org/trunk@46393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn
2019-10-26 21:09:04 +00:00
parent 9890e68661
commit 3caaa40fc6
36 changed files with 218 additions and 212 deletions

View File

@@ -807,9 +807,10 @@ function get_role( $role ) {
*
* @since 2.0.0
*
* @param string $role Role name.
* @param string $role Role name.
* @param string $display_name Display name for role.
* @param array $capabilities List of capabilities, e.g. array( 'edit_posts' => true, 'delete_posts' => false );
* @param bool[] $capabilities List of capabilities keyed by the capability name,
* e.g. array( 'edit_posts' => true, 'delete_posts' => false ).
* @return WP_Role|null WP_Role object if role is added, null if already exists.
*/
function add_role( $role, $display_name, $capabilities = array() ) {