PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.9
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.9
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / deprecated / admin / multiple-keywords-modal.php

multiple-keywords-modal.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.9, at src/deprecated/admin/multiple-keywords-modal.php

88 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO\Admin
6 */
7
8 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.
9
10 /**
11 * Class to print out the translatable strings for the Multiple Keywords modal.
12 *
13 * @deprecated 15.5
14 */
15 class WPSEO_Multiple_Keywords_Modal {
16
17 /**
18 * Returns the translations for the Multiple Keywords modal.
19 *
20 * These strings are not escaped because they're meant to be used with React
21 * which already takes care of that. If used in PHP, they should be escaped.
22 *
23 * @deprecated 15.5
24 * @codeCoverageIgnore
25 *
26 * @return array Translated text strings for the Multiple Keywords modal.
27 */
28 public function get_translations() {
29 _deprecated_function( __METHOD__, 'WPSEO 15.5' );
30
31 return [
32 'title' => __( 'Would you like to add another keyphrase?', 'wordpress-seo' ),
33 'intro' => sprintf(
34 /* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */
35 __( 'Great news: you can, with %s!', 'wordpress-seo' ),
36 '{{link}}Yoast SEO Premium{{/link}}'
37 ),
38 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ),
39 'other' => sprintf(
40 /* translators: %s expands to 'Yoast SEO Premium'. */
41 __( 'Other benefits of %s for you:', 'wordpress-seo' ),
42 'Yoast SEO Premium'
43 ),
44 'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ),
45 'buy' => sprintf(
46 /* translators: %s expands to 'Yoast SEO Premium'. */
47 __( 'Get %s', 'wordpress-seo' ),
48 'Yoast SEO Premium'
49 ),
50 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ),
51 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
52 ];
53 }
54
55 /**
56 * Passes translations to JS for the Multiple Keywords modal component.
57 *
58 * @deprecated 15.5
59 * @codeCoverageIgnore
60 *
61 * @return array Translated text strings for the Multiple Keywords modal component.
62 */
63 public function get_translations_for_js() {
64 _deprecated_function( __METHOD__, 'WPSEO 15.5' );
65
66 $translations = $this->get_translations();
67
68 return [
69 'locale' => get_user_locale(),
70 'intl' => $translations,
71 ];
72 }
73
74 /**
75 * Prints the localized Multiple Keywords modal translations for JS.
76 *
77 * @deprecated 15.5
78 * @codeCoverageIgnore
79 *
80 * @return void
81 */
82 public function enqueue_translations() {
83 _deprecated_function( __METHOD__, 'WPSEO 15.5' );
84
85 wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastMultipleKeywordsModalL10n', $this->get_translations_for_js() );
86 }
87 }
88