Ticket #4902: 4902.patch
File 4902.patch, 3.1 KB (added by , 5 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/glossary.php
diff --git sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/glossary.php sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/glossary.php index 3f79946..6c8d4b1 100644
class WPorg_Handbook_Glossary { 33 33 34 34 register_post_type( 'glossary', array( 35 35 'labels' => array( 36 'name' => _x( 'Glossary', 'glossary' ),37 'singular_name' => _x( 'Entry', 'glossary' ),38 'add_new' => _x( 'Add New', 'glossary' ),39 'add_new_item' => _x( 'Add New Entry', 'glossary' ),40 'edit_item' => _x( 'Edit Entry', 'glossary' ),41 'new_item' => _x( 'New Entry', 'glossary' ),42 'view_item' => _x( 'View Entry', 'glossary' ),43 'search_items' => _x( 'Search Glossary', 'glossary' ),44 'not_found' => _x( 'No entries found', 'glossary' ),45 'not_found_in_trash' => _x( 'No entries found in Trash', 'glossary' ),46 'parent_item_colon' => _x( 'Parent Entry:', 'glossary' ),47 'menu_name' => _x( 'Glossary', 'glossary' ),48 'name_admin_bar' => _x( 'Glossary Entry', 'glossary' ),36 'name' => _x( 'Glossary', 'glossary', 'wporg' ), 37 'singular_name' => _x( 'Entry', 'glossary', 'wporg' ), 38 'add_new' => _x( 'Add New', 'glossary', 'wporg' ), 39 'add_new_item' => _x( 'Add New Entry', 'glossary', 'wporg' ), 40 'edit_item' => _x( 'Edit Entry', 'glossary', 'wporg' ), 41 'new_item' => _x( 'New Entry', 'glossary', 'wporg' ), 42 'view_item' => _x( 'View Entry', 'glossary', 'wporg' ), 43 'search_items' => _x( 'Search Glossary', 'glossary','wporg' ), 44 'not_found' => _x( 'No entries found', 'glossary', 'wporg' ), 45 'not_found_in_trash' => _x( 'No entries found in Trash', 'glossary', 'wporg' ), 46 'parent_item_colon' => _x( 'Parent Entry:', 'glossary', 'wporg' ), 47 'menu_name' => _x( 'Glossary', 'glossary', 'wporg' ), 48 'name_admin_bar' => _x( 'Glossary Entry', 'glossary', 'wporg' ), 49 49 ), 50 50 'public' => true, 51 51 'show_ui' => true, … … class WPorg_Handbook_Glossary { 71 71 } 72 72 73 73 static function manage_glossary_posts_columns( $columns ) { 74 $columns['author'] = __( 'Created by' );74 $columns['author'] = __( 'Created by', 'wporg' ); 75 75 return $columns; 76 76 } 77 77 … … class WPorg_Handbook_Glossary { 98 98 99 99 $edit = get_edit_post_link( $post ); 100 100 if ( $edit ) { 101 $edit = ' - <a href="' . esc_url( $edit ) . '"> edit</a>';101 $edit = ' - <a href="' . esc_url( $edit ) . '">' . esc_html__( 'Edit', 'wporg' ) . '</a>'; 102 102 } 103 103 $entry .= ' <a href="' . esc_url( get_permalink( $post ) ) . '">#</a>' . $edit . '</dd>'; 104 104 … … class WPorg_Handbook_Glossary { 109 109 $content .= '</dl>'; 110 110 111 111 if ( current_user_can( get_post_type_object('glossary')->cap->edit_posts ) ) 112 $content .= '<p><a href="' . admin_url( 'post-new.php?post_type=glossary' ) . '"> add new entry</a>';112 $content .= '<p><a href="' . admin_url( 'post-new.php?post_type=glossary' ) . '">' . esc_html__( 'Add new entry', 'wporg' ) . '</a>'; 113 113 114 114 return $content; 115 115 }