Changeset 1523580
- Timestamp:
- 10/28/2016 06:18:15 AM (9 years ago)
- Location:
- advanced-custom-post-types/trunk
- Files:
-
- 4 edited
-
acpt.php (modified) (1 diff)
-
admin/class-load.php (modified) (3 diffs)
-
admin/class-post-type.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
advanced-custom-post-types/trunk/acpt.php
r1523578 r1523580 3 3 Plugin Name: Advanced Custom Post Types 4 4 Description: Customise WordPress with custom post types 5 Version: 0.4. 05 Version: 0.4.5 6 6 Author: iambriansreed 7 7 Author URI: http://iambrian.com/ -
advanced-custom-post-types/trunk/admin/class-load.php
r1523578 r1523580 3 3 namespace Advanced_Custom_Post_Types\Admin { 4 4 5 use Advanced_Custom_Post_Types\Debug; 5 6 use Advanced_Custom_Post_Types\Load_Main; 6 7 use Advanced_Custom_Post_Types\Load_Base; … … 109 110 { 110 111 ?> 111 #dashboard_right_now .<?php echo $post_type['post_type'] ;?>-count a:before {112 content: "\f<?php echo $post_type[' dashicon_unicode_number']; ?>";112 #dashboard_right_now .<?php echo $post_type['post_type']; ?>-count a:before { 113 content: "\f<?php echo $post_type['args']['dashicon_unicode_number']; ?>"; 113 114 } 114 115 … … 297 298 public function dashboard_glance_items( $items ) { 298 299 299 foreach ( $this->loader->get_post_types() as $post_type ) { 300 301 if ( $post_type['args']['public'] ) { 302 303 $type = $post_type['post_type']; 304 305 $num_posts = wp_count_posts( $type ); 300 foreach ( $this->loader->get_post_types() as $post_data ) { 301 302 if ( $post_data['args']['public'] ) { 303 304 $num_posts = wp_count_posts( $post_data['post_type'] ); 306 305 307 306 $published = intval( $num_posts->publish ); 308 307 309 $post_type = get_post_type_object( $type ); 310 311 $text = _n( '%s ' . $post_type->args->labels->singular_name, '%s ' . $post_type->args->labels->name, $published ); 308 $text = _n( '%s ' . $post_data['args']['singular_name'], '%s ' . 309 $post_data['args']['plural_name'], $published ); 312 310 313 311 $text = sprintf( $text, number_format_i18n( $published ) ); 314 312 315 if ( current_user_can( $post_type->args->cap->edit_posts ) ) { 316 317 echo '<li class="post-count ' . $post_type->args->labels->name . '-count">' . '<a href="edit.php?post_type=' . $post_type->name . '">' . $text . '</a>' . '</li>'; 318 } else { 319 echo '<li class="post-count ' . $post_type->args->labels->name . '-count">' . '<span>' . $text . '</span>' . '</li>'; 313 $can_view = current_user_can( $this->settings->get( 'capability' ) ); 314 315 echo '<li class="post-count ' . $post_data['post_type'] . '-count">'; 316 317 if ( $can_view ) { 318 echo '<a href="edit.php?post_type=' . $post_data['post_type'] . '">'; 320 319 } 320 321 echo $text; 322 323 if ( $can_view ) { 324 echo '</a>'; 325 } 326 327 echo '</li>'; 321 328 } 322 329 -
advanced-custom-post-types/trunk/admin/class-post-type.php
r1523578 r1523580 51 51 Notices::add( implode( '<br>', $this->errors ), 'error', false ); 52 52 } 53 54 flush_rewrite_rules(); 53 55 } 54 56 … … 238 240 239 241 $args['menu_icon'] = $dashicon->class_name; 242 243 $args['dashicon_unicode_number'] = $dashicon->unicode_number; 240 244 241 245 return $args; -
advanced-custom-post-types/trunk/readme.txt
r1523578 r1523580 63 63 64 64 = 0.4.0 = 65 * Fixes post name issues more refactoring and cleanup 66 65 * Fixes post name issues more refactoring and cleanup, added title placeholder 66 67 = 0.4.5 = 68 * Fixes At a Glance dashboard issues
Note: See TracChangeset
for help on using the changeset viewer.