Linux 软件免费装
Banner图

tporret API Data Importer

开发者 tporret
更新时间 2026年7月20日 09:56
捐献地址: 去捐款
PHP版本: 8.1 及以上
WordPress版本: 7.0.0
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

xml import api ical etl

下载

1.4.0 1.4.1 1.2.6 1.2.5 1.3.0 1.3.1

详情介绍:

tporret API Data Importer gives WordPress teams an enterprise-grade ETL pipeline for importing external API data with confidence. The plugin ships readable source for its generated admin assets. JavaScript and CSS source files are included in the src/ directory, compiled assets are in build/, and the maintained public source repository is available at https://github.com/tporret/enterprise-api-importer. This readme is written for WordPress administrators and site owners evaluating or using the plugin from the Plugins screen. Use tporret API Data Importer to run clean, repeatable import workflows without sacrificing flexibility: Whether you import catalogs, directory records, listings, events, or custom business data, tporret API Data Importer provides a scalable framework for structured API-to-WordPress ETL. Built for real-world production workflows:

安装:

  1. Upload the plugin folder to the /wp-content/plugins/ directory, or install it through the WordPress Plugins screen.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Go to tporret API Data Importer → Manage Imports to configure your API connections, filtering rules, target post type, and Twig templates. Multisite note: activate the plugin on each subsite that should run imports. If you also want the Network Admin summary dashboard, activate it on the primary site too. Do not use Network Activate; that mode is intentionally not supported.

屏幕截图:

  • API Connection and Data Filtering rules.

升级注意事项:

1.4.1 Adds enterprise hardening for previews, run locking, lookup-table dedupe, JSON limits, and raw-record retention. Raw API records are purged by default unless retention is enabled in Settings. 1.4.0 Adds JSON/iCal payload format selection and iCal recurrence expansion. Existing imports continue to default to JSON. 1.3.1 Maintenance release. No functional upgrade steps required. 1.3.0 Adds parent mapping and full media mappings while preserving existing import jobs and the legacy featured image source path fallback. 1.2.5 Plugin name update for WordPress.org resubmission. No functional upgrade impact. 1.2.4 Dry-run rendering now mirrors save-time template normalization, and mapping template HTML allowlist support has been expanded for card-style/class-based templates while preserving centralized safety checks. 1.2.3 Multisite release. Adds a Network Admin summary dashboard, preserves per-site dashboards, blocks unsupported network activation, and changes the default SSRF dashboard state on new installs from critical to warning. 1.2.2 Security hardening release. Includes encrypted credential storage, masked REST credential responses, safer filter context handling, stronger content/meta sanitization, and tighter admin capability checks. 1.2.1 Maintenance release with cleaned repository history and packaging only. No functional upgrade steps required. 1.2.0 Security and UX release: Includes the new React import workspace, expanded auth methods, API preview/dry-run tools, optional templates on job creation, and per-import editing lock controls, plus enterprise hardening features (capabilities, Twig validation, audit logs, SSRF allowlisting). 1.0.0 Initial stable release with enterprise ETL controls, Twig templating, dynamic post titles, and target post type support.

常见问题:

Does this require WP-CLI?

No. It uses native WP-Cron scheduling, but supports CLI triggers.

Can I parse nested JSON arrays?

Yes. Nested objects and arrays can be parsed and transformed through Twig templating.

Can I import iCal feeds (ICS)?

Yes. Set Payload Format to iCal (.ics) and the importer will expand recurring events into normalized records.

Can I import CSV/TSV or XML/RSS feeds?

Yes. Set Payload Format to CSV/TSV or XML/RSS. CSV supports delimiter auto-detection (or manual override), and XML/RSS uses a configurable repeating node element (for example, item or entry).

How should I handle very large JSON feeds?

Use pagination where possible. JSON imports are non-streaming and protected by filterable payload and record limits. For very large feeds, CSV/XML streaming is the safer path.

Does it handle API authentication?

Yes. It supports four modes per import job: none, bearer token, custom API-key header, and basic auth.

Can I set dynamic titles for imported posts?

Yes. Use Post Title Template with Twig syntax. If left blank, the importer falls back to Imported Item {ID}.

Can I import into custom post types?

Yes. Select any public post type from Target Post Type. If the selected post type becomes unavailable, imports safely fall back to post.

How do I list imported items on the front end?

Imported items are saved as the public tporapdi_item post type. You can list them with a normal archive template such as archive-tporapdi_item.php, or with a WP_Query that sets post_type to tporapdi_item. The plugin does not include a dedicated front-end block for imported-item listings. Example archive template: ```php > No imported items found. ``` Example WP_Query loop: ```php $imported_items = new WP_Query( array( 'post_type' => 'tporapdi_item', 'post_status' => 'publish', 'posts_per_page' => 10, ) ); if ( $imported_items->have_posts() ) { while ( $imported_items->have_posts() ) { $imported_items->the_post(); echo ' ' . esc_html( get_the_title() ) . ''; } wp_reset_postdata(); } ```

How does this work on multisite?

Each subsite keeps its own import jobs, schedules, settings, and dashboard. A separate Network Admin dashboard can summarize active subsites when the plugin is also active on the primary site. Activate the plugin per site; Network Activate is intentionally blocked.

Does this import media attachments automatically from URL fields?

Yes. Configure Media Mappings in the Mapping/Templating tab to sideload featured images, gallery attachments, or attachment IDs stored in custom fields. The legacy Featured Image Source Path still works as a fallback when no media mappings are configured.

Can imported pages or hierarchical custom post types keep parent relationships?

Yes. For hierarchical target post types, enable Parent Mapping in the Mapping/Templating tab. Parent lookup can use an imported external ID, an existing WordPress post ID, or a post slug. Missing parents can be deferred for later reconciliation, imported as root items, or skipped.

Who can edit imported items and templates?

Template configuration requires the tporapdi_manage_templates capability or manage_options role. Multisite super admins always have access. Imported item editing can now be controlled per import job with the "Lock editing of imported posts" setting.

What Twig features are blocked for security?

The following Twig tags are disallowed to prevent file inclusion and code injection: include, source, import, from, embed, extends, use, macro.

Can I allow imports from internal/private networks?

Yes, but not recommended for production. Go to Settings → Allow Internal Endpoints to permit RFC1918 and loopback addresses. For whitelisting specific hosts/CIDR blocks, use Settings → Allowed Endpoint Hosts and Settings → Allowed Endpoint CIDR Blocks.

Why does the dashboard show a security warning on a new install?

The SSRF Hardening check starts in a warning state until you configure Allowed Endpoint Hosts or Allowed Endpoint CIDR Blocks. That warning is there to remind you that outbound API access is still open until you add an allowlist.

What should I configure in tporret API Data Importer → Settings first?

Start with Allowed Endpoint Hosts and list only trusted API domains. Leave Allow Internal Endpoints and Retain Raw API Records disabled unless you intentionally need them. Add CIDR blocks only when you need additional IP-range restrictions.

Are raw API records stored in post meta?

No, not by default. Raw record retention is debug-only and disabled by default. Enabling it stores _tporapdi_raw_record; disabling it purges stored raw records.

Where are template changes logged?

All template configuration changes are logged to the wp_custom_import_logs database table with before/after hashes, actor information, and precise timestamps. Review logs via tporret API Data Importer → Manage Imports → Import edit screen.

更新日志:

1.4.1 1.4.0 1.3.1 1.3.0 1.2.4 1.2.3 1.2.2 1.2.1 1.2.0 1.0.0