Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
generated
/
File Content:
class-helpscout.php
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * Class WPSEO_HelpScout */ class WPSEO_HelpScout implements WPSEO_WordPress_Integration { /** * The id for the beacon. * * @var string */ protected $beacon_id; /** * The pages where the beacon is loaded. * * @var array */ protected $pages; /** * The products the beacon is loaded for. * * @var array */ protected $products; /** * Whether to asks the user's consent before loading in HelpScout. * * @var bool */ protected $ask_consent; /** * WPSEO_HelpScout constructor. * * @param string $beacon_id The beacon id. * @param array $pages The pages where the beacon is loaded. * @param array $products The products the beacon is loaded for. * @param bool $ask_consent Optional. Whether to ask for consent before loading in HelpScout. */ public function __construct( $beacon_id, array $pages, array $products, $ask_consent = false ) { $this->beacon_id = $beacon_id; $this->pages = $pages; $this->products = $products; $this->ask_consent = $ask_consent; } /** * {@inheritDoc} */ public function register_hooks() { if ( ! $this->is_beacon_page() ) { return; } add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_help_scout_script' ] ); add_action( 'admin_footer', [ $this, 'output_beacon_js' ] ); } /** * Enqueues the HelpScout script. */ public function enqueue_help_scout_script() { $asset_manager = new WPSEO_Admin_Asset_Manager(); $asset_manager->enqueue_script( 'help-scout-beacon' ); } /** * Outputs a small piece of javascript for the beacon. */ public function output_beacon_js() { printf( '<script type="text/javascript">window.%1$s(\'%2$s\', %3$s)</script>', ( $this->ask_consent ) ? 'wpseoHelpScoutBeaconConsent' : 'wpseoHelpScoutBeacon', esc_html( $this->beacon_id ), WPSEO_Utils::format_json_encode( $this->get_session_data() ) ); } /** * Checks if the current page is a page containing the beacon. * * @return bool */ private function is_beacon_page() { return in_array( $this->get_current_page(), $this->pages, true ); } /** * Retrieves the value of the current page. * * @return string The current page. */ private function get_current_page() { $page = filter_input( INPUT_GET, 'page' ); if ( isset( $page ) && $page !== false ) { return $page; } return ''; } /** * Retrieves the identifying data. * * @return string The data to pass as identifying data. */ protected function get_session_data() { /** @noinspection PhpUnusedLocalVariableInspection */ // Do not make these strings translatable! They are for our support agents, the user won't see them! $current_user = wp_get_current_user(); $data = [ 'name' => trim( $current_user->user_firstname . ' ' . $current_user->user_lastname ), 'email' => $current_user->user_email, 'WordPress Version' => $this->get_wordpress_version(), 'Server' => $this->get_server_info(), '<a href="' . admin_url( 'themes.php' ) . '">Theme</a>' => $this->get_theme_info(), '<a href="' . admin_url( 'plugins.php' ) . '">Plugins</a>' => $this->get_active_plugins(), ]; if ( ! empty( $this->products ) ) { $addon_manager = new WPSEO_Addon_Manager(); foreach ( $this->products as $product ) { $subscription = $addon_manager->get_subscription( $product ); if ( ! $subscription ) { continue; } $data[ $subscription->product->name ] = $this->get_product_info( $subscription ); } } return WPSEO_Utils::format_json_encode( $data ); } /** * Returns basic info about the server software. * * @return string */ private function get_server_info() { $server_tracking_data = new WPSEO_Tracking_Server_Data(); $server_data = $server_tracking_data->get(); $server_data = $server_data['server']; $fields_to_use = [ 'IP' => 'ip', 'Hostname' => 'Hostname', 'OS' => 'os', 'PHP' => 'PhpVersion', 'CURL' => 'CurlVersion', ]; $server_data['CurlVersion'] = $server_data['CurlVersion']['version'] . '(SSL Support' . $server_data['CurlVersion']['sslSupport'] . ')'; $server_info = '<table>'; foreach ( $fields_to_use as $label => $field_to_use ) { if ( isset( $server_data[ $field_to_use ] ) ) { $server_info .= sprintf( '<tr><td>%1$s</td><td>%2$s</td></tr>', esc_html( $label ), esc_html( $server_data[ $field_to_use ] ) ); } } $server_info .= '</table>'; return $server_info; } /** * Returns info about the Yoast SEO plugin version and license. * * @param object $plugin The plugin. * * @return string The product info. */ private function get_product_info( $plugin ) { if ( empty( $plugin ) ) { return ''; } $product_info = '<table>'; $product_info .= '<tr><td>Version</td><td>' . $plugin->product->version . '</td></tr>'; $product_info .= '<tr><td>Expiration date</td><td>' . $plugin->expiry_date . '</td></tr>'; $product_info .= '</table>'; return $product_info; } /** * Returns the WordPress version + a suffix if current WP is multi site. * * @return string The WordPress version string. */ private function get_wordpress_version() { global $wp_version; $wordpress_version = $wp_version; if ( is_multisite() ) { $wordpress_version .= ' MULTI-SITE'; } return $wordpress_version; } /** * Returns a formatted HTML string for the current theme. * * @return string The theme info as string. */ private function get_theme_info() { $theme = wp_get_theme(); $theme_info = sprintf( '<a href="%1$s">%2$s</a> v%3$s by %4$s', esc_attr( $theme->display( 'ThemeURI' ) ), esc_html( $theme->display( 'Name' ) ), esc_html( $theme->display( 'Version' ) ), esc_html( $theme->display( 'Author' ) ) ); if ( is_child_theme() ) { $theme_info .= sprintf( '<br />Child theme of: %1$s', esc_html( $theme->display( 'Template' ) ) ); } return $theme_info; } /** * Returns a formatted HTML list of all active plugins. * * @return string The active plugins. */ private function get_active_plugins() { $updates_available = get_site_transient( 'update_plugins' ); $active_plugins = ''; foreach ( wp_get_active_and_valid_plugins() as $plugin ) { $plugin_data = get_plugin_data( $plugin ); $plugin_file = str_replace( trailingslashit( WP_PLUGIN_DIR ), '', $plugin ); if ( isset( $updates_available->response[ $plugin_file ] ) ) { $active_plugins .= '<i class="icon-close1"></i> '; } $active_plugins .= sprintf( '<a href="%1$s">%2$s</a> v%3$s', esc_attr( $plugin_data['PluginURI'] ), esc_html( $plugin_data['Name'] ), esc_html( $plugin_data['Version'] ) ); } return $active_plugins; } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
assets
---
0755
.DS_Store
10234 bytes
0644
AjaxController-20260705133136.php
2162 bytes
0644
AjaxController-20260706063917.php
2162 bytes
0644
AjaxController.php
2162 bytes
0644
BundleWriter.php
5687 bytes
0644
DownloadConfController-20260706014647.php
945 bytes
0644
DownloadConfController.php
945 bytes
0644
Inverter.php
6818 bytes
0644
JsonSerializable-20260706211909.php
577 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream-20260706120127.php
4209 bytes
0644
LimitStream.php
4209 bytes
0644
admin-network-it_IT.l10n-20260707223007.php
42133 bytes
0644
admin-network-it_IT.l10n.php
42133 bytes
0644
article-author-presenter.php
1116 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
blocks-helper.php
2317 bytes
0644
class-admin-utils.php
2147 bytes
0644
class-asset.php
4016 bytes
0644
class-capability-manager-factory-20260623170930.php
763 bytes
0644
class-capability-manager-factory.php
763 bytes
0644
class-helpscout.php
6972 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-option-tab.php
1784 bytes
0644
class-option-tabs-formatter.php
2321 bytes
0644
class-sitemaps-admin-20260703023908-20260705054858.php
3665 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin-20260706133002.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-taxonomy-columns-20260707194606.php
7324 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-wpseo-custom-fields.php
1485 bytes
0644
class-wpseo-replacement-variable-20260623222539.php
1375 bytes
0644
class-wpseo-replacement-variable.php
1375 bytes
0644
class-wpseo-statistics-20260703220502-20260705061851.php
1443 bytes
0644
class-wpseo-statistics-20260703220502.php
1443 bytes
0644
class-wpseo-statistics-20260705230907.php
1443 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-notification-20260623093033.php
9611 bytes
0644
class-yoast-notification-20260623162123.php
9611 bytes
0644
class-yoast-notification.php
9611 bytes
0644
class-yoast-plugin-conflict-20260705211603.php
10390 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.constants.php
150 bytes
0644
class.pack.database-20260623162152.php
30838 bytes
0644
class.pack.database.php
30838 bytes
0644
class.web.services-20260704233826.php
7748 bytes
0644
ctrl.package.php
17073 bytes
0644
ctrl.tools-20260622110042.php
4388 bytes
0644
dashboard-1650-rtl.css
1634 bytes
0644
date-helper.php
2846 bytes
0644
deactivation.php
21118 bytes
0644
debug-20260706154220.php
276 bytes
0644
debug.php
276 bytes
0644
define.php
4567 bytes
0644
description-presenter-20260623011438.php
1026 bytes
0644
duplicator-en_US.mo
582 bytes
0644
duplicator-main-20260623133707.php
26907 bytes
0644
duplicator-main.php
26907 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeDropbox.class.php
41782 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623171315.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
environment-helper.php
596 bytes
0644
estimated-reading-time-20260703220613-20260707094404.php
1111 bytes
0644
estimated-reading-time-20260703220613.php
1111 bytes
0644
exceptions-20260706013347.php
708 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget.php
11167 bytes
0644
image-helper-20260624010546.php
10231 bytes
0644
image-helper.php
10231 bytes
0644
image-presenter.php
2093 bytes
0644
inc.data-20260705181931.php
5121 bytes
0644
inc.data.php
5121 bytes
0644
inc.validator-20260706184629.php
5401 bytes
0644
inc.validator.php
5401 bytes
0644
index.php
157663 bytes
0644
interface-metabox-section.php
320 bytes
0644
language-helper.php
1801 bytes
0644
language-utils-20260624001256.php
2613 bytes
0644
language-utils-20260624025003.php
2613 bytes
0644
language-utils.php
2613 bytes
0644
loco-20260706184516.php
5626 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
options-helper.php
3022 bytes
0644
primary-category.php
1998 bytes
0644
primary-term-repository.php
1132 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
require-file-helper.php
305 bytes
0644
root-20260624001107.php
1951 bytes
0644
root.php
1951 bytes
0644
setup.php
2699 bytes
0644
title-presenter.php
1077 bytes
0644
uninstall.php
4401 bytes
0644
values-helper.php
2652 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seo-es_VE.json
25610 bytes
0644
wordpress-seojs-ar-20260705065433-20260707044434.json
25925 bytes
0644
wordpress-seojs-ar-20260705065433.json
25925 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA-20260705054922.json
13790 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-es_CR.json
14212 bytes
0644
wordpress-seojs-gl_ES.json
20143 bytes
0644
wordpress-seojs-ja-20260705160339.json
21424 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk-20260706235406.json
26506 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
wp-seo-main.php
17504 bytes
0644
N4ST4R_ID | Naxtarrr