Settings_Section::render_field( array $args )

Summary

No summary available.

Parameters

$args

(array) (Required)


Return

(void)


Source

File: src/BigCommerce/Settings/Sections/Settings_Section.php

	public function render_field( $args ) {
		$option       = $args['option'];
		$default      = isset( $args['default'] ) ? $args['default'] : '';
		$autocomplete = isset( $args['autocomplete'] ) ? $args['autocomplete'] : '';
		$value        = get_option( $option, $default );
		printf( '<input id="field-%s" type="%s" value="%s" class="regular-text code" name="%s" autocomplete="%s" data-lpignore="true" />', esc_attr( $args[ 'option' ] ), esc_attr( $args[ 'type' ] ), esc_attr( $value ), esc_attr( $option ), esc_attr( $autocomplete ) );
		if ( ! empty( $args[ 'description' ] ) ) {
			printf( '<p class="description">%s</p>', esc_html( $args[ 'description' ] ) );
		}
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.