Index: .
===================================================================
--- . (revision 865)
+++ . (working copy)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+upgrade
Index: plugins/wc-post-types/css/admin.css
===================================================================
--- plugins/wc-post-types/css/admin.css (revision 865)
+++ plugins/wc-post-types/css/admin.css (working copy)
@@ -4,4 +4,16 @@
}
#wcb_session_time {
width: 80px;
+}
+#dashboard_right_now a.wcb_speaker-count:before,
+#dashboard_right_now span.wcb_speaker-count:before {
+ content: "\f488";
+}
+#dashboard_right_now a.wcb_session-count:before,
+#dashboard_right_now span.wcb_session-count:before {
+ content: "\f489";
+}
+#dashboard_right_now a.wcb_sponsor-count:before,
+#dashboard_right_now span.wcb_sponsor-count:before {
+ content: "\f487";
}
\ No newline at end of file
Index: plugins/wc-post-types/wc-post-types.php
===================================================================
--- plugins/wc-post-types/wc-post-types.php (revision 865)
+++ plugins/wc-post-types/wc-post-types.php (working copy)
@@ -44,6 +44,8 @@
add_shortcode( 'sponsors', array( $this, 'shortcode_sponsors' ) );
add_shortcode( 'organizers', array( $this, 'shortcode_organizers' ) );
add_shortcode( 'schedule', array( $this, 'shortcode_schedule' ) );
+
+ add_filter( 'dashboard_glance_items', array( $this, 'glance_items' ), 10, 1 );
}
function init() {
@@ -211,6 +213,7 @@
case 'edit-wcb_speaker':
case 'edit-wcb_sponsor':
case 'edit-wcb_session':
+ case 'dashboard':
wp_enqueue_style( 'wcpt-admin', plugins_url( '/css/admin.css', __FILE__ ), array(), 1 );
break;
default:
@@ -1650,6 +1653,39 @@
register_widget( 'WCPT_Widget_Sessions' );
register_widget( 'WCPT_Widget_Organizers' );
}
+
+ /**
+ * Add post types to 'At a Glance' dashboard widget
+ */
+ function glance_items( $items = array() ) {
+ $post_types = array( 'wcb_speaker', 'wcb_session', 'wcb_sponsor' );
+
+ foreach( $post_types as $type ) {
+
+ if( ! post_type_exists( $type ) ) {
+ continue;
+ }
+
+ $num_posts = wp_count_posts( $type );
+
+ if ( isset( $num_posts->publish ) && $num_posts->publish ) {
+
+ $published = intval( $num_posts->publish );
+ $post_type = get_post_type_object( $type );
+
+ $text = _n( '%s ' . $post_type->labels->singular_name, '%s ' . $post_type->labels->name, $published, 'wordcamporg' );
+ $text = sprintf( $text, number_format_i18n( $published ) );
+
+ if ( current_user_can( $post_type->cap->edit_posts ) ) {
+ $items[] = sprintf( '%2$s', $type, $text ) . "\n";
+ } else {
+ $items[] = sprintf( '%2$s', $type, $text ) . "\n";
+ }
+ }
+ }
+
+ return $items;
+ }
}
// Load the plugin class.
Index: themes
===================================================================
--- themes (revision 865)
+++ themes (working copy)
Property changes on: themes
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+twentytwelve