PATH:
home
/
letacommog
/
laperouse
/
wp-content
/
plugins
/
wordpress-seo
/
admin
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * Exposes shortlinks in a global, so that we can pass them to our Javascript components. */ class WPSEO_Expose_Shortlinks implements WPSEO_WordPress_Integration { /** * Array containing the keys and shortlinks. * * @var array */ private $shortlinks = [ 'shortlinks.focus_keyword_info' => 'https://yoa.st/focus-keyword', 'shortlinks.nofollow_sponsored' => 'https://yoa.st/nofollow-sponsored', 'shortlinks.snippet_preview_info' => 'https://yoa.st/snippet-preview', 'shortlinks.cornerstone_content_info' => 'https://yoa.st/1i9', 'shortlinks.upsell.sidebar.focus_keyword_synonyms_link' => 'https://yoa.st/textlink-synonyms-popup-sidebar', 'shortlinks.upsell.sidebar.focus_keyword_synonyms_button' => 'https://yoa.st/keyword-synonyms-popup-sidebar', 'shortlinks.upsell.sidebar.focus_keyword_additional_link' => 'https://yoa.st/textlink-keywords-popup-sidebar', 'shortlinks.upsell.sidebar.focus_keyword_additional_button' => 'https://yoa.st/add-keywords-popup-sidebar', 'shortlinks.upsell.sidebar.additional_link' => 'https://yoa.st/textlink-keywords-sidebar', 'shortlinks.upsell.sidebar.additional_button' => 'https://yoa.st/add-keywords-sidebar', 'shortlinks.upsell.metabox.go_premium' => 'https://yoa.st/pe-premium-page', 'shortlinks.upsell.metabox.focus_keyword_synonyms_link' => 'https://yoa.st/textlink-synonyms-popup-metabox', 'shortlinks.upsell.metabox.focus_keyword_synonyms_button' => 'https://yoa.st/keyword-synonyms-popup', 'shortlinks.upsell.metabox.focus_keyword_additional_link' => 'https://yoa.st/textlink-keywords-popup-metabox', 'shortlinks.upsell.metabox.focus_keyword_additional_button' => 'https://yoa.st/add-keywords-popup', 'shortlinks.upsell.metabox.additional_link' => 'https://yoa.st/textlink-keywords-metabox', 'shortlinks.upsell.metabox.additional_button' => 'https://yoa.st/add-keywords-metabox', 'shortlinks.upsell.gsc.create_redirect_button' => 'https://yoa.st/redirects', 'shortlinks.readability_analysis_info' => 'https://yoa.st/readability-analysis', 'shortlinks.activate_premium_info' => 'https://yoa.st/activate-subscription', 'shortlinks.upsell.sidebar.morphology_upsell_metabox' => 'https://yoa.st/morphology-upsell-metabox', 'shortlinks.upsell.sidebar.morphology_upsell_sidebar' => 'https://yoa.st/morphology-upsell-sidebar', 'shortlinks.semrush.volume_help' => 'https://yoa.st/3-v', 'shortlinks.semrush.trend_help' => 'https://yoa.st/3-v', 'shortlinks.semrush.prices' => 'https://yoa.st/semrush-prices', 'shortlinks.semrush.premium_landing_page' => 'https://yoa.st/413', ]; /** * Registers all hooks to WordPress. * * @return void */ public function register_hooks() { add_filter( 'wpseo_admin_l10n', [ $this, 'expose_shortlinks' ] ); } /** * Adds shortlinks to the passed array. * * @param array $input The array to add shortlinks to. * * @return array The passed array with the additional shortlinks. */ public function expose_shortlinks( $input ) { foreach ( $this->get_shortlinks() as $key => $shortlink ) { $input[ $key ] = WPSEO_Shortlinker::get( $shortlink ); } $input['default_query_params'] = WPSEO_Shortlinker::get_query_params(); return $input; } /** * Retrieves the shortlinks. * * @return array The shortlinks. */ private function get_shortlinks() { if ( ! $this->is_term_edit() ) { return $this->shortlinks; } $shortlinks = $this->shortlinks; $shortlinks['shortlinks.upsell.metabox.focus_keyword_synonyms_link'] = 'https://yoa.st/textlink-synonyms-popup-metabox-term'; $shortlinks['shortlinks.upsell.metabox.focus_keyword_synonyms_button'] = 'https://yoa.st/keyword-synonyms-popup-term'; $shortlinks['shortlinks.upsell.metabox.focus_keyword_additional_link'] = 'https://yoa.st/textlink-keywords-popup-metabox-term'; $shortlinks['shortlinks.upsell.metabox.focus_keyword_additional_button'] = 'https://yoa.st/add-keywords-popup-term'; $shortlinks['shortlinks.upsell.metabox.additional_link'] = 'https://yoa.st/textlink-keywords-metabox-term'; $shortlinks['shortlinks.upsell.metabox.additional_button'] = 'https://yoa.st/add-keywords-metabox-term'; $shortlinks['shortlinks.upsell.sidebar.morphology_upsell_metabox'] = 'https://yoa.st/morphology-upsell-metabox-term'; return $shortlinks; } /** * Checks if the current page is a term edit page. * * @return bool True when page is term edit. */ private function is_term_edit() { global $pagenow; return WPSEO_Taxonomy::is_term_edit( $pagenow ); } }
[+]
..
[-] class-plugin-compatibility.php
[edit]
[-] class-admin-media-purge-notification.php
[edit]
[-] class-config.php
[edit]
[-] ajax.php
[edit]
[+]
statistics
[-] class-database-proxy.php
[edit]
[-] class-premium-upsell-admin-block.php
[edit]
[-] class-helpscout.php
[edit]
[+]
taxonomy
[-] class-gutenberg-compatibility.php
[edit]
[-] class-plugin-conflict.php
[edit]
[-] interface-collection.php
[edit]
[-] index.php
[edit]
[+]
menu
[+]
google_search_console
[-] class-yoast-network-settings-api.php
[edit]
[+]
filters
[+]
formatter
[+]
watchers
[-] class-admin-utils.php
[edit]
[-] class-suggested-plugins.php
[edit]
[-] class-collector.php
[edit]
[-] class-keyword-synonyms-modal.php
[edit]
[-] class-product-upsell-notice.php
[edit]
[-] class-premium-popup.php
[edit]
[-] class-yoast-notification-center.php
[edit]
[-] class-yoast-dashboard-widget.php
[edit]
[+]
tracking
[-] class-add-keyword-modal.php
[edit]
[-] class-yoast-form.php
[edit]
[-] class-extensions.php
[edit]
[+]
ryte
[+]
config-ui
[+]
notifiers
[+]
exceptions
[+]
ajax
[+]
import
[-] class-admin.php
[edit]
[-] class-remote-request.php
[edit]
[-] class-bulk-description-editor-list-table.php
[edit]
[-] class-multiple-keywords-modal.php
[edit]
[-] class-my-yoast-proxy.php
[edit]
[-] class-admin-help-panel.php
[edit]
[-] class-admin-asset-yoast-components-l10n.php
[edit]
[-] class-extension-manager.php
[edit]
[-] class-expose-shortlinks.php
[edit]
[+]
metabox
[+]
views
[-] class-yoast-input-validation.php
[edit]
[+]
listeners
[+]
capabilities
[-] class-option-tabs.php
[edit]
[-] class-paper-presenter.php
[edit]
[-] admin-settings-changed-listener.php
[edit]
[-] class-yoast-notification.php
[edit]
[-] class-schema-person-upgrade-notification.php
[edit]
[-] class-admin-user-profile.php
[edit]
[-] class-option-tabs-formatter.php
[edit]
[-] class-customizer.php
[edit]
[-] interface-installable.php
[edit]
[-] class-export.php
[edit]
[-] class-bulk-editor-list-table.php
[edit]
[-] class-admin-editor-specific-replace-vars.php
[edit]
[-] class-option-tab.php
[edit]
[-] class-meta-columns.php
[edit]
[+]
services
[-] class-yoast-columns.php
[edit]
[-] class-admin-init.php
[edit]
[-] class-asset.php
[edit]
[-] class-admin-asset-manager.php
[edit]
[+]
endpoints
[-] class-yoast-network-admin.php
[edit]
[+]
pages
[-] class-admin-asset-dev-server-location.php
[edit]
[-] class-admin-asset-seo-location.php
[edit]
[-] class-bulk-title-editor-list-table.php
[edit]
[-] class-license-page-manager.php
[edit]
[-] class-admin-gutenberg-compatibility-notification.php
[edit]
[+]
roles
[-] class-yoast-plugin-conflict.php
[edit]
[-] class-primary-term-admin.php
[edit]
[-] class-extension.php
[edit]
[-] class-admin-recommended-replace-vars.php
[edit]
[-] class-plugin-availability.php
[edit]
[-] class-admin-asset-location.php
[edit]
[-] class-yoast-notifications.php
[edit]
[-] class-admin-asset-analysis-worker-location.php
[edit]