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

init

parent bdfb059d
No related branches found
No related tags found
No related merge requests found
Pipeline #6085 failed
{
"name": "wpdesk/wp-builder",
"name": "wpdesk/wp-notice",
"authors": [
{
"name": "GROla",
......@@ -8,7 +8,8 @@
],
"require": {
"php": ">=5.5",
"wpdesk/wp-basic-requirements": "dev-master"
"wpdesk/wp-basic-requirements": "dev-master",
"wpdesk/wp-builder": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "<7",
......@@ -19,7 +20,7 @@
"wimg/php-compatibility": "^8"
},
"autoload": {
"psr-4": {"WPDesk\\PluginBuilder\\": "src/"}
"psr-4": {"WPDesk\\Notice\\": "src/"}
},
"autoload-dev": {
},
......
......@@ -2,15 +2,26 @@
namespace WPDesk\Notice;
use WPDesk\PluginBuilder\Plugin\HookablePluginDependant;
use WPDesk\PluginBuilder\Plugin\PluginAccess;
/**
* Class Notice.
*
* @package WPDesk\Notice
*/
class AjaxHandler
class AjaxHandler implements HookablePluginDependant
{
use PluginAccess;
/**
* Hooks.
*/
public function hooks()
{
add_action();
}
}
......@@ -28,7 +28,17 @@ class DismissibleNotice extends Notice
$this->noticeDismissOptionName = $noticeContent;
}
protected
/**
* Get attributes as string.
*
* @return string
*/
protected function getAttributesAsString()
{
$attributesAsString = parent::getAttributesAsString();
$attributesAsString .= sprintf('data-dismiss-option="%1$s"', esc_attr($this->noticeDismissOptionName));
return $attributesAsString;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment