![]() |
WPDK
1.5.0
WordPress Development Kit
|
Public Member Functions | |
| __construct ($id, $content= '', $type=WPDKUIAlertType::INFORMATION, $title= '') | |
| Construct. More... | |
| content () | |
| Content. More... | |
| title () | |
| Title. More... | |
| html () | |
| Get HTML. More... | |
| toControl () | |
| Brief. More... | |
| alert ($echo=true) | |
Public Member Functions inherited from WPDKHTMLTag | |
| __construct ($tag_name) | |
| addData ($name, $value) | |
| Add data attribute. More... | |
| addClass ($class) | |
| Add CSS Class. More... | |
| display () | |
| Display. More... | |
| html () | |
| Return the HTML markup for this tag. More... | |
| draw () | |
| Draw. More... | |
| setPropertiesByArray ($properties=array()) | |
| Set properties by array. More... | |
Public Member Functions inherited from WPDKObject | |
| __className () | |
| Returns the class object. More... | |
| __parentClass () | |
| Returns the class object for the receiver’s superclass. More... | |
| __isClass ($class) | |
| Brief. More... | |
| __isSubclassOfClass ($class) | |
| Return TRUE if the receiving class is a subclass of —or identical to— $class, otherwise FALSE. More... | |
Data Fields | |
| const | USER_META_KEY_PERMANENT_DISMISS = '_wpdk_alert_dismiss' |
| $dismissable = true | |
| Dismissable. More... | |
| $dismissToolTip = '' | |
| Tooltip. More... | |
| $title = '' | |
| Title. More... | |
| $dismissButton = true | |
| Dismiss button. More... | |
| $dismiss_button_glyph = '×' | |
| Dismiss button glyph icon. More... | |
| $content = '' | |
| Content. More... | |
| $type | |
| Alert type. More... | |
| $permanent_dismiss = false | |
| Permanent dismiss. More... | |
| $block | |
| Block layout. More... | |
Data Fields inherited from WPDKHTMLTag | |
| $__version = '1.1.1' | |
| Version. More... | |
| $accesskey = '' | |
| $class = array() | |
| $content = '' | |
| Content. More... | |
| $contenteditable | |
| $contextmenu | |
| $data = array() | |
| Data attribute. More... | |
| $dir | |
| $draggable | |
| $dropzone | |
| $hidden | |
| $id | |
| $lang | |
| $onclick | |
| $spellcheck | |
| $style | |
| $tabindex | |
| $tagName | |
| Tag name. More... | |
| $title | |
Data Fields inherited from WPDKObject | |
| $__version = '1.0.0' | |
| The version number assigned to the class. More... | |
Protected Attributes | |
| $dismissed = array() | |
| Permanent dismissed. More... | |
Protected Attributes inherited from WPDKHTMLTag | |
| $attributes = array() | |
| Attributes list. More... | |
| $close | |
| Close tag. More... | |
| $open | |
| Open tag. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from WPDKHTMLTag | |
| static | sanitizeAttributes ($attributes) |
| Sanitize attributes. More... | |
| static | sanitizeData ($attributes) |
| Sanitize data attributes. More... | |
| static | sanitizeClasses ($classes) |
| Sanitize CSS Classes list. More... | |
| static | sanitizeStyles ($styles) |
| Sanitize CSS Classes list. More... | |
| static | attributeInline ($attributes, $additional_attributes=false) |
| Inline Data attribute. More... | |
| static | dataInline ($data, $additional_data=false) |
| Inline Data attribute. More... | |
| static | classInline ($classes, $additional_classes=false) |
| Inline CSS class. More... | |
| static | styleInline ($styles, $additional_styles=false) |
| Inline CSS class. More... | |
| static | mergeClasses ($class, $class2=null, $_=null) |
| Merge. More... | |
Protected Member Functions inherited from WPDKHTMLTag | |
| beforeContent () | |
| Before content. More... | |
| afterContent () | |
| After content. More... | |
Useful Alert
To create and display an alert just coding:
$alert = new WPDKUIAlert( 'my-alert', 'Hello World!' ); $alert->display();
OR
class myAlert extends WPDKUIAlert {
// Internal construct
public function __construct()
{
parent::__construct( $id, false, $type, $title );
}
// Override content
public function content()
{
echo 'Hello...';
}
}
Definition at line 58 of file wpdk-ui-alert.php.
| __construct | ( | $id, | |
$content = '', |
|||
$type = WPDKUIAlertType::INFORMATION, |
|||
$title = '' |
|||
| ) |
Construct.
Create an instance of WPDKUIAlert class
| string | $id | This alert id |
| string | $content | Optional. An HTML content for this alert |
| string | $type | Optional. See WPDKUIAlertType. Default WPDKUIAlertType::INFORMATION |
| string | $title | Optional. Title of alert |
Definition at line 169 of file wpdk-ui-alert.php.
| alert | ( | $echo = true | ) |
Definition at line 354 of file wpdk-ui-alert.php.
| content | ( | ) |
| html | ( | ) |
Get HTML.
Return the HTML markup for a Twitter bootstrap alert
Definition at line 285 of file wpdk-ui-alert.php.
| title | ( | ) |
| toControl | ( | ) |
Brief.
Return an array item description in Control Layout Array format
Definition at line 321 of file wpdk-ui-alert.php.
| bool $block |
Block layout.
Set TRUE for alert-block class style
Definition at line 146 of file wpdk-ui-alert.php.
| string $content = '' |
| string $dismiss_button_glyph = '×' |
Dismiss button glyph icon.
Glyph used like dismiss button
Definition at line 108 of file wpdk-ui-alert.php.
| bool $dismissable = true |
Dismissable.
Add alert-dismissable class
Definition at line 71 of file wpdk-ui-alert.php.
| bool $dismissButton = true |
Dismiss button.
True to display dismiss [x] button. Default true
Definition at line 99 of file wpdk-ui-alert.php.
|
protected |
Permanent dismissed.
List of permanent dismissed alert id
Definition at line 155 of file wpdk-ui-alert.php.
| string $dismissToolTip = '' |
| bool $permanent_dismiss = false |
Permanent dismiss.
If TRUE this alert is permanet dismiss by a logged in user
Definition at line 136 of file wpdk-ui-alert.php.
| string $title = '' |
| string $type |
| const USER_META_KEY_PERMANENT_DISMISS = '_wpdk_alert_dismiss' |
Definition at line 61 of file wpdk-ui-alert.php.