Opened 18 years ago
Closed 15 years ago
#4915 closed enhancement (fixed)
Deprecate get_alloptions()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Optimization | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
These seem to be near duplicates. One has some filters, one has some caching.
It'd be a strange plugin that used either. Can we deprecate one or the other?
Also note get_alloptions_110().
Attachments (2)
Change History (18)
#2
@
17 years ago
Whats the consensus?
dump get_alloptions() as its not used?
Move to depreciated and return wp_load_alloptions()?
#4
@
16 years ago
- Keywords needs-patch added
+1 to dumping get_alloptions(). the consensus probably is needs-patch though. :-)
#6
@
16 years ago
According to the plugins homepage the plugin is only compatible up to WordPress 2.5. Therefore if it once was an argument on how to handle things it is now an argument to remove get_alloptions().
#7
@
16 years ago
- Keywords has-patch added; needs-patch removed
- Summary changed from get_alloptions() v. wp_load_alloptions() to Deprecate get_alloptions()
wp_load_alloptions() is not a 100% suitable replacement so it's not suggested. No occurences wihtin the codebase. The named plugin is not for 2.8 / 2.9 therefore no prolems to patch any longer. If this gets commited early, the plugin author - if still interested - can then update against the latest version before 2.9 will be released.
#10
@
15 years ago
- Component changed from General to Optimization
- Keywords commit added
- Milestone changed from Future Release to 3.0
- Type changed from defect (bug) to enhancement
- Version set to 2.9
#11
@
15 years ago
Why aren't we deprecating in favor of wp_load_alloptions()? Just because we don't want wp_getalloptions() to return wp_load_alloptions() once it is deprecated, the favored replacement should still be named.
And I'm not sure why we're completely clearing out the function instead of returning wp_load_alloptions(). It isn't an exact replacement but both end up returning the same thing.
#13
@
15 years ago
Replying to Denis-de-Bernardy:
It's not used at all in WP, the ticket has been opened for 2 years...
Sure, but there's been no sign of deprecation. The codex and wp_load_alloptions() inline docs even denote the difference between the two, which means a plugin author might still use it, even choosing to use it over wp_load_alloptions() due to the difference. While the repository is a good guideline, not all plugins out there are on wordpress.org.
Best I can tell, wp_load_alloptions() should be a named replacement. Generally, it seems we run down this checklist:
- Is the functionality and return value of the replacement (if applicable) roughly compatible? If yes, return the replacement. If no:
- Does the deprecated function still perform an action? If it still does something: leave it as is and only name the replacement (if applicable). If no:
- The function no longer provides any functionality, so strip it down to nothing. (See get_autotoggle() as an example.)
Seems the first one applies here.
We have one plugin in the repository that is still using get_alloptions().
http://svn.wp-plugins.org/inscript/trunk/inscript.php
The methods that use it are doing manual manipulation of the options table, and thus would be incompatible with any WP install using an options cache... so it needs updating anyway.
I say we yank this for 2.4, and notify the author of InScript so he can update his plugin to use the options API.