Skip to content
Snippets Groups Projects
Commit c8bb33b5 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Merge branch 'master' into 'feature/readme'

# Conflicts:
#   README.md
parents 4d8bde02 f392e425
No related branches found
No related tags found
1 merge request!22Feature/readme
Pipeline #11529 passed
This commit is part of merge request !22. Comments created here will be created in the context of that merge request.
......@@ -85,4 +85,24 @@ $notice = new \WPDesk\Notice\PermanentDismissibleNotice( 'Notice text goes here'
## Project documentation
PHPDoc: https://wpdesk.gitlab.io/wp-notice/index.html
### AJAX handler
To use permanent dismissible notices AJAX handler must be created and hooks initialized:
```php
wpdesk_init_wp_notice_ajax_handler();
// Is equivalent to:
( new \WPDesk\Notice\AjaxHandler() )->hooks();
```
### Displaying
To display permanent dismissible notice:
```php
wpdesk_permanent_dismissible_wp_notice( 'Notice text goes here', 'notice-name' );
// Is equivalent to
$notice = new \WPDesk\Notice\PermanentDismissibleNotice( 'Notice text goes here', 'notice-name' );
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment