|
@@ 369-404 (lines=36) @@
|
| 366 |
|
* @since 1.0.0 |
| 367 |
|
* @return string |
| 368 |
|
*/ |
| 369 |
|
public function generate_text_html( $key, $data ) { |
| 370 |
|
$field_key = $this->get_field_key( $key ); |
| 371 |
|
$defaults = array( |
| 372 |
|
'title' => '', |
| 373 |
|
'disabled' => false, |
| 374 |
|
'class' => '', |
| 375 |
|
'css' => '', |
| 376 |
|
'placeholder' => '', |
| 377 |
|
'type' => 'text', |
| 378 |
|
'desc_tip' => false, |
| 379 |
|
'description' => '', |
| 380 |
|
'custom_attributes' => array(), |
| 381 |
|
); |
| 382 |
|
|
| 383 |
|
$data = wp_parse_args( $data, $defaults ); |
| 384 |
|
|
| 385 |
|
ob_start(); |
| 386 |
|
?> |
| 387 |
|
<tr valign="top"> |
| 388 |
|
<th scope="row" class="titledesc"> |
| 389 |
|
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
| 390 |
|
<?php echo $this->get_tooltip_html( $data ); ?> |
| 391 |
|
</th> |
| 392 |
|
<td class="forminp"> |
| 393 |
|
<fieldset> |
| 394 |
|
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
| 395 |
|
<input class="input-text regular-input <?php echo esc_attr( $data['class'] ); ?>" type="<?php echo esc_attr( $data['type'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="<?php echo esc_attr( $this->get_option( $key ) ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); ?> /> |
| 396 |
|
<?php echo $this->get_description_html( $data ); ?> |
| 397 |
|
</fieldset> |
| 398 |
|
</td> |
| 399 |
|
</tr> |
| 400 |
|
<?php |
| 401 |
|
|
| 402 |
|
return ob_get_clean(); |
| 403 |
|
} |
| 404 |
|
|
| 405 |
|
/** |
| 406 |
|
* Generate Upload Input HTML. |
| 407 |
|
* |
|
@@ 479-514 (lines=36) @@
|
| 476 |
|
* @since 1.0.0 |
| 477 |
|
* @return string |
| 478 |
|
*/ |
| 479 |
|
public function generate_price_html( $key, $data ) { |
| 480 |
|
$field_key = $this->get_field_key( $key ); |
| 481 |
|
$defaults = array( |
| 482 |
|
'title' => '', |
| 483 |
|
'disabled' => false, |
| 484 |
|
'class' => '', |
| 485 |
|
'css' => '', |
| 486 |
|
'placeholder' => '', |
| 487 |
|
'type' => 'text', |
| 488 |
|
'desc_tip' => false, |
| 489 |
|
'description' => '', |
| 490 |
|
'custom_attributes' => array(), |
| 491 |
|
); |
| 492 |
|
|
| 493 |
|
$data = wp_parse_args( $data, $defaults ); |
| 494 |
|
|
| 495 |
|
ob_start(); |
| 496 |
|
?> |
| 497 |
|
<tr valign="top"> |
| 498 |
|
<th scope="row" class="titledesc"> |
| 499 |
|
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
| 500 |
|
<?php echo $this->get_tooltip_html( $data ); ?> |
| 501 |
|
</th> |
| 502 |
|
<td class="forminp"> |
| 503 |
|
<fieldset> |
| 504 |
|
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
| 505 |
|
<input class="wc_input_price input-text regular-input <?php echo esc_attr( $data['class'] ); ?>" type="text" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="<?php echo esc_attr( wc_format_localized_price( $this->get_option( $key ) ) ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); ?> /> |
| 506 |
|
<?php echo $this->get_description_html( $data ); ?> |
| 507 |
|
</fieldset> |
| 508 |
|
</td> |
| 509 |
|
</tr> |
| 510 |
|
<?php |
| 511 |
|
|
| 512 |
|
return ob_get_clean(); |
| 513 |
|
} |
| 514 |
|
|
| 515 |
|
/** |
| 516 |
|
* Generate Decimal Input HTML. |
| 517 |
|
* |
|
@@ 523-558 (lines=36) @@
|
| 520 |
|
* @since 1.0.0 |
| 521 |
|
* @return string |
| 522 |
|
*/ |
| 523 |
|
public function generate_decimal_html( $key, $data ) { |
| 524 |
|
$field_key = $this->get_field_key( $key ); |
| 525 |
|
$defaults = array( |
| 526 |
|
'title' => '', |
| 527 |
|
'disabled' => false, |
| 528 |
|
'class' => '', |
| 529 |
|
'css' => '', |
| 530 |
|
'placeholder' => '', |
| 531 |
|
'type' => 'text', |
| 532 |
|
'desc_tip' => false, |
| 533 |
|
'description' => '', |
| 534 |
|
'custom_attributes' => array(), |
| 535 |
|
); |
| 536 |
|
|
| 537 |
|
$data = wp_parse_args( $data, $defaults ); |
| 538 |
|
|
| 539 |
|
ob_start(); |
| 540 |
|
?> |
| 541 |
|
<tr valign="top"> |
| 542 |
|
<th scope="row" class="titledesc"> |
| 543 |
|
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
| 544 |
|
<?php echo $this->get_tooltip_html( $data ); ?> |
| 545 |
|
</th> |
| 546 |
|
<td class="forminp"> |
| 547 |
|
<fieldset> |
| 548 |
|
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
| 549 |
|
<input class="wc_input_decimal input-text regular-input <?php echo esc_attr( $data['class'] ); ?>" type="text" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" value="<?php echo esc_attr( wc_format_localized_decimal( $this->get_option( $key ) ) ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); ?> /> |
| 550 |
|
<?php echo $this->get_description_html( $data ); ?> |
| 551 |
|
</fieldset> |
| 552 |
|
</td> |
| 553 |
|
</tr> |
| 554 |
|
<?php |
| 555 |
|
|
| 556 |
|
return ob_get_clean(); |
| 557 |
|
} |
| 558 |
|
|
| 559 |
|
/** |
| 560 |
|
* Generate Password Input HTML. |
| 561 |
|
* |
|
@@ 625-660 (lines=36) @@
|
| 622 |
|
* @since 1.0.0 |
| 623 |
|
* @return string |
| 624 |
|
*/ |
| 625 |
|
public function generate_textarea_html( $key, $data ) { |
| 626 |
|
$field_key = $this->get_field_key( $key ); |
| 627 |
|
$defaults = array( |
| 628 |
|
'title' => '', |
| 629 |
|
'disabled' => false, |
| 630 |
|
'class' => '', |
| 631 |
|
'css' => '', |
| 632 |
|
'placeholder' => '', |
| 633 |
|
'type' => 'text', |
| 634 |
|
'desc_tip' => false, |
| 635 |
|
'description' => '', |
| 636 |
|
'custom_attributes' => array(), |
| 637 |
|
); |
| 638 |
|
|
| 639 |
|
$data = wp_parse_args( $data, $defaults ); |
| 640 |
|
|
| 641 |
|
ob_start(); |
| 642 |
|
?> |
| 643 |
|
<tr valign="top"> |
| 644 |
|
<th scope="row" class="titledesc"> |
| 645 |
|
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
| 646 |
|
<?php echo $this->get_tooltip_html( $data ); ?> |
| 647 |
|
</th> |
| 648 |
|
<td class="forminp"> |
| 649 |
|
<fieldset> |
| 650 |
|
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
| 651 |
|
<textarea rows="3" cols="20" class="input-text wide-input <?php echo esc_attr( $data['class'] ); ?>" type="<?php echo esc_attr( $data['type'] ); ?>" name="<?php echo esc_attr( $field_key ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>" placeholder="<?php echo esc_attr( $data['placeholder'] ); ?>" <?php disabled( $data['disabled'], true ); ?> <?php echo $this->get_custom_attribute_html( $data ); ?>><?php echo esc_textarea( $this->get_option( $key ) ); ?></textarea> |
| 652 |
|
<?php echo $this->get_description_html( $data ); ?> |
| 653 |
|
</fieldset> |
| 654 |
|
</td> |
| 655 |
|
</tr> |
| 656 |
|
<?php |
| 657 |
|
|
| 658 |
|
return ob_get_clean(); |
| 659 |
|
} |
| 660 |
|
|
| 661 |
|
/** |
| 662 |
|
* Generate Checkbox HTML. |
| 663 |
|
* |