@@ -1051,6 +1051,7 @@ discard block |
||
| 1051 | 1051 | * @param string | $slug | The type of message we're looking for |
| 1052 | 1052 | * @param string | $response_text| The default response message |
| 1053 | 1053 | * @param array | $data | An array of data that may be needed to construct the user's error message |
| 1054 | + * @param string $slug |
|
| 1054 | 1055 | * @return string| $response_text| The $response_text (after it's potentially been changed) |
| 1055 | 1056 | */ |
| 1056 | 1057 | protected function check_for_user_defined_response_message( $slug, $response_text, $data = false ) { |
@@ -1198,6 +1199,7 @@ discard block |
||
| 1198 | 1199 | * |
| 1199 | 1200 | * @param string | $message | The response message |
| 1200 | 1201 | * @param bool | $is_success | Boolean signifying if we're returning a success message or an error message |
| 1202 | + * @param boolean $is_success |
|
| 1201 | 1203 | * @return string| The $message wrapping in HTML |
| 1202 | 1204 | */ |
| 1203 | 1205 | public function wrap_form_submission_response( $message, $is_success ) { |
@@ -1242,6 +1244,7 @@ discard block |
||
| 1242 | 1244 | * @param string | $response | The response message to display to the user |
| 1243 | 1245 | * @param array | $additional_fields | An array of additional fields to return |
| 1244 | 1246 | * @param bool | $return_response_non_ajax | Boolean deciding if we need to return a message |
| 1247 | + * @param integer $hide |
|
| 1245 | 1248 | * |
| 1246 | 1249 | * @return If AJAX, return $this->yikes_send_json_error(). If not AJAX, return an array || false. |
| 1247 | 1250 | */ |
@@ -489,6 +489,9 @@ discard block |
||
| 489 | 489 | $response_body = json_decode( wp_remote_retrieve_body( $response ) ); |
| 490 | 490 | } |
| 491 | 491 | |
| 492 | + /** |
|
| 493 | + * @return string |
|
| 494 | + */ |
|
| 492 | 495 | public function get_premium_license( $plugin_slug ) {
|
| 493 | 496 | |
| 494 | 497 | switch( $plugin_slug ) {
|
@@ -823,6 +826,7 @@ discard block |
||
| 823 | 826 | |
| 824 | 827 | /** |
| 825 | 828 | * Convert the php date format string to a js date format |
| 829 | + * @param string $type |
|
| 826 | 830 | */ |
| 827 | 831 | public function yikes_jQuery_datepicker_date_format_php_to_js( $sFormat, $type ) {
|
| 828 | 832 | switch ( $type ) {
|
@@ -1318,8 +1322,6 @@ discard block |
||
| 1318 | 1322 | * the correct WordPress options API (old plugin stored options wierdly) |
| 1319 | 1323 | * |
| 1320 | 1324 | * @since 1.0.0 |
| 1321 | - * @param string $yikes_inc_easy_mailchimp_extender The name of this plugin. |
|
| 1322 | - * @param string $version The version of this plugin. |
|
| 1323 | 1325 | */ |
| 1324 | 1326 | public function check_for_old_yks_mc_options() {
|
| 1325 | 1327 | $old_plugin_options = get_option( 'ykseme_storage' ); |
@@ -1354,8 +1356,6 @@ discard block |
||
| 1354 | 1356 | * the correct WordPress options API (old plugin stored options wierdly) |
| 1355 | 1357 | * |
| 1356 | 1358 | * @since 1.0.0 |
| 1357 | - * @param string $yikes_inc_easy_mailchimp_extender The name of this plugin. |
|
| 1358 | - * @param string $version The version of this plugin. |
|
| 1359 | 1359 | */ |
| 1360 | 1360 | public function display_options_migrate_notice() {
|
| 1361 | 1361 | |
@@ -23,7 +23,6 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @since %VERSION% |
| 25 | 25 | * |
| 26 | - * @param string $field Class name of the service that was not recognized. |
|
| 27 | 26 | * |
| 28 | 27 | * @return static |
| 29 | 28 | */ |
@@ -41,7 +40,6 @@ discard block |
||
| 41 | 40 | * |
| 42 | 41 | * @since %VERSION% |
| 43 | 42 | * |
| 44 | - * @param string $field Class name of the service that was not recognized. |
|
| 45 | 43 | * |
| 46 | 44 | * @return static |
| 47 | 45 | */ |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @since %VERSION% |
| 92 | 92 | * |
| 93 | - * @param array $atts Array of shortcode attributes. |
|
| 93 | + * @param array $attr Array of shortcode attributes. |
|
| 94 | 94 | * |
| 95 | 95 | * @return array Context to pass onto view. |
| 96 | 96 | * @throws InvalidPostID When the post ID is not valid. |
@@ -199,7 +199,6 @@ discard block |
||
| 199 | 199 | * |
| 200 | 200 | * @param int $form_id The ID for the form. |
| 201 | 201 | * @param EasyFormsModel $form_data The form Object. |
| 202 | - * @param array $field_classes The classes for fields in the form. |
|
| 203 | 202 | * |
| 204 | 203 | * @return EasyForm |
| 205 | 204 | */ |
@@ -57,10 +57,8 @@ |
||
| 57 | 57 | /** |
| 58 | 58 | * Construct Field |
| 59 | 59 | * |
| 60 | - * @param string $id Fields ID. |
|
| 61 | 60 | * @param array $classes Field and label classes. |
| 62 | 61 | * @param string $placeholder Fields placeholder. |
| 63 | - * @param string $name Field name. |
|
| 64 | 62 | */ |
| 65 | 63 | public function __construct( $classes, $placeholder, $label, $value, $description, $merge, $form_id, $hidden, $required ) { |
| 66 | 64 | $this->classes = $classes; |
@@ -10,6 +10,10 @@ discard block |
||
| 10 | 10 | namespace YIKES\EasyForms\Form; |
| 11 | 11 | |
| 12 | 12 | trait FieldBuilder { |
| 13 | + |
|
| 14 | + /** |
|
| 15 | + * @param string $field |
|
| 16 | + */ |
|
| 13 | 17 | protected function get_field_classes( $field ) { |
| 14 | 18 | $field_classes = []; |
| 15 | 19 | $label_classes = []; |
@@ -80,6 +84,9 @@ discard block |
||
| 80 | 84 | $this->hidden_label_count = $this->hidden_label_count++; |
| 81 | 85 | } |
| 82 | 86 | |
| 87 | + /** |
|
| 88 | + * @param string $field |
|
| 89 | + */ |
|
| 83 | 90 | protected function get_label( $field ) { |
| 84 | 91 | $label = []; |
| 85 | 92 | if( $field['type'] == 'email' ) { |
@@ -96,6 +103,9 @@ discard block |
||
| 96 | 103 | return $label; |
| 97 | 104 | } |
| 98 | 105 | |
| 106 | + /** |
|
| 107 | + * @param string $field |
|
| 108 | + */ |
|
| 99 | 109 | protected function get_value( $field ) { |
| 100 | 110 | // pass our default value through our filter to parse dynamic data by tag (used solely for 'text' type) |
| 101 | 111 | $default_value = ( isset( $field['default'] ) ? esc_attr( $field['default'] ) : '' ); |
@@ -103,10 +113,16 @@ discard block |
||
| 103 | 113 | return apply_filters( 'yikes-mailchimp-' . $field['merge'] . '-default-value', $default_value, $field, $this->form_id ); |
| 104 | 114 | } |
| 105 | 115 | |
| 116 | + /** |
|
| 117 | + * @param string $field |
|
| 118 | + */ |
|
| 106 | 119 | protected function get_placeholder( $field ) { |
| 107 | 120 | return isset( $field['placeholder'] ) ? $field['placeholder'] : ''; |
| 108 | 121 | } |
| 109 | 122 | |
| 123 | + /** |
|
| 124 | + * @param string $field |
|
| 125 | + */ |
|
| 110 | 126 | protected function get_hidden( $field ) { |
| 111 | 127 | $visible = false; |
| 112 | 128 | // if both hide label and hide field are checked, we gotta hide the field! |
@@ -118,6 +134,9 @@ discard block |
||
| 118 | 134 | return $visible; |
| 119 | 135 | } |
| 120 | 136 | |
| 137 | + /** |
|
| 138 | + * @param string $field |
|
| 139 | + */ |
|
| 121 | 140 | protected function get_description( $field ) { |
| 122 | 141 | $description = ''; |
| 123 | 142 | $show_description = isset( $field['description'] ) ? true : false; |