Use this hook to add new tab / settings group in WordPress Download Manager settings page.

Example:

class CustomSettings{
    function __construct(){
        add_filter('add_wpdm_settings_tab', array($this, 'Tab'));
    }

    function Tab($tabs){
        $tabs['new-tab-id'] = \WPDM\admin\menus\Settings::createMenu('new-tab-id', 'New Tab', array($this, 'TabPage'), 'fa fa-magic');
        return $tabs;
    }

    function TabPage(){

        if (isset($_POST['section']) && $_POST['section'] == 'new-tab-id' && is_admin()) {
            //Save Settings                 
            _e('Saved Successfully!');
            die();
        }
        ?>
        <!-- Setting page html here. -->
        <?php
    }


}
new CustomSettings();
Last Updated: Feb 6, 2016


Leave a Reply