| 1 |
<?php |
| 2 |
/** |
| 3 |
* Filter |
| 4 |
* |
| 5 |
* @package AutomatorWP\Integrations\Filter |
| 6 |
* @author AutomatorWP <contact@automatorwp.com>, Ruben Garcia <rubengcdev@gmail.com> |
| 7 |
* @since 1.0.0 |
| 8 |
*/ |
| 9 |
// Exit if accessed directly |
| 10 |
if( !defined( 'ABSPATH' ) ) exit; |
| 11 |
|
| 12 |
// Triggers |
| 13 |
require_once plugin_dir_path( __FILE__ ) . 'triggers/trigger-filter.php'; |
| 14 |
// Actions |
| 15 |
require_once plugin_dir_path( __FILE__ ) . 'actions/action-filter.php'; |
| 16 |
|
| 17 |
/** |
| 18 |
* Registers this integration |
| 19 |
* |
| 20 |
* @since 1.0.0 |
| 21 |
*/ |
| 22 |
function automatorwp_register_filter_integration() { |
| 23 |
|
| 24 |
automatorwp_register_integration( 'filter', array( |
| 25 |
'label' => 'Filter', |
| 26 |
'icon' => plugin_dir_url( __FILE__ ) . 'assets/filter.svg', |
| 27 |
) ); |
| 28 |
|
| 29 |
} |
| 30 |
add_action( 'automatorwp_init', 'automatorwp_register_filter_integration', 1 ); |
| 31 |
|
| 32 |
/** |
| 33 |
* Registers integration labels (due to text domain that requires to be in init) |
| 34 |
* |
| 35 |
* @since 1.0.0 |
| 36 |
*/ |
| 37 |
function automatorwp_register_filter_integration_label() { |
| 38 |
|
| 39 |
AutomatorWP()->integrations['filter']['label'] = __( 'Filter', 'automatorwp' ); |
| 40 |
|
| 41 |
} |
| 42 |
add_action( 'init', 'automatorwp_register_filter_integration_label' ); |