wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



post_comments_form_block_form_defaults › WordPress Function

Seit6.0.0
Veraltetn/v
post_comments_form_block_form_defaults ( $fields )
Parameter:
  • (array) $fields The default comment form arguments.
    Erforderlich: Ja
Gibt zurück:
  • (array) Returns the modified fields.
Definiert in:
Codex:

Use the button block classes for the form-submit button.



Quellcode

function post_comments_form_block_form_defaults( $fields ) {
	if ( wp_is_block_theme() ) {
		$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="wp-block-button__link ' . wp_theme_get_element_class_name( 'button' ) . '" value="%4$s" />';
		$fields['submit_field']  = '<p class="form-submit wp-block-button">%1$s %2$s</p>';
	}

	return $fields;
}