BP_Admin::modify_plugin_action_links( array $links, string $file )
Add Settings link to plugins area.
Description Description
Parameters Parameters
- $links
-
(Required) Links array in which we would prepend our link.
- $file
-
(Required) Current plugin basename.
Return Return
(array) Processed links.
Source Source
File: bp-core/classes/class-bp-admin.php
public function modify_plugin_action_links( $links, $file ) { // Return normal links if not BuddyPress. if ( plugin_basename( buddypress()->basename ) != $file ) { return $links; } // Add a few links to the existing links array. return array_merge( $links, array( 'settings' => '<a href="' . esc_url( add_query_arg( array( 'page' => 'bp-components' ), bp_get_admin_url( $this->settings_page ) ) ) . '">' . esc_html__( 'Settings', 'buddypress' ) . '</a>', 'about' => '<a href="' . esc_url( bp_get_admin_url( '?hello=buddypress' ) ) . '">' . esc_html_x( 'Hello, BuddyPress!', 'Colloquial alternative to "learn about BuddyPress"', 'buddypress' ) . '</a>' ) ); }
Changelog Changelog
Version | Description |
---|---|
1.6.0 | Introduced. |