Yoast\WP\SEO\Integrations\Admin
HelpScout_Beacon::get_session_data() protected Yoast 1.0
Retrieves the identifying data.
{} Это метод класса: HelpScout_Beacon{}
Хуков нет.
Возвращает
Строку
. The data to pass as identifying data.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_session_data();
Код HelpScout_Beacon::get_session_data() HelpScout Beacon::get session data Yoast 16.1.1
protected function get_session_data() {
$current_user = wp_get_current_user();
// Do not make these strings translatable! They are for our support agents, the user won't see them!
$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 );
}