Eric Andrew Lewis
27361e6ffe
Networks and sites: Replace "blog" usage with "site" in docs.
...
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.
See #35417 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36417 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-28 03:50:26 +00:00
ericlewis
3fde994152
Networks and sites: Replace "blog" usage with "site" in docs.
...
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.
See #35417 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36416 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-28 03:34:02 +00:00
Drew Jaynes
228c200b35
Docs: Add variadic markers to the optional $object_id parameter notation for WP_User::has_cap().
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35954 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-16 05:31:27 +00:00
Drew Jaynes
092c62e738
Docs: Move an inline comment that was preventing the hook docs for the user_has_cap filter from being parsed.
...
Props ocean90.
Fixes #34639 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35598 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-10 06:44:51 +00:00
Sergey Biryukov
90f4b365a3
Remove <code> tags from translatable strings in wp-includes/class-wp-user.php.
...
Add translator comments.
Props ramiy.
Fixes #34576 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35548 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-06 00:05:58 +00:00
Drew Jaynes
0cb7c0bd9f
Docs: Add missing descriptions for the $wpdb global in DocBlocks all the places.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35170 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 23:43:10 +00:00
Scott Taylor
d92723a33f
Users: in WP_User::__unset(), don't reset the deprecated prop id to ID. Still throw the deprecated notice.
...
Update unit test.
Fixes #20043 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34466 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 00:48:23 +00:00
Drew Jaynes
a74e215ac4
Docs: The Users subpackage is plural.
...
See #33701 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34412 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 13:45:48 +00:00
Drew Jaynes
16e2ecda05
Docs: Add a missing access modifier to the declaration for the WP_User::__unset() magic method, introduced in [34380].
...
Also adds missing documentation to the DocBlock.
Fixes #20043 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34390 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 10:06:56 +00:00
Drew Jaynes
4c8a45fe8c
Docs: Fix some syntactical issues and add missing parameter and return descriptions to the DocBlock for the WP_User::__get() magic method.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34389 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 10:01:01 +00:00
Drew Jaynes
e0cef41f09
Docs: Fix some syntactical issues and add missing parameter and return descriptions to the DocBlock for the WP_User::__isset() magic method.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34388 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 09:58:05 +00:00
Drew Jaynes
adc24d967b
Docs: Add a file header to wp-includes/class-wp-user.php, created in [33752].
...
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34387 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 09:55:34 +00:00
Scott Taylor
0ad726ef4d
Users: add __unset to WP_User.
...
Adds unit tests.
Props johnjamesjacoby, MikeHansenMe, wonderboymusic.
Fixes #20043 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34380 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 04:59:35 +00:00
Scott Taylor
3f8f3ccff0
Users: clarify the docs for WP_User::__set to make it clear that it does save data in the database.
...
Props johnpbloch.
Fixes #24255 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34379 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 04:55:50 +00:00
Drew Jaynes
f2eb739ea6
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34224 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 07:35:37 +00:00
Boone Gorges
974517d2bc
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34125 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 18:57:15 +00:00
Scott Taylor
05e249d5ac
Ensure that role is not empty before adding it in add_role() function and methods.
...
Props MikeHansenMe, dannydehaan, michielhab.
Fixes #23746 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33967 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 03:41:27 +00:00
Scott Taylor
5936394bb6
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33958 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 01:12:41 +00:00
DrewAPicture
62230a38e1
Docs: Add missing parameter documentation to the the DocBlock for WP_User::__set().
...
Props racase for the initial patch.
Fixes #33652 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33847 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-01 21:46:02 +00:00
Scott Taylor
28217ae6a0
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33752 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-26 04:57:48 +00:00