[wp-trac] [WordPress Trac] #37535: Outputting Post Type Description on admin edit screen

WordPress Trac noreply at wordpress.org
Mon Aug 1 06:14:20 UTC 2016


#37535: Outputting Post Type Description on admin edit screen
------------------------------+-----------------------------
 Reporter:  simonrcodrington  |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Administration    |    Version:  trunk
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 When registering a custom post type you
 can[https://codex.wordpress.org/Function_Reference/register_post_type#description
 specify the description] as part of the arguments you pass into
 `register_post_type`. I would expect that somewhere in the back-end of WP
 this description would be shown, however it isn't.

 It would be great if we could output the description right below the title
 of the post type when viewing the entries table (as I've done below)

 [[Image(https://goo.gl/IwzNmi)]]

 I've updated `edit.php` inside of `wp-admin` and added the following code
 after the main H1 tag


 {{{
 <?php
 //output description if set
 if($post_type_object->description){
         echo '<p class="description">';
                 echo esc_html( $post_type_object->description);
         echo '</p>';
 }?>
 }}}

 It's a pretty small update but its pretty useful for clients so that know
 what this admin edit screen is for. I use them for outlining what type of
 content will be added here.

 If the content type doesn't have a description nothing is outputted.

 I can submit a pull request since it's a fairly straightforward change.

 Cheers

 Simon

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37535>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list