LLMS_Metabox_Field::output()
outputs the head for each of the field types
Description Description
Source Source
File: includes/admin/post-types/meta-boxes/fields/llms.class.meta.box.fields.php
public function output() { global $post; if ( ( ! metadata_exists( 'post', $post->ID, $this->field['id'] ) || 'auto-draft' === $post->post_status ) && ! empty( $this->field['default'] ) ) { $this->meta = $this->field['default']; } else { $this->meta = self::get_post_meta( $post->ID, $this->field['id'] ); } $controller = isset( $this->field['controller'] ) ? ' data-controller="' . $this->field['controller'] . '"' : ''; $controller_value = isset( $this->field['controller_value'] ) ? ' data-controller-value="' . $this->field['controller_value'] . '"' : ''; if ( ! isset( $this->field['group'] ) ) { $this->field['group'] = ''; } if ( ! isset( $this->field['desc_class'] ) ) { $this->field['desc_class'] = ''; } if ( ! isset( $this->field['desc'] ) ) { $this->field['desc'] = ''; } $wrapper_classes = array( 'llms-mb-list' ); $wrapper_classes[] = $this->field['id']; $wrapper_classes[] = $this->field['type']; $wrapper_classes = array_merge( $wrapper_classes, explode( ' ', $this->field['group'] ) ); ?> <li class="<?php echo implode( ' ', $wrapper_classes ); ?>"<?php echo $controller . $controller_value; ?>> <div class="description <?php echo $this->field['desc_class']; ?>"> <label for="<?php echo $this->field['id']; ?>"><?php echo $this->field['label']; ?></label> <?php echo $this->field['desc'] ?> <?php if ( isset( $this->field['required'] ) && $this->field['required'] ) : ?><em>(required)</em><?php endif; ?> </div> <?php }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
?? | Introduced. |