LLMS_Metabox_Date_Field::get_data_attrs()

Construct data attributes for the field sets up jQuery datepicker


Return Return

([type]) [description]


Top ↑

Source Source

File: includes/admin/post-types/meta-boxes/fields/llms.class.meta.box.date.php

	public function get_data_attrs() {

		$attrs = array(
			'date_format' => 'data-format',
			'date_max'    => 'data-max-date',
			'date_min'    => 'data-min-date',
		);

		$data_attrs = '';
		foreach ( $attrs as $key => $attr ) {
			$val = ! empty( $this->field[ $key ] ) ? $this->field[ $key ] : null;
			if ( $val ) {
				$data_attrs .= sprintf( '%1$s="%2$s"', $attr, $val );
			}
		}
		return $data_attrs;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.11.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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