plugin_action_links

過濾鉤子
apply_filters( 'plugin_action_links', $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:
定義位置
相關勾子
plugin_install_action_linkspaginate_linksnetwork_admin_plugin_action_linksplugin_action_links_plugin_filetheme_action_links
相關方法
paginate_linkspaginate_comments_linksis_plugin_activeplugin_dir_urlis_plugin_active_for_networkplugins_api
引入
4.9.0
棄用
-

plugin_action_links 是一個過濾鉤子,允許開發者在WordPress管理區的”外掛”螢幕上的”行動”欄中新增連結。這個鉤子可以用來給每個外掛新增自定義的連結,比如設定頁面或支援資源的連結。

過濾顯示在外掛列表表中的每個外掛的動作連結。

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

常見問題

FAQs
檢視更多 >