/** * Function to display Plugin more page */ function video_morereplace($arguments = array()) { global $videomoreControllerFile, $wp_query, $frontControllerPath, $frontModelPath, $frontViewPath; /** Get playlist id from param */ $playid = filter_input(INPUT_GET, 'playid'); /** Get more name from param */ $more =& $wp_query->query_vars['more']; /** Get playlist name from param */ $playlist_name =& $wp_query->query_vars['playlist_name']; /** Check playlist name is exist */ if (!empty($playlist_name)) { /** Get playlist id */ $playid = get_playlist_id($playlist_name); } /** Set playlist id into query */ $wp_query->query_vars['playid'] = $playid; /** Get user id from param */ $userid = filter_input(INPUT_GET, 'userid'); /** Get user name from param */ $user_name =& $wp_query->query_vars['user_name']; $user_name = str_replace('%20', ' ', $user_name); /** Check user name is exist */ if (!empty($user_name)) { /** Get user id for the given user name*/ $userid = get_user_id($user_name); } /** Set user id into query */ $wp_query->query_vars['userid'] = $userid; /** Include videomore controller and create object for view */ include_once $videomoreControllerFile; $videoOBJ = new ContusMorePageView(); /** Set more page name as cat if playlist id exists */ if (!empty($playid)) { $more = 'cat'; } /** Set more page name as user if user id exists */ if (!empty($userid)) { $more = 'user'; } /** Set more page name as categories if all-category exists */ if ($more == 'all-category') { $more = 'categories'; } /** Get video search param */ $video_search =& $wp_query->query_vars['video_search']; /** Set more page name as search if video search exists */ if (!empty($video_search)) { $more = 'search'; } /** Get video tags param */ $videotag =& $wp_query->query_vars['video_tag']; /** Set more page name as tag if video tags exists */ if (!empty($videotag)) { $more = 'tag'; } /** Call function to display more videos page */ return $videoOBJ->video_more_pages($more, $arguments); }
/** * Function to display Plugin more page */ function video_morereplace() { global $frontControllerPath, $frontModelPath, $frontViewPath, $wp_query; $playid = filter_input(INPUT_GET, 'playid'); $more =& $wp_query->query_vars['more']; $playlist_name =& $wp_query->query_vars['playlist_name']; if (!empty($playlist_name)) { $playid = get_playlist_id($playlist_name); } $wp_query->query_vars['playid'] = $playid; $userid = filter_input(INPUT_GET, 'userid'); $user_name =& $wp_query->query_vars['user_name']; $user_name = str_replace('%20', ' ', $user_name); if (!empty($user_name)) { $userid = get_user_id($user_name); } $wp_query->query_vars['userid'] = $userid; include_once $frontControllerPath . 'videomoreController.php'; $videoOBJ = new ContusMoreView(); if (!empty($playid)) { $more = 'cat'; } if (!empty($userid)) { $more = 'user'; } $video_search =& $wp_query->query_vars['video_search']; if (!empty($video_search)) { $more = 'search'; } $videotag =& $wp_query->query_vars['video_tag']; if (!empty($videotag)) { $more = 'tag'; } $contentvideoPlayer = $videoOBJ->video_more_pages($more); return $contentvideoPlayer; }