LLMS_Metabox_Date_Field::get_data_attrs()
Construct data attributes for the field sets up jQuery datepicker
Return Return
([type]) [description]
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.11.0 | Introduced. |