The problem is that new arguments don't display at customizer.
at first, we extend WP_Customize_Control
with this class:
class WP_Customize_Foo_Control extends WP_Customize_Control {
public $type = 'foo';
public function render_content() {
echo $this->label;
echo $this->description;
echo $this->foo; // <--- problem is here, it's not display
echo $this->moo; // <--- problem is here, it's not display
}
}
at the next step we use add_setting
and add_control
to display our new control in static_front_page
section.
$wp_customize->add_setting( 'foo_one', array(
'type' => 'theme_mod',
));
$wp_customize->add_control( new WP_Customize_Foo_Control(
$wp_customize,
'foo_one',
array(
'label' => 'Label',
'description' => 'desc',
'type' => 'foo',
'section' => 'static_front_page',
'foo' => 'John Doe',
'moo' => array('some','array','goes','here')
)
));
problem is that, foo
and moo
arguments is not display in customizer.