. */ /* Stop direct call */ defined('ABSPATH') OR exit; // get the tinymce plugin define( 'AT_PATH', plugin_dir_path(__FILE__) ); if (!class_exists('A5_AddMceButton')) require_once AT_PATH.'class-lib/A5_MCEButtonClass.php'; // AdSenseTargeting begin of class class AdSenseTargeting { function __construct() { // import laguage files load_plugin_textdomain('adsense-targeting', false , basename(dirname(__FILE__)).'/languages'); add_filter('plugin_row_meta', array($this, 'register_links'),10,2); add_shortcode( 'at_ignore_tag', array($this, 'at_wrap_ignore')); add_filter('loop_start', array($this, 'google_start')); add_filter('loop_end', array($this, 'google_end')); add_action('wp_head', array($this, 'at_header'), 1000); $tinymce_button = new A5_AddMceButton ('adsense-targeting', 'GoogleIgnoreTags', 'mce_buttons_2'); } // Selbstbeweihräucherung function at_header() { echo "\n"; } //Additional links on the plugin page function register_links($links, $file) { $base = plugin_basename(__FILE__); if ($file == $base) : $links[] = ''.__('FAQ', 'adsense-targeting').''; $links[] = ''.__('Donate', 'adsense-targeting').''; endif; return $links; } // adding short code function at_wrap_ignore($atts, $content = NULL){ $eol = "\n"; return $eol.''.$eol.''.$eol.do_shortcode($content).$eol.''.$eol.''.$eol; } // wrapping the loop into adsense tags function google_start() { echo "\n"; } function google_end() { echo "\n"; } } // end of class $adsensetargeting = new AdSenseTargeting; ?>