15 * MINUTE_IN_SECONDS, // Translations load at init; other code may read schedules earlier. 'display' => did_action( 'init' ) ? __( 'Every 15 minutes (Hookbird)', 'hookbird' ) : 'Every 15 minutes (Hookbird)', ); return $schedules; } ); register_activation_hook( __FILE__, array( 'Hookbird\\Installer', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'Hookbird\\Installer', 'deactivate' ) ); add_action( 'plugins_loaded', array( 'Hookbird\\Plugin', 'instance' ) ); /** * Send a custom event to every endpoint subscribed to it. * * Example: hookbird_dispatch( 'lead.created', array( 'email' => $email ) ); * * @param string $event Event key, for example "lead.created". Lowercase letters, numbers, underscores and dots. * @param array $data Event data. Must be JSON serialisable. * @return int Number of deliveries queued. */ function hookbird_dispatch( $event, array $data = array() ) { return Hookbird\Dispatcher::instance()->dispatch( (string) $event, $data ); }