title = __('Optimize Google Fonts', $this->plugin_text_domain); add_filter('omgf_optimize_settings_content', [$this, 'do_title'], 10); add_filter('omgf_optimize_settings_content', [$this, 'do_description'], 15); add_filter('omgf_optimize_settings_content', [$this, 'do_before'], 20); add_filter('omgf_optimize_settings_content', [$this, 'do_optimization_mode'], 30); add_filter('omgf_optimize_settings_content', [$this, 'do_promo_combine_requests'], 40); add_filter('omgf_optimize_settings_content', [$this, 'do_display_option'], 50); add_filter('omgf_optimize_settings_content', [$this, 'do_promo_force_font_display'], 60); add_filter('omgf_optimize_settings_content', [$this, 'do_promo_include_file_types'], 70); add_filter('omgf_optimize_settings_content', [$this, 'do_promo_force_subsets'], 80); add_filter('omgf_optimize_settings_content', [$this, 'do_after'], 100); add_filter('omgf_optimize_settings_content', [$this, 'do_optimize_fonts_container'], 200); add_filter('omgf_optimize_settings_content', [$this, 'do_optimize_fonts_contents'], 250); add_filter('omgf_optimize_settings_content', [$this, 'close_optimize_fonts_container'], 300); add_filter('omgf_optimize_settings_content', [$this, 'do_before'], 350); add_filter('omgf_optimize_settings_content', [$this, 'do_optimize_edit_roles'], 375); add_filter('omgf_optimize_settings_content', [$this, 'do_after'], 400); } /** * */ public function do_description() { ?>

plugin_text_domain); ?>

here.', $this->plugin_text_domain), self::FFW_PRESS_OMGF_AF_URL); ?>

do_radio( __('Optimization Mode', $this->plugin_text_domain), OMGF_Admin_Settings::OMGF_OPTIMIZATION_MODE, OMGF_Admin_Settings::OMGF_OPTIMIZE_SETTING_OPTIMIZATION_MODE, OMGF_OPTIMIZATION_MODE, __('Manual processing mode is best suited for configurations, which use a fixed number of fonts across the entire site. When in manual mode, the generated stylesheet is forced throughout the entire site. Automatic processing mode is best suited for configurations using e.g. page builders, which load different fonts on certain pages.', $this->plugin_text_domain) ); } /** * */ public function do_promo_combine_requests() { $this->do_checkbox( __('Combine & Dedupe (Pro)', $this->plugin_text_domain), 'omgf_pro_combine_requests', defined('OMGF_PRO_COMBINE_REQUESTS') ? true : false, __('Combine and deduplicate multiple Google Fonts stylesheets into one stylesheet. This feature is always on in OMGF Pro.', $this->plugin_text_domain) . ' ' . $this->promo, true ); } /** * */ public function do_display_option() { $this->do_select( __('Font-Display Option', $this->plugin_text_domain), OMGF_Admin_Settings::OMGF_OPTIMIZE_SETTING_DISPLAY_OPTION, OMGF_Admin_Settings::OMGF_FONT_DISPLAY_OPTIONS, OMGF_DISPLAY_OPTION, __('Select which value to set the font-display attribute to. Defaults to Swap (recommended).', $this->plugin_text_domain) ); } /** * Force Font-Display Option Site Wide */ public function do_promo_force_font_display() { $this->do_checkbox( __('Force Font-Display Option Site Wide (Pro)', $this->plugin_text_domain), 'omgf_pro_force_font_display', defined('OMGF_PRO_FORCE_FONT_DISPLAY') ? OMGF_PRO_FORCE_FONT_DISPLAY : false, __('Force the above font-display attribute on all @font-face statements to ensure all text is user-visible while webfonts and icon sets are loading.', $this->plugin_text_domain), true ); } /** * Display WOFF2 Only * * @return void */ public function do_promo_include_file_types() { $this->do_select( __('Include File Types (Pro)', $this->plugin_text_domain), 'omgf_pro_file_types', OMGF_Admin_Settings::OMGF_FILE_TYPES_OPTIONS, defined('OMGF_PRO_FILE_TYPES') ? OMGF_PRO_FILE_TYPES : [], __('Select which file types should be included in the stylesheet. Loading WOFF2 files only will result in a smaller stylesheet, but will make the stylesheet slightly less Cross Browser compatible. Using WOFF and WOFF2 together (default) accounts for +98% of browsers. Add EOT for IE 6-10 and TTF and SVG for legacy Android/iOS browsers. Use CTRL + click to select multiple values.', $this->plugin_text_domain) . ' ' . $this->promo, true, true ); } /** * */ public function do_promo_force_subsets() { $this->do_select( __('Force Subsets (Pro)', $this->plugin_text_domain), 'omgf_pro_force_subsets', OMGF_Admin_Settings::OMGF_FORCE_SUBSETS_OPTIONS, defined('OMGF_PRO_FORCE_SUBSETS') ? OMGF_PRO_FORCE_SUBSETS : [], __('If a theme or plugin loads subsets you don\'t need, use this option to force all Google Fonts to be loaded in the selected subsets. You can also use this option to force the loading of additional subsets, if a theme/plugin doesn\'t allow you to configure the loaded subsets. Use CTRL + click to select multiple values.', $this->plugin_text_domain) . ' ' . $this->promo, true, true ); } /** * */ public function do_optimize_fonts_container() { ?>
optimized_fonts = OMGF::optimized_fonts(); ?> plugin_text_domain); ?> optimized_fonts) : ?> do_optimized_fonts_manager(); ?>
do_manual_template(); $this->do_automatic_template(); ?>

