If you like this free version you may also like Affiliate Windows Plus that offers a shortcode option as well. The cost is just GBP10.00. Buy the Affiliate Window Plus version
';
_e("Sidebar banners keywords", 'affban_textdomain' );
echo ' ';
global $post;
$postid=$post->ID;
$value = get_post_meta($postid,'sidebarquery1',true);
echo "";
}
/* When the post is saved, saves our custom data */
function affban_save_postdata( $post_id ) {
// verify if this is an auto save routine.
// If it is our form has not been submitted, so we dont want to do anything
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
return;
// verify this came from the our screen and with proper authorization,
// because save_post can be triggered at other times
if ( !wp_verify_nonce( $_POST['affban_noncename'], plugin_basename( __FILE__ ) ) )
return;
// Check permissions
if ( 'page' == $_POST['post_type'] )
{
if ( !current_user_can( 'edit_page', $post_id ) )
return;
}
else
{
if ( !current_user_can( 'edit_post', $post_id ) )
return;
}
// OK, we're authenticated: we need to find and save the data
$mydata = $_POST['affban_new_field'];
global $post;
$post_id = $post->ID;
update_post_meta($post_id,'sidebarquery1',$mydata);
}
?>