WPSEO_Snippet_Preview

Class WPSEO_Snippet_Preview.

Defined (1)

The class is defined in the following location(s).

/deprecated/class-snippet-preview.php  
  1. class WPSEO_Snippet_Preview { 
  2. /** 
  3. * @var string 
  4. * @deprecated 3.0 Removed, use javscript instead. 
  5. */ 
  6. protected $content; 
  7.  
  8. /** 
  9. * @var array The WPSEO options. 
  10. * @deprecated 3.0 Removed, use javascript instead. 
  11. */ 
  12. protected $options; 
  13.  
  14. /** 
  15. * @var object The post for which we want to generate the snippet preview. 
  16. * @deprecated 3.0 Removed, use javascript instead. 
  17. */ 
  18. protected $post; 
  19.  
  20. /** 
  21. * @var string The title that is shown in the snippet. 
  22. * @deprecated 3.0 Removed, use javascript instead. 
  23. */ 
  24. protected $title; 
  25.  
  26. /** 
  27. * @var string The description that is shown in the snippet. 
  28. * @deprecated 3.0 Removed, use javascript instead. 
  29. */ 
  30. protected $description; 
  31.  
  32. /** 
  33. * @var string The date that is shown at the beginning of the description in the snippet. 
  34. * @deprecated 3.0 Removed, use javascript instead. 
  35. */ 
  36. protected $date = ''; 
  37.  
  38. /** 
  39. * @var string The url that is shown in the snippet. 
  40. * @deprecated 3.0 Removed, use javascript instead. 
  41. */ 
  42. protected $url = ''; 
  43.  
  44. /** 
  45. * @var string The slug of the url that is shown in the snippet. 
  46. * @deprecated 3.0 Removed, use javascript instead. 
  47. */ 
  48. protected $slug = ''; 
  49.  
  50. /** 
  51. * Generates the html for the snippet preview containing dynamically generated text components. 
  52. * Those components are included as properties which are set in the constructor. 
  53. * @param WP_Post $post Post instance. 
  54. * @param string $title Title string. 
  55. * @param string $description Description string. 
  56. * @deprecated 3.0 Removed, use javascript instead. 
  57. */ 
  58. public function __construct( $post, $title, $description ) { 
  59. _deprecated_constructor( __CLASS__, 'WPSEO 3.0' ); 
  60.  
  61. /** 
  62. * Getter for $this->content 
  63. * @return string html for snippet preview 
  64. * @deprecated 3.0 Removed, use javascript instead. 
  65. */ 
  66. public function get_content() { 
  67. _deprecated_function( __METHOD__, 'WPSEO 3.0', __( 'Use javascript instead.', 'wordpress-seo' ) ); 
  68. return $this->content; 
  69.  
  70. /** 
  71. * Sets date if available 
  72. * @deprecated 3.0 Removed, use javascript instead. 
  73. */ 
  74. protected function set_date() { 
  75. _deprecated_function( __METHOD__, 'WPSEO 3.0', __( 'Use javascript instead.', 'wordpress-seo' ) ); 
  76.  
  77. /** 
  78. * Retrieves a post date when post is published, or return current date when it's not. 
  79. * @return string 
  80. * @deprecated 3.0 Removed, use javascript instead. 
  81. */ 
  82. protected function get_post_date() { 
  83. _deprecated_function( __METHOD__, 'WPSEO 3.0', __( 'Use javascript instead.', 'wordpress-seo' ) ); 
  84. return ''; 
  85.  
  86. /** 
  87. * Generates the url that is displayed in the snippet preview. 
  88. * @deprecated 3.0 Removed, use javascript instead. 
  89. */ 
  90. protected function set_url() { 
  91. _deprecated_function( __METHOD__, 'WPSEO 3.0', __( 'Use javascript instead.', 'wordpress-seo' ) ); 
  92.  
  93. /** 
  94. * Sets the slug and adds it to the url if the post has been published and the post name exists. 
  95. * If the post is set to be the homepage the slug is also not included. 
  96. * @deprecated 3.0 Removed, use javascript instead. 
  97. */ 
  98. protected function set_slug() { 
  99. _deprecated_function( __METHOD__, 'WPSEO 3.0', __( 'Use javascript instead.', 'wordpress-seo' ) ); 
  100.  
  101. /** 
  102. * Generates the html for the snippet preview and assign it to $this->content. 
  103. * @deprecated 3.0 Removed, use javascript instead. 
  104. */ 
  105. protected function set_content() { 
  106. _deprecated_function( __METHOD__, 'WPSEO 3.0', __( 'Use javascript instead.', 'wordpress-seo' ) ); 
  107.  
  108. /** 
  109. * Sets the html for the snippet preview through a filter 
  110. * @param string $content Content string. 
  111. * @deprecated 3.0 Removed, use javascript instead. 
  112. */ 
  113. protected function set_content_through_filter( $content ) { 
  114. _deprecated_function( __METHOD__, 'WPSEO 3.0', __( 'Use javascript instead.', 'wordpress-seo' ) );