SimpleHistory::add_dashboard_widget PHP Method

add_dashboard_widget() public method

Maybe add a dashboard widget, requires current user to have view history capability and a setting to show dashboard to be set
    function add_dashboard_widget()
    {
        if ($this->setting_show_on_dashboard() && current_user_can($this->get_view_history_capability())) {
            /**
             * Filter to determine if history page should be added to page below dashboard or not
             *
             * @since 2.0.23
             *
             * @param bool Show the page or not
             */
            $show_dashboard_widget = apply_filters("simple_history/show_dashboard_widget", true);
            if ($show_dashboard_widget) {
                wp_add_dashboard_widget("simple_history_dashboard_widget", __("Simple History", 'simple-history'), array($this, "dashboard_widget_output"));
            }
        }
    }
SimpleHistory