프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$__version | string | Override version | |
$backdrop | boolean | Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click. | |
$buttons | array | List of buttons to display in footer | |
$close_button | boolean | True for dismiss button [x] on top right | |
$content | string | HTML content | |
$dismissButton | boolean | True for dismiss button [x] on top right | |
$dismiss_button_glyph | string | Glyph used like dismiss button | |
$height | integer | Height | |
$keyboard | boolean | Closes the modal when escape key is pressed | |
$permanent_dismiss | boolean | If TRUE this modal is permanet dismiss by a logged in user | |
$static | boolean | Render as static. Default is FALSE | |
$title | string | Title of modal (window) | |
$width | integer | Width |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$dismissed | array | List of permanent dismissed dialog id |
메소드 | 설명 | |
---|---|---|
__construct ( string $id, string $title, string $content = '' ) : WPDKUIModalDialog | Create an instance of WPDKUIModalDialog class | |
addButton ( string $id, string $label, boolean $dismiss = true, string $class = '', string $href = '' ) | Add a footer button | |
add_buttons ( $id, $label, $dismiss = true, $class = '' ) | ||
add_data ( $key, $value ) | ||
buttonOpenModal ( string $label, string $class = '' ) : string | Return the HTML markup for button tag to open this modal dialog | |
button_open_modal ( $label, $class = '' ) | ||
buttons ( ) : array | Return a list of button | |
content ( ) : string | Content | |
footer ( ) : string | Content of the footer of dialog. You can override this method. | |
hide ( ) | Hide immediately | |
html ( ) : string | Return the HTML markup for modal dialog | |
is_dismissed ( ) : boolean | Return TRUE if this modal dialog is dismissed. FALSE otherwise. | |
modal ( $echo = true ) | ||
open ( ) | Display and open dialog | |
print_footer_scripts ( ) | Prints any scripts and data queued for the footer. | |
show ( ) | Display immediately | |
toggle ( ) | Toggle modal |
메소드 | 설명 | |
---|---|---|
_buttons ( ) : string | Return the HTML markup for footer buttons | |
_footer ( ) : string | Return the footer content. | |
aria_title ( ) : string | Return the HTML aria title format | |
dismissButton ( ) : string | Return the HTML markup for top right dismiss button [x] | |
height ( ) : string | Return the computate style for height to use in main content div of dialog. | |
width ( ) : string | Return the computate style for width to use in main div of dialog. |
public addButton ( string $id, string $label, boolean $dismiss = true, string $class = '', string $href = '' ) | ||
$id | string | Unique id for button |
$label | string | Text label |
$dismiss | boolean | Optional. True for data-dismiss |
$class | string | Optional. Addition CSS class |
$href | string | Optional. If set use a TAG A instead BUTTON. |
public is_dismissed ( ) : boolean | ||
리턴 | boolean |
public bool $backdrop | ||
리턴 | boolean |
public bool $close_button | ||
리턴 | boolean |
public bool $dismissButton | ||
리턴 | boolean |
public string $dismiss_button_glyph | ||
리턴 | string |
public bool $permanent_dismiss | ||
리턴 | boolean |