ID; $query = new WP_Query(array('post_type' => 'post', 'posts_per_page' =>'-1') ); if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); if(isset($_GET['post'])) { if($_GET['post'] == $post->ID) { $author = get_the_author_meta('ID'); if($author != $userID) { wp_redirect( home_url() ); exit; } $current_post = $post->ID; $title = get_the_title(); $content = get_the_content(); $posttags = get_the_tags($current_post); if ($posttags) { foreach($posttags as $tag) { $tags_list = $tag->name . ' '; } } $postcategory = get_the_category( $current_post ); $category_id = $postcategory[0]->cat_ID; $post_category_type = get_post_meta($post->ID, 'post_category_type', true); $betubeVideoLayout = get_post_meta($post->ID, 'jtheme_video_layout', true); $videoCustomVideoLink = get_post_meta($post->ID, 'jtheme_video_file', true); $betubeEmbedCode = get_post_meta($post->ID, 'jtheme_video_code', true); $betubeVideoLink = get_post_meta($post->ID, 'jtheme_video_url', true); $betubeVideoLink2 = get_post_meta($post->ID, 'single_video_link_second', true); $betubeVideoLink3 = get_post_meta($post->ID, 'single_video_link_third', true); $betubePostTime = get_post_meta($post->ID, 'post_time', true); $betubePostQuality = get_post_meta($post->ID, 'post_quality', true); $betubeHDPost = get_post_meta($post->ID, 'hd_post', true); if ( has_post_thumbnail() ) { $post_thumbnail = get_the_post_thumbnail($current_post, 'thumbnail'); } } } endwhile; endif; wp_reset_query(); global $current_post; global $redux_demo; $postTitleError = ''; $post_priceError = ''; $catError = ''; if(isset($_POST['submitted']) && isset($_POST['post_nonce_field']) && wp_verify_nonce($_POST['post_nonce_field'], 'post_nonce')) { if(trim($_POST['postTitle']) === '') { $postTitleError = 'Please enter a title.'; $hasError = true; } else { $postTitle = trim($_POST['postTitle']); } if(trim($_POST['cat']) === '-1') { $catError = 'Please select a category.'; $hasError = true; } if($hasError != true) { if(is_super_admin() ){ $beTubepostStatus = 'publish'; }elseif(!is_super_admin()){ if($redux_demo['post-options-edit-on'] == 1){ $beTubepostStatus = 'pending'; }else{ $beTubepostStatus = 'publish'; } } $mCatID = $_POST['cat']; $post_information = array( 'ID' => $current_post, 'post_title' => esc_attr(strip_tags($_POST['postTitle'])), 'post_content' => strip_tags($_POST['video-body'], '