plugin_row_meta

过滤钩子
apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status )
参数
  • (string[]) $plugin_meta An array of the plugin's metadata, including the version, author, author URI, and plugin URI.
    Required:
  • (string) $plugin_file Path to the plugin file relative to the plugins directory.
    Required:
  • (array) $plugin_data { An array of plugin data. @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. @type string $upgrade_notice The upgrade notice for the new plugin version. @type bool $update-supported Whether the plugin supports updates. @type string $Name The human-readable name of the plugin. @type string $PluginURI Plugin URI. @type string $Version Plugin version. @type string $Description Plugin description. @type string $Author Plugin author. @type string $AuthorURI Plugin author URI. @type string $TextDomain Plugin textdomain. @type string $DomainPath Relative path to the plugin's .mo file(s). @type bool $Network Whether the plugin can only be activated network-wide. @type string $RequiresWP The version of WordPress which the plugin requires. @type string $RequiresPHP The version of PHP which the plugin requires. @type string $UpdateURI ID of the plugin for update purposes, should be a URI. @type string $Title The human-readable title of the plugin. @type string $AuthorName Plugin author's name. @type bool $update Whether there's an available update. Default null. }
    Required:
  • (string) $status Status filter currently applied to the plugin list. Possible values are: 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search', 'paused', 'auto-update-enabled', 'auto-update-disabled'.
    Required:
定义位置
相关勾子
after_plugin_rowplugin_localeplugin_loadedplugins_loadedtheme_row_meta
相关方法
plugin_dir_pathwp_login_viewport_metaplugins_urlplugins_apiplugin_dir_urlget_plugin_data
引入
2.8.0
弃用
-

plugin_row_meta: 这个过滤器用于在WordPress管理中的”插件”屏幕上为插件的行添加额外的信息。这些信息可以用来显示诸如插件兼容性、支持链接或作者信息等信息。

过滤插件列表表中每个插件的行元数组。

$plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status );

常见问题

FAQs
查看更多 >