• Hello! Can i create multiple restrict rules in selectboxes or checkboxes.

    I try to modify by plugin code:

    if ( !isset( $et_pb_element->whitelisted_fields[‘cvdb_content_visibility_check’] ) ) {
    $et_pb_element->fields_unprocessed[‘cvdb_content_visibility_check’] = array(
    ‘label’ => __( ‘Content rules’, $text_domain ),
    ‘type’=> ‘select’,
    ‘option_category’ => ‘layout’,
    ‘options’ => array(
    ‘!is_user_logged_in()’=> esc_html__( ‘For logged-out users’, ‘et_builder’ ),
    ‘is_user_logged_in()’=> esc_html__( ‘For logged in users’, ‘et_builder’ ),
    ‘current_user_can(“role1”)’=> esc_html__( ‘For users with Role1’, ‘et_builder’ ),
    ‘current_user_can(“role2”)’=> esc_html__( ‘For users with Role2’, ‘et_builder’ ),
    ‘current_user_can(“role3”)’=> esc_html__( ‘For users with Role3’, ‘et_builder’ ),
    ),
    );
    $et_pb_element->whitelisted_fields[‘cvdb_content_visibility_check’] = array();
    }

    But there are only single select. How i can add more selectboxes or checkboxes? Thx…

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Multiple restrict rules’ is closed to new replies.