-
-
Save billerickson/c3b62c9be828f120d54bf1af0447642a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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