WPSEO_Taxonomy_Fields_Presenter::form_row()privateYoast 1.0

Create a row in the form table.

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

Хуков нет.

Возвращает

Строку.

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

// private - только в коде основоного (родительского) класса
$result = $this->form_row( $field_name, $field_configuration );
$field_name(строка) (обязательный)
Variable the row controls.
$field_configuration(массив) (обязательный)
Array with the field configuration.

Код WPSEO_Taxonomy_Fields_Presenter::form_row() Yoast 22.4

private function form_row( $field_name, array $field_configuration ) {
	$esc_field_name = esc_attr( $field_name );

	$options = (array) $field_configuration['options'];

	if ( ! empty( $field_configuration['description'] ) ) {
		$options['description'] = $field_configuration['description'];
	}

	$label            = $this->get_label( $field_configuration['label'], $esc_field_name );
	$field            = $this->get_field( $field_configuration['type'], $esc_field_name, $this->get_field_value( $field_name ), $options );
	$help_content     = ( $field_configuration['options']['help'] ?? '' );
	$help_button_text = ( $field_configuration['options']['help-button'] ?? '' );
	$help             = new WPSEO_Admin_Help_Panel( $field_name, $help_button_text, $help_content );

	return $this->parse_row( $label, $help, $field );
}