| @@ -4,8 +4,10 @@ | ||
| 4 | 4 | * |
| 5 | 5 | * @package WPSEO\Admin\Menu |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | +use Yoast\WP\SEO\Promotions\Application\Promotion_Manager; | |
| 9 | + | |
| 8 | 10 | /** |
| 9 | 11 | * Admin menu base class. |
| 10 | 12 | */ |
| 11 | 13 | abstract class WPSEO_Base_Menu implements WPSEO_WordPress_Integration { |
| @@ -236,8 +238,30 @@ | ||
| 236 | 238 | * @return array Callback page handler. |
| 237 | 239 | */ |
| 238 | 240 | protected function get_admin_page_callback() { |
| 239 | 241 | return [ $this->menu, 'load_page' ]; |
| 242 | + } | |
| 243 | + | |
| 244 | + /** | |
| 245 | + * Returns the page title to use for the licenses page. | |
| 246 | + * | |
| 247 | + * @deprecated 25.5 | |
| 248 | + * @codeCoverageIgnore | |
| 249 | + * | |
| 250 | + * @return string The title for the license page. | |
| 251 | + */ | |
| 252 | + protected function get_license_page_title() { | |
| 253 | + static $title = null; | |
| 254 | + | |
| 255 | + _deprecated_function( __METHOD__, 'Yoast SEO 25.5' ); | |
| 256 | + | |
| 257 | + $title ??= __( 'Upgrades', 'wordpress-seo' ); | |
| 258 | + | |
| 259 | + if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-promotion' ) && ! YoastSEO()->helpers->product->is_premium() ) { | |
| 260 | + $title = __( 'Upgrades', 'wordpress-seo' ) . '<span class="yoast-menu-bf-sale-badge">' . __( '30% OFF', 'wordpress-seo' ) . '</span>'; | |
| 261 | + } | |
| 262 | + | |
| 263 | + return $title; | |
| 240 | 264 | } |
| 241 | 265 | |
| 242 | 266 | /** |
| 243 | 267 | * Returns a base64 URL for the svg for use in the menu. |