field, array( 'inline' => false, 'query_args' => array(), 'check_all' => false, 'check_all_text' => esc_html__( 'Check/Uncheck All', 'adminify' ), ) ); $inline_class = ( $args['inline'] ) ? ' class="adminify--inline-list"' : ''; echo wp_kses_post( $this->field_before() ); if ( isset( $this->field['options'] ) ) { $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value ); $options = $this->field['options']; $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options, false, $args['query_args'] ) ); if ( is_array( $options ) && ! empty( $options ) ) { echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- attribute value pre-escaped with esc_attr() where built. foreach ( $options as $option_key => $option_value ) { if ( is_array( $option_value ) && ! empty( $option_value ) ) { echo '
  • '; echo ''; echo '
  • '; } else { $checked = ( in_array( $option_key, $value ) ) ? ' checked' : ''; echo '
  • '; echo ''; echo '
  • '; } } echo ''; if ( $args['check_all'] ) { echo '
    '. esc_html( $args['check_all_text'] ) .'
    '; } } else { echo ( ! empty( $this->field['empty_message'] ) ) ? esc_attr( $this->field['empty_message'] ) : esc_html__( 'No data available.', 'adminify' ); } } else { echo ''; } echo wp_kses_post( $this->field_after() ); } } }