File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -303,16 +303,12 @@ function wp_dashboard_right_now() {
303303 <ul>
304304 <?php
305305 // At a Glance Post Types.
306- foreach ( get_post_types ( array ( 'at_a_glance ' => true ) ) as $ post_type ) {
306+ foreach ( get_post_types ( array ( 'at_a_glance ' => true ), 'objects ' ) as $ post_type_object ) {
307+ $ post_type = $ post_type_object ->name ;
307308 $ num_posts = wp_count_posts ( $ post_type );
308309 $ num_post_published = intval ( $ num_posts ->publish );
309310
310311 if ( $ num_posts && $ num_post_published ) {
311- $ post_type_object = get_post_type_object ( $ post_type );
312-
313- if ( ! $ post_type_object ) {
314- continue ;
315- }
316312 if ( 1 === $ num_post_published ) {
317313 $ post_label = $ post_type_object ->labels ->singular_name ;
318314 } else {
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ final class WP_Post_Type {
199199 * @since 4.6.0
200200 * @var string $menu_icon
201201 */
202- public $ menu_icon = null ;
202+ public $ menu_icon ;
203203
204204 /**
205205 * The string to use to build the read, edit, and delete capabilities.
You can’t perform that action at this time.
0 commit comments