PageRenderTime 47ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/lgorence/quickpress
PHP | 39 lines | 18 code | 6 blank | 15 comment | 1 complexity | 6ce6fdfc2431c5a31787c941b3b285cc MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, AGPL-1.0
  1. <?php
  2. /*
  3. Plugin Name: Embedded Megavideo videos
  4. Description: Parse embedded videos from Megavideo
  5. Version: 1.0
  6. Author: Janis Elsts
  7. ModuleCategory: parser
  8. ModuleClassName: blcMegavideoEmbed
  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 blcMegavideoEmbed extends blcEmbedParserBase {
  17. function init(){
  18. parent::init();
  19. $this->short_title = __('Megavideo Video', 'broken-link-checker');
  20. $this->long_title = __('Embedded Megavideo video', 'broken-link-checker');
  21. $this->url_search_string = 'megavideo.com/v/';
  22. }
  23. function link_url_from_src($src){
  24. //It doesn't really matter what URL we use here, since Megavideo has been
  25. //taken down and all URLs will fail anyway.
  26. return $src;
  27. }
  28. function ui_get_link_text($instance, $context = 'display'){
  29. return '[' . $this->short_title . ']';
  30. }
  31. }