public function fetchFeed($vURLs, $numItems = 0, $fCacheRenew = false) { $arrURLs = is_array($vURLs) ? $vURLs : (array) $vURLs; $strURLID = md5(serialize($arrURLs)); if (!isset($this->arrFeedItems[$strURLID]) && $fCacheRenew == false) { $this->arrFeedItems[$strURLID] = (array) AmazonAutoLinks_WPUtilities::getTransient($this->strTransientPrefix . $strURLID); unset($this->arrFeedItems[$strURLID][0]); // casting array causes the 0 key, } // If it's out of stock, fill the array by fetching the feed. if (empty($this->arrFeedItems[$strURLID])) { // When an array of urls is passed to the Simple Pie's set_feed_url() method, the memory usage increases largely. // So fetch the feeds one by one per url and store the output into an array. foreach ($arrURLs as $strURL) { $oFeed = $this->getFeedObj($strURL, null, $fCacheRenew ? 0 : 3600); // foreach ( $oFeed->get_items( 0, $numItems * 3 ) as $item ) does not change the memory usage foreach ($oFeed->get_items() as $oItem) { $this->arrFeedItems[$strURLID][$oItem->get_title()] = array('strContent' => $oItem->get_content(), 'strDescription' => $oItem->get_description(), 'strTitle' => $oItem->get_title(), 'strDate' => $oItem->get_title(), 'strAuthor' => $oItem->get_date('j F Y, g:i a'), 'strLink' => $oItem->get_permalink()); } // For PHP below 5.3 to release the memory. $oFeed->__destruct(); // Do what PHP should be doing on it's own. unset($oFeed); } // This life span should be little longer than the feed cache life span, which is 1700. AmazonAutoLinks_WPUtilities::setTransient($this->strTransientPrefix . $strURLID, $this->arrFeedItems[$strURLID], 1800); // 30 minutes } $arrOut = $this->arrFeedItems[$strURLID]; if ($numItems) { array_splice($arrOut, ${$numItems}); } return $arrOut; }
protected function getBounceURL() { // AmazonAutoLinks_WPUtilities::deleteTransient( 'AAL_BounceURL' ); return AmazonAutoLinks_WPUtilities::getTransient(isset($_GET['bounce_url']) ? $_GET['bounce_url'] : 'AAL_BounceURL'); // if ( ! isset( $_GET['bounce_url'] ) ) // return; // $oEncode = new AmazonAutoLinks_Encrypt; // return $oEncode->decode( $_GET['bounce_url'] ); }
public function validation_aal_add_category_unit_set_category_unit_options($aInput, $aOldInput) { // validation + _ + page slug + tab slug $_fVerified = true; $_aErrors = array(); // Check the limitation. if ($this->oOption->isUnitLimitReached()) { $this->setFieldErrors(array('error')); // must set an field error array which does not yield empty so that it won't be redirected. $this->setSettingNotice(sprintf(__('Please upgrade to <A href="%1$s">Pro</a> to add more units! Make sure to empty the <a href="%2$s">trash box</a> to delete the units completely!', 'amazon-auto-links'), 'http://en.michaeluno.jp/amazon-auto-links-pro/', admin_url('edit.php?post_status=trash&post_type=' . AmazonAutoLinks_Commons::PostTypeSlug))); return $aOldInput; } if (empty($aInput['aal_add_category_unit']['category']['category_associate_id'])) { $_aErrors['category']['category_associate_id'] = __('The associate ID cannot be empty.', 'amazon-auto-links'); $_fVerified = false; } // An invalid value is found. if (!$_fVerified) { // Set the error array for the input fields. $this->setFieldErrors($_aErrors); $this->setSettingNotice(__('There was an error in your input.', 'amazon-auto-links')); return $aOldInput; } // Drop the sections. $arrNewFields = array(); foreach ($aInput['aal_add_category_unit'] as $strSection => $arrFields) { $arrNewFields = $arrNewFields + $arrFields; } $arrSanitizedFields = array(); // Remove the category_ prefix in the keys. foreach ($arrNewFields as $strKey => $vValue) { $arrSanitizedFields[preg_replace('/^category_/', '', $strKey)] = $vValue; } $arrSanitizedFields['categories'] = array(); $arrSanitizedFields['categories_exclude'] = array(); $arrSanitizedFields = $this->oOption->sanitizeUnitOpitons($arrSanitizedFields); // If nothing is checked for the feed type, enable the bestseller item. if (!array_filter($arrSanitizedFields['feed_type'])) { $arrSanitizedFields['feed_type']['bestsellers'] = true; } $arrTempUnitOptions = (array) AmazonAutoLinks_WPUtilities::getTransient('AAL_CreateUnit_' . $arrSanitizedFields['transient_id']); AmazonAutoLinks_WPUtilities::setTransient('AAL_CreateUnit_' . $arrSanitizedFields['transient_id'], AmazonAutoLinks_Utilities::uniteArrays($arrSanitizedFields, $arrTempUnitOptions), 60 * 10 * 6 * 24); // AmazonAutoLinks_Debug::logArray( $arrSanitizedFields ); return $aInput; }
protected function fetchItems($arrURLs, $numItems = 1) { $strURLID = md5(serialize(is_string($arrURLs) ? array($arrURLs) : $arrURLs)); if (!isset($this->arrFeedItems[$strURLID])) { $this->arrFeedItems[$strURLID] = (array) AmazonAutoLinks_WPUtilities::getTransient($this->strTransientPrefix . $strURLID); $this->arrFeedItems[$strURLID] = array_filter($this->arrFeedItems[$strURLID]); // casting array causes the 0 key } // If it's out of stock, fill the array by fetching the feed. shuffle($this->arrFeedItems[$strURLID]); $this->arrFeedItems[$strURLID] = array_unique($this->arrFeedItems[$strURLID]); if (count($this->arrFeedItems[$strURLID]) < $numItems) { $oReplace = new AmazonAutoLinks_HTMLElementReplacer(get_bloginfo('charset')); // When an array of urls is passed to the Simple Pie's set_feed_url() method, the memory usage increases largely. // So fetch the feeds one by one per url and store the output into an array. foreach ($arrURLs as $strURL) { $oFeed = $this->getFeedObj($strURL, $numItems * 10); // multiplied by three to store items more than enough for next calls. foreach ($oFeed->get_items() as $item) { // foreach ( $oFeed->get_items( 0, $numItems * 3 ) as $item ) does not change the memory usage $this->arrFeedItems[$strURLID][] = $oReplace->Perform($item->get_content()); } // For PHP below 5.3 to release the memory. $oFeed->__destruct(); // Do what PHP should be doing on it's own. unset($oFeed); } unset($oReplace); // This life span should be little longer than the feed cache life span, which is 1700. AmazonAutoLinks_WPUtilities::setTransient($this->strTransientPrefix . $strURLID, $this->arrFeedItems[$strURLID], 1800); // 30 minutes } $this->arrFeedItems[$strURLID] = array_unique($this->arrFeedItems[$strURLID]); shuffle($this->arrFeedItems[$strURLID]); $strOut = ''; for ($i = 1; $i <= $numItems; $i++) { $strOut .= array_pop($this->arrFeedItems[$strURLID]); } return $strOut; }
protected function handleCustomActions() { if (!isset($_GET['custom_action'], $_GET['nonce'], $_GET['post'])) { return; } $strNonce = AmazonAutoLinks_WPUtilities::getTransient('AAL_Nonce_' . $_GET['nonce']); if ($strNonce === false) { add_action('admin_notices', array($this, 'notifyNonceFailed')); return; } AmazonAutoLinks_WPUtilities::deleteTransient('AAL_Nonce_' . $_GET['nonce']); // Currently only the status toggle is supported. if ($_GET['custom_action'] == 'toggle_status' && $_GET['post']) { $arrUnitIDs = get_post_meta($_GET['post'], 'unit_ids', true); if (empty($arrUnitIDs)) { return; } // if this field is empty, the post must be the wrong post type. $fIsEnabled = get_post_meta($_GET['post'], 'status', true); update_post_meta($_GET['post'], 'status', !$fIsEnabled); } }
/** * Fetches HTML body with the specified URL with caching functionality. * */ public function getHTML($strURL, $fUseFileGetContents = false) { // Check the transient first. $strTransient = $this->strHTMLCachePrefix . md5($strURL); $strHTMLBodyEncoded = AmazonAutoLinks_WPUtilities::getTransient($strTransient); if (false !== $strHTMLBodyEncoded) { return $this->oEncrypt->decode($strHTMLBodyEncoded); } // Fetch HTML. if ($fUseFileGetContents) { $strHTMLBody = file_get_contents($strURL); } else { $arrResponse = wp_remote_get($strURL, array('timeout' => 20, 'httpversion' => '1.1')); $strHTMLBody = wp_remote_retrieve_body($arrResponse); } // If failed or empty, return. if (empty($strHTMLBody)) { return $strHTMLBody; } // Encode the HTML string; otherwise, sometimes it gets broken. AmazonAutoLinks_WPUtilities::setTransient($strTransient, $this->oEncrypt->encode($strHTMLBody), 60 * 60 * 48); return $strHTMLBody; }
/** * A wrapper method for the get_transient() function. * * This method does retrieves the transient with the given transient key. In addition, it checks if it is an array; otherwise, it makes it an array. * * @access public * @since 2.0.0 * @remark The scope is public as the event method uses it. */ public function getTransient($strTransientKey) { $vData = AmazonAutoLinks_WPUtilities::getTransient($strTransientKey); // if it's false, no transient is stored. Otherwise, some values are in there. if ($vData === false) { return false; } // If it's array, okay. if (is_array($vData)) { return $vData; } // Maybe it's encoded if (is_string($vData) && is_serialized($vData)) { return unserialize($vData); } // Maybe it's an object. In that case, convert it to an associative array. if (is_object($vData)) { return get_object_vars($vData); } // It's an unknown type. So cast array and return it. return (array) $vData; }
/** * The v2 Option Converter page(tab) to v3 * * @since 3 * @callback action load_{page slug}_{tab slug} */ public function load_aal_settings_create_v3_options() { if (!isset($_GET['bounce_url'])) { return; } $_sBounceURL = AmazonAutoLinks_WPUtilities::getTransient($_GET['bounce_url']); // Created v3 options from the v2 options. new AmazonAutoLinks_ImportV2Options(get_option(AmazonAutoLinks_Commons::AdminOptionKey, array())); // v3 will be loaded in the next page. delete_option(AmazonAutoLinks_Commons::AdminOptionKey); exit(wp_redirect($_sBounceURL . "&aal-option-upgrade=true")); }
/** * * @remark The scope is public because the meta box calls it. */ public function getFieldOfSimilarityLookUp($strSectionID, $strPrefix) { $bIsSearchUnitType = in_array($GLOBALS['strAmazonAutoLinks_UnitType'], array('search', 'item_lookup', 'similarity_lookup ')); $arrUnitOptions = isset($_REQUEST['transient_id']) ? AmazonAutoLinks_WPUtilities::getTransient('AAL_CreateUnit_' . $_REQUEST['transient_id']) : ($bIsSearchUnitType && isset($_GET['post']) && $_GET['post'] != 0 ? $GLOBALS['oAmazonAutoLinks_Option']->getUnitOptionsByPostID($_GET['post']) : array()); return array(array('strFieldID' => $strPrefix . 'unit_title', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Unit Name', 'amazon-auto-links'), 'strType' => 'text', 'fIf' => isset($_REQUEST['transient_id']), 'vValue' => isset($arrUnitOptions['unit_title']) ? $arrUnitOptions['unit_title'] : null), array('strFieldID' => $strPrefix . 'ItemId', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Item ASIN', 'amazon-auto-links'), 'strType' => 'text', 'vSize' => version_compare($GLOBALS['wp_version'], '3.8', '>=') ? 40 : 60, 'strDescription' => __('Enter the ASIN(s) of the product. For more more than one items, use the <code>,</code> (comma) characters to delimit the items.', 'amazon-auto-links') . ' e.g. <code>B009ZVO3H6</code>', 'vValue' => $strSectionID ? '' : null), array('strFieldID' => $strPrefix . 'SimilarityType', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Similarity Type', 'amazon-auto-links'), 'strType' => 'radio', 'vLabel' => array('Intersection' => __('Intersection', 'amazon-auto-links') . ' - ' . __('returns the intersection of items that are similar to all of the ASINs specified', 'amazon-auto-links'), 'Random' => __('Random', 'amazon-auto-links') . ' - ' . __('returns the union of randomly picked items that are similar to all of the ASINs specified.', 'amazon-auto-links')), 'strDescription' => __('The maximum of only ten items can be retrieved.', 'amazon-auto-links'), 'vDefault' => 'Intersection'), array('strFieldID' => $strPrefix . 'count', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Number of Items', 'amazon-auto-links'), 'strType' => 'number', 'vMax' => 10, 'vMin' => 1, 'strDescription' => __('The number of product links to display. This unit type cannot display more than 10 items.'), 'vDefault' => 10), array('strFieldID' => $strPrefix . 'search_type', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Search Type', 'amazon-auto-links'), 'strType' => 'text', 'vDisable' => true, 'vReadOnly' => true, 'vValue' => isset($arrUnitOptions['Operation']) ? $this->getSearchTypeLabel($arrUnitOptions['Operation']) : __('Similar Products', 'amazon-auto-links')), array('strFieldID' => $strPrefix . 'Operation', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Operation', 'amazon-auto-links'), 'strType' => 'hidden', 'vReadOnly' => true, 'vValue' => isset($arrUnitOptions['Operation']) ? $arrUnitOptions['Operation'] : 'SimilarityLookup'), array('strFieldID' => $strPrefix . 'country', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Locale', 'amazon-auto-links'), 'strType' => 'text', 'vReadOnly' => true, 'vValue' => isset($arrUnitOptions['country']) ? $arrUnitOptions['country'] : null), array('strFieldID' => $strPrefix . 'associate_id', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Associate ID', 'amazon-auto-links'), 'strType' => 'text', 'strDescription' => 'e.g. <code>miunosoft-20</code>', 'vValue' => isset($arrUnitOptions['associate_id']) ? $arrUnitOptions['associate_id'] : null), array('strFieldID' => $strPrefix . 'image_size', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Image Size', 'amazon-auto-links'), 'strType' => 'number', 'vAfterInputTag' => ' ' . __('pixel', 'amazon-auto-links'), 'vDelimiter' => '', 'strDescription' => __('The maximum width of the product image in pixel. Set <code>0</code> for no image.', 'amazon-auto-links') . ' ' . __('Max', 'amazon-auto-links') . ': <code>500</code> ' . __('Default', 'amazon-auto-links') . ': <code>160</code>', 'vMax' => 500, 'vMin' => 0, 'vDefault' => 160), array('strFieldID' => $strPrefix . 'ref_nosim', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Direct Link Bonus', 'amazon-auto-links'), 'strType' => 'radio', 'vLabel' => array(1 => __('On', 'amazon-auto-links'), 0 => __('Off', 'amazon-auto-links')), 'strDescription' => sprintf(__('Inserts <code>ref=nosim</code> in the link url. For more information, visit <a href="%1$s">this page</a>.', 'amazon-auto-links'), 'https://affiliate-program.amazon.co.uk/gp/associates/help/t5/a21'), 'vDefault' => 0), array('strFieldID' => $strPrefix . 'title_length', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Title Length', 'amazon-auto-links'), 'strType' => 'number', 'strDescription' => __('The allowed character length for the title.', 'amazon-auto-links') . ' ' . __('Use it to prevent a broken layout caused by a very long product title. Set -1 for no limit.', 'amazon-auto-links') . '<br />' . __('Default', 'amazon-auto-links') . ": <code>-1</code>", 'vDefault' => -1), array('strFieldID' => $strPrefix . 'description_length', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Description Length', 'amazon-auto-links'), 'strType' => 'number', 'strDescription' => __('The allowed character length for the description.', 'amazon-auto-links') . ' ' . __('Set -1 for no limit.', 'amazon-auto-links') . '<br />' . __('Default', 'amazon-auto-links') . ": <code>250</code>", 'vDefault' => 250), array('strFieldID' => $strPrefix . 'link_style', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Link Style', 'amazon-auto-links'), 'strType' => 'radio', 'vLabel' => array(1 => 'http://www.amazon.<code>[domain-suffix]</code>/<code>[product-name]</code>/dp/<code>[asin]</code>/ref=<code>[...]</code>?tag=<code>[associate-id]</code>' . " <span class='description'>(" . __('Default', 'amazon-auto-links') . ")</span>", 2 => 'http://www.amazon.<code>[domain-suffix]</code>/exec/obidos/ASIN/<code>[asin]</code>/<code>[associate-id]</code>/ref=<code>[...]</code>', 3 => 'http://www.amazon.<code>[domain-suffix]</code>/gp/product/<code>[asin]</code>/?tag=<code>[associate-id]</code>&ref=<code>[...]</code>', 4 => 'http://www.amazon.<code>[domain-suffix]</code>/dp/ASIN/<code>[asin]</code>/ref=<code>[...]</code>?tag=<code>[associate-id]</code>', 5 => site_url() . '?' . $GLOBALS['oAmazonAutoLinks_Option']->arrOptions['aal_settings']['query']['cloak'] . '=<code>[asin]</code>&locale=<code>[...]</code>&tag=<code>[associate-id]</code>'), 'vDefault' => 1), array('strFieldID' => $strPrefix . 'credit_link', 'strSectionID' => $strSectionID ? $strSectionID : null, 'strTitle' => __('Credit Link', 'amazon-auto-links'), 'strType' => 'radio', 'vLabel' => array(1 => __('On', 'amazon-auto-links'), 0 => __('Off', 'amazon-auto-links')), 'strDescription' => sprintf(__('Inserts the credit link at the end of the unit output.', 'amazon-auto-links'), ''), 'vDefault' => 1)); }
public function validation_aal_add_search_unit_initial_search_settings($aInput, $aOldInput) { // validation_{page slug}_{tab slug} $fVerified = true; $arrErrors = array(); $arrSearchOptions = $aInput['aal_add_search_unit']['search']; // Check the limitation. if ($this->oOption->isUnitLimitReached()) { $this->setFieldErrors(array('error')); // must set an field error array which does not yield empty so that it won't be redirected. $this->setSettingNotice(sprintf(__('Please upgrade to <A href="%1$s">Pro</a> to add more units! Make sure to empty the <a href="%2$s">trash box</a> to delete the units completely!', 'amazon-auto-links'), 'http://en.michaeluno.jp/amazon-auto-links-pro/', admin_url('edit.php?post_status=trash&post_type=' . AmazonAutoLinks_Commons::PostTypeSlug))); return $aOldInput; } // If the Access Key fields are present, it means the user has not set them yet in the Settings page. // In this case, just check if they are valid and if so, save them in the settings' option array. Otherwise, return an error. if (isset($arrSearchOptions['search_access_key'], $arrSearchOptions['search_access_key_secret'])) { $strPublicKey = $arrSearchOptions['search_access_key']; if (strlen($strPublicKey) != 20) { $arrErrors['search']['search_access_key'] = __('The Access Key ID must consist of 20 characters.', 'amazon-auto-links') . ': ' . $strPublicKey . ' '; $fVerified = false; } $strPrivateKey = $arrSearchOptions['search_access_key_secret']; if (strlen($strPrivateKey) != 40) { $arrErrors['search']['search_access_key_secret'] = __('The Secret Access Key must consist of 40 characters.', 'amazon-auto-links') . ': ' . $strPrivateKey . ' '; $fVerified = false; } // An invalid value is found. if (!$fVerified) { // Set the error array for the input fields. $this->setFieldErrors($arrErrors); $this->setSettingNotice(__('There was an error in your input.', 'amazon-auto-links')); return $aOldInput; } // Test authentication - browse the Books node in amazon.com. $oAmazonAPI = new AmazonAutoLinks_ProductAdvertisingAPI('com', $strPublicKey, $strPrivateKey); if (!$oAmazonAPI->test()) { $arrErrors['search']['search_access_key'] = __('Sent Value', 'amazon-auto-links') . ': ' . $strPublicKey; $arrErrors['search']['search_access_key_secret'] = __('Sent Value', 'amazon-auto-links') . ': ' . $strPrivateKey; $this->setFieldErrors($arrErrors); $this->setSettingNotice(__('Failed authentication.', 'amazon-auto-links')); $aOldInput; } // It is authenticated, so set the keys in the Settings option array. // Since the validation_ callbacks internally merge with the framework's property option array, // modify the property array, NOT the option object that plugin creates. $this->oProps->arrOptions['aal_settings']['authentication_keys']['access_key'] = $strPublicKey; $this->oProps->arrOptions['aal_settings']['authentication_keys']['access_key_secret'] = $strPrivateKey; } if (empty($arrSearchOptions['search_associate_id'])) { $arrErrors['search']['search_associate_id'] = __('The associate ID cannot be empty.', 'amazon-auto-links'); $fVerified = false; } // An invalid value is found. if (!$fVerified) { // Set the error array for the input fields. $this->setFieldErrors($arrErrors); $this->setSettingNotice(__('There was an error in your input.', 'amazon-auto-links')); return $aOldInput; } // Drop the sections. $_aNewFields = array(); foreach ($aInput['aal_add_search_unit'] as $strSection => $arrFields) { $_aNewFields = $_aNewFields + $arrFields; } // Remove the search_ prefix in the keys. $_aSanitizedFields = array(); foreach ($_aNewFields as $strKey => $vValue) { $_aSanitizedFields[preg_replace('/^search_/', '', $strKey)] = $vValue; } // Set the unit type based on the chosen one. // Redirect to the appropriate page by the search type. switch ($_aSanitizedFields['Operation']) { case 'ItemSearch': $_aSanitizedFields['unit_type'] = 'search'; $sTabSlug = 'search_products'; break; case 'ItemLookup': $_aSanitizedFields['unit_type'] = 'item_lookup'; $sTabSlug = 'item_lookup'; break; case 'SimilarityLookup': $_aSanitizedFields['unit_type'] = 'similarity_lookup'; $sTabSlug = 'similarity_lookup'; break; } // Save the transient $arrTempUnitOptions = (array) AmazonAutoLinks_WPUtilities::getTransient('AAL_CreateUnit_' . $_aSanitizedFields['transient_id']); $aSavingUnitOptions = AmazonAutoLinks_Utilities::uniteArrays($_aSanitizedFields, $arrTempUnitOptions); AmazonAutoLinks_WPUtilities::setTransient('AAL_CreateUnit_' . $_aSanitizedFields['transient_id'], $aSavingUnitOptions, 60 * 10 * 6 * 24); // Go to the next page. die(wp_redirect(add_query_arg(array('tab' => $sTabSlug, 'transient_id' => $_aSanitizedFields['transient_id']) + $_GET, $_aSanitizedFields['bounce_url']))); }
/** * A callback for the accessSiteAtShutDown() method. * * @since 1.0.0 */ public static function _replyToAccessSite() { // Retrieve the plugin scheduled tasks array. $_sTransientName = md5(get_class()); $_aTasks = AmazonAutoLinks_WPUtilities::getTransient($_sTransientName); $_aTasks = $_aTasks ? $_aTasks : array(); $_nNow = microtime(true); // Check the excessive background call protection interval if (!self::$_fIgnoreLock) { $_nCalled = isset($_aTasks['called']) ? $_aTasks['called'] : 0; if ($_nCalled + self::$_iLockBackgroundCallInterval > $_nNow) { return; // if it's called within 10 seconds from the last time of calling this method, do nothing to avoid excessive calls. } } // Renew the called time. $_aFlagKeys = array('called' => $_nNow); AmazonAutoLinks_WPUtilities::setTransient($_sTransientName, $_aFlagKeys + $_aTasks, self::getAllowedMaxExecutionTime()); // set a locked key so it prevents duplicated function calls due to too many calls caused by simultaneous accesses. // Compose a GET query array $_aGet = self::$_aGet; if (defined('WP_DEBUG')) { $_aGet['debug'] = WP_DEBUG; } unset($_aGet[0]); // Load the site in the background. wp_remote_get(site_url('?' . http_build_query($_aGet)), array('timeout' => 0.01, 'sslverify' => false, 'cookies' => $_aFlagKeys + array($_sTransientName => true))); }