Commit Graph

10 Commits

Author SHA1 Message Date
Andrew Nacin 443609fcab Pass value and expiration to result hooks in set_transient() and set_site_transient(). props johnbillion, fixes #24583.
git-svn-id: https://develop.svn.wordpress.org/trunk@24433 602fd350-edb4-49c9-b593-d223f7449a82
2013-06-16 04:06:12 +00:00
Andrew Nacin 11ab449a89 Ensure we strictly compare 'alloptions' and 'notoptions' when protecting these special options.
Trim and check for emptiness of $option in delete_option(), as done for get, update, and add.

fixes #23289.



git-svn-id: https://develop.svn.wordpress.org/trunk@23510 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 16:49:20 +00:00
Andrew Nacin 2f1e3701ed Trim the option name in get_option() before calling the pre_option_$option filter, not after. props evansolomon. fixes #22358.
git-svn-id: https://develop.svn.wordpress.org/trunk@22633 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-17 13:20:57 +00:00
Ryan Boren 194e2775b8 Don't create {$blog_id}_user-settings, {$blog_id}_user-settings-time, and {$blog_id}_dashboard_quick_press_last_post_id user options when a super admin visits a site they aren't a member of. Instead, rely solely on the wp-settings cookie.
fixes #22178


git-svn-id: https://develop.svn.wordpress.org/trunk@22256 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 18:58:09 +00:00
Andrew Nacin 774a12be83 Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@21996 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 05:26:19 +00:00
Andrew Nacin 7f29924c6a Remove ms-files.php rewriting from WordPress multisite. fixes #19235.
Keep existing networks compatible with a ms_files_rewriting network option.



git-svn-id: https://develop.svn.wordpress.org/trunk@21823 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 22:22:20 +00:00
Ryan Boren 8dfae17319 Call filters for default option values only as needed to reduce number of filter calls. Props Ott042. see #20448
git-svn-id: https://develop.svn.wordpress.org/trunk@20784 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-14 17:00:13 +00:00
Ryan Boren 7e4b88ad24 Add filters for the default to get_option() and get_site_option(). Provide default overrides in the customizer. Props Otto42. see #20448
git-svn-id: https://develop.svn.wordpress.org/trunk@20783 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-14 16:45:32 +00:00
Andrew Nacin 54a6a40533 Introduce $wpdb->delete(). props justindgivens, scribu. fixes #18948.
git-svn-id: https://develop.svn.wordpress.org/trunk@20287 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-24 15:24:31 +00:00
Ryan Boren 93d4783778 Move option, setting, and transient functions from functions.php to option.php. see #19552
git-svn-id: https://develop.svn.wordpress.org/trunk@19602 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-19 23:15:32 +00:00