PluginProbe
Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager / 4.1.40
Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager v4.1.40
4.1.41 4.1.40 4.1.39 4.1.38 trunk 1.2 1.2.1 1.2.2 1.2.3 1.3 1.3.1 1.3.2 1.3.3 1.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6 1.6.1 All 180 releases
flexible-checkout-fields / src / Settings / Option / RegexPhoneOption.php
RegexPhoneOption.php
63 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDesk\FCF\Free\Settings\Option;
4
5 use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
6
7 /**
8 * {@inheritdoc}
9 */
10 class RegexPhoneOption extends OptionAbstract {
11
12 const FIELD_NAME = 'validation_regex';
13
14 /**
15 * {@inheritdoc}
16 */
17 public function get_option_name(): string {
18 return self::FIELD_NAME;
19 }
20
21 /**
22 * {@inheritdoc}
23 */
24 public function get_option_tab(): string {
25 return AdvancedTab::TAB_NAME;
26 }
27
28 /**
29 * {@inheritdoc}
30 */
31 public function get_option_type(): string {
32 return self::FIELD_TYPE_TEXT;
33 }
34
35 /**
36 * {@inheritdoc}
37 */
38 public function get_option_label(): string {
39 return __( 'Validation regex', 'flexible-checkout-fields' );
40 }
41
42 /**
43 * {@inheritdoc}
44 */
45 public function get_label_tooltip(): string {
46 return __( 'Enter the number format using the regex code. Our documentation contains sample formats.', 'flexible-checkout-fields' );
47 }
48
49 /**
50 * {@inheritdoc}
51 */
52 public function get_label_tooltip_url(): string {
53 return apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-phone-validation-regex' );
54 }
55
56 /**
57 * {@inheritdoc}
58 */
59 public function sanitize_option_value( $field_value ) {
60 return sanitize_text_field( $field_value );
61 }
62 }
63