WPSEO_Admin_Init::add_publish_box_section()publicYoast 1.0

Adds a custom Yoast section within the Classic Editor publish box.

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

Хуки из метода

Возвращает

null. Ничего.

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

$WPSEO_Admin_Init = new WPSEO_Admin_Init();
$WPSEO_Admin_Init->add_publish_box_section( $post );
$post(\WP_Post) (обязательный)
The current post object.

Код WPSEO_Admin_Init::add_publish_box_section() Yoast 19.6.1

<?php
public function add_publish_box_section( $post ) {
	if ( in_array( $this->pagenow, [ 'post.php', 'post-new.php' ], true ) ) {
		?>
		<div id="yoast-seo-publishbox-section"></div>
		<?php
		/**
		 * Fires after the post time/date setting in the Publish meta box.
		 *
		 * @api \WP_Post The current post object.
		 */
		do_action( 'wpseo_publishbox_misc_actions', $post );
	}
}