Following the upgrade of WordPress to version 3.0 I noticed that there were some errors with the Ad-minister plugin, specifically on the main administration page (tools.php?page=ad-minister).
The page was now displaying an error message:
on line 302
The error is due to a change in the way new posts are created in WP3. The fix (until such time as the plugin is updated by the authors) is to replace the following section of code in the administer_queue_scripts function in the ad-minister.php file:
$_POST['post_title'] = 'Ad-minister Data Holder ' . $nbr;
$_POST['post_type'] = 'administer';
$_POST['content'] = 'This post holds your Ad-minister data';
$id = wp_write_post();
update_option('administer_post_id', $id);
with the new code:
$adminster_post = array();
$adminster_post['post_title'] = 'Ad-minister Data Holder ' . $nbr;
$adminster_post['post_type'] = 'administer';
$adminster_post['content'] = 'This post holds your Ad-minister data';
$id = wp_insert_post( $adminster_post,true );
update_option('administer_post_id', $id);







Recent Comments