Automattic\WooCommerce\Admin\Notes
Note::set_content() public WC 1.0
Set note content.
{} Это метод класса: Note{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$Note = new Note(); $Note->set_content( $content );
- $content(строка) (обязательный)
- Note content.
Код Note::set_content() Note::set content WC 5.0.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 );
}