public static function instance() { if (null === self::$instance) { self::$instance = new self(); } return self::$instance; }
public function maybe_enqueue_assets() { $screen = get_current_screen(); if (!$screen || $screen->id !== $this->page_hook) { return; } $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script('wp-js-admin', WP_JS_Plugin::instance()->get_url('assets/dist/js/admin' . $min . '.js'), array('jquery', 'jquery-ui-dialog', 'underscore'), WP_JS_Plugin::VERSION, true); }