Automattic\WooCommerce\Admin\Notes
Note::set_content()
Set note content.
Метод класса: Note{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Note = new Note(); $Note->set_content( $content );
- $content(строка) (обязательный)
- Note content.
Код Note::set_content() Note::set content WC 8.7.0
public function set_content( $content ) { $allowed_html = array( 'br' => array(), 'em' => array(), 'strong' => array(), 'a' => array( 'href' => true, 'rel' => true, 'name' => true, 'target' => true, 'download' => array( 'valueless' => 'y', ), ), 'p' => array(), ); $content = wp_kses( $content, $allowed_html ); if ( empty( $content ) ) { $this->error( 'admin_note_invalid_data', __( 'The admin note content prop cannot be empty.', 'woocommerce' ) ); } $this->set_prop( 'content', $content ); }