| @@ -20,10 +20,8 @@ | ||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @param int $form_id |
| 24 | - * | |
| 25 | - * @return void | |
| 26 | 24 | */ |
| 27 | 25 | public static function maybe_init( $form_id ) { |
| 28 | 26 | $antispam = new self( $form_id ); |
| 29 | 27 | if ( $antispam->run_antispam() ) { |
| @@ -34,10 +32,8 @@ | ||
| 34 | 32 | /** |
| 35 | 33 | * Initialise the actions for the Anti-spam. |
| 36 | 34 | * |
| 37 | 35 | * @since 4.11 |
| 38 | - * | |
| 39 | - * @return void | |
| 40 | 36 | */ |
| 41 | 37 | public function init() { |
| 42 | 38 | add_filter( 'frm_form_attributes', array( $this, 'add_token_to_form' ), 10, 1 ); |
| 43 | 39 | add_filter( 'frm_form_div_attributes', array( $this, 'add_token_to_form' ), 10, 1 ); |
| @@ -173,10 +169,8 @@ | ||
| 173 | 169 | } |
| 174 | 170 | |
| 175 | 171 | /** |
| 176 | 172 | * @param int $form_id |
| 177 | - * | |
| 178 | - * @return void | |
| 179 | 173 | */ |
| 180 | 174 | public static function maybe_echo_token( $form_id ) { |
| 181 | 175 | $antispam = new self( $form_id ); |
| 182 | 176 | if ( $antispam->run_antispam() ) { |
| @@ -298,10 +292,8 @@ | ||
| 298 | 292 | } |
| 299 | 293 | |
| 300 | 294 | /** |
| 301 | 295 | * Clear third party cache plugins to avoid data-tokens missing or appearing when the antispam setting is changed. |
| 302 | - * | |
| 303 | - * @return void | |
| 304 | 296 | */ |
| 305 | 297 | public static function clear_caches() { |
| 306 | 298 | self::clear_w3_total_cache(); |
| 307 | 299 | self::clear_wp_fastest_cache(); |
| @@ -308,11 +300,8 @@ | ||
| 308 | 300 | self::clear_wp_super_cache(); |
| 309 | 301 | self::clear_wp_optimize(); |
| 310 | 302 | } |
| 311 | 303 | |
| 312 | - /** | |
| 313 | - * @return void | |
| 314 | - */ | |
| 315 | 304 | private static function clear_w3_total_cache() { |
| 316 | 305 | if ( is_callable( 'w3tc_flush_all' ) ) { |
| 317 | 306 | w3tc_flush_all(); |
| 318 | 307 | } |
| @@ -317,18 +306,12 @@ | ||
| 317 | 306 | w3tc_flush_all(); |
| 318 | 307 | } |
| 319 | 308 | } |
| 320 | 309 | |
| 321 | - /** | |
| 322 | - * @return void | |
| 323 | - */ | |
| 324 | 310 | private static function clear_wp_fastest_cache() { |
| 325 | 311 | do_action( 'wpfc_clear_all_cache' ); |
| 326 | 312 | } |
| 327 | 313 | |
| 328 | - /** | |
| 329 | - * @return void | |
| 330 | - */ | |
| 331 | 314 | private static function clear_wp_super_cache() { |
| 332 | 315 | if ( function_exists( 'wp_cache_clean_cache' ) ) { |
| 333 | 316 | global $file_prefix; |
| 334 | 317 | wp_cache_clean_cache( $file_prefix, true ); |
| @@ -334,11 +317,8 @@ | ||
| 334 | 317 | wp_cache_clean_cache( $file_prefix, true ); |
| 335 | 318 | } |
| 336 | 319 | } |
| 337 | 320 | |
| 338 | - /** | |
| 339 | - * @return void | |
| 340 | - */ | |
| 341 | 321 | private static function clear_wp_optimize() { |
| 342 | 322 | if ( class_exists( 'WP_Optimize' ) ) { |
| 343 | 323 | WP_Optimize()->get_page_cache()->purge(); |
| 344 | 324 | } |