Beispiel #1
0
 /**
  * Use the "new" post data with the old video data, to prevent the need for an external video
  * API call when the video hasn't changed.
  *
  * Match whether old data can be used on video id or on video url if id is not available
  *
  * @param string $match_on  Array key to use in the $vid array to determine whether or not to use the old data
  *                          Defaults to 'url' for this implementation.
  *
  * @return bool  Whether or not valid old data was found (and used)
  */
 protected function maybe_use_old_video_data($match_on = 'url')
 {
     if (isset($this->old_vid['id']) && isset($this->vid['id']) && $this->old_vid['id'] == $this->vid['id']) {
         $match_on = 'id';
     }
     return parent::maybe_use_old_video_data($match_on);
 }
 /**
  * Use the "new" post data with the old video data, to prevent the need for an external video
  * API call when the video hasn't changed.
  *
  * Match whether old data can be used on url rather than video id
  *
  * @param string $match_on  Array key to use in the $vid array to determine whether or not to use the old data
  *                          Defaults to 'url' for this implementation.
  *
  * @return bool  Whether or not valid old data was found (and used)
  */
 protected function maybe_use_old_video_data($match_on = 'id')
 {
     if ($this->id_regex !== '') {
         return parent::maybe_use_old_video_data($match_on);
     } else {
         return parent::maybe_use_old_video_data('url');
     }
 }
Beispiel #3
0
 /**
  * Use the "new" post data with the old video data, to prevent the need for an external video
  * API call when the video hasn't changed.
  *
  * Match whether old data can be used on url rather than video id
  *
  * @param string $match_on  Array key to use in the $vid array to determine whether or not to use the old data
  *                          Defaults to 'url' for this implementation.
  *
  * @return bool  Whether or not valid old data was found (and used)
  */
 protected function maybe_use_old_video_data($match_on = 'url')
 {
     return parent::maybe_use_old_video_data($match_on);
 }