/** * Renders view. */ public function __render() { $title = __('Google DFP Ads Settings', WP_Google_DFP_Ads::get_instance()->get_slug()); echo '<h2>' . $title . '</h2>'; echo '<form class="' . $this->id . '" method="post" action="options.php">'; do_settings_sections($this->id); settings_fields(WP_Google_DFP_Ads_Settings_Fields::get_instance()->get_id()); submit_button(); echo '</form>'; }
/** * Renders view. */ public function __render() { $script = get_option(WP_Google_DFP_Ads_Settings_Footer_Input::get_instance()->get_id()); if (empty($script)) { return; } $comment = __('WP Google DFP Ads: Footer', WP_Google_DFP_Ads::get_instance()->get_slug()); echo '<!-- ' . $comment . ' -->' . PHP_EOL; echo $script . PHP_EOL; }
/** * Enqueues styles. */ public function __enqueue_styles() { $screen = get_current_screen(); if ('settings_page_' . WP_Google_DFP_Ads_Settings::get_instance()->get_id() === $screen->id) { $handle = WP_Google_DFP_Ads::get_instance()->get_slug() . '-admin-styles'; $relative_path = __DIR__ . '/../admin/css/'; $filename = 'wp-google-dfp-ads.min.css'; $filename_debug = 'wp-google-dfp-ads.css'; $dependencies = array(); $options = new WP_Enqueue_Options($handle, $relative_path, $filename, $filename_debug, $dependencies, WP_Google_DFP_Ads::get_instance()->get_version()); WP_Enqueue_Util::get_instance()->enqueue_style($options); } }
/** * Renders view. */ public function __render() { $description = __('Enter the Google DFP Ads that should appear in the index and search loops below.', WP_Google_DFP_Ads::get_instance()->get_slug()); echo '<p>' . $description . '</p>'; }
/** * Initializes settings. */ public function __initialize() { add_settings_field($this->id, __('Script Block', WP_Google_DFP_Ads::get_instance()->get_slug()), array($this, '__render'), WP_Google_DFP_Ads_Settings::get_instance()->get_id(), WP_Google_DFP_Ads_Settings_Head_Section::get_instance()->get_id()); register_setting(WP_Google_DFP_Ads_Settings_Fields::get_instance()->get_id(), $this->id); }
/** * Renders view. */ public function __render() { $description = __('Enter the Google DFP Ads that should appear in the <code><head></code> below.', WP_Google_DFP_Ads::get_instance()->get_slug()); echo '<p>' . $description . '</p>'; }
/** * Renders view. */ public function __render() { $description = __('Enter the Google DFP Ads that should appear just above the closing <code></body></code> tag, otherwise known as the footer.', WP_Google_DFP_Ads::get_instance()->get_slug()); echo '<p>' . $description . '</p>'; }