WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

Yoast\WP\SEO\Integrations\Third_Party

The_Events_Calendar{} Yoast 1.0

Class The_Events_Calendar

Хуков нет.

Возвращает

Null. Ничего.

Использование

$The_Events_Calendar = new The_Events_Calendar();
// use class methods

Методы

  1. add_graph_pieces( $pieces, $context )
  2. get_conditionals()
  3. register_hooks()

Код The_Events_Calendar{} Yoast 15.6.2

<?php
class The_Events_Calendar implements Integration_Interface {

	/**
	 * Returns the conditionals based in which this loadable should be active.
	 *
	 * @return array
	 */
	public static function get_conditionals() {
		return [ Front_End_Conditional::class, The_Events_Calendar_Conditional::class, Open_Graph_Conditional::class ];
	}

	/**
	 * Initializes the integration.
	 *
	 * This is the place to register hooks and filters.
	 *
	 * @return void
	 */
	public function register_hooks() {
		\add_filter( 'wpseo_schema_graph_pieces', [ $this, 'add_graph_pieces' ], 11, 2 );
	}

	/**
	 * Adds the events graph pieces to the schema collector.
	 *
	 * @param array  $pieces  The current graph pieces.
	 * @param string $context The current context.
	 *
	 * @return array Extended graph pieces.
	 */
	public function add_graph_pieces( $pieces, $context ) {
		$pieces[] = new Events_Calendar_Schema( $context );
		return $pieces;
	}
}