| @@ -121,10 +121,8 @@ | ||
| 121 | 121 | * core plugin. |
| 122 | 122 | */ |
| 123 | 123 | require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-cf7-grid-layout-loader.php'; |
| 124 | 124 | require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wordpress-gurus-debug-api.php'; |
| 125 | - /** @since 5.0 dynamic tags interface */ | |
| 126 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/lists/class-cf7sg-dynamic-select.php'; | |
| 127 | 125 | |
| 128 | 126 | /** |
| 129 | 127 | * The class responsible for defining internationalization functionality |
| 130 | 128 | * of the plugin. |
| @@ -193,11 +191,11 @@ | ||
| 193 | 191 | //register dynamic dropdown taxonomy with cf7 post |
| 194 | 192 | $this->loader->add_action('init', $plugin_admin, 'register_dynamic_dropdown_taxonomy' , 20, 2 ); |
| 195 | 193 | //$this->loader->add_action('init', $plugin_admin, 'modify_cf7_post_type' , 20 ); |
| 196 | 194 | //add some metabox to the wpcf7_contact_form post type |
| 197 | - $this->loader->add_action( 'add_meta_boxes', $plugin_admin, 'edit_page_metabox' ); | |
| 198 | - /** @since 4.6.0 hide author metabox by default */ | |
| 199 | - $this->loader->add_filter('hidden_meta_boxes', $plugin_admin, 'hide_author_metabox',10,3); | |
| 195 | + $this->loader->add_action( 'add_meta_boxes', $plugin_admin, 'main_editor_meta_box' ); | |
| 196 | + $this->loader->add_action( 'add_meta_boxes', $plugin_admin, 'info_meta_box' ); | |
| 197 | + $this->loader->add_action( 'add_meta_boxes', $plugin_admin, 'helper_meta_box'); | |
| 200 | 198 | //save the post |
| 201 | 199 | $this->loader->add_action('save_post_wpcf7_contact_form', $plugin_admin, 'save_post', 10,3); |
| 202 | 200 | /** delete post @since 4.3.0 */ |
| 203 | 201 | $this->loader->add_action('before_delete_post', $plugin_admin, 'delete_post'); |
| @@ -232,9 +230,9 @@ | ||
| 232 | 230 | $this->loader->add_filter( 'wpcf7_messages', $plugin_admin, 'disabled_message' , 5,2); |
| 233 | 231 | /** @since 3.0.0 */ |
| 234 | 232 | $this->loader->add_filter( 'wpcf7_map_meta_cap', $plugin_admin, 'reset_meta_cap' , 5,1); |
| 235 | 233 | //make sure users that cannot publish forms are set to pending. |
| 236 | - $this->loader->add_filter( 'wp_insert_post_data', $plugin_admin, 'pending_for_review',10,2); | |
| 234 | + $this->loader->add_filter( 'wp_insert_post_data', $plugin_admin, 'pending_for_review'); | |
| 237 | 235 | //add all form capabilities to editor role. |
| 238 | 236 | $this->loader->add_action( 'admin_init', $plugin_admin, 'enable_cf7_editor_role', 5,0 ); |
| 239 | 237 | /** @since 3.3.0 helper hooks added via action hook */ |
| 240 | 238 | $this->loader->add_action( 'cf7sg_ui_grid_helper_hooks', $plugin_admin, 'print_helper_hooks'); |
| @@ -251,9 +249,8 @@ | ||
| 251 | 249 | /** @since 4.3.0 enable previews/views of forms */ |
| 252 | 250 | $this->loader->add_action( 'init', $plugin_admin, 'register_form_preview_posttype', 0 ); |
| 253 | 251 | /** @since 4.4 load translation files */ |
| 254 | 252 | $this->loader->add_action( 'cf7pll_load_plugin_translation_resource', $plugin_admin, 'load_translation_files'); |
| 255 | - | |
| 256 | 253 | } |
| 257 | 254 | |
| 258 | 255 | /** |
| 259 | 256 | * Register all of the hooks related to the public-facing functionality |
| @@ -287,9 +284,9 @@ | ||
| 287 | 284 | $this->loader->add_action( 'wpcf7_init', $plugin_public, 'register_cf7_shortcode' ); |
| 288 | 285 | //setup individual tag filers |
| 289 | 286 | $this->loader->add_filter( 'wpcf7_posted_data', $plugin_public, 'setup_grid_values', 5, 1 ); |
| 290 | 287 | //filter cf7 validation |
| 291 | - $this->loader->add_filter( 'wpcf7_validate', $plugin_public, 'filter_wpcf7_validate', 1, 1); | |
| 288 | + $this->loader->add_filter( 'wpcf7_validate', $plugin_public, 'filter_wpcf7_validate', 30, 2 ); | |
| 292 | 289 | //benchmark validation |
| 293 | 290 | $this->loader->add_filter( 'wpcf7_validate_dynamic_select*', $plugin_public, 'validate_required', 30, 2 ); |
| 294 | 291 | $this->loader->add_filter( 'wpcf7_validate_benchmark*', $plugin_public, 'validate_required', 30, 2 ); |
| 295 | 292 | /** |
| @@ -307,9 +304,9 @@ | ||
| 307 | 304 | $this->loader->add_filter( 'wpcf7_mail_components', $plugin_public, 'wpcf7_mail_components' , 999,3); |
| 308 | 305 | /** @since 4.0.0 enable/disable autop with filter */ |
| 309 | 306 | $this->loader->add_filter( 'wpcf7_autop_or_not', $plugin_public, 'disable_autop_for_grid' ,5,1); |
| 310 | 307 | /** @since 4.4 prefill preview forms */ |
| 311 | - $this->loader->add_action( 'wpcf7_before_send_mail', $plugin_public, 'on_submit_success'); | |
| 308 | + $this->loader->add_action( 'wpcf7_before_send_mail', $plugin_public, 'prefill_preview_forms'); | |
| 312 | 309 | |
| 313 | 310 | } |
| 314 | 311 | |
| 315 | 312 | /** |