parent = $parent; add_action( 'wp_dashboard_setup', array( $this, 'add_dashboard_widgets' ) ); } /** * Add the widget * * @since 1.0.0 * @access public * @return void */ public function add_dashboard_widgets() { if ( ! current_user_can( $this->parent->WPSCAN_ROLE ) ) { return; } wp_add_dashboard_widget( $this->parent->WPSCAN_DASHBOARD, __( 'WPScan Status', 'wpscan' ), array( $this, 'dashboard_widget_content' ) ); } /** * Render the widget * * @since 1.0.0 * @access public * @return string */ public function dashboard_widget_content() { $report = $this->parent->get_report(); if ( ! $this->parent->classes['settings']->api_token_set() ) { echo esc_html( '