WPCF7_Pipe{}
Class representing a pair of pipe.
Хуков нет.
Использование
$WPCF7_Pipe = new WPCF7_Pipe(); // use class methods
Методы
- public __construct( $text )
Код WPCF7_Pipe{} WPCF7 Pipe{} CF7 6.1.6
class WPCF7_Pipe {
public $before = '';
public $after = '';
public function __construct( $text ) {
$text = (string) $text;
$pipe_pos = strpos( $text, '|' );
if ( false === $pipe_pos ) {
$this->before = $this->after = wpcf7_strip_whitespaces( $text );
} else {
$this->before = wpcf7_strip_whitespaces( substr( $text, 0, $pipe_pos ) );
$this->after = wpcf7_strip_whitespaces( substr( $text, $pipe_pos + 1 ) );
}
}
}