| @@ -65,9 +65,9 @@ | ||
| 65 | 65 | * |
| 66 | 66 | * @return mixed |
| 67 | 67 | */ |
| 68 | 68 | public function __call( $method, $arguments ) { |
| 69 | - _deprecated_function( $method, 'WPSEO 14.0' ); | |
| 69 | + _deprecated_function( $method, 'Yoast SEO 14.0' ); | |
| 70 | 70 | |
| 71 | 71 | $title_methods = [ |
| 72 | 72 | 'title', |
| 73 | 73 | 'fix_woo_title', |
| @@ -91,11 +91,9 @@ | ||
| 91 | 91 | * |
| 92 | 92 | * @return static The instance. |
| 93 | 93 | */ |
| 94 | 94 | public static function get_instance() { |
| 95 | - if ( is_null( self::$instance ) ) { | |
| 96 | - self::$instance = new self(); | |
| 97 | - } | |
| 95 | + self::$instance ??= new self(); | |
| 98 | 96 | |
| 99 | 97 | return self::$instance; |
| 100 | 98 | } |
| 101 | 99 | |
| @@ -108,12 +106,13 @@ | ||
| 108 | 106 | * |
| 109 | 107 | * @return string|void |
| 110 | 108 | */ |
| 111 | 109 | public function canonical( $echo = true, $un_paged = false, $no_override = false ) { |
| 112 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 110 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 113 | 111 | |
| 114 | 112 | $presentation = $this->get_current_page_presentation(); |
| 115 | 113 | $presenter = new Canonical_Presenter(); |
| 114 | + | |
| 116 | 115 | /** This filter is documented in src/integrations/front-end-integration.php */ |
| 117 | 116 | $presenter->presentation = $presentation; |
| 118 | 117 | $presenter->helpers = $this->helpers; |
| 119 | 118 | $presenter->replace_vars = $this->replace_vars; |
| @@ -130,9 +129,9 @@ | ||
| 130 | 129 | * |
| 131 | 130 | * @return string |
| 132 | 131 | */ |
| 133 | 132 | public function get_robots() { |
| 134 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 133 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 135 | 134 | |
| 136 | 135 | $presentation = $this->get_current_page_presentation(); |
| 137 | 136 | return $presentation->robots; |
| 138 | 137 | } |
| @@ -138,11 +137,13 @@ | ||
| 138 | 137 | } |
| 139 | 138 | |
| 140 | 139 | /** |
| 141 | 140 | * Outputs the meta robots value. |
| 141 | + * | |
| 142 | + * @return void | |
| 142 | 143 | */ |
| 143 | 144 | public function robots() { |
| 144 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 145 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 145 | 146 | |
| 146 | 147 | $presentation = $this->get_current_page_presentation(); |
| 147 | 148 | $presenter = new Robots_Presenter(); |
| 148 | 149 | $presenter->presentation = $presentation; |
| @@ -159,9 +160,9 @@ | ||
| 159 | 160 | * |
| 160 | 161 | * @return array |
| 161 | 162 | */ |
| 162 | 163 | public function robots_for_single_post( $robots, $post_id = 0 ) { |
| 163 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 164 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 164 | 165 | |
| 165 | 166 | $presentation = $this->get_current_page_presentation(); |
| 166 | 167 | |
| 167 | 168 | return $presentation->robots; |
| @@ -174,9 +175,9 @@ | ||
| 174 | 175 | * |
| 175 | 176 | * @return string The content title. |
| 176 | 177 | */ |
| 177 | 178 | private function get_title( $object = null ) { |
| 178 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 179 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 179 | 180 | |
| 180 | 181 | $presentation = $this->get_current_page_presentation(); |
| 181 | 182 | $title = $presentation->title; |
| 182 | 183 | |
| @@ -192,9 +193,9 @@ | ||
| 192 | 193 | * |
| 193 | 194 | * @return string |
| 194 | 195 | */ |
| 195 | 196 | public function add_paging_to_title( $sep, $seplocation, $title ) { |
| 196 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 197 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 197 | 198 | |
| 198 | 199 | return $title; |
| 199 | 200 | } |
| 200 | 201 | |
| @@ -208,9 +209,9 @@ | ||
| 208 | 209 | * |
| 209 | 210 | * @return string |
| 210 | 211 | */ |
| 211 | 212 | public function add_to_title( $sep, $seplocation, $title, $title_part ) { |
| 212 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 213 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 213 | 214 | |
| 214 | 215 | if ( $seplocation === 'right' ) { |
| 215 | 216 | return $title . $sep . $title_part; |
| 216 | 217 | } |
| @@ -221,11 +222,13 @@ | ||
| 221 | 222 | /** |
| 222 | 223 | * Adds 'prev' and 'next' links to archives. |
| 223 | 224 | * |
| 224 | 225 | * @link http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html |
| 226 | + * | |
| 227 | + * @return void | |
| 225 | 228 | */ |
| 226 | 229 | public function adjacent_rel_links() { |
| 227 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 230 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 228 | 231 | |
| 229 | 232 | $presentation = $this->get_current_page_presentation(); |
| 230 | 233 | |
| 231 | 234 | $rel_prev_presenter = new Rel_Prev_Presenter(); |
| @@ -248,9 +251,9 @@ | ||
| 248 | 251 | * |
| 249 | 252 | * @return string |
| 250 | 253 | */ |
| 251 | 254 | public function metadesc( $echo = true ) { |
| 252 | - _deprecated_function( __METHOD__, 'WPSEO 14.0' ); | |
| 255 | + _deprecated_function( __METHOD__, 'Yoast SEO 14.0' ); | |
| 253 | 256 | |
| 254 | 257 | $presentation = $this->get_current_page_presentation(); |
| 255 | 258 | $presenter = new Meta_Description_Presenter(); |
| 256 | 259 | $presenter->presentation = $presentation; |
| @@ -269,8 +272,9 @@ | ||
| 269 | 272 | * @return Indexable_Presentation The current page presentation. |
| 270 | 273 | */ |
| 271 | 274 | private function get_current_page_presentation() { |
| 272 | 275 | $context = $this->context_memoizer->for_current_page(); |
| 276 | + | |
| 273 | 277 | /** This filter is documented in src/integrations/front-end-integration.php */ |
| 274 | 278 | return apply_filters( 'wpseo_frontend_presentation', $context->presentation, $context ); |
| 275 | 279 | } |
| 276 | 280 | } |