Changeset 11312
- Timestamp:
- 11/04/2021 06:13:10 AM (3 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r10437 r11312 48 48 // Admin Metaboxes 49 49 add_action( 'add_meta_boxes', array( $this, 'register_admin_metaboxes' ), 10, 2 ); 50 add_action( 'do_meta_boxes', array( $this, 'replace_title_global' ) );50 add_action( 'do_meta_boxes', array( $this, 'replace_title_global' ), 10, 2 ); 51 51 52 52 add_filter( 'postmeta_form_keys', array( $this, 'postmeta_form_keys' ) ); … … 70 70 * @global string $title The wp-admin title variable. 71 71 * 72 * @param string $post_type The post type of the current page 72 * @param string $post_type The post type of the current page. 73 * @param string $context Meta box context. Possible values include 'normal', 'advanced', 'side'. 73 74 * @return void. 74 75 */ 75 public function replace_title_global( $post_type ) {76 public function replace_title_global( $post_type, $context ) { 76 77 global $title; 77 78 78 if ( 'plugin' === $post_type ) { 79 $title = sprintf( $title, get_the_title() ); // esc_html() on output 79 if ( 'plugin' === $post_type && 'normal' === $context ) { 80 $post_type_object = get_post_type_object( $post_type ); 81 $title = sprintf( '%1$s %2$s', $post_type_object->labels->edit_item, get_the_title() ); // esc_html() on output 80 82 } 81 83 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r11162 r11312 171 171 172 172 // Context only available in admin, not in toolbar. 173 'edit_item' => is_admin() ? __( 'Editing Plugin: %s', 'wporg-plugins' ) : __( 'Edit Plugin', 'wporg-plugins' ),173 'edit_item' => is_admin() ? __( 'Editing Plugin:', 'wporg-plugins' ) : __( 'Edit Plugin', 'wporg-plugins' ), 174 174 ), 175 175 'description' => __( 'A Repo Plugin', 'wporg-plugins' ),
Note: See TracChangeset
for help on using the changeset viewer.