I have defined a php function:
function my_function($text = '', $relative = false, $icon = true) {
//do something
}
It works as expected with default values. But when I want to change the value of one variable it doesn't work:
my_function($icon = false); // this doesn't change anything
I have to call it with all variables to make changes take effect:
my_function($text = '', $relative = false, $icon = false); // this changes the output
I am working in php 5.4.1 and Wordpress. What I do wrong? Thanks.