Automattic\WooCommerce\Admin\Notes
Note::set_layout()
Set note layout.
Метод класса: Note{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Note = new Note(); $Note->set_layout( $layout );
- $layout(строка) (обязательный)
- Note layout.
Код Note::set_layout() Note::set layout WC 8.7.0
public function set_layout( $layout ) { // If we don't receive a layout we will set it by default as "plain". if ( empty( $layout ) ) { $layout = 'plain'; } $valid_layouts = array( 'banner', 'plain', 'thumbnail' ); if ( in_array( $layout, $valid_layouts, true ) ) { $this->set_prop( 'layout', $layout ); } else { $this->error( 'admin_note_invalid_data', __( 'The admin note layout has a wrong prop value.', 'woocommerce' ) ); } }