Yoast_Dismissable_Notice_Ajax::__construct()
Initialize the hooks for the AJAX request.
Метод класса: Yoast_Dismissable_Notice_Ajax{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Yoast_Dismissable_Notice_Ajax = new Yoast_Dismissable_Notice_Ajax(); $Yoast_Dismissable_Notice_Ajax->__construct( $notice_name, $notice_type );
- $notice_name(строка) (обязательный)
- The name for the hook to catch the notice.
- $notice_type(строка)
- The notice type.
По умолчанию: self::FOR_USER
Код Yoast_Dismissable_Notice_Ajax::__construct() Yoast Dismissable Notice Ajax:: construct Yoast 24.1
public function __construct( $notice_name, $notice_type = self::FOR_USER ) { $this->notice_name = $notice_name; $this->notice_type = $notice_type; add_action( 'wp_ajax_wpseo_dismiss_' . $notice_name, [ $this, 'dismiss_notice' ] ); }