textarea( $args ); } public function textarea( $args ) { $default = [ 'title' => '', 'name' => '', 'description' => '', 'class' => '', 'condition' => '' ]; self::$args = wp_parse_args( $args, $default ); self::textarea_markup(); } protected static function textarea_markup() { $args = self::$args; $uniqName = $args['name']; if( self::$type != 'meta' ) { $wrapTypeClass = ''; $optionName = self::$optionName; $getData = self::$getOptionData; $fieldName = esc_attr( $optionName ).'['.$uniqName.']'; $value = !empty( $getData[$uniqName] ) ? $getData[$uniqName] : ''; } else { $wrapTypeClass = 'ea-meta-field '; $fieldName = $uniqName; $value = get_post_meta( get_the_ID(), $uniqName, true ); } $conditionData = ''; if( !empty( $args['condition'] ) ) { $conditionData = wp_json_encode( $args['condition'] ); } ?>