钩子文档

load-importer-{$importer}

💡 云策文档标注

概述

load-importer-{$importer} 是一个 WordPress 动作钩子,在导入器屏幕加载前触发。钩子名称中的动态部分 $importer 表示导入器的 slug。

关键要点

  • 这是一个动态钩子,用于在特定导入器屏幕加载前执行自定义代码。
  • 可能的钩子名称包括 load-importer-blogger、load-importer-wpcat2tag 等,具体取决于导入器类型。
  • 钩子自 WordPress 3.5.0 版本引入,开发者可以利用它来扩展或修改导入器功能。

📄 原文内容

Fires before an importer screen is loaded.

Description

The dynamic portion of the hook name, $importer, refers to the importer slug.

Possible hook names include:

  • load-importer-blogger
  • load-importer-wpcat2tag
  • load-importer-livejournal
  • load-importer-mt
  • load-importer-rss
  • load-importer-tumblr
  • load-importer-wordpress

Source

do_action( "load-importer-{$importer}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

Changelog

Version Description
3.5.0 Introduced.