BP_Admin::modify_plugin_action_links( array $links, string $file )
Add Settings link to plugins area.
Description
Parameters
- $links
-
(Required) Links array in which we would prepend our link.
- $file
-
(Required) Current plugin basename.
Return
(array) Processed links.
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( bp_get_admin_url( 'admin.php?page=bp-settings' ) ) . '">' . __( 'Settings', 'buddyboss' ) . '</a>', 'about' => '<a href="' . esc_url( bp_get_admin_url( '?hello=buddyboss' ) ) . '">' . __( 'About', 'buddyboss' ) . '</a>' ) ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.6.0 | BuddyPress 1.6.0 |
BuddyBoss 1.0.0 Updated the Settings path | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.