Ads Easy', 'administrator', 'ads-easy-settings', array($this, 'build_options_page')); } /** * * Actually build the option pages * */ function build_options_page() { parent::open_page('Ads Easy', __('http://wasistlos.waldemarstoffel.com/plugins-fur-wordpress/ads-easy', self::language_file), 'adseasy', __('Plugin Support', self::language_file)); settings_errors(); _e('Do you use Google Adsense in the widget?', self::language_file); parent::open_form('options.php'); settings_fields('ae_options'); do_settings_sections('ae_use_adsense'); submit_button(); if (WP_DEBUG === true) : echo '
'; var_dump(self::$options); echo ''; parent::close_draggable(); echo '
'.__('To activate the use of the tags, check the box.', self::language_file).'
'; } function ae_display_tags($labels) { a5_checkbox('use_google_tags', 'ae_options[use_google_tags]', @self::$options['use_google_tags'], $labels[0]); } function ae_display_time($labels) { a5_number_field('ae_time', 'ae_options[ae_time]', self::$options['ae_time'], $labels[0], array('step' => 1)); } function ae_display_css($labels) { echo $labels[0].''.$labels[1].''; a5_textarea('ae_css', 'ae_options[ae_css]', @self::$options['ae_css'], false, array('rows' => 7, 'cols' => 35)); } function compress_field($labels) { a5_checkbox('compress', 'ae_options[compress]', @self::$options['compress'], $labels[0]); } function inline_field($labels) { a5_checkbox('inline', 'ae_options[inline]', @self::$options['inline'], $labels[0]); } function resize_field() { a5_resize_textarea(array('ae_css')); } function validate($input) { self::$options['use_google_tags'] = isset($input['use_google_tags']) ? true : NULL; self::$options['ae_time'] = trim($input['ae_time']); self::$options['ae_css'] = trim($input['ae_css']); if (!is_numeric(self::$options['ae_time'])) : add_settings_error('ae_settings', 'wrong-time', __('Please give numeric value for the minutes.', self::language_file), 'error'); unset(self::$options['ae_time']); endif; self::$options['compress'] = isset($input['compress']) ? true : false; self::$options['inline'] = isset($input['inline']) ? true : false; return self::$options; } } // end of class ?>