# wordpress-seo/trunk/src/schema/infrastructure/disable-schema-integration.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version trunk. 35 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/trunk/code/src/schema/infrastructure/disable-schema-integration.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/trunk/raw/src/schema/infrastructure/disable-schema-integration.php
- Modified: 2026-01-07T11:32:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/trunk/code/src/schema/infrastructure/disable-schema-integration.php#L10-L20`.

```php
<?php

namespace Yoast\WP\SEO\Schema\Infrastructure;

use Yoast\WP\SEO\Conditionals\Schema_Disabled_Conditional;
use Yoast\WP\SEO\Integrations\Integration_Interface;

/**
 * Handles disabling schema.
 */
class Disable_Schema_Integration implements Integration_Interface {

	/**
	 * Returns the conditionals based on which this loadable should be active.
	 *
	 * @return string[]
	 */
	public static function get_conditionals() {
		return [ Schema_Disabled_Conditional::class ];
	}

	/**
	 * Registers action hook.
	 *
	 * @return void
	 */
	public function register_hooks(): void {
		if ( ! \is_admin() ) {
			// No need to run this on admin pages, which would actually break some functionality in the schema settings page.
			// Specifically, in the schema settings page, we want to be able to understand whether schema has been disabled programmatically too.
			\add_filter( 'wpseo_json_ld_output', '__return_false' );
		}
	}
}

```
