WPCF7_WelcomePanelColumn{}CF7 1.0

Хуков нет.

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

$WPCF7_WelcomePanelColumn = new WPCF7_WelcomePanelColumn();
// use class methods

Методы

  1. public content()
  2. public icon()
  3. public print_content()
  4. public title()

Код WPCF7_WelcomePanelColumn{} CF7 5.6.3

abstract class WPCF7_WelcomePanelColumn {

	abstract protected function icon();
	abstract protected function title();
	abstract protected function content();

	public function print_content() {
		$icon = sprintf(
			'<span class="dashicons dashicons-%s" aria-hidden="true"></span>',
			esc_attr( $this->icon() )
		);

		$title = sprintf(
			'<h3>%1$s %2$s</h3>',
			$icon,
			$this->title()
		);

		$content = $this->content();

		if ( is_array( $content ) ) {
			$content = implode( "\n\n", $content );
		}

		$content = wp_kses_post( $content );
		$content = wptexturize( $content );
		$content = convert_chars( $content );
		$content = wpautop( $content );

		echo "\n";
		echo '<div class="welcome-panel-column">';
		echo $title;
		echo $content;
		echo '</div>';
	}
}