init(); } // initial point of action public function init() { add_action('admin_menu', array($this, 'register_page')); add_action('admin_init', array($this, 'register_settings')); add_action('wp_footer', array($this,'send_to_frontend')); } // register page call public function register_page() { add_options_page('AdRoll', 'AdRoll Retargeting', 'manage_options', 'wp_adroll', array($this, 'adrl_page')); } // register settings group public function register_settings() { register_setting('adrl_setting', 'adrl_setting'); add_settings_section( 'adrl_settings_section', // ID used to identify this section and with which to register options 'AdRoll Unique ID’s', // Title to be displayed on the administration page array($this, 'adrl_settings_callback'), // Callback used to render the description of the section 'wp_adroll' // Page on which to add this section of options ); add_settings_field( 'adrl_adv_id', // ID used to identify the field throughout the theme 'AdRoll adv_id', // The label to the left of the option interface element array($this, 'adrl_adv_id_callback'), // The name of the function responsible for rendering the option interface 'wp_adroll', // The page on which this option will be displayed 'adrl_settings_section' // The name of the section to which this field belongs ); add_settings_field( 'adrl_pix_id', // ID used to identify the field throughout the theme 'AdRoll pix_id', // The label to the left of the option interface element array($this, 'adrl_pix_id_callback'), // The name of the function responsible for rendering the option interface 'wp_adroll', // The page on which this option will be displayed 'adrl_settings_section' // The name of the section to which this field belongs ); } // general settings group callback public function adrl_settings_callback() { //$out = '