You've already forked wp-fedistream
feat: Add plugin action links and user guide
- Add Settings and Dashboard links to the WordPress Plugins page - Create comprehensive user guide (USERGUIDE.md) covering: - Installation and configuration - Managing artists, albums, tracks, and playlists - Shortcodes and widgets - ActivityPub and WooCommerce integration - User library features and troubleshooting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -196,6 +196,34 @@ final class Plugin {
|
||||
add_action( 'admin_menu', array( $this, 'add_admin_menu' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_assets' ) );
|
||||
|
||||
// Add settings link to plugins page.
|
||||
add_filter( 'plugin_action_links_' . WP_FEDISTREAM_BASENAME, array( $this, 'add_plugin_action_links' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add action links to the plugins page.
|
||||
*
|
||||
* @param array $links Existing action links.
|
||||
* @return array Modified action links.
|
||||
*/
|
||||
public function add_plugin_action_links( array $links ): array {
|
||||
$settings_link = sprintf(
|
||||
'<a href="%s">%s</a>',
|
||||
esc_url( admin_url( 'admin.php?page=fedistream-settings' ) ),
|
||||
esc_html__( 'Settings', 'wp-fedistream' )
|
||||
);
|
||||
|
||||
$dashboard_link = sprintf(
|
||||
'<a href="%s">%s</a>',
|
||||
esc_url( admin_url( 'admin.php?page=fedistream' ) ),
|
||||
esc_html__( 'Dashboard', 'wp-fedistream' )
|
||||
);
|
||||
|
||||
// Add our links at the beginning.
|
||||
array_unshift( $links, $dashboard_link, $settings_link );
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user