/home/fortodpl/hairandtattoo.com/wp-content/plugins/wordpress-seo/admin
NameSizeModeActions
ajax/-0755rm
capabilities/-0755rm
endpoints/-0755rm
exceptions/-0755rm
filters/-0755rm
formatter/-0755rm
google_search_console/-0755rm
import/-0755rm
listeners/-0755rm
menu/-0755rm
metabox/-0755rm
notifiers/-0755rm
pages/-0755rm
roles/-0755rm
services/-0755rm
statistics/-0755rm
taxonomy/-0755rm
tracking/-0755rm
views/-0755rm
watchers/-0755rm
admin-settings-changed-listener.php24450644editdlrm
ajax.php120250644editdlrm
class-admin-asset-analysis-worker-location.php18500644editdlrm
class-admin-asset-dev-server-location.php16440644editdlrm
class-admin-asset-location.php4880644editdlrm
class-admin-asset-manager.php214560644editdlrm
class-admin-asset-seo-location.php21260644editdlrm
class-admin-editor-specific-replace-vars.php64990644editdlrm
class-admin-gutenberg-compatibility-notification.php26120644editdlrm
class-admin-help-panel.php27620644editdlrm
class-admin-init.php109740644editdlrm
class-admin-recommended-replace-vars.php61280644editdlrm
class-admin-user-profile.php31310644editdlrm
class-admin-utils.php22010644editdlrm
class-admin.php130360644editdlrm
class-asset.php44050644editdlrm
class-bulk-description-editor-list-table.php21960644editdlrm
class-bulk-editor-list-table.php302420644editdlrm
class-bulk-title-editor-list-table.php23820644editdlrm
class-collector.php10050644editdlrm
class-config.php49470644editdlrm
class-database-proxy.php76880644editdlrm
class-export.php35450644editdlrm
class-expose-shortlinks.php72550644editdlrm
class-gutenberg-compatibility.php25290644editdlrm
class-meta-columns.php279590644editdlrm
class-my-yoast-proxy.php62870644editdlrm
class-option-tab.php22680644editdlrm
class-option-tabs-formatter.php29060644editdlrm
class-option-tabs.php23110644editdlrm
class-paper-presenter.php36000644editdlrm
class-plugin-availability.php103060644editdlrm
class-plugin-conflict.php41410644editdlrm
class-premium-popup.php28750644editdlrm
class-premium-upsell-admin-block.php80200644editdlrm
class-primary-term-admin.php74940644editdlrm
class-product-upsell-notice.php58920644editdlrm
class-remote-request.php32030644editdlrm
class-schema-person-upgrade-notification.php22860644editdlrm
class-suggested-plugins.php44320644editdlrm
class-wincher-dashboard-widget.php36160644editdlrm
class-yoast-columns.php36060644editdlrm
class-yoast-dashboard-widget.php40220644editdlrm
class-yoast-form.php365840644editdlrm
class-yoast-input-validation.php73780644editdlrm
class-yoast-network-admin.php102110644editdlrm
class-yoast-network-settings-api.php42420644editdlrm
class-yoast-notification-center.php266480644editdlrm
class-yoast-notification.php103400644editdlrm
class-yoast-notifications.php78130644editdlrm
class-yoast-plugin-conflict.php105350644editdlrm
index.php380644editdlrm
interface-collection.php2570644editdlrm
interface-installable.php2540644editdlrm
Edit: /home/fortodpl/hairandtattoo.com/wp-content/plugins/wordpress-seo/admin/class-my-yoast-proxy.php (6287B)
is_proxy_page() ) { return; } // Register the page for the proxy. add_action( 'admin_menu', [ $this, 'add_proxy_page' ] ); add_action( 'admin_init', [ $this, 'handle_proxy_page' ] ); } /** * Registers the proxy page. It does not actually add a link to the dashboard. * * @codeCoverageIgnore * * @return void */ public function add_proxy_page() { add_dashboard_page( '', '', 'read', self::PAGE_IDENTIFIER, '' ); } /** * Renders the requested proxy page and exits to prevent the WordPress UI from loading. * * @codeCoverageIgnore * * @return void */ public function handle_proxy_page() { $this->render_proxy_page(); // Prevent the WordPress UI from loading. exit(); } /** * Renders the requested proxy page. * * This is separated from the exits to be able to test it. * * @return void */ public function render_proxy_page() { $proxy_options = $this->determine_proxy_options(); if ( $proxy_options === [] ) { // Do not accept any other file than implemented. $this->set_header( 'HTTP/1.0 501 Requested file not implemented' ); return; } // Set the headers before serving the remote file. $this->set_header( 'Content-Type: ' . $proxy_options['content_type'] ); $this->set_header( 'Cache-Control: max-age=' . self::CACHE_CONTROL_MAX_AGE ); try { echo $this->get_remote_url_body( $proxy_options['url'] ); } catch ( Exception $e ) { /* * Reset the file headers because the loading failed. * * Note: Due to supporting PHP 5.2 `header_remove` can not be used here. * Overwrite the headers instead. */ $this->set_header( 'Content-Type: text/plain' ); $this->set_header( 'Cache-Control: max-age=0' ); $this->set_header( 'HTTP/1.0 500 ' . $e->getMessage() ); } } /** * Tries to load the given url via `wp_remote_get`. * * @codeCoverageIgnore * * @param string $url The url to load. * * @return string The body of the response. * * @throws Exception When `wp_remote_get` returned an error. * @throws Exception When the response code is not 200. */ protected function get_remote_url_body( $url ) { $response = wp_remote_get( $url ); if ( $response instanceof WP_Error ) { throw new Exception( 'Unable to retrieve file from MyYoast' ); } if ( wp_remote_retrieve_response_code( $response ) !== 200 ) { throw new Exception( 'Received unexpected response from MyYoast' ); } return wp_remote_retrieve_body( $response ); } /** * Determines the proxy options based on the file and plugin version arguments. * * When the file is known it returns an array like this: * * $array = array( * 'content_type' => 'the content type' * 'url' => 'the url, possibly with the plugin version' * ) * * * @return array Empty for an unknown file. See format above for known files. */ protected function determine_proxy_options() { if ( $this->get_proxy_file() === 'research-webworker' ) { return [ 'content_type' => 'text/javascript; charset=UTF-8', 'url' => 'https://my.yoast.com/api/downloads/file/analysis-worker?plugin_version=' . $this->get_plugin_version(), ]; } return []; } /** * Checks if the current page is the MyYoast proxy page. * * @codeCoverageIgnore * * @return bool True when the page request parameter equals the proxy page. */ protected function is_proxy_page() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. $page = isset( $_GET['page'] ) && is_string( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; return $page === self::PAGE_IDENTIFIER; } /** * Returns the proxy file from the HTTP request parameters. * * @codeCoverageIgnore * * @return string The sanitized file request parameter or an empty string if it does not exist. */ protected function get_proxy_file() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['file'] ) && is_string( $_GET['file'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. return sanitize_text_field( wp_unslash( $_GET['file'] ) ); } return ''; } /** * Returns the plugin version from the HTTP request parameters. * * @codeCoverageIgnore * * @return string The sanitized plugin_version request parameter or an empty string if it does not exist. */ protected function get_plugin_version() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['plugin_version'] ) && is_string( $_GET['plugin_version'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. $plugin_version = sanitize_text_field( wp_unslash( $_GET['plugin_version'] ) ); // Replace slashes to secure against requiring a file from another path. return str_replace( [ '/', '\\' ], '_', $plugin_version ); } return ''; } /** * Sets the HTTP header. * * This is a tiny helper function to enable better testing. * * @codeCoverageIgnore * * @param string $header The header to set. * * @return void */ protected function set_header( $header ) { header( $header ); } }