" . 'Could not connect to atcontent.com. Contact your hosting provider.' . "
";
}
//End PingBack
$userid = wp_get_current_user()->ID;
$hidden_field_name = 'ac_submit_hidden';
$form_message = '';
$form_script = '';
$form_message_block = '';
$ac_api_key = get_user_meta($userid, "ac_api_key", true );
$ac_pen_name = get_user_meta($userid, "ac_pen_name", true );
if ( isset( $_POST[ $hidden_field_name ] ) && ( $_POST[ $hidden_field_name ] == 'Y' ) &&
isset( $_POST[ "ac_advanced_settings" ] ) ) {
update_user_meta( $userid, "ac_script_init", $_POST[ "ac_script_init" ] );
$form_message .= 'Settings saved.';
}
if ( isset( $_POST[ $hidden_field_name ] ) && ( $_POST[ $hidden_field_name ] == 'Y' ) &&
isset( $_POST[ "ac_reset_posts_processing" ] ) ) {
$posts = $wpdb->get_results(
"
SELECT ID, post_title, post_author
FROM {$wpdb->posts}
WHERE post_status = 'publish'
AND post_author = {$userid} AND post_type = 'post'
"
);
foreach ( $posts as $post )
{
if ($post->post_author == $userid) {
$ac_postid = get_post_meta($post->ID, "ac_postid", true);
$ac_is_process = ($ac_postid == "") ? "" : "1";
update_post_meta( $post->ID, "ac_is_process", $ac_is_process );
}
}
$form_message .= "Post processing settings are reseted.";
}
if ( isset( $_POST[ $hidden_field_name ] ) && ( $_POST[ $hidden_field_name ] == 'Y' ) &&
isset( $_POST[ "ac_turn_off_pages" ] ) ) {
$posts = $wpdb->get_results(
"
SELECT ID, post_author
FROM {$wpdb->posts}
WHERE post_status = 'publish'
AND post_author = {$userid} AND post_type = 'page'
"
);
foreach ( $posts as $post )
{
if ($post->post_author == $userid) {
update_post_meta( $post->ID, "ac_is_process", "2" );
}
}
$form_message .= "AtContent is turned off for pages.";
}
?>
Geek Settings
0) {
$form_message_block .= <<
{$form_message}
END;
}
echo $form_message_block;
?>
Don't use this page if you not a geek.
0) {
$ac_script_init = get_user_meta($userid, "ac_script_init", true );
?>
Service functions
If you have any problems, ideas, feedback, questions — please contact us. We will use your help to make plugin better! :)
If you are interested in plugin features description, please read it on AtContent plugin page
Diagnostic info