.
*/
/* Stop direct call */
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) die(__('Sorry, you don't have direct access to this page.'));
// import laguage files
load_plugin_textdomain('adsense-targeting', false , basename(dirname(__FILE__)).'/languages');
//Additional links on the plugin page
add_filter('plugin_row_meta', 'at_register_links',10,2);
function at_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
add_shortcode( 'at_ignore_tag', 'at_wrap_ignore');
function at_wrap_ignore($atts, $content = null){
$eol = "\r\n";
return $eol.''.$eol.''.$eol.do_shortcode($content).$eol.''.$eol.''.$eol;
}
// get the tinymce plugin
include_once('tinymce/tinymce.php');
// wrapping the content into adsense tags
add_filter('the_content', 'at_set_tags');
add_filter('the_excerpt', 'at_set_tags');
function at_set_tags($content) {
$eol = "\r\n";
return $eol.''.$eol.$content.$eol.''.$eol;
}
?>