WPSEO_Metabox::render_hidden_fieldsprotectedYoast 1.0

Renders the metabox hidden fields.

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

Возвращает

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

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->render_hidden_fields();

Код WPSEO_Metabox::render_hidden_fields() Yoast 27.9

protected function render_hidden_fields() {
	wp_nonce_field( 'yoast_free_metabox', 'yoast_free_metabox_nonce' );

	// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped in class.
	echo new Meta_Fields_Presenter( $this->get_metabox_post(), 'general' );

	if ( $this->is_advanced_metadata_enabled ) {
		// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped in class.
		echo new Meta_Fields_Presenter( $this->get_metabox_post(), 'advanced' );
	}

	// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped in class.
	echo new Meta_Fields_Presenter( $this->get_metabox_post(), 'schema', $this->get_metabox_post()->post_type );

	if ( $this->social_is_enabled ) {
		// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped in class.
		echo new Meta_Fields_Presenter( $this->get_metabox_post(), 'social' );
	}

	$screen          = WP_Screen::get();
	$is_block_editor = $screen && $screen->is_block_editor();
	if ( $is_block_editor && $this->get_metabox_post()->post_type === 'post' ) {
		/**
		 * Filter: 'wpseo_enable_ai_content_planner_inline_banner' - Allows hiding the AI Content Planner inline banner site-wide.
		 *
		 * Returning false stops the hidden meta inputs from being rendered, which the editor JS treats as "banner disabled".
		 *
		 * @param bool $enabled Whether the inline banner should be available in the editor. Default true.
		 */
		if ( apply_filters( 'wpseo_enable_ai_content_planner_inline_banner', true ) ) {
			// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped in class.
			echo new Meta_Fields_Presenter( $this->get_metabox_post(), 'content_planner' );
		}
	}

	/**
	 * Filter: 'wpseo_content_meta_section_content' - Allow filtering the metabox content before outputting.
	 *
	 * @param string $post_content The metabox content string.
	 */
	// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output should be escaped in the filter.
	echo apply_filters( 'wpseo_content_meta_section_content', '' );
}