In this short blog post, we’ll show you a PHP function to insert a custom or personalised widget in WordPress Admin Dashboard

PHP function to insert a custom or personalised widget in WordPress Admin Dashboard
<?php
/*--------------------------------------------------------------
INSERE WIDGET PERSONALIZADO NO DASHBOARD ADMIN
--------------------------------------------------------------*/
function btwp_insert_custom_dashboard_widgets() {
global $wp_meta_boxes;
wp_add_dashboard_widget('custom_help_widget', 'Contate o desenvolvedor', 'btwp_insert_custom_dashboard_help');
}
function btwp_insert_custom_dashboard_help() {
echo '<p>Bem vindo ao sistema do site nome da empresa! Precisa de Ajuda? Contate o desenvolvedor <a href="mailto:email@email.com.br">aqui</a>. Para aceesar o nosso site, visite: <a href="http://www.nome-site.com.br" target="_blank">Nome do Site</a></p>';
}
add_action('wp_dashboard_setup', 'btwp_insert_custom_dashboard_widgets');

Tags: wp, wordpress, dashboard, php, custom_dashboard_widgets, wp_add_dashboard_widget, add_action