apply_filters ( 'jetpack_open_graph_fallback_description', string $var, object $data )

Filter the fallback `og:description` used when no excerpt information is provided.

Source file: functions.opengraph.php

View in GitHub

Parameters

$var

(string) Fallback og:description. Default is translated `Visit the post for more’.

$data

(object) Post object for the current post.


Changelog

Since: Jetpack 3.9.0


Notes

When a post doesn’t include any excerpt (either because you didn’t add any text in the post content, or it’s a password-protected post), Jetpack creates a default Open Graph description value, “Visit the post for more”. That description is used on places like Facebook, when sharing a link to your post.

The `jetpack_open_graph_fallback_description` filter allows you to change that value, like so:

function jeherve_custom_og_desc_fallback( $var, $data ) {
    return 'You should really click to find out more about this post!';
}
add_filter( 'jetpack_open_graph_fallback_description', 'jeherve_custom_og_desc_fallback', 10, 2 );

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s