@@ 304-339 (lines=36) @@ | ||
301 | * @since 1.0.0 |
|
302 | * @return string |
|
303 | */ |
|
304 | public function generate_text_html( $key, $data ) { |
|
305 | $field = $this->get_field_key( $key ); |
|
306 | $defaults = array( |
|
307 | 'title' => '', |
|
308 | 'disabled' => false, |
|
309 | 'class' => '', |
|
310 | 'css' => '', |
|
311 | 'placeholder' => '', |
|
312 | 'type' => 'text', |
|
313 | 'desc_tip' => false, |
|
314 | 'description' => '', |
|
315 | 'custom_attributes' => array() |
|
316 | ); |
|
317 | ||
318 | $data = wp_parse_args( $data, $defaults ); |
|
319 | ||
320 | ob_start(); |
|
321 | ?> |
|
322 | <tr valign="top"> |
|
323 | <th scope="row" class="titledesc"> |
|
324 | <label for="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
|
325 | <?php echo $this->get_tooltip_html( $data ); ?> |
|
326 | </th> |
|
327 | <td class="forminp"> |
|
328 | <fieldset> |
|
329 | <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
|
330 | <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 ); ?>" id="<?php echo esc_attr( $field ); ?>" 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 ); ?> /> |
|
331 | <?php echo $this->get_description_html( $data ); ?> |
|
332 | </fieldset> |
|
333 | </td> |
|
334 | </tr> |
|
335 | <?php |
|
336 | ||
337 | return ob_get_clean(); |
|
338 | } |
|
339 | ||
340 | /** |
|
341 | * Generate Price Input HTML. |
|
342 | * |
|
@@ 348-383 (lines=36) @@ | ||
345 | * @since 1.0.0 |
|
346 | * @return string |
|
347 | */ |
|
348 | public function generate_price_html( $key, $data ) { |
|
349 | $field = $this->get_field_key( $key ); |
|
350 | $defaults = array( |
|
351 | 'title' => '', |
|
352 | 'disabled' => false, |
|
353 | 'class' => '', |
|
354 | 'css' => '', |
|
355 | 'placeholder' => '', |
|
356 | 'type' => 'text', |
|
357 | 'desc_tip' => false, |
|
358 | 'description' => '', |
|
359 | 'custom_attributes' => array() |
|
360 | ); |
|
361 | ||
362 | $data = wp_parse_args( $data, $defaults ); |
|
363 | ||
364 | ob_start(); |
|
365 | ?> |
|
366 | <tr valign="top"> |
|
367 | <th scope="row" class="titledesc"> |
|
368 | <label for="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
|
369 | <?php echo $this->get_tooltip_html( $data ); ?> |
|
370 | </th> |
|
371 | <td class="forminp"> |
|
372 | <fieldset> |
|
373 | <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
|
374 | <input class="wc_input_price input-text regular-input <?php echo esc_attr( $data['class'] ); ?>" type="text" name="<?php echo esc_attr( $field ); ?>" id="<?php echo esc_attr( $field ); ?>" 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 ); ?> /> |
|
375 | <?php echo $this->get_description_html( $data ); ?> |
|
376 | </fieldset> |
|
377 | </td> |
|
378 | </tr> |
|
379 | <?php |
|
380 | ||
381 | return ob_get_clean(); |
|
382 | } |
|
383 | ||
384 | /** |
|
385 | * Generate Decimal Input HTML. |
|
386 | * |
|
@@ 392-427 (lines=36) @@ | ||
389 | * @since 1.0.0 |
|
390 | * @return string |
|
391 | */ |
|
392 | public function generate_decimal_html( $key, $data ) { |
|
393 | $field = $this->get_field_key( $key ); |
|
394 | $defaults = array( |
|
395 | 'title' => '', |
|
396 | 'disabled' => false, |
|
397 | 'class' => '', |
|
398 | 'css' => '', |
|
399 | 'placeholder' => '', |
|
400 | 'type' => 'text', |
|
401 | 'desc_tip' => false, |
|
402 | 'description' => '', |
|
403 | 'custom_attributes' => array() |
|
404 | ); |
|
405 | ||
406 | $data = wp_parse_args( $data, $defaults ); |
|
407 | ||
408 | ob_start(); |
|
409 | ?> |
|
410 | <tr valign="top"> |
|
411 | <th scope="row" class="titledesc"> |
|
412 | <label for="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
|
413 | <?php echo $this->get_tooltip_html( $data ); ?> |
|
414 | </th> |
|
415 | <td class="forminp"> |
|
416 | <fieldset> |
|
417 | <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
|
418 | <input class="wc_input_decimal input-text regular-input <?php echo esc_attr( $data['class'] ); ?>" type="text" name="<?php echo esc_attr( $field ); ?>" id="<?php echo esc_attr( $field ); ?>" 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 ); ?> /> |
|
419 | <?php echo $this->get_description_html( $data ); ?> |
|
420 | </fieldset> |
|
421 | </td> |
|
422 | </tr> |
|
423 | <?php |
|
424 | ||
425 | return ob_get_clean(); |
|
426 | } |
|
427 | ||
428 | /** |
|
429 | * Generate Password Input HTML. |
|
430 | * |
|
@@ 494-529 (lines=36) @@ | ||
491 | * @since 1.0.0 |
|
492 | * @return string |
|
493 | */ |
|
494 | public function generate_textarea_html( $key, $data ) { |
|
495 | $field = $this->get_field_key( $key ); |
|
496 | $defaults = array( |
|
497 | 'title' => '', |
|
498 | 'disabled' => false, |
|
499 | 'class' => '', |
|
500 | 'css' => '', |
|
501 | 'placeholder' => '', |
|
502 | 'type' => 'text', |
|
503 | 'desc_tip' => false, |
|
504 | 'description' => '', |
|
505 | 'custom_attributes' => array() |
|
506 | ); |
|
507 | ||
508 | $data = wp_parse_args( $data, $defaults ); |
|
509 | ||
510 | ob_start(); |
|
511 | ?> |
|
512 | <tr valign="top"> |
|
513 | <th scope="row" class="titledesc"> |
|
514 | <label for="<?php echo esc_attr( $field ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label> |
|
515 | <?php echo $this->get_tooltip_html( $data ); ?> |
|
516 | </th> |
|
517 | <td class="forminp"> |
|
518 | <fieldset> |
|
519 | <legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend> |
|
520 | <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 ); ?>" id="<?php echo esc_attr( $field ); ?>" 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> |
|
521 | <?php echo $this->get_description_html( $data ); ?> |
|
522 | </fieldset> |
|
523 | </td> |
|
524 | </tr> |
|
525 | <?php |
|
526 | ||
527 | return ob_get_clean(); |
|
528 | } |
|
529 | ||
530 | /** |
|
531 | * Generate Checkbox HTML. |
|
532 | * |