views
8 years ago
class-admin.php
9 years ago
class-integration-fixture.php
10 years ago
class-integration-manager.php
9 years ago
class-integration-tags.php
9 years ago
class-integration.php
9 years ago
class-user-integration.php
9 years ago
functions.php
9 years ago
functions.php
53 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Gets an array of all registered integrations |
| 5 | * |
| 6 | * @since 3.0 |
| 7 | * @access public |
| 8 | * |
| 9 | * @return MC4WP_Integration[] |
| 10 | */ |
| 11 | function mc4wp_get_integrations() { |
| 12 | return mc4wp('integrations')->get_all(); |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * Get an instance of a registered integration class |
| 17 | * |
| 18 | * @since 3.0 |
| 19 | * @access public |
| 20 | * |
| 21 | * @param string $slug |
| 22 | * |
| 23 | * @return MC4WP_Integration |
| 24 | */ |
| 25 | function mc4wp_get_integration( $slug ) { |
| 26 | return mc4wp('integrations')->get( $slug ); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Register a new integration with MailChimp for WordPress |
| 31 | * |
| 32 | * @since 3.0 |
| 33 | * @access public |
| 34 | * |
| 35 | * @param string $slug |
| 36 | * @param string $class |
| 37 | * |
| 38 | * @param bool $always_enabled |
| 39 | */ |
| 40 | function mc4wp_register_integration( $slug, $class, $always_enabled = false ) { |
| 41 | return mc4wp('integrations')->register_integration( $slug, $class, $always_enabled ); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Deregister a previously registered integration with MailChimp for WordPress |
| 46 | * |
| 47 | * @since 3.0 |
| 48 | * @access public |
| 49 | * @param string $slug |
| 50 | */ |
| 51 | function mc4wp_deregister_integration( $slug ) { |
| 52 | mc4wp('integrations')->deregister_integration( $slug ); |
| 53 | } |