/** * Get the notification strategy. * * @internal * * @since 1.0 * * @return \IronBound\WP_Notifications\Strategy\Strategy */ function get_notification_strategy() { if (class_exists('wpMandrill') && ($c = \wpMandrill::getConnected() && \wpMandrill::isConnected())) { $key = \wpMandrill::getAPIKey(); $strategy = new Mandrill_Strategy(new Mandrill_API($key)); } elseif (defined('ITELIC_Mandrill') && class_exists('Mandrill')) { $key = ITELIC_Mandrill; $strategy = new Mandrill_Strategy(new Mandrill_API($key)); } else { $strategy = new iThemes_Exchange(); } /** * Get a notifications strategy. * * @since 1.0 * * @param \IronBound\WP_Notifications\Strategy\Strategy $strategy * @param string $batch_name */ return apply_filters('itelic_get_queue_processor', $strategy); }