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

Yoast\WP\SEO

Main{} Yoast 1.0

Class Main.

Хуков нет.

Возвращает

null. Ничего.

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

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

Методы

  1. get_container()
  2. get_name()
  3. get_surfaces()

Код Main{} Yoast 17.2

class Main extends Abstract_Main {

	/**
	 * The API namespace constant.
	 *
	 * @var string
	 */
	const API_V1_NAMESPACE = 'yoast/v1';

	/**
	 * The WP CLI namespace constant.
	 *
	 * @var string
	 */
	const WP_CLI_NAMESPACE = 'yoast';

	/**
	 * {@inheritDoc}
	 */
	protected function get_container() {
		if ( $this->is_development() && \class_exists( '\Yoast\WP\SEO\Dependency_Injection\Container_Compiler' ) ) {
			// Exception here is unhandled as it will only occur in development.
			Container_Compiler::compile(
				$this->is_development(),
				__DIR__ . '/generated/container.php',
				__DIR__ . '/../config/dependency-injection/services.php',
				__DIR__ . '/../vendor/composer/autoload_classmap.php',
				'Yoast\WP\SEO\Generated'
			);
		}

		if ( \file_exists( __DIR__ . '/generated/container.php' ) ) {
			require_once __DIR__ . '/generated/container.php';

			return new Cached_Container();
		}

		return null;
	}

	/**
	 * {@inheritDoc}
	 */
	protected function get_name() {
		return 'yoast-seo';
	}

	/**
	 * {@inheritDoc}
	 */
	protected function get_surfaces() {
		return [
			'classes' => Classes_Surface::class,
			'meta'    => Meta_Surface::class,
			'helpers' => Helpers_Surface::class,
		];
	}
}