Commit Graph

144 Commits

Author SHA1 Message Date
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Ryan Boren 54067a5f20 Remove extraneous spaces. Props kenan3008, dimadin. fixes #19501 #19433
git-svn-id: https://develop.svn.wordpress.org/trunk@19596 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-14 17:36:38 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Jon Cave bde6461ff4 Provide back compat mapping for user_level, wp_usersettings and wp_usersettingstime properties of WP_User objects. Fixes #19265.
git-svn-id: https://develop.svn.wordpress.org/trunk@19325 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-17 20:40:24 +00:00
Andrew Nacin f1bbad5d5b Remove dead code. empty() will catch anything that equals false.
git-svn-id: https://develop.svn.wordpress.org/trunk@19171 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-05 13:35:48 +00:00
Ryan Boren 168e89007c Avoid 'Only variables should be assigned by reference' warning. Props arena. fixes #18867
git-svn-id: https://develop.svn.wordpress.org/trunk@18956 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-12 20:41:06 +00:00
Ryan Boren b412d5f082 Don't stomp meta fields in wp_update_user(). Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18909 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-07 02:34:41 +00:00
Jon Cave 205aa5ba5c Fix typos in documentation (wp-includes/[a-h]). See #18560.
git-svn-id: https://develop.svn.wordpress.org/trunk@18633 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-03 16:02:41 +00:00
Ryan Boren 9e2aa32657 Handle null user ID in the WP_User constructor. Props kawauso. fixes #17894
git-svn-id: https://develop.svn.wordpress.org/trunk@18598 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-24 19:47:35 +00:00
Ryan Boren 1d3e616495 Introduce metadata_exists(), WP_User::get_data_by(), WP_User::get(), WP_User::has_prop(). Don't fill user objects with meta. Eliminate data duplication in cache and memory. Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18597 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-24 19:32:59 +00:00
Ryan Boren afe083447f Handle id back compat in isset magic method. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18515 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-05 20:54:08 +00:00
Ryan Boren eda7d43e85 Deprecate get_userdatabylogin() and get_user_by_email(). Props scribu. fixes #18333
git-svn-id: https://develop.svn.wordpress.org/trunk@18513 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-05 16:57:31 +00:00
Ryan Boren 15507ec835 Remove first_name and last_name properties. Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18512 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-05 16:45:11 +00:00
Ryan Boren 35d92b5e1e Handle deprecation of id in __set(). Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18506 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-04 15:42:38 +00:00
Ryan Boren 8eea785bcb Add magic get/set/isset methods to WP_User to avoid data duplication. Standardize on WP_User::ID. Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18504 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-04 03:09:27 +00:00
Ryan Boren 58d9d5ea5d Remove return by ref from get_role(). Props scribu, elyobo. fixes #18237
git-svn-id: https://develop.svn.wordpress.org/trunk@18476 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-28 17:12:18 +00:00
Ryan Boren 6b5d8397b0 Introduce register_meta(), get_metadata_by_mid(), and *_post_meta capabilities. fixes #17850
git-svn-id: https://develop.svn.wordpress.org/trunk@18445 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-20 22:04:35 +00:00
Mark Jaquith 9d6bb11571 Check parent caps for revisions. props aaroncampbell. fixes #17668
git-svn-id: https://develop.svn.wordpress.org/trunk@18200 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-08 18:06:43 +00:00
Ryan Boren 9730cb8d15 Constructor cleanup. Props ocean90. fixes #16768
git-svn-id: https://develop.svn.wordpress.org/trunk@17771 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-29 20:05:12 +00:00
Ryan Boren d470b22d59 Remove PHP4 constructors. Props hakre. see #16768
git-svn-id: https://develop.svn.wordpress.org/trunk@17604 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-05 17:25:08 +00:00
Andrew Nacin 3a3d660a6e I have CDO. see #15779.
git-svn-id: https://develop.svn.wordpress.org/trunk@16910 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-14 11:25:11 +00:00
Andrew Nacin 12da6006e0 Ensure the map_meta_cap filter receives the right cap when the map_meta_cap flag is false. fixes #15779.
git-svn-id: https://develop.svn.wordpress.org/trunk@16909 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-14 11:22:32 +00:00
Ryan Boren c37f65296a Make sure create_users is strippped from blog admins for multisite setups where add_new_users is not enabled. see #15357
git-svn-id: https://develop.svn.wordpress.org/trunk@16551 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-23 16:29:21 +00:00
Andrew Nacin b0abda23b6 Don't check post_type_supports in map_meta_cap. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@16422 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-17 06:21:34 +00:00
Andrew Nacin 66d261ba84 Cripple capability_type. Produced inconsistent, janky meta cap mapping; now only acts as a capability base. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@16273 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-10 14:50:14 +00:00
Ryan Boren 6fd3b61886 Always allow super admins to have create_users. see #15357
git-svn-id: https://develop.svn.wordpress.org/trunk@16264 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-09 21:45:06 +00:00
Ryan Boren b8b7810f52 Introduce user_can(). Props simonwheatley. fixes #14602
git-svn-id: https://develop.svn.wordpress.org/trunk@16209 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-05 17:04:46 +00:00
Ryan Boren efdb066697 Do not set role if it is the same. Props nickmomrik. fixes #14708
git-svn-id: https://develop.svn.wordpress.org/trunk@15919 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-22 19:38:20 +00:00
Andrew Nacin 3732810a25 Only check the post author if the post type supports authors. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@15891 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 14:55:15 +00:00
Andrew Nacin 71ebaa6170 Rough first pass on map_meta_cap for custom post types. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@15890 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 14:40:04 +00:00
Andrew Nacin dde4381c70 Use map_meta_cap for multisite super admins in current_user_can_for_blog. props jamescollins, see #15122.
git-svn-id: https://develop.svn.wordpress.org/trunk@15812 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-15 06:47:40 +00:00
Ryan Boren 9ee8b20f30 First pass of user admin. Network admin and screen cleanups. see #14696
git-svn-id: https://develop.svn.wordpress.org/trunk@15746 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-07 19:34:18 +00:00
Andrew Nacin 6131f69f23 Provide an example for add_role() capabilities argument. props simonwheatley, fixes #14918.
git-svn-id: https://develop.svn.wordpress.org/trunk@15640 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-21 14:52:03 +00:00
Andrew Nacin fc00e5842f More efficient is_super_admin(). Don't call new WP_User on the current user. props mdawaffe, fixes #14842.
git-svn-id: https://develop.svn.wordpress.org/trunk@15608 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-10 23:24:34 +00:00
scribu b1def7dad8 Introduce 'edit_comment' meta cap. Fixes #14520
git-svn-id: https://develop.svn.wordpress.org/trunk@15596 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-07 23:35:28 +00:00
scribu ef3ee6e841 call get_users() from get_users_of_blog()
git-svn-id: https://develop.svn.wordpress.org/trunk@15566 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-05 14:35:55 +00:00
Andrew Nacin 65fdbfec3f Fix the delete_user meta cap.
git-svn-id: https://develop.svn.wordpress.org/trunk@15561 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-04 12:24:43 +00:00
Andrew Nacin 2c326f0a87 Ensure we're checking when looking for is_super_admin() in map_meta_cap(). Bump DB version.
fixes #14454 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@15480 602fd350-edb4-49c9-b593-d223f7449a82
2010-07-29 21:58:58 +00:00
Andrew Nacin 97366f31f0 Fix checking for whether WP_User object is actually a user. props filosofo, fixes #13903 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@15404 602fd350-edb4-49c9-b593-d223f7449a82
2010-07-13 21:27:05 +00:00
Dion Hulse 7efc4efdaa Alot more tabs. Props jacobsantos & Viper007bond. See #14147
git-svn-id: https://develop.svn.wordpress.org/trunk@15355 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-30 00:05:18 +00:00
Ryan Boren 58fb5bb514 Pass ID to is_super_admin(). Props bigdawggi. fixes #14066 for 3.1
git-svn-id: https://develop.svn.wordpress.org/trunk@15311 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-24 14:49:23 +00:00
Andrew Nacin 1752cea413 Fix phpdoc typo. props demetris, fixes #13781.
git-svn-id: https://develop.svn.wordpress.org/trunk@15165 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-08 07:44:50 +00:00
Ryan Boren ba0dab7090 Use import cap. Add old edit_files cap to list of caps to shutdown if DISALLOW_FILE_EDIT. see #13681
git-svn-id: https://develop.svn.wordpress.org/trunk@15097 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-01 18:08:27 +00:00
Andrew Nacin 43d4f742b9 Some sanity checks -- make sure we have a valid post author user object before checking if the current user is the author.
git-svn-id: https://develop.svn.wordpress.org/trunk@14782 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-21 15:15:32 +00:00
Andrew Nacin 323342deec Move post type object capabilities to a 'cap' object. Allow them to be initialized via the 'capabilities' key (an array) when registering support for the post type. Caps are now referred to by the name of the cap as if it was a post, i.e. ->cap->edit_post. see #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14585 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 20:45:18 +00:00
Ryan Boren d783952469 Strip trailing whites.
git-svn-id: https://develop.svn.wordpress.org/trunk@14404 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 20:26:11 +00:00
Andrew Nacin e2e2836ad5 Explicitly set the capability required in edit_users map_meta_cap branch, so we don't accidentally pass edit_user. props TheDeadMedic. fixes #13074, fixes #13137
git-svn-id: https://develop.svn.wordpress.org/trunk@14256 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-27 20:39:39 +00:00
Ryan Boren 981960fa09 Introduce DISALLOW_UNFILTERED_HTML
git-svn-id: https://develop.svn.wordpress.org/trunk@14244 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-26 21:42:42 +00:00
Ryan Boren 8d9073103c Introduce get_super_admins(). Allow hard-coding a global super_admins array and bypassing site options. fixes #12815
git-svn-id: https://develop.svn.wordpress.org/trunk@14206 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-23 20:34:03 +00:00
Joseph Scott cae7b3b275 New 'list_users' cap to provide more controls over listing users vs. editing
users.

Apply this new cap to the 'Authors & Users' menu item and 'Users' page in
wp-admin.

Bump db version to 14139 to pick up the new cap.

See #13074



git-svn-id: https://develop.svn.wordpress.org/trunk@14189 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-22 19:48:13 +00:00