Skip to content

Instantly share code, notes, and snippets.

@jeherve

jeherve/plugin.php

Last active Jul 3, 2019
Embed
What would you like to do?
[Jetpack] Deactivate Twitter Cards and / or Open Graph Meta tags.
<?php
/*
* Plugin Name: Disable Jetpack Open Graph tags and Twitter Cards
* Plugin URI: http://wordpress.org/extend/plugins/jetpack/
* Description: Disables Jetpack Open Graph tags
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
// Disable both Twitter Cards and OG tags
add_filter( 'jetpack_enable_open_graph', '__return_false', 99 );
// Disable only the Twitter Cards
add_filter( 'jetpack_disable_twitter_cards', '__return_true', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.