PluginProbe
ManageWP Worker / 3.9.2
ManageWP Worker v3.9.2
4.9.38 4.9.37 4.9.36 4.9.35 4.9.34 3.8.7 3.8.8 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.18 3.9.19 3.9.2 3.9.20 3.9.21 3.9.22 3.9.23 3.9.24 All 73 releases
worker / plugins / extra_html_example / extra_html_example.php

extra_html_example.php in ManageWP Worker 3.9.2, at plugins/extra_html_example/extra_html_example.php

18 lines 505 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // add filter for the stats structure
4 add_filter('mmb_stats_filter', mmb_extra_html_example);
5
6 function mmb_extra_html_example($stats)
7 {
8 $count_posts = wp_count_posts();
9
10 $published_posts = $count_posts->publish;
11
12 // add 'extra_html' element. This is what gets displayed in the dashboard
13 $stats['extra_html'] = '<p>Hello from '.get_bloginfo('name').' with '.$published_posts.' published posts.</p>';
14
15 // return the whole array back
16 return $stats;
17 }
18 ?>