| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - die( 'You are not allowed to call this page directly.' ); | |
| 4 | -} | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * @since 2.04 |
| 8 | 5 | */ |
| @@ -87,11 +84,8 @@ | ||
| 87 | 84 | * |
| 88 | 85 | * @since 2.04 |
| 89 | 86 | * |
| 90 | 87 | * @param $form_id |
| 91 | - * @param int|string $form_id | |
| 92 | - * | |
| 93 | - * @return void | |
| 94 | 88 | */ |
| 95 | 89 | protected function init_form_id( $form_id ) { |
| 96 | 90 | $this->form_id = (int) $form_id; |
| 97 | 91 | } |
| @@ -99,10 +93,8 @@ | ||
| 99 | 93 | /** |
| 100 | 94 | * Initialize the fields property |
| 101 | 95 | * |
| 102 | 96 | * @since 2.04 |
| 103 | - * | |
| 104 | - * @return void | |
| 105 | 97 | */ |
| 106 | 98 | protected function init_fields() { |
| 107 | 99 | $this->fields = FrmField::get_all_for_form( $this->form_id, '', 'exclude', 'exclude' ); |
| 108 | 100 | } |
| @@ -112,10 +104,8 @@ | ||
| 112 | 104 | * |
| 113 | 105 | * @since 2.05 |
| 114 | 106 | * |
| 115 | 107 | * @param array $atts |
| 116 | - * | |
| 117 | - * @return void | |
| 118 | 108 | */ |
| 119 | 109 | protected function init_plain_text( $atts ) { |
| 120 | 110 | if ( isset( $atts['plain_text'] ) && $atts['plain_text'] ) { |
| 121 | 111 | $this->is_plain_text = true; |
| @@ -127,10 +117,8 @@ | ||
| 127 | 117 | * |
| 128 | 118 | * @since 2.04 |
| 129 | 119 | * |
| 130 | 120 | * @param array $atts |
| 131 | - * | |
| 132 | - * @return void | |
| 133 | 121 | */ |
| 134 | 122 | protected function init_format( $atts ) { |
| 135 | 123 | if ( isset( $atts['format'] ) && is_string( $atts['format'] ) && $atts['format'] !== '' ) { |
| 136 | 124 | $this->format = $atts['format']; |
| @@ -142,10 +130,8 @@ | ||
| 142 | 130 | /** |
| 143 | 131 | * Initialize the table_generator property |
| 144 | 132 | * |
| 145 | 133 | * @since 2.04 |
| 146 | - * | |
| 147 | - * @return void | |
| 148 | 134 | */ |
| 149 | 135 | protected function init_table_generator() { |
| 150 | 136 | $this->table_generator = new FrmTableHTMLGenerator( 'shortcode' ); |
| 151 | 137 | } |
| @@ -174,10 +160,8 @@ | ||
| 174 | 160 | /** |
| 175 | 161 | * Return the default HTML array |
| 176 | 162 | * |
| 177 | 163 | * @since 2.04 |
| 178 | - * | |
| 179 | - * @return array | |
| 180 | 164 | */ |
| 181 | 165 | protected function get_array() { |
| 182 | 166 | foreach ( $this->fields as $field ) { |
| 183 | 167 | $this->add_field_array( $field ); |
| @@ -189,10 +173,8 @@ | ||
| 189 | 173 | /** |
| 190 | 174 | * Return the default plain text for an email message |
| 191 | 175 | * |
| 192 | 176 | * @since 2.04 |
| 193 | - * | |
| 194 | - * @return string | |
| 195 | 177 | */ |
| 196 | 178 | protected function get_plain_text() { |
| 197 | 179 | return $this->generate_content_for_all_fields(); |
| 198 | 180 | } |
| @@ -200,10 +182,8 @@ | ||
| 200 | 182 | /** |
| 201 | 183 | * Return the default HTML for an email message |
| 202 | 184 | * |
| 203 | 185 | * @since 2.04 |
| 204 | - * | |
| 205 | - * @return string | |
| 206 | 186 | */ |
| 207 | 187 | protected function get_table() { |
| 208 | 188 | $content = $this->table_generator->generate_table_header(); |
| 209 | 189 | $content .= $this->generate_content_for_all_fields(); |
| @@ -287,10 +267,8 @@ | ||
| 287 | 267 | * |
| 288 | 268 | * @since 2.04 |
| 289 | 269 | * |
| 290 | 270 | * @param stdClass $field |
| 291 | - * | |
| 292 | - * @return void | |
| 293 | 271 | */ |
| 294 | 272 | protected function add_field_array( $field ) { |
| 295 | 273 | if ( in_array( $field->type, $this->skip_fields ) ) { |
| 296 | 274 | return; |
| @@ -305,10 +283,8 @@ | ||
| 305 | 283 | * @since 2.04 |
| 306 | 284 | * |
| 307 | 285 | * @param stdClass $field |
| 308 | 286 | * @param string $value |
| 309 | - * | |
| 310 | - * @return void | |
| 311 | 287 | */ |
| 312 | 288 | protected function add_single_field_array( $field, $value ) { |
| 313 | 289 | $array = array( |
| 314 | 290 | 'label' => '[' . $field->id . ' show=field_label]', |