因为这里有一个ticket 关于input\\u attrs类不适用于某些控件。
我想知道我是否可以在div中包装一些wordpress自定义控件?
我可以这样做吗
$wp_customize->add_control( $this->slug . \'_style[heading_text_decoration]\', array(
\'label\' => __(\'Text Decoration\'),
\'type\' => \'checkbox\',
\'section\' => $this->slug . \'_text_style\',
\'priority\' => 16,
\'input_attrs\' => array(
\'before\' => \'<div class="my-wrap">\',
\'class\' => \'section-style-all-heading\',
\'after\' => \'</div>\'
),
) );
或
$wp_customize->add_control( $this->slug . \'_style[heading_text_decoration]\', array(
\'label\' => __(\'Text Decoration\'),
\'type\' => \'checkbox\',
\'section\' => $this->slug . \'_text_style\',
\'priority\' => 16,
\'input_attrs\' => array(
\'wrap\' => \'<div class="my-wrap"></div>\',
\'class\' => \'section-style-all-heading\',
),
) );
或者其他方法?