prefix.'ai_writing_assistant_sceduled_posts'; $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) ); if ( $wpdb->get_var( $query ) == $table_name ) { $posts = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}ai_writing_assistant_sceduled_posts WHERE status != 'completed' "); if (!empty($posts)){ foreach ($posts as $post) { $id = $post->id; $title = $post->title; $scheduled_time = $post->scheduled_time; $post_type = $post->post_type; $category = $post->category; $language = $post->language; $content_structure = $post->content_structure; $content_length = $post->content_length; $keywords = $post->keywords; $writing_style = $post->writing_style; $writing_tone = $post->writing_tone; $generate_image = $post->generate_image; $status = $post->status; $post_id = $post->post_id; /*if ($status=="completed"){ continue; }*/ $trs .= ' '.$id.' '.$title.' '.aiwa_post_types_selectbox("posttype-".$id, $post_type, false, false, true).' '. aiwa_category_selectbox('list-' . $id . '-cat-selectbox', $category, false, true).'
Use YYYY-MM-DD HH:MM:SS format (e.g. 2023-02-11 21:42:00)
'.aiwa_get_language_text($language).' '.aiwa_get_scheduled_content_structure_options("aiwa-scheduled-content-structure", $content_structure, false, true).' '.aiwa_get_content_length_selectbox("", $content_length, false, true).' '.$keywords.' '.aiwa_get_writing_styles_selectbox($writing_style, true).' '.aiwa_get_writing_tones_selectbox($writing_tone, true).' '; } } $generated_posts = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}ai_writing_assistant_sceduled_posts WHERE status = 'completed'"); if (!empty($generated_posts)){ foreach ($generated_posts as $post) { $id = $post->id; $title = $post->title; $scheduled_time = $post->scheduled_time; $post_type = $post->post_type; $category = $post->category; $status = $post->status; $post_id = $post->post_id; /*if ($status!=="completed"){ continue; }*/ $generated_posts_trs .= ' '.$id.' '.$title.' '.aiwa_post_types_selectbox("posttype-".$id, $post_type, false, false, true).' '. aiwa_category_selectbox('list-' . $id . '-cat-selectbox', $category, false, true).' '; } } } ?>

" autocomplete="off">