Support » Requests and Feedback » $wp_post_types['attachment']->labels

  • I’ve been trying to customize the admin panel for a client and they had a request to change Media Library to something else. Simple enough, right? Just use global $wp_post_types make a function and run $labels = $wp_post_types[‘attachment’]->labels and then go through the $labels-> list and rewrite them.

    After no success, I went digging though the WP core files to find that the upload.php page does not use $labels->name to write “Media Library” or $labels->add_new to write “Upload New Media”. They’re both written directly into the pages as __(“Media Library”).

    So, I have 2 questions and 1 request.

    Question 1: Why were these files written to not use the $wp_post_types[‘attachment’] labels ?

    Question 2: Why were these used in a slightly inconsistent manor not allowing the user to change the name label but allowing the user to change the edit_item label and a few others? Also, users are able to modify the globals $menu and $submennu to change the name or title in the menu bar.

    My request: Please make this consistent with the other post types allowing the user to define the all labels in the [‘attachment’] post type so they are applied consistently.

    Thank you.

    [No bumping, thank you.]

  • The topic ‘$wp_post_types['attachment']->labels’ is closed to new replies.