WPSEO_Admin_Init::add_publish_box_section
Adds a custom Yoast section within the Classic Editor publish box.
Метод класса: WPSEO_Admin_Init{}
Хуки из метода
Возвращает
null. Ничего (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() WPSEO Admin Init::add publish box section Yoast 26.5
<?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.
*
* @param WP_Post $post The current post object.
*/
do_action( 'wpseo_publishbox_misc_actions', $post );
}
}