Inpsyde\MultilingualPress\Widget\Dashboard\DashboardWidget::register PHP Method

register() public method

Registers the widget.
Since: 3.0.0
public register ( ) : boolean
return boolean Whether or not the widget was registered successfully.
    public function register()
    {
        if ($this->capability && !current_user_can($this->capability)) {
            return false;
        }
        return add_action('wp_dashboard_setup', function () {
            wp_add_dashboard_widget($this->id, $this->name, [$this->view, 'render'], $this->control_callback, $this->callback_args);
        });
    }