Today I found some strange piece of php code:
function wt_render() {
echo '<div class="wrap theme-options-page clearfix"';
global $wp_version;
if(version_compare($wp_version, "3.5", '>')){
echo ' data-version="gt3_5"';
}
echo '>';
echo '<form method="post" action="">';
foreach($this->options as $option) {
if (method_exists($this, $option['type'])) {
$this->{$option['type']}($option);
}
}
echo '</form>';
echo '</div>';
}
What does this mean?
I believe the bracket marked $option['type'] as a variable the interpreter should use. Without them, I got an error: "Array to String conversion".
Am I right?