ACF_Form_Post::edit_form_after_titlepublicACF 5.7.6

Called after the title and before the content editor to render the after title metaboxes. Also renders the CSS required to hide the "hide-on-screen" elements on the page based on the field group settings.

Метод класса: ACF_Form_Post{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$ACF_Form_Post = new ACF_Form_Post();
$ACF_Form_Post->edit_form_after_title();

Список изменений

С версии 5.7.6 Введена.

Код ACF_Form_Post::edit_form_after_title() ACF 6.4.2

public function edit_form_after_title() {

	// globals
	global $post, $wp_meta_boxes;

	// render post data
	acf_form_data(
		array(
			'screen'  => 'post',
			'post_id' => $post->ID,
		)
	);

	// render 'acf_after_title' metaboxes
	do_meta_boxes( get_current_screen(), 'acf_after_title', $post );

	$style = '';
	if ( is_string( $this->style ) ) {
		$style = $this->style;
	}

	// Render dynamic field group style, using wp_strip_all_tags as this is filterable, but should only contain valid styles and no html.
	echo '<style type="text/css" id="acf-style">' . wp_strip_all_tags( $style ) . '</style>'; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CSS only, escaped by wp_strip_all_tags.
}