get_field_tags( $context )

This function retrieves the HTML tags used to wrap form fields based on the context provided. The context can be ‘post’ or ‘term’, and the function returns an associative array of HTML tags for the wrapper, label, and input elements.


Plugin


Namespace

Launchpad\Field


Return

void


File: \includes\lp-field-functions.php
protected function get_field_tags( $context ) {
    $tags = array(
        'wrapper' => 'div',
        'label' => 'div',
        'input' => 'div'
    );
    if( $context == 'term' ){
        $tags = array(
            'wrapper' => 'tr',
            'label' => 'th',
            'input' => 'td'
        );
    } 
    return $tags;
}