38 lines
798 B
PHP
38 lines
798 B
PHP
<?php
|
|
|
|
namespace Foxstudio\Plugins\Template\Utils;
|
|
|
|
class Notice
|
|
{
|
|
|
|
public function noticeSuccess($title)
|
|
{
|
|
return $this->displayNotice('success', $title);
|
|
}
|
|
|
|
public function noticeWarning($title)
|
|
{
|
|
return $this->displayNotice('warning', $title);
|
|
}
|
|
|
|
public function noticeError($title)
|
|
{
|
|
return $this->displayNotice('error', $title);
|
|
}
|
|
|
|
public function noticeInfo($title)
|
|
{
|
|
return $this->displayNotice('info', $title);
|
|
}
|
|
|
|
private function displayNotice($type, $title)
|
|
{
|
|
return wc_print_notice($title, $type);
|
|
// return '
|
|
// <div class="notice notice-'. esc_attr($type) .' is-dismissible">
|
|
// <p>'. esc_html($title) .'</p>
|
|
// </div>
|
|
// ';
|
|
}
|
|
|
|
} |