Commit Graph

61 Commits

Author SHA1 Message Date
Drew Jaynes 48213a5842 Docs: Fix some syntactical issues and add missing parameter and return descriptions to the DocBlock for the `WP_User::__get()` magic method.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 10:02:24 +00:00
Drew Jaynes fd82198aad Docs: Fix some syntactical issues and add missing parameter and return descriptions to the DocBlock for the `WP_User::__isset()` magic method.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 09:59:24 +00:00
Drew Jaynes 16d8ed44a5 Docs: Add a file header to wp-includes/class-wp-user.php, created in [33752].
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 09:56:25 +00:00
Scott Taylor eb1e8f41a0 Users: add `__unset` to `WP_User`.
Adds unit tests.

Props johnjamesjacoby, MikeHansenMe, wonderboymusic.
Fixes #20043.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 05:00:24 +00:00
Scott Taylor d093242095 Users: clarify the docs for `WP_User::__set` to make it clear that it does save data in the database.
Props johnpbloch.
Fixes #24255.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 04:56:24 +00:00
Drew Jaynes a7ea95f53a Docs: Add documentation for `$object_id`, the optional second parameter in `current_user_can()` and `WP_User::has_cap()`, and the optional third parameter in `map_meta_cap()`.
This change introduces the vernacular of "meta" vs "primitive" capabilities to core docs, and providing examples for each inline and attempts to make it clear that `$object_id` is really only useful if the passed `$capability` is of the meta cap variety.

Props jliman for the initial patch.
Fixes #32694.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 07:36:32 +00:00
Boone Gorges ef474c6970 Accept 'ID' as a valid `$field` in `get_user_by()`.
We already accept 'id'. `ID` more closely matches the database and
`WP_User` schemas.

Props Shelob9.
Fixes #33869.
Built from https://develop.svn.wordpress.org/trunk@34125


git-svn-id: http://core.svn.wordpress.org/trunk@34093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 18:58:26 +00:00
Scott Taylor 7ef604c052 Ensure that `role` is not empty before adding it in `add_role()` function and methods.
Props MikeHansenMe, dannydehaan, michielhab.
Fixes #23746.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 03:42:25 +00:00
Scott Taylor 8879565c0a In `WP_User`, add `@property` docs for `description`, `first_name`, and `last_name`. `user_firstname` and `user_lastname` only exist for back-compat.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 01:13:24 +00:00
Drew Jaynes 05c7abcf13 Docs: Add missing parameter documentation to the the DocBlock for `WP_User::__set()`.
Props racase for the initial patch.
Fixes #33652.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-01 21:47:21 +00:00
Scott Taylor df1c0c2363 Roles: move classes into their own file. `capbilities.php` loads the new files, so this is 100% BC if someone is loading `capbilities.php` directly. New files created using `svn cp`.
Creates: 
`class-wp-roles.php` 
`class-wp-role.php` 
`class-wp-user.php` 
`capbilities-functions.php` 

`capbilities.php` contains only top-level code. Class files only contains classes. Functions file only contains functions.

See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 04:58:21 +00:00