Ticket #31304: 31304.diff
| File 31304.diff, 724 bytes (added by , 12 years ago) |
|---|
-
wp-includes/capabilities.php
1517 1517 } 1518 1518 1519 1519 /** 1520 * Check if role exists. 1521 * 1522 * @see get_role() Uses function to retrieve role object. 1523 * @since 4.2.0 1524 * 1525 * @param string $role Role name. 1526 * @return boolean True if role exists, false if it does not or no role name is supplied. 1527 */ 1528 function role_exists( $role = '' ) { 1529 1530 if( $role ) { 1531 1532 $role_object = get_role( $role ); 1533 1534 if( ! is_null( $role_object ) ) { 1535 return true; 1536 } 1537 1538 } 1539 1540 return false; 1541 } 1542 1543 /** 1520 1544 * Retrieve a list of super admins. 1521 1545 * 1522 1546 * @since 3.0.0
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)