";
}
}
function save_trackerfield() {
global $post;
$postID=get_the_ID();
if ($postID!=false) {
if (isset($_POST['afstrackername']))
$tracker = addslashes($_POST['afstrackername']);
else
$tracker = addslashes($_POST['post_title']);
if (empty($tracker)) $tracker = $post->post_title;
if (!empty($tracker)) {
if (!add_post_meta($postID, 'afstrackername', $tracker, true)) {
update_post_meta($postID, 'afstrackername', $tracker);
}
}
}
}
function plugin_menu() {
$message = null;
$message_updated = __("Website ID Saved!","afs");
$message_empty = __("Error: AFS website ID number must be a 8 digits! ","afs");
// update options
if (!empty($_POST)) {
if ($_POST['afs_account']) {
$accountstr=$_POST['afs_account'];
$accountstr=trim($accountstr);
$num=intval($accountstr);
if ($num==0)
{
$message = $message_empty;
}
else
{
$accountstr=sprintf("%08d",$num);
update_option('afs_account',$accountstr);
//if ($_POST['afs_x']) update_option('afs_x', $_POST['afs_x']);
// else update_option('afs_x', 0);
//if ($_POST['afs_y']) update_option('afs_y', $_POST['afs_y']);
//else update_option('afs_y', 0);
//
$message = $message_updated;
//update_option('afs_code', $afs_code);
}
wp_cache_flush();
}
}
/*
else
{
$message = $message_empty;
//update_option('afs_account', "");
wp_cache_flush();
}
*/
?>
\n";
?>
";
_e('Click here','afs');
print " ";
_e('to get a Website ID','afs');
print " ";
_e('2 - Type your Website ID into the Website ID field','afs');
print ". ";
_e("3 - Click on 'Update' button","afs");
print ". ";
_e('4 - AFS Analytics code will be inserted into the footer','afs');
print ". ";
_e('For any Questions?','afs');
print " Facebook ";
_e('or','afs');
print " ";
_e('Contact-us','afs');
print "";
?>
";
_e('visible tracker','afs');
print ".";
_e('If you want to insert the code in other place, just paste the line:','afs');
print '<div id="addfreestats"></div> ';
_e('where you want the code to appear.','afs');
?>