Settings', 'Support', ); $actions = array_merge( $actions, $mylinks ); return $actions; } class AdlessSettingsPage { /** * Holds the values to be used in the fields callbacks */ private $options; /** * Start up */ public function __construct() { add_action('admin_menu', array($this, 'add_plugin_page')); add_action('admin_init', array($this, 'page_init')); add_filter('plugin_action_links_adless/adless.php', 'adless_action_links'); } /** * Add options page */ public function add_plugin_page() { // This page will be under "Settings" add_options_page( 'Adless Settings', 'Adless', 'manage_options', 'adless', array($this, 'create_admin_page') ); } /** * Options page callback */ public function create_admin_page() { // Set class property $this->options = get_option('adless_options'); ?>

Adless Settings


Visit adless.net/get-started/wordpress for more information on prerequisites.'; } public function print_advanced_section_info() { print 'This section allows you full customization of Adless. This configuration will extend and when relevant override the settings above.

Documentation can be found in adless.net/get-started.'; } public function print_paywall_section_info() { print 'Using the Adless paywall to protect your premium content is about as easy as it gets; after signing up, you just add the css classname adless-protected-content to the content you want protected.

See adless.net/get-started/wordpress for a simple instruction on how to get started.'; } public function print_default_services_section_info() { print 'Default services are the services you agree to deliver on all pages on this website, for example if you never show any display advertisement (the NO_ADS service). You still need to sign up for the services in Adless before you receive any compensation so that you know the terms.'; } public function earnerID_callback() { printf( '

Your earner ID can be found in the earners section when you have created an Adless account.

', isset($this->options['earnerID']) ? esc_attr($this->options['earnerID']) : '' ); } public function services_callback() { printf( '', isset($this->options['services']) ? esc_attr(implode(", ", $this->options['services'])) : '', ); } public function paywall_message_callback() { printf( wp_editor( !empty($this->options['paywallMessage']) ? base64_decode($this->options['paywallMessage']) : '

Thank\'s for your interest!

This content is available for paying visitors only.

', "adless_paywallMessage", array( 'wpautop' => true, 'textarea_name' => 'adless_options[paywallMessage]' ) ) ); } public function custom_configuration_callback() { printf( '', isset($this->options['customConfiguration']) ? esc_attr($this->options['customConfiguration']) : '', ); } } ?>