RCS file: /cvsroot/cafelog/wordpress/index.php,v
retrieving revision 1.78
diff -u -3 -r1.78 index.php
|
|
|
3 | 3 | require('./wp-blog-header.php'); |
4 | 4 | ?> |
5 | 5 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
6 | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 6 | <html xmlns="http://www.w3.org/1999/xhtml" <?php blog_language(); ?>> |
7 | 7 | |
8 | 8 | <head profile="http://gmpg.org/xfn/1"> |
9 | 9 | <title><?php bloginfo('name'); ?><?php wp_title(); ?></title> |
… |
… |
|
39 | 39 | <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3> |
40 | 40 | <div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></div> |
41 | 41 | |
42 | | <div class="storycontent"> |
| 42 | <div class="storycontent" <?php the_language() ?>> |
43 | 43 | <?php the_content(); ?> |
44 | 44 | </div> |
45 | 45 | |
RCS file: /cvsroot/cafelog/wordpress/wp-admin/edit-form-advanced.php,v
retrieving revision 1.28
diff -u -3 -r1.28 edit-form-advanced.php
|
|
|
46 | 46 | $saveasdraft = '<input name="save" type="submit" id="save" tabindex="6" value="' . __('Save and Continue Editing') . '" />'; |
47 | 47 | |
48 | 48 | if (empty($post_status)) $post_status = 'draft'; |
| 49 | if (empty($post_language)) $post_language = get_settings('default_blog_language'); |
49 | 50 | |
50 | 51 | ?> |
51 | 52 | |
… |
… |
|
93 | 94 | <legend><?php _e('Post Slug') ?></legend> |
94 | 95 | <div><input name="post_name" type="text" size="17" id="post_name" value="<?php echo $post_name ?>" /></div> |
95 | 96 | </fieldset> |
| 97 | <div style="clear:both"> |
96 | 98 | <fieldset id="postpassworddiv"> |
97 | 99 | <legend><a href="http://wordpress.org/docs/reference/post/#post_password" title="<?php _e('Help on post password') ?>"><?php _e('Post Password') ?></a></legend> |
98 | 100 | <div><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post_password ?>" /></div> |
99 | 101 | </fieldset> |
100 | | |
| 102 | <fieldset id="postlanguagediv"> |
| 103 | <legend><a href="http://wordpress.org/docs/reference/post/#post_language" title="<?php _e('Help on post Language') ?>"><?php _e('Post Language') ?></a></legend> |
| 104 | <div><input name="post_language" type="text" size="2" maxlength="2" id="post_language" value="<?php echo $post_language ?>" /></div> |
| 105 | </fieldset> |
| 106 | </div> |
101 | 107 | <br /> |
102 | 108 | <fieldset style="clear:both"> |
103 | 109 | <legend><a href="http://wordpress.org/docs/reference/post/#excerpt" title="<?php _e('Help with excerpts') ?>"><?php _e('Excerpt') ?></a></legend> |
RCS file: /cvsroot/cafelog/wordpress/wp-admin/options-writing.php,v
retrieving revision 1.21
diff -u -3 -r1.21 options-writing.php
|
|
|
48 | 48 | <h2>Writing Options</h2> |
49 | 49 | <form name="form1" method="post" action="options.php"> |
50 | 50 | <input type="hidden" name="action" value="update" /> |
51 | | <input type="hidden" name="page_options" value="'default_post_edit_rows','use_smilies','use_balanceTags','advanced_edit','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category', 'default_email_category'" /> |
| 51 | <input type="hidden" name="page_options" value="'default_post_edit_rows','use_smilies','use_balanceTags','advanced_edit','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category', 'default_email_category', 'default_blog_language'" /> |
52 | 52 | <table width="100%" cellspacing="2" cellpadding="5" class="editform"> |
53 | 53 | <tr valign="top"> |
54 | 54 | <th scope="row"> <?php _e('When starting a post, show:') ?> </th> |
… |
… |
|
87 | 87 | ?> |
88 | 88 | </select></td> |
89 | 89 | </tr> |
| 90 | <tr valign="top"> |
| 91 | <th scope="row"><?php _e('Default blog language:') ?></th> |
| 92 | <td><input name="default_blog_language" id="default_blog_language" value="<?php echo get_settings('default_blog_language') ?>" size="2" maxlength="2" /> <a href="http://www.oasis-open.org/cover/iso639a.html"><?php _e('Lookup your language code.')?></a> |
| 93 | </td> |
| 94 | <tr> |
90 | 95 | </table> |
91 | 96 | <fieldset class="options"> |
92 | 97 | <legend><?php _e('Update Services') ?></legend> |
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.70
diff -u -3 -r1.70 post.php
|
|
|
71 | 71 | $ping_status = $_POST['ping_status']; |
72 | 72 | if (empty($ping_status)) $ping_status = get_settings('default_ping_status'); |
73 | 73 | $post_password = $_POST['post_password']; |
| 74 | if (empty($post_language)) $post_language = get_settings('default_blog_language'); |
74 | 75 | |
75 | 76 | if (empty($post_name)) |
76 | 77 | $post_name = sanitize_title($post_title, $post_ID); |
… |
… |
|
111 | 112 | |
112 | 113 | if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) { |
113 | 114 | $postquery ="INSERT INTO $wpdb->posts |
114 | | (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt) |
| 115 | (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password, post_language, post_name, to_ping, post_modified, post_modified_gmt) |
115 | 116 | VALUES |
116 | | ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', $post_latf, $post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt') |
| 117 | ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', $post_latf, $post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_language', '$post_name', '$trackback', '$now', '$now_gmt') |
117 | 118 | "; |
118 | 119 | } else { |
119 | 120 | $postquery ="INSERT INTO $wpdb->posts |
120 | | (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt) |
| 121 | (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_language, post_name, to_ping, post_modified, post_modified_gmt) |
121 | 122 | VALUES |
122 | | ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt') |
| 123 | ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_language', '$post_name', '$trackback', '$now', '$now_gmt') |
123 | 124 | "; |
124 | 125 | } |
125 | 126 | |
… |
… |
|
229 | 230 | $comment_status = $postdata->comment_status; |
230 | 231 | $ping_status = $postdata->ping_status; |
231 | 232 | $post_password = $postdata->post_password; |
| 233 | $post_language = $postdata->post_language; |
232 | 234 | $to_ping = $postdata->to_ping; |
233 | 235 | $pinged = $postdata->pinged; |
234 | 236 | $post_name = $postdata->post_name; |
… |
… |
|
302 | 304 | if (empty($ping_status)) $ping_status = 'closed'; |
303 | 305 | //if (!$_POST['ping_status']) $ping_status = get_settings('default_ping_status'); |
304 | 306 | $post_password = $_POST['post_password']; |
| 307 | $post_language = $_POST['post_language']; |
305 | 308 | $post_name = sanitize_title($_POST['post_name'], $post_ID); |
306 | 309 | if (empty($post_name)) $post_name = sanitize_title($post_title); |
307 | 310 | $trackback = $_POST['trackback_url']; |
… |
… |
|
357 | 360 | comment_status = '$comment_status', |
358 | 361 | ping_status = '$ping_status', |
359 | 362 | post_password = '$post_password', |
| 363 | post_language = '$post_language', |
360 | 364 | post_name = '$post_name', |
361 | 365 | to_ping = '$trackback', |
362 | 366 | post_modified = '$now', |
RCS file: /cvsroot/cafelog/wordpress/wp-admin/upgrade-functions.php,v
retrieving revision 1.64
diff -u -3 -r1.64 upgrade-functions.php
|
|
|
877 | 877 | $wpdb->query("INSERT INTO $wpdb->options (option_name, option_type, option_value, option_description, option_admin_level) VALUES('default_email_category', 1, '1', 'by default posts by email will have this category', 8)"); |
878 | 878 | } |
879 | 879 | |
| 880 | if(!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'default_blog_language'")) { |
| 881 | $wpdb->query("INSERT INTO $wpdb->options (option_name, option_type, option_value, option_description, option_admin_level) VALUES('default_blog_language', 1, 'en', 'by default this will identify the language of your blog', 8)"); |
| 882 | } |
| 883 | |
| 884 | maybe_add_column($wpdb->posts, 'post_language', "ALTER TABLE `$wpdb->posts` ADD `post_language` VARCHAR( 2 ) DEFAULT 'en' NOT NULL ;"); |
| 885 | |
880 | 886 | if(!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'recently_edited'")) { |
881 | 887 | $wpdb->query("INSERT INTO $wpdb->options (option_name, option_type, option_value, option_admin_level) VALUES ('recently_edited', 3, '', 8)"); |
882 | 888 | } |
RCS file: /cvsroot/cafelog/wordpress/wp-admin/wp-admin.css,v
retrieving revision 1.58
diff -u -3 -r1.58 wp-admin.css
|
|
|
426 | 426 | width: 10.4em; |
427 | 427 | } |
428 | 428 | |
429 | | #titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv { |
| 429 | #titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #postlanguagediv, #namediv, #uridiv, #emaildiv { |
430 | 430 | float: left; |
431 | 431 | height: 6em; |
432 | 432 | margin-right: 5px; |
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.133
diff -u -3 -r1.133 functions.php
|
|
|
1865 | 1865 | return $wp_query_state->home; |
1866 | 1866 | } |
1867 | 1867 | |
| 1868 | function blog_language() { |
| 1869 | $lang = get_settings('default_blog_language'); |
| 1870 | // This is for XHTML 1.0: |
| 1871 | echo 'lang="'.$lang.'" xml:lang="'.$lang.'"'; |
| 1872 | // This is for XHTML 1.1: |
| 1873 | // echo 'xml:lang="'.$lang.'"'; |
| 1874 | } |
| 1875 | function the_language() { |
| 1876 | global $post; |
| 1877 | echo 'lang="'.$post->post_language.'"'; |
| 1878 | } |
1868 | 1879 | ?> |
| 1880 | No newline at end of file |