[wp-hackers] WP/PHP Syntax Question...
Brian Layman
Brian at TheCodeCave.com
Wed Jun 21 03:13:31 GMT 2006
I'm just making sure I'm not missing something in the PHP syntax....
In Classes.php, WP_Query::get_date_permastruct is declared like this
(without any parameters specified):
function get_date_permastruct() {
[...]
}
In the functions get_year_permastruct() and get_month_permastruct(), it
is called with a parameter like this:
$structure = $this->get_date_permastruct($this->permalink_structure);
Since there is no parameter declared in get_date_permastruct, I'm making
the assumption that this value is ignored. I just wanted to make
certain that this wasn't PHP syntax for a default value if a return
false or return 0 is called. That would be a pretty obscure way of
doing default values, but with the rest of this WP code being fairly
clean, its almost surprising to see something wrong.
Am I guessing right that this is just legacy code or something to that
effect and PHP just ignores extra parameters being passed to a function?
Or is there something else going on of which I am unaware?
______________________________________________
Brian Layman
http://www.TheCodeCave.com
More information about the wp-hackers
mailing list