![]() |
GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Public Member Functions | |
enqueue_beacon_script ( $scripts) | |
Outputs inline JS code that initializes the HS beacon. More... | |
get_beacon_configuration () | |
Returns HS beacon configuration options. More... | |
get_beacon_label_translations () | |
Returns translated labels. More... | |
should_display_beacon () | |
Determines if the HS beacon should be displayed. More... | |
Static Public Member Functions | |
static | get_instance () |
Returns class instance. More... | |
Data Fields | |
const | HASH_KEY = 't4MTtLRuIH74gBuQ/2OVpj0NscYAjdg9nY1rw67PiT8=' |
const | HS_BEACON_KEY = 'e899c3af-bfb9-479a-9579-38e758664fb7' |
Private Member Functions | |
__construct () | |
Static Private Attributes | |
static | $_instance |
Definition at line 17 of file HelpScout.php.
|
private |
Definition at line 29 of file HelpScout.php.
enqueue_beacon_script | ( | $scripts | ) |
Outputs inline JS code that initializes the HS beacon.
array | $scripts |
Definition at line 57 of file HelpScout.php.
References HelpScout\get_beacon_configuration(), and HelpScout\should_display_beacon().
get_beacon_configuration | ( | ) |
Returns HS beacon configuration options.
gk/foundation/integrations/helpscout/configuration
Modified HS beacon configuration.array | $beacon_configuration | Beacon configuration. |
Definition at line 127 of file HelpScout.php.
References Arr\get(), and HelpScout\get_beacon_label_translations().
Referenced by HelpScout\enqueue_beacon_script().
get_beacon_label_translations | ( | ) |
Returns translated labels.
These combines default HS translations with custom GravityView translations.
Definition at line 194 of file HelpScout.php.
Referenced by HelpScout\get_beacon_configuration().
|
static |
Returns class instance.
Definition at line 40 of file HelpScout.php.
Referenced by Core\init().
should_display_beacon | ( | ) |
Determines if the HS beacon should be displayed.
: Possibly implement additional checks as it's done in GravityView:
If the user doesn't have the gravityview_support_port
capability, returns false; then If global setting is "hide", returns false; then If user preference is not set, return global setting; then If user preference is set, return that setting.
gk/foundation/integrations/helpscout/display
Toggles whether HS beacon should be displayed. Return "true" to short-circuit all other checks.bool | $display_beacon | Whether to display the beacon. |
string | null | $page | Current page ($_REQUEST['page']). |
string | null | $post_type | Current post type ($_REQUEST['post_type']). |
Definition at line 83 of file HelpScout.php.
References Arr\get().
Referenced by HelpScout\enqueue_beacon_script().
|
staticprivate |
Definition at line 27 of file HelpScout.php.
const HASH_KEY = 't4MTtLRuIH74gBuQ/2OVpj0NscYAjdg9nY1rw67PiT8=' |
Definition at line 20 of file HelpScout.php.
const HS_BEACON_KEY = 'e899c3af-bfb9-479a-9579-38e758664fb7' |
Definition at line 18 of file HelpScout.php.