[wp-trac] [WordPress Trac] #11028: Remove get_the_content / wp_link_pages dead code
WordPress Trac
wp-trac at lists.automattic.com
Sun Oct 25 22:18:54 UTC 2009
#11028: Remove get_the_content / wp_link_pages dead code
----------------------------------------+-----------------------------------
Reporter: filosofo | Owner: ryan
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 2.9
Component: Template | Version: 2.9
Severity: normal | Resolution:
Keywords: has-patch $more_file $file |
----------------------------------------+-----------------------------------
Comment(by filosofo):
You can pass more arguments to a function than are explicitly defined, but
you can't neglect to pass a value to an argument that's defined without a
default value--that's what will produce an error.
Replying to [comment:4 westi]:
> why are we keeping other deprecated args on functions.
I don't know. This one kinda makes sense, because $autoload isn't
deprecated, so removing the deprecated one would change the argument
order:
{{{
function add_option( $name, $value = '', $deprecated = '', $autoload =
'yes' ) {
}}}
I can see the point of this one, too, as it is still functional and gives
the developer warning that in...er...2.7 it's going to be non-functional:
{{{
*
* @param string $domain Unique identifier for retrieving translated
strings
* @param string $abs_rel_path Optional. Relative path to ABSPATH of a
folder,
* where the .mo file resides. Deprecated, but still functional until
2.7
* @param string $plugin_rel_path Optional. Relative path to
WP_PLUGIN_DIR. This is the preferred argument to use. It takes precendence
over $abs_rel_path
*/
function load_plugin_textdomain($domain, $abs_rel_path = false,
$plugin_rel_path = false) {
}}}
But we could probably get rid of this one, especially since the removed
argument was unlikely to have been used outside of core.
{{{
function wp_get_http( $url, $file_path = false, $deprecated = false ) {
}}}
Grepping through core I'm amazed at how much "deprecated" cruft there is.
I think I'll make another patch to clear out some of this stuff.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11028#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list