buddypress
10 years ago
contact-form-7
10 years ago
custom
10 years ago
easy-digital-downloads
10 years ago
events-manager
10 years ago
ninja-forms
10 years ago
woocommerce
10 years ago
wp-comment-form
10 years ago
wp-registration-form
10 years ago
bootstrap.php
10 years ago
bootstrap.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Try to include a file before each integration's settings page |
| 5 | * |
| 6 | * @param MC4WP_Integration $integration |
| 7 | */ |
| 8 | function mc4wp_admin_before_integration_settings( MC4WP_Integration $integration ) { |
| 9 | $file = dirname( __FILE__ ) . sprintf( '/%s/admin-before.php', $integration->slug ); |
| 10 | |
| 11 | if( file_exists( $file ) ) { |
| 12 | include $file; |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | add_action( 'mc4wp_admin_before_integration_settings', 'mc4wp_admin_before_integration_settings' ); |
| 17 | |
| 18 | // Register core integrations |
| 19 | mc4wp_register_integration( 'ninja-forms', 'MC4WP_Ninja_Forms_Integration' ); |
| 20 | mc4wp_register_integration( 'wp-comment-form', 'MC4WP_Comment_Form_Integration' ); |
| 21 | mc4wp_register_integration( 'wp-registration-form', 'MC4WP_Registration_Form_Integration' ); |
| 22 | mc4wp_register_integration( 'buddypress', 'MC4WP_BuddyPress_Integration' ); |
| 23 | mc4wp_register_integration( 'woocommerce', 'MC4WP_WooCommerce_Integration' ); |
| 24 | mc4wp_register_integration( 'easy-digital-downloads', 'MC4WP_Easy_Digital_Downloads_Integration' ); |
| 25 | mc4wp_register_integration( 'contact-form-7', 'MC4WP_Contact_Form_7_Integration', true ); |
| 26 | mc4wp_register_integration( 'events-manager', 'MC4WP_Events_Manager_Integration' ); |
| 27 | mc4wp_register_integration( 'custom', 'MC4WP_Custom_Integration', true ); |
| 28 |