Yoast_Dashboard_Widget::add_dashboard_widget()publicYoast 1.0

Adds dashboard widget to WordPress.

Метод класса: Yoast_Dashboard_Widget{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$Yoast_Dashboard_Widget = new Yoast_Dashboard_Widget();
$Yoast_Dashboard_Widget->add_dashboard_widget();

Код Yoast_Dashboard_Widget::add_dashboard_widget() Yoast 19.11

public function add_dashboard_widget() {
	add_filter( 'postbox_classes_dashboard_wpseo-dashboard-overview', [ $this, 'wpseo_dashboard_overview_class' ] );
	wp_add_dashboard_widget(
		'wpseo-dashboard-overview',
		/* translators: %s is the plugin name */
		sprintf( __( '%s Posts Overview', 'wordpress-seo' ), 'Yoast SEO' ),
		[ $this, 'display_dashboard_widget' ]
	);
}