.
*/
/* Stop direct call */
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) die('Sorry, you don't have direct access to this page.');
// get the tinymce plugin
define( 'AT_PATH', plugin_dir_path(__FILE__) );
if (!class_exists('A5_AddMceButton')) require_once AT_PATH.'tinymce/A5_MCEButtonClass.php';
// AdSenseTargeting begin of class
class AdSenseTargeting {
static $language_file = 'adsense-targeting';
function AdSenseTargeting() {
// import laguage files
load_plugin_textdomain(self::$language_file, false , basename(dirname(__FILE__)).'/languages');
add_filter('plugin_row_meta', array($this, 'at_register_links'),10,2);
add_shortcode( 'at_ignore_tag', array($this, 'at_wrap_ignore'));
add_filter('the_content', array($this, 'at_set_tags'));
add_filter('the_excerpt', array($this, 'at_set_tags'));
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 "\r\n";
}
//Additional links on the plugin page
function at_register_links($links, $file) {
$base = plugin_basename(__FILE__);
if ($file == $base) :
$links[] = ''.__('FAQ', self::$language_file).'';
$links[] = ''.__('Donate', self::$language_file).'';
endif;
return $links;
}
// adding short code
function at_wrap_ignore($atts, $content = null){
$eol = "\r\n";
return $eol.''.$eol.''.$eol.do_shortcode($content).$eol.''.$eol.''.$eol;
}
// wrapping the content into adsense tags
function at_set_tags($content) {
$eol = "\r\n";
return $eol.''.$eol.$content.$eol.''.$eol;
}
} // end of class
$adsensetargeting = new AdSenseTargeting;
?>