Skip to main content

GravityView_Sharing_Jetpack

Add support for the Jetpack Sharing plugin

Source: includes/services/jetpack.php:9

Details

Methods

MethodDescription
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

NameTypeDefaultDescription
$context\GV\Template_ContextnullThe 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

NameTypeDefaultDescription
$valuenull | array | stringThe value get_metadata() should return - a single metadata value, or an array of values.
$object_idintObject ID.
$meta_keystringMeta 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

NameTypeDefaultDescription
$the_contentstring''

Returns

  • string

Source: includes/services/jetpack.php:150

function filter_sharing_permalink( $permalink, $post_id=0, $sharing_source='' )

Modify the redirect URL used for the sharing screens

Parameters

NameTypeDefaultDescription
$permalink
$post_id0
$sharing_source''Name of the sharing class triggering the request

Returns

  • string

Source: includes/services/jetpack.php:164