GravityView_Sharing_Jetpack
Add support for the Jetpack Sharing plugin
Source: includes/services/jetpack.php:9
Details
- Kind:
class - Namespace:
(global) - Extends: GravityView_Sharing_Service
Methods
| Method | Description |
|---|---|
output() | |
filter_sharing_disabled() | Override the 'sharing_disabled' metadata used by Jetpack to determine whether to display the sharing links. |
remove_the_content_filter() | Remove the permalink filter |
filter_sharing_permalink() | Modify the redirect URL used for the sharing screens |
Method Reference
output()
function output( $context=null )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$context | \GV\Template_Context | null | The context. |
Returns
string|null
Source: includes/services/jetpack.php:40
filter_sharing_disabled()
public function filter_sharing_disabled( $value, $object_id, $meta_key )
Override the 'sharing_disabled' metadata used by Jetpack to determine whether to display the sharing links.
We add the filter to force the display of the links, even if the View's global setting is to not display them.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | null | array | string | The value get_metadata() should return - a single metadata value, or an array of values. | |
$object_id | int | Object ID. | |
$meta_key | string | Meta key. |
Since: 1.0.1
Source: includes/services/jetpack.php:91
remove_the_content_filter()
function remove_the_content_filter( $the_content='' )
Remove the permalink filter
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$the_content | string | '' |
Returns
string
Source: includes/services/jetpack.php:150
filter_sharing_permalink()
function filter_sharing_permalink( $permalink, $post_id=0, $sharing_source='' )
Modify the redirect URL used for the sharing screens
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$permalink | |||
$post_id | 0 | ||
$sharing_source | '' | Name of the sharing class triggering the request |
Returns
string
Source: includes/services/jetpack.php:164