plugin_action_links_{$plugin_file}

過濾鉤子
apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context )
引數
  • (string[]) $actions An array of plugin action links. By default this can include 'activate', 'deactivate', and 'delete'. With Multisite active this can also include 'network_active' and 'network_only' items.
    Required:
  • (string) $plugin_file Path to the plugin file relative to the plugins directory.
    Required:
  • (array) $plugin_data An array of plugin data. See get_plugin_data() and the {@see 'plugin_row_meta'} filter for the list of possible values.
    Required:
  • (string) $context The plugin context. By default this can include 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
    Required:
定義位置
相關勾子
network_admin_plugin_action_links_plugin_fileplugin_action_linksplugin_install_action_linksafter_plugin_row_plugin_filenetwork_admin_plugin_action_links
相關方法
get_plugin_fileswp_make_plugin_file_treewp_print_plugin_file_treewp_get_active_network_pluginswp_edit_theme_plugin_filewp_ajax_edit_theme_plugin_file
引入
4.9.0
棄用
-

plugin_action_links_{$plugin_file}是”plugin_action_links”鉤子的一個變種,專門針對單個外掛。鉤子名稱中的”{$plugin_file}”部分被替換為外掛的檔名。這個鉤子可以用來為特定的外掛在”行動”欄中新增自定義連結。

過濾外掛列表表中為特定外掛顯示的操作連結列表。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$actions = apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
$actions = apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );
$actions = apply_filters( "plugin_action_links_{$plugin_file}", $actions, $plugin_file, $plugin_data, $context );

常見問題

FAQs
檢視更多 >