# wordpress-seo/18.2/src/deprecated/frontend/schema/interface-wpseo-graph-piece.php

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

- Page: https://pluginprobe.com/plugins/wordpress-seo/18.2/code/src/deprecated/frontend/schema/interface-wpseo-graph-piece.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/18.2/raw/src/deprecated/frontend/schema/interface-wpseo-graph-piece.php
- Modified: 2021-05-18T13:42:44+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/18.2/code/src/deprecated/frontend/schema/interface-wpseo-graph-piece.php#L10-L20`.

```php
<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Frontend\Schema
 */

if ( ! interface_exists( 'WPSEO_Graph_Piece' ) ) {
	/**
	 * An interface for registering Schema Graph Pieces.
	 *
	 * @since      10.2
	 * @deprecated 14.0
	 */
	interface WPSEO_Graph_Piece {

		/**
		 * Add your piece of the graph.
		 *
		 * @return array|bool A graph piece on success, false on failure.
		 */
		public function generate();

		/**
		 * Determines whether or not a piece should be added to the graph.
		 *
		 * @return bool
		 */
		public function is_needed();
	}
}

```
