includes(); $this->init_components(); $this->hooks(); } /** * Include required files. */ private function includes() { require_once REYBLOCK_LAUNCHPAD_DIR . 'inc/class-system-status.php'; require_once REYBLOCK_LAUNCHPAD_DIR . 'inc/class-admin-menu.php'; require_once REYBLOCK_LAUNCHPAD_DIR . 'inc/blocks/class-blocks-manager.php'; } /** * Instantiate sub-components. */ private function init_components() { $this->system_status = new SystemStatus(); $this->admin_menu = new AdminMenu(); $this->blocks = new BlocksManager(); } /** * Setup hooks. */ private function hooks() { add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ] ); } /** * Enqueue scripts and styles only on our Launchpad page. * * @param string $hook Admin page hook. */ public function enqueue_admin_assets( $hook ) { if ( strpos( $hook, 'reyblock' ) === false ) { return; } // Admin CSS (Uses modern native system fonts, 100% GDPR and WordPress.org compliant) wp_enqueue_style( 'reyblock-launchpad-admin', REYBLOCK_LAUNCHPAD_URL . 'assets/css/launchpad-admin.css', [], REYBLOCK_LAUNCHPAD_VERSION ); } }