/** * @return array */ private function _getActiveButtonLabels() { $_aButtonIDs = AmazonAutoLinks_PluginUtility::getActiveButtonIDs(); $_aLabels = array(); foreach ($_aButtonIDs as $_iButtonID) { $_aLabels[$_iButtonID] = get_the_title($_iButtonID) . ' - ' . get_post_meta($_iButtonID, 'button_label', true); } return $_aLabels; }
/** * @return array */ private function _getActiveButtonLabels() { $_aButtonIDs = AmazonAutoLinks_PluginUtility::getActiveButtonIDs(); $_aLabels = array(); foreach ($_aButtonIDs as $_iButtonID) { $_sButtonLabel = get_post_meta($_iButtonID, 'button_label', true); $_sButtonLabel = $_sButtonLabel ? $_sButtonLabel : __('Buy Now', 'amazon-auto-links'); $_aLabels[$_iButtonID] = $_sButtonLabel; } return $_aLabels; }