0

我在这里有代码多复选框:

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'),
    );

是的,这段代码不起作用。如何检查默认值是:departmentsalarry

哪里错了?请帮我。

4

1 回答 1

1

您可以只使用 'department,salry' 作为 'std' 键的值。

'std' => 'department,salarry',
于 2017-09-12T10:52:24.723 回答