* @internal * * @since 1.4.6 */ function wp_currencies_update() { $cron = new WP_Currencies\Cron(); $cron->cron_update_currencies(); } /** * WP Currencies. * * @since 1.4.0 * * @return WP_Currencies */ function wp_currencies() { $wp_currencies = new WP_Currencies(); return $wp_currencies::get_instance(); } // Instantiate. wp_currencies(); } else { add_action('admin_notices', function () { echo '<div class="error"><p>' . sprintf(__("Plugin conflict: %s has been declared already by another plugin or theme and WP Currencies cannot run properly. Try deactivating other plugins and try again.", 'wp_currencies'), '`function wp_currencies()`') . '</p></div>'; if (isset($_GET['activate'])) { unset($_GET['activate']); } }); }
/** * Get currencies. * * @since 1.0.0 * * @return array An associative array with currency codes for keys and currency data for values. */ function get_currencies() { return wp_currencies()->get_currencies(); }