[], 'version' => $version]; $scriptAsset = file_exists($scriptAssetPath) ? require $scriptAssetPath : $fallback; \wp_enqueue_script( Config::$slug . '-toolbar-scripts', EXTENDIFY_BASE_URL . 'public/build/' . $manifest[$jsKey], $scriptAsset['dependencies'], $scriptAsset['version'], true ); \wp_set_script_translations( Config::$slug . '-toolbar-scripts', 'extendify-local', EXTENDIFY_PATH . 'languages/js' ); if (!empty($manifest[$cssKey])) { \wp_enqueue_style( Config::$slug . '-toolbar-styles', EXTENDIFY_BASE_URL . 'public/build/' . $manifest[$cssKey], [], $version, 'all' ); } } /** * Render the toolbar at the top of . * * @return void */ public function render() { if (!self::shouldRender()) { return; } $editLink = ''; $queried = \get_queried_object(); if ($queried instanceof \WP_Post) { $maybe = \get_edit_post_link($queried->ID); if ($maybe) { $editLink = $maybe; } } // phpcs:disable Generic.Files.LineLength.TooLong -- inline SVG + HTML template markup ?>