Skip to content

Instantly share code, notes, and snippets.

@bdeleasa
Created September 28, 2018 13:42
Show Gist options
  • Save bdeleasa/ff1d0baba8ecdd388b831e7e60bf287b to your computer and use it in GitHub Desktop.
Save bdeleasa/ff1d0baba8ecdd388b831e7e60bf287b to your computer and use it in GitHub Desktop.
Disables the default JSON outputted by the Events Calendar plugin.
<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @link http://briannadeleasa.com
* @since 0.0.1
* @package TEC_Disable_JSON
*
* @wordpress-plugin
* Plugin Name: The Events Calendar - Disable JSON
* Plugin URI: https://loudmouse.com
* Description: Disables the default JSON outputted by the Events Calendar plugin.
* Version: 1.0.0
* Author: Brianna Deleasa
* Author URI: http://briannadeleasa.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: the-events-calendar-disable-json
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Disable JSON LD markup outputted by The Events Calendar.
*
* Our SEO manager says the markup isn't corrent and needs to be custom,
* so we need to disable what's currently outputted so we can input a
* custom code ourselves.
*/
add_filter( 'tribe_json_ld_markup', '__return_empty_string' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment