Admin Dashboard Widgets
Admin Dashboard Widgets are displayed on the admin area homepage.
They allow you to provide convenient access to key information and functionality from your module within the admin homepage dashboard.
Below is an example of how a dashboard widget is defined.
<?php
add_hook('AdminHomeWidgets', 1, function() {
//you can use mysql queries using mention below methods
// full_query("select query here");
// insert_query("table name",[data array]);
// update_query("table name",[data for updation array],[where condition array]);
// delete_query("table name",[where condition array]);
$output = '<div class="widget-content-padded">Hello World!</div>';
$widget = [
'id'=>11,
'title'=>'Widget Title here',
'description'=>'Widget Description here',
'weight'=>2,//widget order by (Display order)
'columns'=>4, //widget columns admin dashboard default column = 12
'DisplayTitle'=>true, //display widget title = true/false
'WidgetOwnLayout'=>false, // widget own style true/false
'content'=>$output //widget content output
];
return $widget;
});