Use new code style
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
|
||||
namespace WP_Ultimo\Checkout\Signup_Fields;
|
||||
|
||||
use \WP_Ultimo\Checkout\Signup_Fields\Base_Signup_Field;
|
||||
use WP_Ultimo\Checkout\Signup_Fields\Base_Signup_Field;
|
||||
|
||||
// Exit if accessed directly
|
||||
defined('ABSPATH') || exit;
|
||||
@ -24,15 +24,14 @@ defined('ABSPATH') || exit;
|
||||
class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
|
||||
/**
|
||||
* Returns the type of the field.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
* Returns the type of the field.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public function get_type(): string {
|
||||
|
||||
return 'shortcode';
|
||||
|
||||
} // end get_type;
|
||||
}
|
||||
/**
|
||||
* Returns if this field should be present on the checkout flow or not.
|
||||
*
|
||||
@ -41,8 +40,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
public function is_required(): bool {
|
||||
|
||||
return false;
|
||||
|
||||
} // end is_required;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the title of the field/element type.
|
||||
@ -55,8 +53,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
public function get_title() {
|
||||
|
||||
return __('Shortcode', 'wp-ultimo');
|
||||
|
||||
} // end get_title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the field/element.
|
||||
@ -69,8 +66,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
public function get_description() {
|
||||
|
||||
return __('Displays the content of a given WordPress shortcode. Can be useful to inset content from other plugins inside a WP Multisite WaaS checkout form.', 'wp-ultimo');
|
||||
|
||||
} // end get_description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the tooltip of the field/element.
|
||||
@ -83,8 +79,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
public function get_tooltip() {
|
||||
|
||||
return __('Displays the content of a given WordPress shortcode. Can be useful to insert content from other plugins inside a WP Multisite WaaS checkout form.', 'wp-ultimo');
|
||||
|
||||
} // end get_tooltip;
|
||||
}
|
||||
/**
|
||||
* Returns the icon to be used on the selector.
|
||||
*
|
||||
@ -95,8 +90,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
public function get_icon(): string {
|
||||
|
||||
return 'dashicons-wu-terminal';
|
||||
|
||||
} // end get_icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default values for the field-elements.
|
||||
@ -110,10 +104,9 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
public function defaults() {
|
||||
|
||||
return array(
|
||||
''
|
||||
'',
|
||||
);
|
||||
|
||||
} // end defaults;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of keys of the default fields we want to display on the builder.
|
||||
@ -127,8 +120,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
// 'id',
|
||||
// 'name',
|
||||
);
|
||||
|
||||
} // end default_fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* If you want to force a particular attribute to a value, declare it here.
|
||||
@ -141,8 +133,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
return array(
|
||||
'name' => __('Shortcode', 'wp-ultimo'),
|
||||
);
|
||||
|
||||
} // end force_attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of additional fields specific to this type.
|
||||
@ -160,8 +151,7 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
'desc' => __('Please, enter the full shortcode, including [].', 'wp-ultimo'),
|
||||
),
|
||||
);
|
||||
|
||||
} // end get_fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the field/element actual field array to be used on the checkout form.
|
||||
@ -184,7 +174,5 @@ class Signup_Field_Shortcode extends Base_Signup_Field {
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
} // end to_fields_array;
|
||||
|
||||
} // end class Signup_Field_Shortcode;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user