PageRenderTime 26ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/broken-link-checker/modules/containers/dummy.php

https://bitbucket.org/lgorence/quickpress
PHP | 77 lines | 41 code | 9 blank | 27 comment | 0 complexity | 9ac7c3ec4213b956c7456f2820af2b6d MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, AGPL-1.0
  1. <?php
  2. /*
  3. Plugin Name: Dummy
  4. Description:
  5. Version: 1.0
  6. Author: Janis Elsts
  7. ModuleID: dummy
  8. ModuleCategory: container
  9. ModuleClassName: blcDummyManager
  10. ModuleAlwaysActive: true
  11. ModuleHidden: true
  12. */
  13. /**
  14. * A "dummy" container class that can be used as a fallback when the real container class can't be found.
  15. *
  16. *
  17. * @package Broken Link Checker
  18. * @access public
  19. */
  20. class blcDummyContainer extends blcContainer{
  21. function synch(){
  22. //Just mark it as synched so that it doesn't bother us anymore.
  23. $this->mark_as_synched();
  24. }
  25. function edit_link($field_name, $parser, $new_url, $old_url = '', $old_raw_url = ''){
  26. return new WP_Error(
  27. 'container_not_found',
  28. sprintf(
  29. __("I don't know how to edit a '%s' [%d].", 'broken-link-checker'),
  30. $this->container_type,
  31. $this->container_id
  32. )
  33. );
  34. }
  35. function unlink($field_name, $parser, $url, $raw_url =''){
  36. return new WP_Error(
  37. 'container_not_found',
  38. sprintf(
  39. __("I don't know how to edit a '%s' [%d].", 'broken-link-checker'),
  40. $this->container_type,
  41. $this->container_id
  42. )
  43. );
  44. }
  45. function ui_get_source($container_field, $context = 'display'){
  46. return sprintf(
  47. '<em>Unknown source %s[%d]:%s</em>',
  48. $this->container_type,
  49. $this->container_id,
  50. $container_field
  51. );
  52. }
  53. }
  54. /**
  55. * A dummy manager class.
  56. *
  57. * @package Broken Link Checker
  58. * @access public
  59. */
  60. class blcDummyManager extends blcContainerManager {
  61. var $container_class_name = 'blcDummyContainer';
  62. function resynch($forced = false){
  63. //Do nothing.
  64. }
  65. }
  66. ?>