PluginProbe
Edit Flow / 0.1.5
Edit Flow v0.1.5
0.11.1 0.11.0 0.7.2 0.7.3 0.7.4 0.7.5 0.7.6 0.8 0.8.1 0.8.2 0.9 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 trunk 0.1.5 0.10.0 0.10.1 0.10.2 All 44 releases
edit-flow / php / dashboard.php

dashboard.php in Edit Flow 0.1.5, at php/dashboard.php

58 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Code for all dashboard widgets will go here
4
5 class edit_flow_dashboard {
6
7 function __construct ( ) {
8 add_action('wp_dashboard_setup', array(&$this, 'add_dashboard_widgets') );
9 }
10
11 function add_dashboard_widgets ( ) {
12 global $edit_flow;
13
14 // Set up Post Status widget
15 // But, first check to see if it's enabled
16 if($edit_flow->get_plugin_option('post_status_widget_enabled')) wp_add_dashboard_widget('post_status_widget', 'Unpublished Content', array(&$this, 'post_status_widget'));
17 }
18
19 /**
20 * Creates Post Status widget
21 * Display an at-a-glance view of post counts for all custom statuses in the system
22 */
23 function post_status_widget ( ) {
24 global $edit_flow;
25
26 $statuses = $edit_flow->custom_status->get_custom_statuses();
27 ?>
28 <p class="sub">Posts at a Glance</p>
29
30 <div class="table">
31 <table>
32 <tbody>
33
34 <?php foreach($statuses as $status) : ?>
35 <?php $filter_link = get_custom_status_filter_link($status->slug) ?>
36 <tr>
37 <td class="b">
38 <a href="<?php echo $filter_link; ?>">
39 <?php echo get_custom_status_post_count($status->slug); ?>
40 </a>
41 </td>
42 <td>
43 <a href="<?php echo $filter_link; ?>"><?php echo $status->name ?></a>
44 <span class="small"><a href="<?php echo get_custom_status_edit_link($status->term_id) ?>">[edit]</a></span>
45 </td>
46 </tr>
47
48 <?php endforeach; ?>
49 </tbody>
50 </table>
51 </div>
52 <?php
53 }
54
55 }
56
57
58 ?>