Skip to content

Commit

Permalink
Use WPSEO_DEBUG for pretty printing JSON+LD
Browse files Browse the repository at this point in the history
Fixes #148
  • Loading branch information
roborourke committed Nov 22, 2021
1 parent 6d6a87d commit 437bf2d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function bootstrap( Module $module ) {
add_action( 'admin_init', __NAMESPACE__ . '\\remove_yoast_submenu_page' );

// Pretty print the JSON+LD schema output.
add_action( 'muplugins_loaded', __NAMESPACE__ . '\\enable_yoast_development_mode' );
add_action( 'muplugins_loaded', __NAMESPACE__ . '\\enable_yoast_debug_mode' );

// Remove Helpscout.
add_filter( 'wpseo_helpscout_show_beacon', '__return_false' );
Expand Down Expand Up @@ -340,13 +340,15 @@ function social_options_overridden_notice() {
}

/**
* Enable Yoast Development Mode.
* Enable Yoast Debug Mode.
*
* Yoast development mode will pretty print the yoast-schema-graph HTML.
* Yoast debug mode will pretty print the yoast-schema-graph HTML.
*/
function enable_yoast_development_mode() {
function enable_yoast_debug_mode() {
if ( Altis\get_environment_type() !== 'production' ) {
define( 'YOAST_ENVIRONMENT', 'development' );
if ( ! defined( 'WPSEO_DEBUG' ) ) {
define( 'WPSEO_DEBUG', true );
}
}
}

Expand Down

0 comments on commit 437bf2d

Please sign in to comment.