diff --git a/wp-content/themes/score/lib/inc/fetch-video-data.php b/wp-content/themes/score/lib/inc/fetch-video-data.php index 5a8b6f8..e230973 100644 --- a/wp-content/themes/score/lib/inc/fetch-video-data.php +++ b/wp-content/themes/score/lib/inc/fetch-video-data.php @@ -18,6 +18,7 @@ add_action('wp_print_scripts', 'gp_enqueue_ajax_scripts'); function gp_ajax_video_data() { global $gp_settings, $post, $current_user, $bp; + get_currentuserinfo(); $nonce = $_POST['postCommentNonce']; if ( ! wp_verify_nonce( $nonce, 'myajax-post-comment-nonce' ) ) @@ -50,10 +51,10 @@ function gp_ajax_video_data() { } $array = array(); $i = 0; - - $video = new WP_Query($args); - while ($video->have_posts()) { - $video->the_post(); + + $listavideos = new WP_Query($args); + while ($listavideos->have_posts()) { + $listavideos->the_post(); require(dirname(__FILE__).'/../../loop-dedication-data.php'); // Perfil del usuario: sólo mostrar las dedicadas por él y para él. El resto se descartan.