Linux 软件免费装
Banner图

NPC Manual Generator for Advanced Custom Fields

开发者 npc01
更新时间 2026年5月12日 01:05
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

pdf acf manual documentation custom-fields

下载

1.0.0

详情介绍:

When you hand off a WordPress site to a client, they often ask "where do I edit what?". NPC Manual Generator for Advanced Custom Fields parses the field structures defined by Advanced Custom Fields (ACF) and produces an update manual that operations staff can actually read - in Markdown and PDF. Designed for real-world handoff use, the plugin renders Repeater / Flexible Content / Group nesting, translates ACF location rules into readable text, and bundles a Japanese-capable font for PDF output, so the result is something you can ship as a deliverable. Main features Translation All UI strings are wrapped with __() / _e() and the text domain npc-manual-generator-for-advanced-custom-fields. A Japanese translation is bundled (languages/npc-manual-generator-for-advanced-custom-fields-ja.po). Additional languages can be contributed through translate.wordpress.org. Roadmap Links Author npc - Freelance WordPress developer working with ACF since 2016. This plugin grew from in-house tools used to ship real client projects.

安装:

Standard installation (recommended)
  1. From the WordPress admin, go to Plugins -> Add New -> Upload Plugin and upload the plugin Zip file.
  2. Activate "NPC ACF Manual Generator" from the Plugins list.
  3. Open "ACF Manual" in the left admin menu to start using it.
Manual upload (FTP)
  1. Unzip the package and upload the entire npc-acf-manual-generator/ folder (including vendor/ and fonts/) to wp-content/plugins/.
  2. Activate the plugin from Plugins.
  3. Open "ACF Manual" in the left admin menu.
For developers (when cloning from Git) The vendor/ directory is excluded from version control. Install the dependencies with Composer: composer install --no-dev --optimize-autoloader Requirements

屏幕截图:

  • Field group list (database and JSON sources side by side)
  • Both database-sourced and JSON-sourced field groups detected
  • Markdown preview rendered in the admin
  • Bulk download with format radio (MD / PDF / Both) and multi-select
  • Sample PDF page (A4 portrait, header / footer, location rules)
  • Repeater / Flexible Content / Group nested rendering in the PDF (vertical guide lines)
  • Plugin name and version displayed in the Plugins list

升级注意事项:

1.0.0 First public release on WordPress.org. Stable and production-ready. 0.3.0 Adds PDF output (mPDF + bundled IPAex Gothic) and bulk download format selection. Production-deliverable quality. 0.2.0 Adds reading of field groups stored in the database and Markdown download. Production-ready. 0.1.0 Initial release.

常见问题:

Is ACF required?

No. Markdown / PDF generation from sample JSON works without ACF. ACF 6.0 or higher is recommended for reading actual field groups from the database.

Does it work with ACF Free?

The basic field types work with ACF Free. Repeater / Flexible Content require ACF Pro.

PDF generation says it cannot run

One of the following is the cause. The exact reason is shown in the admin notice.

  • vendor/autoload.php is missing - run composer install --no-dev
  • fonts/ipaexg.ttf is missing - place IPAex Gothic (IPA Font License v1.0) under fonts/
  • PHP extension gd or mbstring is disabled - enable it on the server
  • wp-content/uploads/ is not writable - required to create a temporary directory

Can I customize the PDF design with my own brand?

Yes. The header comment of includes/class-pdf-generator.php documents six apply_filters() extension points (template path, header HTML, footer HTML, mPDF config, default font, final HTML). Add filters from functions.php or your own plugin to swap logos, colors, and layout.

Are there performance concerns on large sites?

The Markdown path is designed to handle 100 field groups within a few seconds. PDF generation for very large manuals (100+ pages) may require raising WP_MEMORY_LIMIT and the PHP execution time limit.

How extensive is the location rule humanization?

  • Post type / taxonomy / user role slugs - converted to readable labels
  • Page / post conditions - the actual page title is resolved
  • If the referenced post is deleted - falls back to [deleted: ID:xxxx]
  • Title resolution runs only for database-sourced groups (JSON-sourced groups show the raw ID)

Where is the sample JSON?

sample-data/group_sample.json is bundled. After activating the plugin, you can try Markdown / PDF generation from this sample even without ACF installed.

I want to contribute a translation

Contributions through the WordPress.org translation platform (translate.wordpress.org) are welcome.

I want to use the filter hooks for white-label customization

See the six apply_filters() calls described in the header comment of includes/class-pdf-generator.php:

  • npc_acf_manual_pdf_template_path - swap the template file path
  • npc_acf_manual_pdf_header_html - swap the header HTML
  • npc_acf_manual_pdf_footer_html - swap the footer HTML
  • npc_acf_manual_pdf_mpdf_config - swap the mPDF constructor arguments
  • npc_acf_manual_pdf_default_font - swap the default font
  • npc_acf_manual_pdf_html - swap the final HTML (last resort)
Add add_filter() calls from functions.php or your own plugin to apply your branding.

How do I test locally?

sample-data/group_sample.json works as a stand-in even when ACF is not installed. A pre-generated sample-data/group_sample.pdf is also bundled for reference.

更新日志:

1.0.0 0.3.0 0.2.0 0.1.0