'; echo $html; } } // Admin Settings public function aba_createOptions() { add_options_page( 'Ad Blocking Advisor Settings', // Page Title 'Ad Blocking Advisor Settings', // Menu Title 'manage_options', // Capability 'aba-settings', // Menu Slug array( &$this, 'aba_settingsPage' ) // Callback Function ); } public function setup_settings() { // General Settings add_settings_section( 'aba_general_settings_section', // Section name __( 'General Settings:','ad-blocking-advisor' ), // Title array( &$this , 'aba_settings_section_callback' ), // Callback 'aba_general_settings' // Which page should this section show on? ); add_settings_field( 'aba_enabled', // ID of the field __( 'Enabled:','ad-blocking-advisor' ), // Title array( &$this , 'enabled_settings' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_notice_text', // ID of the field __( 'Notice Text:','ad-blocking-advisor' ), // Title array( &$this , 'notice_text' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_show_banner_loggedin', // ID of the field __( 'Show the banner to logged in users?','ad-blocking-advisor' ), // Title array( &$this , 'show_banner_loggedin' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_show_banner_dismiss_icon', // ID of the field __( 'Show The Dismiss (X) Icon?','ad-blocking-advisor' ), // Title array( &$this , 'show_banner_dismiss_icon' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_cookie_allow', // ID of the field __( 'Allow Cookie Setting:','ad-blocking-advisor' ), // Title array( &$this , 'cookie_allow' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_cookie_timeout', // ID of the field __( 'Cookie Timeout (in days):','ad-blocking-advisor' ), // Title array( &$this , 'cookie_timeout' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_div_location', // ID of the field __( 'Place the banner before this HTML element:','ad-blocking-advisor' ), // Title array( &$this , 'div_location' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_background_color', // ID of the field __( 'Background Color:','ad-blocking-advisor' ), // Title array( &$this , 'background_color' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_font_color', // ID of the field __( 'Font Color:','ad-blocking-advisor' ), // Title array( &$this , 'font_color' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); add_settings_field( 'aba_font_size', // ID of the field __( 'Font Size:','ad-blocking-advisor' ), // Title array( &$this , 'font_size' ), // Callback function 'aba_general_settings', // Which page should this option show on 'aba_general_settings_section' // Section name to attach to ); register_setting( 'aba_general_settings', 'aba_enabled' ); register_setting( 'aba_general_settings', 'aba_notice_text' ); register_setting( 'aba_general_settings', 'aba_show_banner_dismiss_icon' ); register_setting( 'aba_general_settings', 'aba_show_banner_loggedin' ); register_setting( 'aba_general_settings', 'aba_div_location' ); register_setting( 'aba_general_settings', 'aba_background_color' ); register_setting( 'aba_general_settings', 'aba_font_color' ); register_setting( 'aba_general_settings', 'aba_font_size' ); register_setting( 'aba_general_settings', 'aba_cookie_allow' ); register_setting( 'aba_general_settings', 'aba_cookie_timeout' ); } public function aba_settings_section_callback() { ?>

- v

Thank you for using Ad Blocking Advisor!

Need support?

Visit the plugin homepage! There is a FAQ, as well as the comments section which has some great tips. You can also leave a comment with your question and I'll try to help you out!


Please Donate!

This plugin has taken a considerable amount of time and coffee to create. If you find this plugin valuable and would like to buy me a cup of coffee, please click here to donate! Thanks!
'; } public function notice_text() { $option = get_option( 'aba_notice_text' ); echo ' '; } public function show_banner_dismiss_icon() { $option = get_option( 'aba_show_banner_dismiss_icon' ); echo ' '; } public function show_banner_loggedin() { $option = get_option( 'aba_show_banner_loggedin' ); echo ' '; } public function div_location() { $option = get_option( 'aba_div_location' ); echo ' '; } public function background_color() { $option = get_option( 'aba_background_color' ); echo ' '; } public function font_color() { $option = get_option( 'aba_font_color' ); echo ' '; } public function font_size() { $option = get_option( 'aba_font_size' ); echo ' '; } public function cookie_allow() { $option = get_option( 'aba_cookie_allow' ); echo ' '; } public function cookie_timeout() { $option = get_option( 'aba_cookie_timeout' ); echo ' '; } // Add settings link to the plugin page. function aba_plugin_action_links( $links, $file ) { static $this_plugin; if ( !$this_plugin ) { $this_plugin = plugin_basename( __FILE__ ); } if ( $file == $this_plugin ) { // The "page" query string value must be equal to the slug // of the Settings admin page we defined earlier, which in // this case equals "myplugin-settings". $settings_link = 'Settings'; array_unshift( $links, $settings_link ); } return $links; } } $aba = new Ad_Blocking_Advisor(); ?>