___handleWPCronEvents(); $this->___handleAjaxEvents(); $this->___handleBackgroundRoutines(); $this->___handleQueryURL(); } private function ___handleAjaxEvents() { new AmazonAutoLinks_Event___Action_AjaxUnitLoading; // 3.6.0+ } /** * @since 3.5.0 * @return void */ private function ___handleWPCronEvents() { new AmazonAutoLinks_Event___Action_HTTPCacheRenewal; new AmazonAutoLinks_Event___Action_SimplePie_CacheRenewal; new AmazonAutoLinks_Event___Action_DeleteExpiredCaches; } /** * @since 3.5.0 * @return void */ private function ___handleBackgroundRoutines() { // This must be called after the above action hooks. $_oOption = AmazonAutoLinks_Option::getInstance(); $_bIsIntenseCachingMode = 'intense' === $_oOption->get( 'cache', 'caching_mode' ); // Force executing actions. new AmazonAutoLinks_Shadow( $_bIsIntenseCachingMode ? array( 'aal_action_unit_prefetch', 'aal_action_simplepie_renew_cache', 'aal_action_api_transient_renewal', 'aal_action_api_get_product_info', 'aal_action_api_get_products_info', // 3.7.7+ 'aal_action_api_get_customer_review', 'aal_action_api_get_similar_products', // 3.3.0+ 'aal_action_http_cache_renewal', 'aal_action_delete_expired_caches', // 3.4.0+ ) : array( 'aal_action_unit_prefetch', 'aal_action_api_get_product_info', 'aal_action_api_get_products_info', // 3.7.7+ 'aal_action_api_get_customer_review', 'aal_action_api_get_similar_products', // 3.3.0+ 'aal_action_http_cache_renewal', ) ); if ( ! $_bIsIntenseCachingMode ) { if ( AmazonAutoLinks_Shadow::isBackground() ) { exit; } } } /** * * @since 3.1.0 * @return void */ private function ___handleQueryURL() { $_oOption = AmazonAutoLinks_Option::getInstance(); $_sQueryKey = $_oOption->get( 'query', 'cloak' ); if ( ! isset( $_GET[ $_sQueryKey ] ) ) { return; } new AmazonAutoLinks_Event___Query_Feed( $_sQueryKey ); new AmazonAutoLinks_Event___Query_Redirect( $_sQueryKey ); } }