public static init ( ) : WPDKUIComponents | ||
Результат | WPDKUIComponents |
public static function init()
{
static $instance = null;
if (is_null($instance)) {
$instance = new self();
// @since 1.6.0 - You can now access to this singleton class by global
$GLOBALS[__CLASS__] = $instance;
}
return $instance;
}
/** * Create an instance of WPDKUIModalDialogTour class * * @brief Construct * * @return WPDKUIModalDialogTour */ public function __construct($id, $title) { // Remember, change the id to reopen this dialog tour parent::__construct($id, $title); // Permanent dismiss $this->permanent_dismiss = true; if (false === $this->is_dismissed() && 0 === did_action('wpxm_open_tour')) { // Enqueue page view WPDKUIComponents::init()->enqueue(WPDKUIComponents::PAGE); } }