Commit Graph

56 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 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
Ryan Boren fd10e500e4 Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@19054 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-24 19:13:23 +00:00
Jon Cave 4219b8b03f Fix back compat issues with delete_postmeta and deleted_postmeta actions as these should be passed the meta ID. Fixes #18825.
git-svn-id: https://develop.svn.wordpress.org/trunk@18835 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-30 15:19:32 +00:00
Jon Cave 55609b863e Automatically set 'compare' => 'IN' in WP_Meta_Query::get_sql() when the meta value is an array. Props ldebrouwer, SergeyBiryukov. Fixes #16829.
git-svn-id: https://develop.svn.wordpress.org/trunk@18825 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 22:10:56 +00:00
Andrew Nacin 32ba775ad7 Pass unslashed values from update_metadata() to add_metadata(). fixes #17343.
git-svn-id: https://develop.svn.wordpress.org/trunk@18816 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 19:37:58 +00:00
Andrew Nacin e0889f848c Fix docs for get_meta_sql(). First arg cannot be optional. props duck_, fixes #18717.
git-svn-id: https://develop.svn.wordpress.org/trunk@18789 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-27 05:13:07 +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 dbb0b7c8d6 Turn delete_meta() , get_post_meta_by_id(), update_meta(), delete_post_meta_by_key() into wrappers around the metadata API. Add back compat *_postmeta actions to metadata API. Props jgadbois. see #18196
git-svn-id: https://develop.svn.wordpress.org/trunk@18500 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-03 16:48:37 +00:00
Ryan Boren 0ac95fd5a6 update_metadata_by_mid() and delete_metadata_by_mid(). Props kovshenin. see #18195
git-svn-id: https://develop.svn.wordpress.org/trunk@18494 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-01 17:01:54 +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
Andrew Nacin a657a1986c @since s/3.2/3.2.0/
git-svn-id: https://develop.svn.wordpress.org/trunk@18268 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-11 04:40:18 +00:00
Ryan Boren 46d96c7704 Bring out the pinking shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@18254 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-10 23:01:45 +00:00
Ryan Boren 640eed5f4a Update @since
git-svn-id: https://develop.svn.wordpress.org/trunk@18032 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-25 15:47:17 +00:00
Ryan Boren 57b6c9aeda Sanitize guid on save and display. Sanitize mime type on save. Don't allow changing mime type via edit form handlers. Protect hidden meta.
git-svn-id: https://develop.svn.wordpress.org/trunk@17994 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-22 23:19:42 +00:00
Dion Hulse 4259cd6a27 Properly handle querying for meta by value without a key as well as those with invalid parameters. Props scribu. See #17264
git-svn-id: https://develop.svn.wordpress.org/trunk@17746 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-28 15:02:16 +00:00
Ryan Boren 96fe89727e Introduce WP_Meta_Query and relation support. Props scribu, greuben. fixes #17165 #17011
git-svn-id: https://develop.svn.wordpress.org/trunk@17699 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-25 17:27:35 +00:00
Ryan Boren d328751ee7 Allow querying empty meta values. Props scribu. fixes #15292
git-svn-id: https://develop.svn.wordpress.org/trunk@17674 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-21 18:13:03 +00:00
Ryan Boren 42e432bd94 Avoid var name conflict in _get_meta_sql(). Fixes type var passed to get_meta_sql filter. Props Rahe, nacin. fixes #16825 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@17530 602fd350-edb4-49c9-b593-d223f7449a82
2011-03-22 20:35:47 +00:00
Andrew Nacin 68692f0565 get_meta_sql should be private. see #14645.
git-svn-id: https://develop.svn.wordpress.org/trunk@17170 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-29 19:31:35 +00:00
Ryan Boren aca2b86eaf Add 'who' arg to wp_dropdown_users() and get_users(). Add' hide_if_only_one_author' argument to get_users(). Query only authors (user level greater than 0) when who => author is passed. Query only authors for author meta box and quick edit dropdowns. Props scribu. fixes #15871
git-svn-id: https://develop.svn.wordpress.org/trunk@17088 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-20 17:25:39 +00:00
Ryan Boren 748f5f0154 phpdoc notation fixes. Props demetris. fixes #15852
git-svn-id: https://develop.svn.wordpress.org/trunk@17009 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 22:46:13 +00:00
Andrew Nacin 598bb9952a Allow actual DB fields in WP_User_Query orderby. props duck, see #15816.
git-svn-id: https://develop.svn.wordpress.org/trunk@16953 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-15 16:51:38 +00:00
Ryan Boren 8bf835d944 Meta data caching improvements. Props mdawaffe. see #15545
git-svn-id: https://develop.svn.wordpress.org/trunk@16596 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-26 21:35:26 +00:00
Ryan Boren f721e075e6 Use wp_cache_add() instead of wp_cache_set() in update_meta_cache(). fixes #15452
git-svn-id: https://develop.svn.wordpress.org/trunk@16437 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-17 18:25:42 +00:00
scribu a4cd0df78c Minor get_meta_sql() cleanup. See #9124
git-svn-id: https://develop.svn.wordpress.org/trunk@16410 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-17 00:27:34 +00:00
scribu a8160ed916 Kill WP_Object_Query. See #15032
git-svn-id: https://develop.svn.wordpress.org/trunk@16353 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-13 18:32:43 +00:00
scribu f337bb1b86 Add context to get_meta_sql(). See #15018
git-svn-id: https://develop.svn.wordpress.org/trunk@16286 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-11 10:06:05 +00:00
scribu c0be4fafcf Make get_meta_sql() a standalone function. See #15032
git-svn-id: https://develop.svn.wordpress.org/trunk@16266 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-09 23:22:13 +00:00
scribu 9cc035e926 Fix inconsistencies in metadata filters. Props sc0ttkclark. See #14766
git-svn-id: https://develop.svn.wordpress.org/trunk@16017 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-27 17:45:08 +00:00
scribu d9abf82f7c Add filters to *_metadata() functions. Props sc0ttkclark. Fixes #14766
git-svn-id: https://develop.svn.wordpress.org/trunk@15983 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-26 19:11:27 +00:00
Ryan Boren fc73604019 Actions for adding and deleting meta. Props wojtek.szkutnik mitchoyoshitaka. fixes #14173
git-svn-id: https://develop.svn.wordpress.org/trunk@15917 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-22 19:18:33 +00:00
Andrew Nacin 9494e4ce7e Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: https://develop.svn.wordpress.org/trunk@15590 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-07 11:21:11 +00:00
Ryan Boren d079129f86 Perform strict equality comparison. Props shawnparker. fixes #13350 for 3.1
git-svn-id: https://develop.svn.wordpress.org/trunk@15389 602fd350-edb4-49c9-b593-d223f7449a82
2010-07-12 15:28:31 +00:00
Ryan Boren 364194617a Don't update meta data when the new value matches the old value. fixes #13350
git-svn-id: https://develop.svn.wordpress.org/trunk@14564 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-11 17:35:07 +00:00
Andrew Nacin e98ddd7bd6 Revert patch for expecting unslashed data in the metadata API. Had snuck in with [14546]. see #12416.
git-svn-id: https://develop.svn.wordpress.org/trunk@14547 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-10 20:51:58 +00:00
Andrew Nacin 8235a24f35 Fix double-tabbing in get_dropins.
git-svn-id: https://develop.svn.wordpress.org/trunk@14546 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-10 20:41:14 +00:00
Ryan Boren cec049295c Pass unserializeds value to meta actions.
git-svn-id: https://develop.svn.wordpress.org/trunk@14308 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-29 19:26:40 +00:00
Ryan Boren 93e92e9b32 clean_user_cache() instead of direct cache delete.
git-svn-id: https://develop.svn.wordpress.org/trunk@14305 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-29 18:32:01 +00:00
Ryan Boren ab27ecda6d Reset the global current_user object when the current user is changed.
git-svn-id: https://develop.svn.wordpress.org/trunk@14302 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-29 18:24:18 +00:00
Ryan Boren 6973ce2f9f Clear the users cache when updating user metadata. fixes #13075
git-svn-id: https://develop.svn.wordpress.org/trunk@14179 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-21 18:25:03 +00:00
Dion Hulse 0f638312f7 Fix Metadata deletion. See #12414 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@13496 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-28 10:07:55 +00:00
Andrew Nacin d37de180e1 Validate $object_id in *_metadata() functions. Props scribu fixes #11841
git-svn-id: https://develop.svn.wordpress.org/trunk@13347 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-23 22:42:54 +00:00
Andrew Nacin 2a86f138e8 Ensure we're back compat with return values and actions in deprecated *_usermeta() family. See #10837
git-svn-id: https://develop.svn.wordpress.org/trunk@13326 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-23 09:15:47 +00:00
Ryan Boren 72adbb470e Remove trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@12859 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-26 22:49:05 +00:00
Ryan Boren fa345f7f2c phpdoc for metadata API. Props wnorris. fixes #11943
git-svn-id: https://develop.svn.wordpress.org/trunk@12761 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-19 17:08:04 +00:00
Ryan Boren cd96da236b Use umeta_id for user meta. Props wnorris. fixes #11627 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@12562 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-28 16:42:31 +00:00
Ryan Boren 1be4ed69cb Fix argument order. Props mdawaffe. fixes #11125
git-svn-id: https://develop.svn.wordpress.org/trunk@12173 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-12 14:43:15 +00:00
Ryan Boren a4789b3cc1 Associate subdirector of whitespace trims trailing whites with pinking shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@12042 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-15 20:26:21 +00:00
Peter Westwood 9698b2716d Fix the specification of the object_type column in delete_metadata so that it will delete stuff if $delete_all is false. See #2659
git-svn-id: https://develop.svn.wordpress.org/trunk@11999 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-06 19:18:21 +00:00