id : null ); if ( 'adplugg_page_adplugg_amp_settings' === $screen_id ) { // Show notice if amp plugin isn't found. if ( ! defined( 'AMP__VERSION' ) ) { $amp_not_found_notice = AdPlugg_Notice::create( 'notify_amp_not_found', 'AMP plugin not found.', 'error' ); $amp_not_found_notice->render(); } } } /** * Function to initialize the AdPlugg AMP Options page. */ public function admin_init() { register_setting( 'adplugg_amp_options', ADPLUGG_AMP_OPTIONS_NAME, array( &$this, 'validate' ) ); // ------------- GENERAL AMP SETTINGS ------------ // add_settings_section( 'adplugg_amp_general_section', 'General Settings', array( &$this, 'render_amp_general_section_text' ), 'adplugg_amp_general_settings' ); add_settings_field( 'amp_enable_automatic_placement', 'Automatic Placement', array( &$this, 'render_amp_enable_automatic_placement_field' ), 'adplugg_amp_general_settings', 'adplugg_amp_general_section' ); add_settings_field( 'amp_ad_density', 'Ad Density', array( &$this, 'render_amp_ad_density_field' ), 'adplugg_amp_general_settings', 'adplugg_amp_general_section' ); // ------------- AMP STYLE SETTINGS ------------ // add_settings_section( 'adplugg_amp_style_section', 'Style Settings', array( &$this, 'render_amp_style_section_text' ), 'adplugg_amp_style_settings' ); add_settings_field( 'amp_style_enable_centering', 'Center', array( &$this, 'render_amp_enable_centering_field' ), 'adplugg_amp_style_settings', 'adplugg_amp_style_section' ); } /** * Function to render the AdPlugg AMP options page. */ public function render_page() { ?>
To have AdPlugg ads automatically inserted into your AMP pages, do the following:
See the help above for more info.
The ad density is how many words appear in between ads.
These settings control how your ads will display on the AMP pages.