|
@@ 367-402 (lines=36) @@
|
| 364 |
|
* @since 1.0.0 |
| 365 |
|
* @return string |
| 366 |
|
*/ |
| 367 |
|
public function generate_text_html( $key, $data ) { |
| 368 |
|
$field_key = $this->get_field_key( $key ); |
| 369 |
|
$defaults = array( |
| 370 |
|
'title' => '', |
| 371 |
|
'disabled' => false, |
| 372 |
|
'class' => '', |
| 373 |
|
'css' => '', |
| 374 |
|
'placeholder' => '', |
| 375 |
|
'type' => 'text', |
| 376 |
|
'desc_tip' => false, |
| 377 |
|
'description' => '', |
| 378 |
|
'custom_attributes' => array(), |
| 379 |
|
); |
| 380 |
|
|
| 381 |
|
$data = wp_parse_args( $data, $defaults ); |
| 382 |
|
|
| 383 |
|
ob_start(); |
| 384 |
|
?> |
| 385 |
|
<tr valign="top"> |
| 386 |
|
<th scope="row" class="titledesc"> |
| 387 |
|
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
| 388 |
|
<?php echo $this->get_tooltip_html( $data ); ?> |
| 389 |
|
</th> |
| 390 |
|
<td class="forminp"> |
| 391 |
|
<fieldset> |
| 392 |
|
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
| 393 |
|
<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 ); ?> /> |
| 394 |
|
<?php echo $this->get_description_html( $data ); ?> |
| 395 |
|
</fieldset> |
| 396 |
|
</td> |
| 397 |
|
</tr> |
| 398 |
|
<?php |
| 399 |
|
|
| 400 |
|
return ob_get_clean(); |
| 401 |
|
} |
| 402 |
|
|
| 403 |
|
/** |
| 404 |
|
* Generate Price Input HTML. |
| 405 |
|
* |
|
@@ 411-446 (lines=36) @@
|
| 408 |
|
* @since 1.0.0 |
| 409 |
|
* @return string |
| 410 |
|
*/ |
| 411 |
|
public function generate_price_html( $key, $data ) { |
| 412 |
|
$field_key = $this->get_field_key( $key ); |
| 413 |
|
$defaults = array( |
| 414 |
|
'title' => '', |
| 415 |
|
'disabled' => false, |
| 416 |
|
'class' => '', |
| 417 |
|
'css' => '', |
| 418 |
|
'placeholder' => '', |
| 419 |
|
'type' => 'text', |
| 420 |
|
'desc_tip' => false, |
| 421 |
|
'description' => '', |
| 422 |
|
'custom_attributes' => array(), |
| 423 |
|
); |
| 424 |
|
|
| 425 |
|
$data = wp_parse_args( $data, $defaults ); |
| 426 |
|
|
| 427 |
|
ob_start(); |
| 428 |
|
?> |
| 429 |
|
<tr valign="top"> |
| 430 |
|
<th scope="row" class="titledesc"> |
| 431 |
|
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
| 432 |
|
<?php echo $this->get_tooltip_html( $data ); ?> |
| 433 |
|
</th> |
| 434 |
|
<td class="forminp"> |
| 435 |
|
<fieldset> |
| 436 |
|
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
| 437 |
|
<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 ); ?> /> |
| 438 |
|
<?php echo $this->get_description_html( $data ); ?> |
| 439 |
|
</fieldset> |
| 440 |
|
</td> |
| 441 |
|
</tr> |
| 442 |
|
<?php |
| 443 |
|
|
| 444 |
|
return ob_get_clean(); |
| 445 |
|
} |
| 446 |
|
|
| 447 |
|
/** |
| 448 |
|
* Generate Decimal Input HTML. |
| 449 |
|
* |
|
@@ 455-490 (lines=36) @@
|
| 452 |
|
* @since 1.0.0 |
| 453 |
|
* @return string |
| 454 |
|
*/ |
| 455 |
|
public function generate_decimal_html( $key, $data ) { |
| 456 |
|
$field_key = $this->get_field_key( $key ); |
| 457 |
|
$defaults = array( |
| 458 |
|
'title' => '', |
| 459 |
|
'disabled' => false, |
| 460 |
|
'class' => '', |
| 461 |
|
'css' => '', |
| 462 |
|
'placeholder' => '', |
| 463 |
|
'type' => 'text', |
| 464 |
|
'desc_tip' => false, |
| 465 |
|
'description' => '', |
| 466 |
|
'custom_attributes' => array(), |
| 467 |
|
); |
| 468 |
|
|
| 469 |
|
$data = wp_parse_args( $data, $defaults ); |
| 470 |
|
|
| 471 |
|
ob_start(); |
| 472 |
|
?> |
| 473 |
|
<tr valign="top"> |
| 474 |
|
<th scope="row" class="titledesc"> |
| 475 |
|
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
| 476 |
|
<?php echo $this->get_tooltip_html( $data ); ?> |
| 477 |
|
</th> |
| 478 |
|
<td class="forminp"> |
| 479 |
|
<fieldset> |
| 480 |
|
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
| 481 |
|
<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 ); ?> /> |
| 482 |
|
<?php echo $this->get_description_html( $data ); ?> |
| 483 |
|
</fieldset> |
| 484 |
|
</td> |
| 485 |
|
</tr> |
| 486 |
|
<?php |
| 487 |
|
|
| 488 |
|
return ob_get_clean(); |
| 489 |
|
} |
| 490 |
|
|
| 491 |
|
/** |
| 492 |
|
* Generate Password Input HTML. |
| 493 |
|
* |
|
@@ 557-592 (lines=36) @@
|
| 554 |
|
* @since 1.0.0 |
| 555 |
|
* @return string |
| 556 |
|
*/ |
| 557 |
|
public function generate_textarea_html( $key, $data ) { |
| 558 |
|
$field_key = $this->get_field_key( $key ); |
| 559 |
|
$defaults = array( |
| 560 |
|
'title' => '', |
| 561 |
|
'disabled' => false, |
| 562 |
|
'class' => '', |
| 563 |
|
'css' => '', |
| 564 |
|
'placeholder' => '', |
| 565 |
|
'type' => 'text', |
| 566 |
|
'desc_tip' => false, |
| 567 |
|
'description' => '', |
| 568 |
|
'custom_attributes' => array(), |
| 569 |
|
); |
| 570 |
|
|
| 571 |
|
$data = wp_parse_args( $data, $defaults ); |
| 572 |
|
|
| 573 |
|
ob_start(); |
| 574 |
|
?> |
| 575 |
|
<tr valign="top"> |
| 576 |
|
<th scope="row" class="titledesc"> |
| 577 |
|
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
| 578 |
|
<?php echo $this->get_tooltip_html( $data ); ?> |
| 579 |
|
</th> |
| 580 |
|
<td class="forminp"> |
| 581 |
|
<fieldset> |
| 582 |
|
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
| 583 |
|
<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> |
| 584 |
|
<?php echo $this->get_description_html( $data ); ?> |
| 585 |
|
</fieldset> |
| 586 |
|
</td> |
| 587 |
|
</tr> |
| 588 |
|
<?php |
| 589 |
|
|
| 590 |
|
return ob_get_clean(); |
| 591 |
|
} |
| 592 |
|
|
| 593 |
|
/** |
| 594 |
|
* Generate Checkbox HTML. |
| 595 |
|
* |