Example #1
0
 /**
  * ContusMoreView constructor starts
  */
 public function __construct()
 {
     parent::__construct();
     global $wp_query;
     /**
      * Call plugin helper function
      * to get plugin settings
      * and more page id 
      * for more pages
      */
     $this->_settingsData = getPluginSettings();
     $this->_player_colors = unserialize($this->_settingsData->player_colors);
     $this->_recent_video_order = $this->_player_colors['recentvideo_order'];
     $this->_mPageid = morePageID();
     /**
      * Get video id , playlist id,
      * page number and userid
      * from request URL
      */
     $this->_vId = absint(filter_input(INPUT_GET, 'vid'));
     $this->_pagenum = absint(filter_input(INPUT_GET, 'pagenum'));
     $this->_playid =& $wp_query->query_vars['playid'];
     $this->_userid =& $wp_query->query_vars['userid'];
     /** Get search keyword */
     $searchVal = str_replace(' ', '%20', __('Video Search ...', APPTHA_VGALLERY));
     if (!empty($wp_query->query_vars) && isset($wp_query->query_vars['video_search'])) {
         $video_search = $wp_query->query_vars['video_search'];
         if ($video_search !== $searchVal) {
             $video_search = $video_search;
         } else {
             $video_search = '';
         }
         /** Get serach value */
         $this->_video_search = stripslashes(urldecode($video_search));
     }
     /**
      * Get row, column for more
      * videos from settings
      */
     $this->_rowF = $this->_settingsData->rowMore;
     $this->_colF = $this->_settingsData->colMore;
     $this->_perMore = $this->_rowF * $this->_colF;
     /**
      * Get row, column for category 
      * videos from settings
      * and calculate total values
      */
     $this->_colCat = $this->_settingsData->colCat;
     $this->_rowCat = $this->_settingsData->rowCat;
     $this->_perCat = $this->_colCat * $this->_rowCat;
     /**
      * Get plugin images directory path
      * and upload path 
      * from plugin helper
      */
     $this->_imagePath = getImagesDirURL();
 }
Example #2
0
 public function __construct()
 {
     // contructor starts
     parent::__construct();
     global $wp_query;
     $video_search = '';
     $this->_settingsData = $this->settings_data();
     // Get player settings
     $this->_mPageid = $this->more_pageid();
     // Get more page id
     $this->_feaMore = $this->video_count();
     // Get featured videos count
     $this->_vId = absint(filter_input(INPUT_GET, 'vid'));
     // Get vid from URL
     $this->_pagenum = absint(filter_input(INPUT_GET, 'pagenum'));
     // Get current page number
     $this->_playid =& $wp_query->query_vars['playid'];
     $this->_userid =& $wp_query->query_vars['userid'];
     // Get pid from URL
     $this->_viewslang = __('Views', 'video_gallery');
     $this->_viewlang = __('View', 'video_gallery');
     // Get search keyword
     $searchVal = str_replace(' ', '%20', __('Video Search ...', 'video_gallery'));
     if (isset($wp_query->query_vars['video_search']) && $wp_query->query_vars['video_search'] !== $searchVal) {
         $video_search = $wp_query->query_vars['video_search'];
     }
     $this->_video_search = stripslashes(urldecode($video_search));
     $this->_showF = 5;
     $this->_colF = $this->_settingsData->colMore;
     // get row of more page
     $this->_colCat = $this->_settingsData->colCat;
     // get column of more page
     $this->_rowCat = $this->_settingsData->rowCat;
     // get row of category videos
     $this->_perCat = $this->_colCat * $this->_rowCat;
     // get column of category videos
     $dir = dirname(plugin_basename(__FILE__));
     $dirExp = explode('/', $dir);
     $this->_folder = $dirExp[0];
     // Get plugin folder name
     $this->_site_url = get_site_url();
     // Get base url
     $this->_imagePath = APPTHA_VGALLERY_BASEURL . 'images' . DS;
     // Declare image path
 }