PageRenderTime 74ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/broken-link-checker/modules/extras/googlevideo-embed.php

https://bitbucket.org/lgorence/quickpress
PHP | 35 lines | 17 code | 5 blank | 13 comment | 1 complexity | 848bee85080841ec1a2d87806c4d4a87 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, AGPL-1.0
  1. <?php
  2. /*
  3. Plugin Name: Embedded GoogleVideo videos
  4. Description: Parse embedded videos from GoogleVideo
  5. Version: 1.0
  6. Author: Janis Elsts
  7. ModuleCategory: parser
  8. ModuleClassName: blcGoogleVideoEmbed
  9. ModuleContext: on-demand
  10. ModuleLazyInit: true
  11. ModulePriority: 110
  12. */
  13. if ( !class_exists('blcEmbedParserBase') ){
  14. require 'embed-parser-base.php';
  15. }
  16. class blcGoogleVideoEmbed extends blcEmbedParserBase {
  17. function init(){
  18. parent::init();
  19. $this->short_title = __('GoogleVideo Video', 'broken-link-checker');
  20. $this->long_title = __('Embedded GoogleVideo video', 'broken-link-checker');
  21. $this->url_search_string = 'video.google.com/';
  22. }
  23. function link_url_from_src($src){
  24. parse_str(parse_url($src, PHP_URL_QUERY), $query);
  25. $url = 'http://video.google.com/videoplay?' . build_query(array('docid' => $query['docid']));
  26. return $url;
  27. }
  28. }