*{flex:0 0 100%;scroll-snap-align:start;}' . ':where(.af-root .af-embed){display:block;width:100%;border:0;}' . ':where(.af-root .af-embed-consent){display:block;position:relative;overflow:hidden;background:color-mix(in srgb,currentColor 6%,transparent);}' . ':where(.af-root .af-embed-load){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;height:100%;min-height:120px;padding:24px;text-align:center;cursor:pointer;}' . ':where(.af-root .af-embed-label){font-weight:600;}' . ':where(.af-root .af-embed-note){font-size:.82em;opacity:.7;max-width:34em;}'; public static function current_url(): string { global $wp; if (is_singular() && get_permalink()) { return (string) get_permalink(); } $request = isset($wp->request) ? (string) $wp->request : ''; return (string) home_url(add_query_arg([], $request)); } public static function boot(): void { Storage::maybe_upgrade(); Library::maybe_install(); // After a kit import the permalink structure has changed, but a flush at that moment has no // effect (see Kit\Importer). Deferred to here: by now every CPT and taxonomy is registered // according to the new settings. add_action('init', function () { if (get_option('aumframe_kit_needs_flush')) { delete_option('aumframe_kit_needs_flush'); flush_rewrite_rules(false); } }, 999); // ---- Full-page takeover (project docs 5.0) ---- // Note: get_header() and get_footer() are never called, so the theme's header.php never // executes at all — which is where "zero theme dependency" comes from. add_filter('template_include', [self::class, 'take_over'], 999); add_action('wp_enqueue_scripts', [self::class, 'enqueue_front']); Meta::boot(); Rest::boot(); /* * Shortcodes moved out of the AumCreate theme (1.9.0). Registered on both front end and admin: * the editor's preview renders them too, and `do_shortcode()` runs wherever content is asked for. */ Shortcodes\Pagination::boot(); Shortcodes\Audio::boot(); Shortcodes\ThemeToggle::boot(); Shortcodes\Search::boot(); Shortcodes\Form::boot(); Shortcodes\Catalog::boot(); Shortcodes\Interactions::boot(); ContentTypes::boot(); Forms\Feature::boot(); Model\Feature::boot(); foreach (glob(AUMFRAME_DIR . 'src/Kit/adapters/*.php') as $aumframe_kit_adapter) { require_once $aumframe_kit_adapter; } if (is_admin()) { require_once AUMFRAME_DIR . 'src/Integrations/aumviso-seed.php'; } Interactions\Feature::boot(); Stats\Views::boot(); Catalog\Catalog::boot(); ScreenedRequest::boot(); if (is_admin()) { Admin::boot(); Kit\Screen::boot(); Editor::boot(); I18nAdmin::boot(); PageLink::boot(); } } /** * On a match, swap in our blank canvas; otherwise hand the request straight back to the theme. * This is opt-in: a site can run some pages through Aumframe and the rest through the theme. */ public static function take_over(string $template): string { if (is_admin() || is_feed() || is_embed()) { return $template; } if (!Router::match()) { return $template; } return AUMFRAME_DIR . 'templates/canvas.php'; } /** * Emit a script as