/** * Verifies if the Placester plugin has an api key set. * * @access private * @return bool TRUE if the plugin has an api key, FALSE otherwise. * @since 0.0.1 */ private function _has_plugin_api_key() { if (function_exists('placester_get_api_key')) { try { placester_get_api_key(); } catch (PlaceSterNoApiKeyException $e) { return false; } return true; } else { return false; } }
public static function get_api_key() { $api_key = null; if (function_exists('placester_get_api_key')) { $api_key = placester_get_api_key(); if (!$api_key) { $api_key = false; } } return $api_key; }