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

Yoast\WP\SEO\Integrations\Admin\Addon_Installation

Installation_Integration::install_and_activate_addons() public Yoast 1.0

Installs and activates missing addons.

{} Это метод класса: Installation_Integration{}

Хуков нет.

Возвращает

null. Ничего.

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

$Installation_Integration = new Installation_Integration();
$Installation_Integration->install_and_activate_addons();

Код Installation_Integration::install_and_activate_addons() Yoast 16.7

<?php
public function install_and_activate_addons() {
	if ( filter_input( INPUT_GET, 'action' ) !== 'install' ) {
		return;
	}

	check_admin_referer( 'wpseo_addon_installation', 'nonce' );

	echo '<div class="wrap yoast wpseo_table_page">';

	printf(
		'<h1 id="wpseo-title" class="yoast-h1">%s</h1>',
		esc_html__( 'Installing and activating addons', 'wordpress-seo' )
	);

	$licensed_addons = $this->addon_manager->get_myyoast_site_information()->subscriptions;

	foreach ( $licensed_addons as $addon ) {
		printf( '<p><strong>%s</strong></p>', esc_html( $addon->product->name ) );

		list( $installed, $output ) = $this->install_addon( $addon->product->slug, $addon->product->download );

		if ( $installed ) {
			$activation_output = $this->activate_addon( $addon->product->slug );

			$output = array_merge( $output, $activation_output );
		}

		echo '<p>';
		echo implode( '<br />', array_map( 'esc_html', $output ) );
		echo '</p>';
	}

	printf(
		/* translators: %1$s expands to an anchor tag to the admin premium page, %2$s expands to Yoast SEO Premium, %3$s expands to a closing anchor tag */
		esc_html__( '%1$s Continue to %2$s%3$s', 'wordpress-seo' ),
		'<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_licenses' ) ) . '">',
		'Yoast SEO Premium',
		'</a>'
	);

	echo '</div>';

	exit;
}