Merge pull request #147 from pfefferle/plugin_settings_link

add settings link to plugin page
This commit is contained in:
Matthias Pfefferle 2022-05-09 17:30:44 +02:00 committed by GitHub
commit 0d28633102
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,20 @@ function init() {
}
\add_action( 'plugins_loaded', '\Activitypub\init' );
/**
* Add plugin settings link
*/
function plugin_settings_link( $actions ) {
$settings_link[] = \sprintf(
'<a href="%1s">%2s</a>',
\menu_page_url( 'activitypub', false ),
\__( 'Settings', 'activitypub' )
);
return \array_merge( $settings_link, $actions );
}
\add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), '\Activitypub\plugin_settings_link' );
/**
* Add rewrite rules
*/