Adding a local plugin to site admin navigation

If you want to add a local plugin navigation under the Site Administration block (under Plugins > Local Plugins) add the following to your local plugin settings.php file:

// Add the settings page to the navigation block

$settings = new admin_settingpage(
    'local_yourplugin', 
    get_string('pluginname', 'local_yourplugin')
);

$ADMIN->add('localplugins', $settings);