While reviewing a function in the wordpress source code I ran across a function that listed several parameters as such
function mysql2date( $dateformatstring, $mysqlstring, $translate = true )
My question revolves around the final parameter “$translate = true”
Is this setting the variable to true, or only calling $translate IF it is equal to true?
It’s a default value. If the paramater is provided when calling the function, the value of
$translatewithin the function will be whatever value was passed in. If not, it will default totrue.