PluginProbe ʕ •ᴥ•ʔ
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF / trunk
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF vtrunk
2.0.5 trunk 1.3.7 1.4.0 1.4.1 1.4.2 1.4.6 1.5.0 1.5.3 1.5.6 1.5.8 1.6.5 1.6.6 1.6.9 1.7.0 1.7.4 1.8.1 1.8.2 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4
robin-image-optimizer / libs / factory / forms / controls / url.php
robin-image-optimizer / libs / factory / forms / controls Last commit date
customs 5 months ago holders 5 months ago checkbox.php 5 months ago color-and-opacity.php 5 months ago color.php 5 months ago datepicker-range.php 5 months ago dropdown-and-colors.php 5 months ago dropdown.php 5 months ago font.php 5 months ago google-font.php 5 months ago gradient.php 5 months ago hidden.php 5 months ago index.php 5 months ago integer.php 5 months ago list.php 5 months ago multiple-textbox.php 5 months ago paddings-editor.php 5 months ago pattern.php 5 months ago radio-colors.php 5 months ago radio.php 5 months ago textarea.php 5 months ago textbox.php 5 months ago url.php 5 months ago wp-editor.php 5 months ago
url.php
41 lines
1 <?php
2
3 /**
4 * Url Control
5 *
6 * Main options:
7 *
8 * @see FactoryForms600_TextboxControl
9 *
10 * @package factory-forms
11 * @since 1.0.0
12 */
13
14 // Exit if accessed directly
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit;
17 }
18
19 if ( ! class_exists( 'Wbcr_FactoryForms600_UrlControl' ) ) {
20
21 class Wbcr_FactoryForms600_UrlControl extends Wbcr_FactoryForms600_TextboxControl {
22
23 public $type = 'url';
24
25 /**
26 * Adding 'http://' to the url if it was missed.
27 *
28 * @since 1.0.0
29 * @return string
30 */
31 public function getSubmitValue( $name, $sub_name ) {
32 $value = parent::getSubmitValue( $name, $sub_name );
33 if ( ! empty( $value ) && substr( $value, 0, 4 ) != 'http' ) {
34 $value = 'http://' . $value;
35 }
36
37 return $value;
38 }
39 }
40 }
41