Use new code style

This commit is contained in:
David Stone
2025-02-07 19:02:33 -07:00
parent 0181024ae1
commit 8433379d90
672 changed files with 37107 additions and 45249 deletions

View File

@ -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;
@ -32,8 +32,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
public function get_type() {
return 'hidden';
} // end get_type;
}
/**
* Returns if this field should be present on the checkout flow or not.
@ -44,8 +43,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
public function is_required() {
return false;
} // end is_required;
}
/**
* Requires the title of the field/element type.
@ -58,8 +56,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
public function get_title() {
return __('Hidden Field', 'wp-ultimo');
} // end get_title;
}
/**
* Returns the description of the field/element.
@ -72,8 +69,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
public function get_description() {
return __('Adds a hidden field. This is useful when coupled with the "Fill from the Request" option, to load values from the URL, for example.', 'wp-ultimo');
} // end get_description;
}
/**
* Returns the tooltip of the field/element.
@ -86,8 +82,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
public function get_tooltip() {
return __('Adds a hidden field. This is useful when coupled with the "Fill from the Request" option, to load values from the URL, for example.', 'wp-ultimo');
} // end get_tooltip;
}
/**
* Returns the icon to be used on the selector.
@ -100,8 +95,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
public function get_icon() {
return 'dashicons-wu-eye-off';
} // end get_icon;
}
/**
* Returns the default values for the field-elements.
@ -117,8 +111,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
return array(
'from_request' => true,
);
} // end defaults;
}
/**
* List of keys of the default fields we want to display on the builder.
@ -132,8 +125,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
'id',
'save_as',
);
} // end default_fields;
}
/**
* If you want to force a particular attribute to a value, declare it here.
@ -144,8 +136,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
public function force_attributes() {
return array();
} // end force_attributes;
}
/**
* Returns the list of additional fields specific to this type.
@ -166,8 +157,7 @@ class Signup_Field_Hidden extends Base_Signup_Field {
'value' => '',
),
);
} // end get_fields;
}
/**
* Gets the pre-filled value for the field.
@ -180,14 +170,11 @@ class Signup_Field_Hidden extends Base_Signup_Field {
$value = parent::get_value();
if (empty($value)) {
$value = $this->attributes['fixed_value'];
} // end if;
}
return $value;
} // end get_value;
}
/**
* Returns the field/element actual field array to be used on the checkout form.
@ -207,7 +194,5 @@ class Signup_Field_Hidden extends Base_Signup_Field {
'value' => $this->get_value(),
),
);
} // end to_fields_array;
} // end class Signup_Field_Hidden;
}
}