Google's TOS before using this plugin!
Author: Phil Hord
Author URI: http://philhord.com
*/
/*
adsense
This function replaces tags with actual Google Adsense code
*/
function phord_insert_adsense($data) {
$tag = "";
/**************************************************************************
** Replace this HTML code with your own customized Google Adsense code. **
**************************************************************************/
$adsense_code = '
';
/**************************************************************************
** All done! No more changes need to be made below this line! Enjoy! **
**************************************************************************/
return str_replace( $tag, $adsense_code, $data );
}
add_filter('the_content', 'phord_insert_adsense');
//---- The following AddAButton code comes from the Edit Button Template
//---- found here: http://codex.wordpress.org/Plugins
//---- and originally written by Owen Winkler
//---- It was originally here: http://www.asymptomatic.net/wp-hacks
//---- But I had trouble downloading it from there.
add_filter('admin_footer', 'phord_InsertAdsenseButton');
function phord_InsertAdsenseButton()
{
if(strpos($_SERVER['REQUEST_URI'], 'post.php'))
{
?>
if(toolbar)
{
var theButton = document.createElement('input');
theButton.type = 'button';
theButton.value = '';
theButton.onclick = ;
theButton.className = 'ed_button';
theButton.title = "";
theButton.id = "";
toolbar.appendChild(theButton);
}