[wp-trac] [WordPress Trac] #61225: Add a new hook to allow custom buttons next to "Add new post" button

WordPress Trac noreply at wordpress.org
Wed May 15 22:17:16 UTC 2024


#61225: Add a new hook to allow custom buttons next to "Add new post" button
--------------------------------+-----------------------------
 Reporter:  siddiquesaad        |      Owner:  siddiquesaad
     Type:  enhancement         |     Status:  assigned
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Administration      |    Version:
 Severity:  normal              |   Keywords:
  Focuses:  ui, administration  |
--------------------------------+-----------------------------
 There's no way to add a personalized button next to the "Add New <Post
 Type>" button on the edit screen in WP-Admin. Sometimes, customization is
 needed, like adding an "Import" button to be programmatically added to a
 custom post type. It'll immensely help to add a do_action here:

 {{{
 if ( current_user_can( $post_type_object->cap->create_posts ) ) {
         echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '"
 class="page-title-action">' . esc_html( $post_type_object->labels->add_new
 ) . '</a>';
 }
 }}}

 Thanks

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


More information about the wp-trac mailing list