I am using namespaces.
I try to create a WordPress widget (http://codex.wordpress.org/Widgets_API)
With namespaces the following gives an error because the arguments can not be passed (and without namespaces it obviously works like usual)
namespace a\b\c;
class whatever extends \WP_Widget {
function whatever() {
parent::WP_Widget('name1', 'name2');
}
// .. other functions left out
}
add_action('widgets_init',
create_function('', 'return register_widget("a\b\c\whatever");'));
uhm... what is the correct syntax for 'parent::WP_Widget' using namespaces?
(the COMPLETE error message is:
Warning: Missing argument 2 for WP_Widget::__construct(), called in
C:\xampp\htdocs\wp2\wp-includes\widgets.php on line 324 and defined in
C:\xampp\htdocs\wp2\wp-includes\widgets.php on line 93
)
And the debugger shows nothing has been passed:
Variables in local scope (#14)
$control_options = Undefined
$id_base = boolean false
$name = Undefined
$widget_options = Undefined
(only the $name is required)