/** * Load the imported icon fonts. * * @since 0.1.0 */ function ev_load_icon_fonts() { foreach (ev_get_icon_fonts() as $icon_font) { $icon_font_name = 'ev-icon-font-' . $icon_font['name']; ev_fw()->admin()->add_style($icon_font_name, $icon_font['url']); $add_to_frontend = apply_filters('ev_autoload_icon_fonts', false); if ($add_to_frontend) { ev_fw()->frontend()->add_style($icon_font_name, $icon_font['url']); } else { ev_fw()->frontend()->register_style($icon_font_name, $icon_font['url']); } } }
/** * Return a list of the defined densities. * * @since 0.1.0 * @return array */ function ev_get_densities() { return ev_fw()->media()->get_densities(); }
/** * Get a list of all the defined image sizes and their data. * * @since 0.1.0 * @return array The list of all the defined image sizes and their data. */ function ev_get_image_sizes() { return ev_fw()->media()->get_image_sizes(); }
/** * Get the context of the current screen on frontend. * * @since 1.0.0 * @return array */ function ev_get_context() { return ev_fw()->frontend()->context(); }
/** * Retrieve a configuration value. * * @since 0.1.0 * @param string $key The configuration key. * @param string $subkey The configuration subkey. * @return mixed|bool */ function ev_config($key, $subkey = false) { $config = ev_fw()->config(); if (isset($config[$key])) { $config[$key] = apply_filters("ev_config[key:{$key}]", $config[$key]); if ($subkey !== false) { if (isset($config[$key][$subkey])) { return apply_filters("ev_config[key:{$key}][subkey:{$subkey}]", $config[$key][$subkey]); } else { return false; } } return $config[$key]; } return false; }
/** * Add an update nag notice to the admin static notices queue. * * @since 0.1.0 * @param string $message The notice message. */ function ev_update_nag_notice($message) { ev_fw()->admin()->add_notice($message, 'update-nag'); }