Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
languages
/
File Content:
class-metabox-formatter.php
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Formatter */ use Yoast\WP\SEO\Config\Schema_Types; use Yoast\WP\SEO\Config\SEMrush_Client; use Yoast\WP\SEO\Exceptions\OAuth\Authentication_Failed_Exception; use Yoast\WP\SEO\Exceptions\SEMrush\Tokens\Empty_Property_Exception; use Yoast\WP\SEO\Exceptions\SEMrush\Tokens\Empty_Token_Exception; /** * This class forces needed methods for the metabox localization. */ class WPSEO_Metabox_Formatter { /** * Object that provides formatted values. * * @var WPSEO_Metabox_Formatter_Interface */ private $formatter; /** * Setting the formatter property. * * @param WPSEO_Metabox_Formatter_Interface $formatter Object that provides the formatted values. */ public function __construct( WPSEO_Metabox_Formatter_Interface $formatter ) { $this->formatter = $formatter; } /** * Returns the values. * * @return array */ public function get_values() { $defaults = $this->get_defaults(); $values = $this->formatter->get_values(); return ( $values + $defaults ); } /** * Returns array with all the values always needed by a scraper object. * * @return array Default settings for the metabox. */ private function get_defaults() { $analysis_seo = new WPSEO_Metabox_Analysis_SEO(); $analysis_readability = new WPSEO_Metabox_Analysis_Readability(); $schema_types = new Schema_Types(); return [ 'author_name' => get_the_author_meta( 'display_name' ), 'site_name' => get_bloginfo( 'name' ), 'sitewide_social_image' => WPSEO_Options::get( 'og_default_image' ), 'search_url' => '', 'post_edit_url' => '', 'base_url' => '', 'contentTab' => __( 'Readability', 'wordpress-seo' ), 'keywordTab' => __( 'Keyphrase:', 'wordpress-seo' ), 'removeKeyword' => __( 'Remove keyphrase', 'wordpress-seo' ), 'contentLocale' => get_locale(), 'userLocale' => \get_user_locale(), 'translations' => $this->get_translations(), 'keyword_usage' => [], 'title_template' => '', 'metadesc_template' => '', 'contentAnalysisActive' => $analysis_readability->is_enabled() ? 1 : 0, 'keywordAnalysisActive' => $analysis_seo->is_enabled() ? 1 : 0, 'cornerstoneActive' => WPSEO_Options::get( 'enable_cornerstone_content', false ) ? 1 : 0, 'semrushIntegrationActive' => WPSEO_Options::get( 'semrush_integration_active', true ) ? 1 : 0, 'intl' => $this->get_content_analysis_component_translations(), 'isRtl' => is_rtl(), 'isPremium' => YoastSEO()->helpers->product->is_premium(), 'wordFormRecognitionActive' => YoastSEO()->helpers->language->is_word_form_recognition_active( WPSEO_Language_Utils::get_language( get_locale() ) ), 'siteIconUrl' => get_site_icon_url(), 'countryCode' => WPSEO_Options::get( 'semrush_country_code', false ), 'SEMrushLoginStatus' => WPSEO_Options::get( 'semrush_integration_active', true ) ? $this->get_semrush_login_status() : false, 'showSocial' => [ 'facebook' => WPSEO_Options::get( 'opengraph', false ), 'twitter' => WPSEO_Options::get( 'twitter', false ), ], 'schema' => [ 'displayFooter' => WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ), 'pageTypeOptions' => $schema_types->get_page_type_options(), 'articleTypeOptions' => $schema_types->get_article_type_options(), ], 'twitterCardType' => YoastSEO()->helpers->options->get( 'twitter_card_type' ), /** * Filter to determine if the markers should be enabled or not. * * @param bool $showMarkers Should the markers being enabled. Default = true. */ 'show_markers' => apply_filters( 'wpseo_enable_assessment_markers', true ), 'publish_box' => [ 'labels' => [ 'content' => [ 'na' => sprintf( /* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */ __( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ), '<a href="#yoast-readability-analysis-collapsible-metabox">', '</a>', '<strong>' . __( 'Not available', 'wordpress-seo' ) . '</strong>' ), 'bad' => sprintf( /* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */ __( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ), '<a href="#yoast-readability-analysis-collapsible-metabox">', '</a>', '<strong>' . __( 'Needs improvement', 'wordpress-seo' ) . '</strong>' ), 'ok' => sprintf( /* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */ __( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ), '<a href="#yoast-readability-analysis-collapsible-metabox">', '</a>', '<strong>' . __( 'OK', 'wordpress-seo' ) . '</strong>' ), 'good' => sprintf( /* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */ __( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ), '<a href="#yoast-readability-analysis-collapsible-metabox">', '</a>', '<strong>' . __( 'Good', 'wordpress-seo' ) . '</strong>' ), ], 'keyword' => [ 'na' => sprintf( /* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */ __( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ), '<a href="#yoast-seo-analysis-collapsible-metabox">', '</a>', '<strong>' . __( 'Not available', 'wordpress-seo' ) . '</strong>' ), 'bad' => sprintf( /* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */ __( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ), '<a href="#yoast-seo-analysis-collapsible-metabox">', '</a>', '<strong>' . __( 'Needs improvement', 'wordpress-seo' ) . '</strong>' ), 'ok' => sprintf( /* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */ __( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ), '<a href="#yoast-seo-analysis-collapsible-metabox">', '</a>', '<strong>' . __( 'OK', 'wordpress-seo' ) . '</strong>' ), 'good' => sprintf( /* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */ __( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ), '<a href="#yoast-seo-analysis-collapsible-metabox">', '</a>', '<strong>' . __( 'Good', 'wordpress-seo' ) . '</strong>' ), ], ], ], 'markdownEnabled' => $this->is_markdown_enabled(), 'analysisHeadingTitle' => __( 'Analysis', 'wordpress-seo' ), 'zapierIntegrationActive' => WPSEO_Options::get( 'zapier_integration_active', false ) ? 1 : 0, 'zapierConnectedStatus' => ! empty( WPSEO_Options::get( 'zapier_subscription', [] ) ) ? 1 : 0, /** * Filter to determine whether the PreviouslyUsedKeyword assessment should run. * * @param bool $previouslyUsedKeywordActive Whether the PreviouslyUsedKeyword assessment should run. */ 'previouslyUsedKeywordActive' => apply_filters( 'wpseo_previously_used_keyword_active', true ), ]; } /** * Returns required yoast-component translations. * * @return array */ private function get_content_analysis_component_translations() { // Esc_html is not needed because React already handles HTML in the (translations of) these strings. return [ 'locale' => \get_user_locale(), 'content-analysis.errors' => __( 'Errors', 'wordpress-seo' ), 'content-analysis.problems' => __( 'Problems', 'wordpress-seo' ), 'content-analysis.improvements' => __( 'Improvements', 'wordpress-seo' ), 'content-analysis.considerations' => __( 'Considerations', 'wordpress-seo' ), 'content-analysis.good' => __( 'Good results', 'wordpress-seo' ), 'content-analysis.highlight' => __( 'Highlight this result in the text', 'wordpress-seo' ), 'content-analysis.nohighlight' => __( 'Remove highlight from the text', 'wordpress-seo' ), 'content-analysis.disabledButton' => __( 'Marks are disabled in current view', 'wordpress-seo' ), 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ), ]; } /** * Returns Jed compatible YoastSEO.js translations. * * @return array */ private function get_translations() { $locale = \get_user_locale(); $file = WPSEO_PATH . 'languages/wordpress-seo-' . $locale . '.json'; if ( file_exists( $file ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents -- Retrieving a local file. $file = file_get_contents( $file ); if ( is_string( $file ) && $file !== '' ) { return json_decode( $file, true ); } } return []; } /** * Checks if Jetpack's markdown module is enabled. * Can be extended to work with other plugins that parse markdown in the content. * * @return bool */ private function is_markdown_enabled() { $is_markdown = false; if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'get_active_modules' ) ) { $active_modules = Jetpack::get_active_modules(); // First at all, check if Jetpack's markdown module is active. $is_markdown = in_array( 'markdown', $active_modules, true ); } /** * Filters whether markdown support is active in the readability- and seo-analysis. * * @since 11.3 * * @param array $is_markdown Is markdown support for Yoast SEO active. */ return apply_filters( 'wpseo_is_markdown_enabled', $is_markdown ); } /** * Checks if the user is logged in to SEMrush. * * @return bool The SEMrush login status. */ private function get_semrush_login_status() { try { $semrush_client = YoastSEO()->classes->get( SEMrush_Client::class ); } catch ( Empty_Property_Exception $e ) { // Return false if token is malformed (empty property). return false; } // Get token (and refresh it if it's expired). try { $semrush_client->get_tokens(); } catch ( Authentication_Failed_Exception $e ) { return false; } catch ( Empty_Token_Exception $e ) { return false; } return $semrush_client->has_valid_tokens(); } /* ********************* DEPRECATED METHODS ********************* */ /** * Returns the translations for the Add Keyword modal. * * These strings are not escaped because they're meant to be used with React * which already takes care of that. If used in PHP, they should be escaped. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Add Keyword modal. */ public function get_add_keyword_upsell_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' ); return [ 'title' => __( 'Would you like to add more than one keyphrase?', 'wordpress-seo' ), 'intro' => sprintf( /* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */ __( 'Great news: you can, with %s!', 'wordpress-seo' ), '{{link}}Yoast SEO Premium{{/link}}' ), 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ), 'other' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Other benefits of %s for you:', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ), 'buy' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ), 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ), ]; } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
.DS_Store
10234 bytes
0644
AjaxController.php
2162 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream-20260707002235.php
4209 bytes
0644
LimitStream.php
4209 bytes
0644
admin-network-it_IT.l10n.php
42133 bytes
0644
base.php
2793 bytes
0644
class-admin-utils-20260622095013.php
2147 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-metabox-null-tab.php
425 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
deactivation.php
21118 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260705194237.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget.php
11167 bytes
0644
image-helper.php
10231 bytes
0644
inc.data.php
5121 bytes
0644
inc.validator.php
5401 bytes
0644
index.php
157663 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
module.php
1297 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
uninstall.php
4401 bytes
0644
wordpress-seo-ar.json
42244 bytes
0644
wordpress-seo-bg_BG.json
13260 bytes
0644
wordpress-seo-bs_BA.json
13069 bytes
0644
wordpress-seo-ca.json
25222 bytes
0644
wordpress-seo-cs_CZ.json
27104 bytes
0644
wordpress-seo-da_DK.json
24011 bytes
0644
wordpress-seo-de_DE.json
25614 bytes
0644
wordpress-seo-el.json
32877 bytes
0644
wordpress-seo-en_AU.json
23728 bytes
0644
wordpress-seo-en_CA.json
23727 bytes
0644
wordpress-seo-en_GB.json
23888 bytes
0644
wordpress-seo-en_NZ.json
22134 bytes
0644
wordpress-seo-en_ZA.json
23885 bytes
0644
wordpress-seo-es_AR.json
25263 bytes
0644
wordpress-seo-es_CR.json
23684 bytes
0644
wordpress-seo-es_EC.json
25577 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seo-es_MX.json
25671 bytes
0644
wordpress-seo-es_PE.json
23709 bytes
0644
wordpress-seo-es_VE.json
25610 bytes
0644
wordpress-seo-fa_IR.json
29338 bytes
0644
wordpress-seo-fi.json
24119 bytes
0644
wordpress-seo-fr_BE.json
25325 bytes
0644
wordpress-seo-fr_CA.json
24845 bytes
0644
wordpress-seo-fr_FR.json
25828 bytes
0644
wordpress-seo-gl_ES.json
25051 bytes
0644
wordpress-seo-he_IL.json
28080 bytes
0644
wordpress-seo-hi_IN.json
38703 bytes
0644
wordpress-seo-hr.json
17420 bytes
0644
wordpress-seo-hu_HU.json
25553 bytes
0644
wordpress-seo-id_ID.json
24676 bytes
0644
wordpress-seo-it_IT.json
25925 bytes
0644
wordpress-seo-ja.json
25482 bytes
0644
wordpress-seo-ko_KR.json
13325 bytes
0644
wordpress-seo-lt_LT.json
12225 bytes
0644
wordpress-seo-nb_NO-20260703214724.json
24061 bytes
0644
wordpress-seo-nb_NO.json
24061 bytes
0644
wordpress-seo-nl_BE.json
24801 bytes
0644
wordpress-seo-nl_NL.json
24803 bytes
0644
wordpress-seo-pl_PL.json
26936 bytes
0644
wordpress-seo-pt_AO.json
13650 bytes
0644
wordpress-seo-pt_BR.json
24890 bytes
0644
wordpress-seo-ro_RO.json
27336 bytes
0644
wordpress-seo-ru_RU.json
37718 bytes
0644
wordpress-seo-sk_SK.json
26126 bytes
0644
wordpress-seo-sr_RS.json
35111 bytes
0644
wordpress-seo-sv_SE.json
25302 bytes
0644
wordpress-seo-tr_TR-20260704110924.json
25170 bytes
0644
wordpress-seo-tr_TR.json
25170 bytes
0644
wordpress-seo-uk.json
36802 bytes
0644
wordpress-seo-vi.json
25176 bytes
0644
wordpress-seo-zh_CN.json
20687 bytes
0644
wordpress-seo-zh_TW.json
17270 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bg_BG.json
12915 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-ca.json
20461 bytes
0644
wordpress-seojs-cs_CZ.json
20179 bytes
0644
wordpress-seojs-da_DK.json
19185 bytes
0644
wordpress-seojs-el.json
26250 bytes
0644
wordpress-seojs-en_AU.json
18578 bytes
0644
wordpress-seojs-en_CA.json
18586 bytes
0644
wordpress-seojs-en_GB.json
18745 bytes
0644
wordpress-seojs-en_NZ.json
13599 bytes
0644
wordpress-seojs-en_ZA.json
18735 bytes
0644
wordpress-seojs-es_AR.json
20375 bytes
0644
wordpress-seojs-es_CR.json
14212 bytes
0644
wordpress-seojs-es_EC.json
20572 bytes
0644
wordpress-seojs-es_ES.json
20568 bytes
0644
wordpress-seojs-es_MX.json
20442 bytes
0644
wordpress-seojs-es_PE.json
15220 bytes
0644
wordpress-seojs-es_VE.json
20572 bytes
0644
wordpress-seojs-fa_IR.json
24968 bytes
0644
wordpress-seojs-fi.json
19387 bytes
0644
wordpress-seojs-fr_BE.json
20526 bytes
0644
wordpress-seojs-fr_CA.json
20227 bytes
0644
wordpress-seojs-fr_FR.json
20864 bytes
0644
wordpress-seojs-gl_ES.json
20143 bytes
0644
wordpress-seojs-he_IL.json
22003 bytes
0644
wordpress-seojs-hi_IN.json
32531 bytes
0644
wordpress-seojs-hr.json
17910 bytes
0644
wordpress-seojs-hu_HU.json
20382 bytes
0644
wordpress-seojs-id_ID.json
19633 bytes
0644
wordpress-seojs-it_IT.json
20244 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-ko_KR.json
15129 bytes
0644
wordpress-seojs-lt_LT.json
15127 bytes
0644
wordpress-seojs-nb_NO.json
19172 bytes
0644
wordpress-seojs-nl_BE.json
19731 bytes
0644
wordpress-seojs-nl_NL.json
19772 bytes
0644
wordpress-seojs-pl_PL.json
19913 bytes
0644
wordpress-seojs-pt_BR.json
19800 bytes
0644
wordpress-seojs-pt_PT-20260702182201.json
19983 bytes
0644
wordpress-seojs-pt_PT.json
19983 bytes
0644
wordpress-seojs-ro_RO.json
20716 bytes
0644
wordpress-seojs-ru_RU.json
27585 bytes
0644
wordpress-seojs-sk_SK.json
16796 bytes
0644
wordpress-seojs-sr_RS.json
25852 bytes
0644
wordpress-seojs-sv_SE.json
19011 bytes
0644
wordpress-seojs-tr_TR.json
20226 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
wordpress-seojs-vi.json
22210 bytes
0644
wordpress-seojs-zh_CN.json
17392 bytes
0644
wordpress-seojs-zh_TW.json
12586 bytes
0644
wordpress-seojs.json
10444 bytes
0644
wordpress-seojs.php
38479 bytes
0644
yoast-components-ar.json
7805 bytes
0644
yoast-components-bg_BG.json
6559 bytes
0644
yoast-components-bs_BA.json
5339 bytes
0644
yoast-components-ca.json
6729 bytes
0644
yoast-components-cs_CZ.json
6593 bytes
0644
yoast-components-da_DK.json
6327 bytes
0644
yoast-components-de_DE.json
6799 bytes
0644
yoast-components-el.json
8688 bytes
0644
yoast-components-en_AU.json
6127 bytes
0644
yoast-components-en_CA.json
6204 bytes
0644
yoast-components-en_GB.json
6209 bytes
0644
yoast-components-en_NZ.json
5351 bytes
0644
yoast-components-en_ZA.json
6203 bytes
0644
yoast-components-es_AR.json
6592 bytes
0644
yoast-components-es_CR.json
5649 bytes
0644
yoast-components-es_EC.json
6718 bytes
0644
yoast-components-es_ES.json
6707 bytes
0644
yoast-components-es_PE.json
5413 bytes
0644
yoast-components-es_VE.json
6695 bytes
0644
yoast-components-fa_IR.json
7935 bytes
0644
yoast-components-fi.json
6303 bytes
0644
yoast-components-fr_BE.json
6683 bytes
0644
yoast-components-fr_CA.json
6784 bytes
0644
yoast-components-fr_FR.json
6896 bytes
0644
yoast-components-gl_ES.json
6630 bytes
0644
yoast-components-he_IL.json
6988 bytes
0644
yoast-components-hi_IN.json
10186 bytes
0644
yoast-components-hr.json
6449 bytes
0644
yoast-components-hu_HU.json
6595 bytes
0644
yoast-components-id_ID.json
6257 bytes
0644
yoast-components-it_IT.json
6765 bytes
0644
yoast-components-ja.json
7277 bytes
0644
yoast-components-ko_KR.json
5244 bytes
0644
yoast-components-lt_LT.json
4404 bytes
0644
yoast-components-nb_NO.json
6368 bytes
0644
yoast-components-nl_BE.json
6622 bytes
0644
yoast-components-nl_NL.json
6615 bytes
0644
yoast-components-pl_PL.json
6524 bytes
0644
yoast-components-pt_AO.json
4955 bytes
0644
yoast-components-pt_BR.json
6473 bytes
0644
yoast-components-pt_PT.json
6422 bytes
0644
yoast-components-ro_RO.json
6863 bytes
0644
yoast-components-ru_RU.json
9223 bytes
0644
yoast-components-sk_SK.json
5925 bytes
0644
yoast-components-sr_RS.json
8062 bytes
0644
yoast-components-sv_SE.json
6538 bytes
0644
yoast-components-tr_TR.json
6500 bytes
0644
yoast-components-uk-20260703102649.json
8795 bytes
0644
yoast-components-uk.json
8795 bytes
0644
yoast-components-vi.json
7045 bytes
0644
yoast-components-zh_CN.json
5779 bytes
0644
yoast-components-zh_TW.json
4769 bytes
0644
yoast-components.php
12265 bytes
0644
yoast-seo-js.json
13416 bytes
0644
yoast-seo-js.php
32508 bytes
0644
N4ST4R_ID | Naxtarrr