| @@ 12-26 (lines=15) @@ | ||
| 9 | /** |
|
| 10 | * {@inheritdoc} |
|
| 11 | */ |
|
| 12 | public function render_content() { |
|
| 13 | ||
| 14 | ?> |
|
| 15 | <label> |
|
| 16 | <?php if ( ! empty( $this->label ) ) : ?> |
|
| 17 | <span class="fields-control-title"><?php echo esc_html( $this->label ); ?></span> |
|
| 18 | <?php endif; |
|
| 19 | if ( ! empty( $this->description ) ) : ?> |
|
| 20 | <span class="description fields-control-description"><?php echo $this->description; ?></span> |
|
| 21 | <?php endif; ?> |
|
| 22 | <input type="<?php echo esc_attr( $this->type ); ?>" <?php $this->input_attrs(); ?> value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> /> |
|
| 23 | </label> |
|
| 24 | <?php |
|
| 25 | ||
| 26 | } |
|
| 27 | ||
| 28 | } |
|
| 29 | ||
| @@ 501-515 (lines=15) @@ | ||
| 498 | * |
|
| 499 | * Control content can alternately be rendered in JS. See {@see WP_Fields_API_Control::print_template()}. |
|
| 500 | */ |
|
| 501 | public function render_content() { |
|
| 502 | ||
| 503 | ?> |
|
| 504 | <label> |
|
| 505 | <?php if ( ! empty( $this->label ) ) : ?> |
|
| 506 | <span class="fields-control-title"><?php echo esc_html( $this->label ); ?></span> |
|
| 507 | <?php endif; |
|
| 508 | if ( ! empty( $this->description ) ) : ?> |
|
| 509 | <span class="description fields-control-description"><?php echo $this->description; ?></span> |
|
| 510 | <?php endif; ?> |
|
| 511 | <input type="<?php echo esc_attr( $this->type ); ?>" <?php $this->input_attrs(); ?> value="<?php echo esc_attr( $this->value( $this->item_id ) ); ?>" <?php $this->link(); ?> /> |
|
| 512 | </label> |
|
| 513 | <?php |
|
| 514 | ||
| 515 | } |
|
| 516 | ||
| 517 | /** |
|
| 518 | * Render the control's JS template. |
|