如何在类型复选框 Visual Composer 短代码中设置多个默认值?
How to set multi default value in type checkbox Visual Composer shortcode?
我这里有代码多复选框:
array(
"type" => "checkbox",
"heading" => esc_html__( 'Theme Data', 'my-theme' ),
"param_name" => "pr_name",
"admin_label" => true,
"value" => array(
esc_html__( 'Department', 'my-theme' ) => 'department',
esc_html__( 'Salarry', 'my-theme' ) => 'salarry',
esc_html__( 'Address', 'my-theme' ) => 'address',
esc_html__( 'Degree', 'my-theme' ) => 'degree',
esc_html__( 'Work time', 'my-theme' ) => 'time',
esc_html__( 'End time', 'my-theme' ) => 'enddate'
),
'std' => array('department', 'salarry'),
);
是的,此代码无效。如何检查默认值是:department
和 salarry
?
哪里错了?请帮助我。
您可以只使用 'department,salarry' 作为 'std' 键的值。
'std' => 'department,salarry',
我这里有代码多复选框:
array(
"type" => "checkbox",
"heading" => esc_html__( 'Theme Data', 'my-theme' ),
"param_name" => "pr_name",
"admin_label" => true,
"value" => array(
esc_html__( 'Department', 'my-theme' ) => 'department',
esc_html__( 'Salarry', 'my-theme' ) => 'salarry',
esc_html__( 'Address', 'my-theme' ) => 'address',
esc_html__( 'Degree', 'my-theme' ) => 'degree',
esc_html__( 'Work time', 'my-theme' ) => 'time',
esc_html__( 'End time', 'my-theme' ) => 'enddate'
),
'std' => array('department', 'salarry'),
);
是的,此代码无效。如何检查默认值是:department
和 salarry
?
哪里错了?请帮助我。
您可以只使用 'department,salarry' 作为 'std' 键的值。
'std' => 'department,salarry',