[英]How to make wordpress visual composer attribute check box checked initially
according to visual composer knowledge base we can add attribute like根据视觉作曲家知识库,我们可以添加属性,如
vc_map( array( "name" => __("Portfolio Grid", "js_composer"), "base" => "abc-portfolio", "description" => __("Display masonry portfolio grid", "js_composer"), "class" => "abc-portfolio-section", "category" => __("abc Component", "js_composer"), "params" => array( array( "type" => "checkbox", "admin_label" => true, "weight" => 10, "heading" => __( "Make featured", "js_composer" ), "description" => __("description", "js_composer"), "value" => array('key' => 'value' ), "param_name" => "abc_param" ), ) ) );
Here we get a check-box but how can I make this check-box checked initially ?在这里,我们得到一个复选框,但我怎样才能使这个复选框最初被选中?
thanks in advance.提前致谢。
Check the Custom checkbox attribute .选中自定义复选框属性。
Actually, configuration is possible by array key:实际上,可以通过数组键进行配置:
'std' => '', // default unchecked
So you can play with this attribute std
with values true/false/'yes'..
and you will see how it changes.因此,您可以使用值为
true/false/'yes'..
此属性std
,您将看到它true/false/'yes'..
如何变化的。
In your case:在你的情况下:
"value" => array('key' => 'value' ),
So if 'std'=>'value'
your checkbox will be checked.因此,如果
'std'=>'value'
您的复选框将被选中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.