• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Yoast SEO a2z

Yoast SEO a2z

WordPress SEO a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / HelpScout_Beacon::output_beacon_js() – Outputs a small piece of javascript for the beacon.

You appear to be a bot. Output may be restricted

Description

Outputs a small piece of javascript for the beacon.

Usage

HelpScout_Beacon::output_beacon_js();

Parameters

Returns

void

Source

File name: wordpress-seo/src/integrations/admin/helpscout-beacon.php
Lines:

1 to 13 of 13
  public function output_beacon_js() {
    if ( ! $this->is_beacon_page() ) {
      return;
    }

    \printf(
      '<script type="text/javascript">window.%1$s(\'%2$s\', %3$s)</script>',
      ( $this->ask_consent ) ? 'wpseoHelpScoutBeaconConsent' : 'wpseoHelpScoutBeacon',
      \esc_html( $this->pages_ids[ $this->page ] ),
      // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaping done in format_json_encode.
      WPSEO_Utils::format_json_encode( (array) $this->get_session_data() )
    );
  }
 

 View on GitHub View on Trac

Published: 22nd February 2021 | Last updated: 12th September 2021

Primary Sidebar

Information

Function name: HelpScout_Beacon::output_beacon_js
Class ref: HelpScout_Beacon
Plugin ref: Yoast SEO
Version: 19.9
Sourcefile: src/integrations/admin/helpscout-beacon.php
File ref: src/integrations/admin/helpscout-beacon.php
Deprecated?: No
API Letters: B,H,J,O

Footer

Yoast SEO a2z
Yoast SEO a2z
WordPress SEO a2z
WordPress 6.1.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wordpress-seo.wp-a2z.org
© Copyright Yoast SEO a2z 2017-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites