in_plugin_update_message-{$file}

動作鉤子
do_action( "in_plugin_update_message-{$file}", $plugin_data, $response )
引數
  • (array) $plugin_data An array of plugin metadata. See get_plugin_data() and the {@see 'plugin_row_meta'} filter for the list of possible values.
    Required:
  • (object) $response { An object of metadata about the available plugin update. @type string $id Plugin ID, e.g. `w.org/plugins/[plugin-name]`. @type string $slug Plugin slug. @type string $plugin Plugin basename. @type string $new_version New plugin version. @type string $url Plugin URL. @type string $package Plugin update package URL. @type string[] $icons An array of plugin icon URLs. @type string[] $banners An array of plugin banner URLs. @type string[] $banners_rtl An array of plugin RTL banner URLs. @type string $requires The version of WordPress which the plugin requires. @type string $tested The version of WordPress the plugin is tested against. @type string $requires_php The version of PHP which the plugin requires. }
    Required:
定義位置
相關勾子
auto_plugin_update_send_emailplugins_auto_update_enabledauto_plugin_theme_update_emailpost_updated_messagesplugins_update_check_locales
相關方法
list_plugin_updateswp_plugin_update_rowsget_plugin_updateswp_get_auto_update_messagewp_plugin_update_rowoption_update_filter
引入
2.8.0
棄用
-

in_plugin_update_message-{$file} – 這個動作鉤子是在外掛更新介面觸發的,它允許你在外掛更新資訊中新增自定義資訊。鉤子名稱中的{$file}引數代表外掛檔案路徑。

在外掛列表表的每一行的更新訊息容器末尾觸發。

鉤子名稱的動態部分$file是指外掛的主檔案相對於外掛目錄的路徑。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( "in_plugin_update_message-{$file}", $plugin_data, $response ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
do_action( "in_plugin_update_message-{$file}", $plugin_data, $response ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
do_action( "in_plugin_update_message-{$file}", $plugin_data, $response ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

常見問題

FAQs
檢視更多 >