Interwebbi's Asset Inliner

外掛說明

Interwebbi’s Asset Inliner is a performance plugin that focuses on practical frontend asset optimization:

  • Inlines local frontend CSS from stylesheet links.
  • Rewrites relative CSS asset URLs so fonts/images still work after inlining.
  • Optional CSS minification.
  • Optional Google Fonts localization (detects Google Fonts stylesheets, downloads font files to local uploads, rewrites font URLs to local files, and inlines the rewritten font CSS).
  • Optional font-display policy override for localized Google Fonts (keep, swap, optional, fallback, block).
  • Optional preload tags for localized WOFF2 fonts.
  • Automatic cache busting on post/page saves, deletions, theme switches, updates, and plugin settings changes.

Google Fonts localization is optional and disabled by default.

螢幕擷圖

  • Interwebbi’s Asset Inliner settings page.

安裝方式

  1. Upload the plugin folder to /wp-content/plugins/ or install via the WordPress plugin uploader.
  2. Activate the plugin through the “Plugins” screen in WordPress.
  3. Go to Settings -> Interwebbi's Asset Inliner.
  4. Enable only the options you want.

常見問題集

Does this work with page caching plugins?

Yes. The generated HTML (including inlined CSS) can be cached normally. Purge page cache after major style changes.

Does this localize all Google Fonts automatically?

When “Localize Google Fonts” is enabled, the plugin processes Google Fonts stylesheet URLs used on frontend pages and stores downloaded font files locally.

Does this plugin send telemetry?

No telemetry is included. Remote requests are only made when Google Fonts localization is enabled, and only to fetch Google Fonts CSS/font files required for rendering.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Interwebbi's Asset Inliner〉的開發相關工作。

參與者

將〈Interwebbi's Asset Inliner〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

0.1.10

  • Hardened local URL-to-file resolution with allowed-root containment checks.
  • Removed hardcoded include-directory assumptions from file path mapping.
  • Added Google Fonts remote host validation before downloading font files.

0.1.9

  • Stored localized Google Fonts assets under /uploads/interwebbis-asset-inliner/ for WordPress.org compliance.
  • Reworked local URL-to-file resolution to use WordPress directory/location functions instead of ABSPATH-based assumptions.
  • Sanitized REQUEST_URI handling for frontend request gating.

0.1.8

  • Added Google Fonts filtering controls for localized downloads (allowed subsets, allowed weights, and optional italic variant toggle).

0.1.7

  • Explicitly close plugin-owned output buffer on shutdown to avoid unclosed ob_start() flow in shared environments.

0.1.6

  • Renamed plugin to “Interwebbi’s Asset Inliner” with slug interwebbis-asset-inliner.
  • Prefixed internal declarations and stored data keys with interwebbiinlineassets_ for collision safety.

0.1.5

  • Bypass all plugin optimizations on frontend requests for logged-in administrators.

0.1.4

  • Added stricter frontend request gating so optimization logic runs only on true frontend page views.

0.1.3

  • Renamed plugin branding/slug to remove restricted terms for WordPress.org compliance.
  • Removed discouraged translation loader call and aligned text domain usage.
  • Replaced direct database transient deletion with tracked transient key cleanup.
  • Replaced unlink() usage with wp_delete_file().
  • Updated tested compatibility metadata and naming consistency.

0.1.2

  • Added Google Fonts localization features (font-display policy and optional WOFF2 preload tags).
  • Added automatic cache busting on content/theme/update/settings events.
  • Added plugin settings link on Plugins page.
  • Improved compatibility for subdirectory WordPress installs.