Skip to content

Instantly share code, notes, and snippets.

@billerickson

billerickson/seo.php Secret

Created Sep 23, 2019
Embed
What would you like to do?
<?php
/**
* Determines if JSON-LD is enabled from 3rd party plugins.
*
* @since 3.1.0
*
* @return bool True if enabled, false if else.
*/
function genesis_is_wpseo_outputting_jsonld() {
$wpseo_ld_enabled = (
defined( 'WPSEO_VERSION' )
&& version_compare( WPSEO_VERSION, '11.0-RC0', '>=' )
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
&& apply_filters( 'wpseo_json_ld_output', true )
);
return apply_filters( 'genesis_is_wpseo_outputting_jsonld', $wpseo_ld_enabled );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment