WPCF7_HTMLFormatter::append_end_tag()
Appends an end tag to the output property.
Метод класса: WPCF7_HTMLFormatter{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$WPCF7_HTMLFormatter = new WPCF7_HTMLFormatter(); $WPCF7_HTMLFormatter->append_end_tag( $tag_name );
- $tag_name(строка) (обязательный)
- Tag name.
Код WPCF7_HTMLFormatter::append_end_tag() WPCF7 HTMLFormatter::append end tag CF7 5.7.5.1
public function append_end_tag( $tag_name ) { if ( ! in_array( $tag_name, self::p_child_elements ) ) { // Remove unnecessary <br />. $this->output = preg_replace( '/\s*<br \/>\s*$/', '', $this->output ); $this->output = rtrim( $this->output ) . "\n"; if ( $this->options['auto_indent'] ) { $this->output .= self::indent( count( $this->stacked_elements ) ); } } $this->output .= sprintf( '</%s>', $tag_name ); // Remove trailing <p></p>. $this->output = preg_replace( '/<p>\s*<\/p>$/', '', $this->output ); }