title = __('Advanced Settings', $this->plugin_text_domain); // Open add_filter('omgf_advanced_settings_content', [$this, 'do_title'], 10); add_filter('omgf_advanced_settings_content', [$this, 'do_description'], 15); add_filter('omgf_advanced_settings_content', [$this, 'do_before'], 20); // Settings add_filter('omgf_advanced_settings_content', [$this, 'do_promo_amp_handling'], 40); add_filter('omgf_advanced_settings_content', [$this, 'do_promo_exclude_posts'], 50); add_filter('omgf_advanced_settings_content', [$this, 'do_cache_dir'], 70); add_filter('omgf_advanced_settings_content', [$this, 'do_promo_fonts_source_url'], 80); add_filter('omgf_advanced_settings_content', [$this, 'do_uninstall'], 110); // Close add_filter('omgf_advanced_settings_content', [$this, 'do_after'], 200); } /** * Description */ public function do_description() { ?>

plugin_text_domain); ?>

do_select( __('AMP handling (Pro)', $this->plugin_text_domain), 'omgf_pro_amp_handling', OMGF_Admin_Settings::OMGF_AMP_HANDLING_OPTIONS, defined('OMGF_PRO_AMP_HANDLING') ? OMGF_PRO_AMP_HANDLING : '', sprintf(__("Decide how OMGF Pro should behave on AMP pages. Only select enable if the custom CSS limit of 75kb is not already reached by your theme and/or other plugins and no other amp-custom tag is present on your pages.", $this->plugin_text_domain), OMGF_Admin_Settings::FFWP_WORDPRESS_PLUGINS_OMGF_PRO) . ' ' . $this->promo, false, true ); } /** * Excluded Post/Page IDs (Pro) * * @return void */ public function do_promo_exclude_posts() { $this->do_text( __('Excluded Post/Page IDs (Pro)', $this->plugin_text_domain), 'omgf_pro_excluded_ids', __('e.g. 1,2,5,21,443'), defined('OMGF_PRO_EXCLUDED_IDS') ? OMGF_PRO_EXCLUDED_IDS : '', __('A comma separated list of post/page IDs where OMGF Pro shouldn\'t run. Only works when Advanced Proccessing is enabled under Detection Settings.', $this->plugin_text_domain) . ' ' . $this->promo, true ); } /** * */ public function do_cache_dir() { $this->do_text( __('Fonts Cache Directory', $this->plugin_text_domain), OMGF_Admin_Settings::OMGF_ADV_SETTING_CACHE_PATH, __('e.g. /uploads/omgf', $this->plugin_text_domain), OMGF_CACHE_PATH, __("The directory (inside wp-content) where font files should be stored. Give each site a unique value if you're using Multisite. Defaults to /uploads/omgf. After changing this setting, the directory will be created if it doesn't exist and existing files will be moved automatically.", $this->plugin_text_domain) ); } /** * */ public function do_promo_fonts_source_url() { $this->do_text( __('Fonts Source URL (Pro)', $this->plugin_text_domain), 'omgf_pro_source_url', __('e.g. https://cdn.mydomain.com/alternate/relative-path', $this->plugin_text_domain), defined('OMGF_PRO_SOURCE_URL') ? OMGF_PRO_SOURCE_URL : '', sprintf( __("Modify the src URL for each font file in the stylesheet. This can be anything, like an absolute URL (e.g. %s) to an alternate relative URL (e.g. /renamed-wp-content-dir/alternate/path/to/font-files). Make sure you include the full path to where OMGF's files are stored and/or served from. Defaults to %s.", $this->plugin_text_domain), str_replace(home_url(), 'https://your-cdn.com', WP_CONTENT_URL . OMGF_CACHE_PATH), WP_CONTENT_URL . OMGF_CACHE_PATH ) . ' ' . $this->promo, true ); } /** * */ public function do_uninstall() { $this->do_checkbox( __('Remove Settings/Files At Uninstall', $this->plugin_text_domain), OMGF_Admin_Settings::OMGF_ADV_SETTING_UNINSTALL, OMGF_UNINSTALL, __('Warning! This will remove all settings and cached fonts upon plugin deletion.', $this->plugin_text_domain) ); } }