GravityView_Support_Port
Since: 1.15
Source: includes/admin/class-gravityview-support-port.php:6
Details
- Kind:
class - Namespace:
(global)
Methods
| Method | Description |
|---|---|
maybe_add_article_to_tooltip() | Modify tooltips to add Beacon article |
maybe_display_helpscout_beacon() | Conditionally displays Help Scout beacon on certain pages |
show_for_user() | Check whether to show Support for a user |
update_user_meta_value() | Update User Profile preferences for GravityView Support |
user_field() | Modify User Profile |
Method Reference
maybe_add_article_to_tooltip()
public function maybe_add_article_to_tooltip( $tooltip='', $article=[], $url='', $atts='', $css_class='', $anchor_text='' )
Modify tooltips to add Beacon article
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$tooltip | string | '' | HTML of original tooltip |
$article | array | [] | Optional. Details about support doc article connected to the tooltip. { |
$url | string | '' | |
$atts | string | '' | |
$css_class | string | '' | |
$anchor_text | string | '' | |
$link_text | string |
Returns
string— If no article information exists, original tooltip. Otherwise, modified!
Since: 2.8.1
Source: includes/admin/class-gravityview-support-port.php:63
maybe_display_helpscout_beacon()
public function maybe_display_helpscout_beacon( $display )
Conditionally displays Help Scout beacon on certain pages
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$display | bool |
Returns
bool
Since: 2.16
Source: includes/admin/class-gravityview-support-port.php:109
show_for_user()
public static function show_for_user( $user=0 )
Check whether to show Support for a user
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.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$user | int | 0 | Optional. ID of the user to check, defaults to 0 for current user. |
Returns
bool— Whether to show GravityView support port
Since:
Source: includes/admin/class-gravityview-support-port.php:180
update_user_meta_value()
public function update_user_meta_value( $user_id )
Update User Profile preferences for GravityView Support
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$user_id | int |
Returns
void
Since: 1.5
Source: includes/admin/class-gravityview-support-port.php:212
user_field()
public function user_field( $user )
Modify User Profile
Modifies the output of profile.php to add GravityView Support preference
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$user | WP_User | Current user info |
Returns
void
Since:
Source: includes/admin/class-gravityview-support-port.php:230