################ Patch to manage "menu titles" with WP Pages Author: Giovanni Allegri Mail: giohappy@gmail.com Date: 22 Octobe 2007 Worpress version: 2.3 ################ Usage: Modifying the following files you can set a menu voice different from the Page title, from inside the Page Administration tools. A "title_menu" new variable has been used, to manage the related "Walker" class functions. You can use it within "wp_list_pages" function inside "The Loop". Example: wp_list_pages('depth=1&title_li=&title_menu=true'); The default value is "false". Modified files: ----- FILE: wp-admin/includes/schema.php OLD: #100 post_title text NOT NULL, #101 post_category int(4) NOT NULL default '0', NEW: #100 post_title text NOT NULL, #101 post_title_menu text NOT NULL, #102 post_category int(4) NOT NULL default '0', ----- FILE: wp-includes/classes.php OLD: #522 $output .= $indent . '
  • ' . apply_filters('the_title', $page->post_title) . ''; NEW: #521 $voice=(($title_menu=='true')?$page->post_title_menu:$page->post_title); #522 $output .= $indent . '
  • ' . apply_filters('the_title', $voice) . ''; ----- FILE wp-includes/post-template.php OLD: #312 'authors' => '', 'sort_column' => 'menu_order, post_title' NEW: #312 'authors' => '', 'sort_column' => 'menu_order, post_title', 'title_menu' => 'false' ----- FILE wp-includes/post.php OLD: #718 post_title = '$post_title', #719 post_excerpt = '$post_excerpt', NEW: #718 post_title = '$post_title', #719 post_title_menu = '$post_title_menu', #720 post_excerpt = '$post_excerpt', OLD: #736 "INSERT IGNORE INTO $wpdb->posts #737 (post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_excerpt, post_status, post_type, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type) #738 VALUES #738 ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')"); NEW: #736 "INSERT IGNORE INTO $wpdb->posts #737 (post_author, post_date, post_date_gmt, post_content, post_content_filtered, post_title, post_title_menu, post_excerpt, post_status, post_type, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type) #738 VALUES #738 ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_title_menu', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')"); THE SAME LAST TWO SUBSTITUTION HAS BEEN APPLIED ALSO AT ROWS 1372-1373 AND 1392-1396 ----- FILE wp-admin/edit-page-form.php OLD: #134
    #135 #136
    #137
    #138 #139 #140
    NEW: #134
    #135 #136
    #137
    #138 #139
    #140 #141
    #142
    #143 #144 #145
    The End.