Skip to content

Commit 08db4f0

Browse files
committed
fix: add Docblock, fix docs and remove useless translation code
1 parent 2080a8d commit 08db4f0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/wp-admin/includes/dashboard.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ function wp_dashboard_right_now() {
318318
} else {
319319
$post_label = $post_type_object->labels->name;
320320
}
321-
/* translators: %d: Number of posts, %s post label. */
322-
$text = sprintf( '%d %s', number_format_i18n( $num_post_published ), $post_label );
321+
$text = number_format_i18n( $num_post_published ) . ' ' . $post_label;
323322

324323
if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) {
325324
printf( '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s</a></li>', $post_type, $text );

src/wp-includes/class-wp-post-type.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ public function set_props( $args ) {
547547
'show_in_admin_bar' => null,
548548
'menu_position' => null,
549549
'menu_icon' => null,
550+
'at_a_glance' => null,
550551
'capability_type' => 'post',
551552
'capabilities' => array(),
552553
'map_meta_cap' => null,
@@ -562,7 +563,6 @@ public function set_props( $args ) {
562563
'rest_base' => false,
563564
'rest_namespace' => false,
564565
'rest_controller_class' => false,
565-
'at_a_glance' => null,
566566
'autosave_rest_controller_class' => false,
567567
'revisions_rest_controller_class' => false,
568568
'late_route_registration' => false,
@@ -601,7 +601,7 @@ public function set_props( $args ) {
601601
$args['show_in_menu'] = $args['show_ui'];
602602
}
603603

604-
// If not set, default to the setting for show_in_menu
604+
// If not set, default to the setting for show_in_menu.
605605
if ( null === $args['at_a_glance'] ) {
606606
$args['at_a_glance'] = (bool) $args['show_in_menu'];
607607
}

src/wp-includes/post.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,6 +1735,8 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
17351735
* of a Dashicons helper class to use a font icon, e.g.
17361736
* 'dashicons-chart-pie'. Pass 'none' to leave div.wp-menu-image empty
17371737
* so an icon can be added via CSS. Defaults to use the posts icon.
1738+
* @type bool $at_a_glance Whether to display this post type in the 'At a Glance' dashboard widget.
1739+
* Default is value of $show_in_menu.
17381740
* @type string|array $capability_type The string to use to build the read, edit, and delete capabilities.
17391741
* May be passed as an array to allow for alternative plurals when using
17401742
* this argument as a base to construct the capabilities, e.g.

0 commit comments

Comments
 (0)