optimized_fonts as $handle => $fonts) : ?> variants) <= 0) continue; ?> id, OMGF_API_Download::OMGF_RENAMED_GOOGLE_FONTS) ? array_search($font->id, OMGF_API_Download::OMGF_RENAMED_GOOGLE_FONTS) : ''; ?> variants as $variant) : ?> id][$variant->id] ?? ''; $unload = OMGF::unloaded_fonts()[$handle][$font->id][$variant->id] ?? ''; $class = $handle . '-' . $font->id . '-' . $variant->id; ?>
  plugin_text_domain); ?> plugin_text_domain); ?> plugin_text_domain); ?>plugin_text_domain); ?> plugin_text_domain); ?> plugin_text_domain); ?>
plugin_text_domain), $handle); ?>
family); ?>%s', $this->plugin_text_domain) . ')', ucfirst($aka)) : ''; ?> (plugin_text_domain); ?> plugin_text_domain); ?> | plugin_text_domain); ?> | plugin_text_domain); ?>)
fontStyle; ?> fontWeight; ?> /> />

%s. Optimizations will be applied on every page using these fonts. If you want to optimize additional Google Fonts from other pages, switch to Automatic (Pro) and visit the pages containing the stylesheets you'd like to optimize. This list will automatically be populated with the captured fonts.", $this->plugin_text_domain), OMGF_MANUAL_OPTIMIZE_URL); ?> Automatic mode might not work when a Full Page Cache plugin is activated. If this list is not being populated with Google Fonts, you could try to visit your frontend and append the following parameter to the URL: %s", $this->plugin_text_domain), $no_cache_param); ?>

>

optimize your Google Fonts manually. OMGF will not run automatically and will %s the requested Google Fonts throughout your website that were captured on the post/page you defined. A Cross-Browser compatible stylesheet will be generated for all requested Google Fonts.", $this->plugin_text_domain), OMGF_FONT_PROCESSING); ?>

plugin_text_domain); ?>

  • plugin_text_domain); ?>
  • plugin_text_domain); ?>

plugin_text_domain); ?>

  • plugin_text_domain); ?>

plugin_text_domain); ?>

plugin_text_domain); ?>

>

optimize your Google Fonts automatically. OMGF will run silently in the background and %s all requested Google Fonts. If the captured stylesheet doesn't exist yet, a call is sent to OMGF's Download API to download the font files and generate a Cross-Browser compatible stylesheet.", $this->plugin_text_domain), OMGF_FONT_PROCESSING); ?>

plugin_text_domain); ?>

  • plugin_text_domain); ?>

plugin_text_domain); ?>

  • plugin_text_domain); ?>

plugin_text_domain); ?>

do_checkbox( __('Optimize Fonts For Editors/Administrators?', $this->plugin_text_domain), OMGF_Admin_Settings::OMGF_OPTIMIZE_SETTING_OPTIMIZE_EDIT_ROLES, OMGF_OPTIMIZE_EDIT_ROLES, __('Should only be disabled while debugging/testing, e.g. using a page builder or switching themes.', $this->plugin_text_domain) ); } }