WordPress.org

Make WordPress Core

Ticket #188: 0000188-default-lang.diff

File 0000188-default-lang.diff, 3.4 KB (added by Kitten, 14 years ago)
  • .php

    old new  
    33require('./wp-blog-header.php');
    44?>
    55<!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(); ?>>
    77
    88<head profile="http://gmpg.org/xfn/1">
    99        <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
  • wp-includes/

    old new  
    18651865    return $wp_query_state->home;
    18661866}
    18671867
     1868function 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}
    18681875?>
     1876 No newline at end of file
  • wp-admin/

    old new  
    4848  <h2>Writing Options</h2>
    4949  <form name="form1" method="post" action="options.php">
    5050    <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'" />
    5252    <table width="100%" cellspacing="2" cellpadding="5" class="editform">
    5353      <tr valign="top">
    5454        <th scope="row"> <?php _e('When starting a post, show:') ?> </th>
     
    8787?>
    8888                        </select></td>
    8989                </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>
    9095    </table>
    9196    <fieldset class="options">
    9297        <legend><?php _e('Update Services') ?></legend>
  • wp-admin/

    old new  
    877877        $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)");
    878878    }
    879879
     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       
    880884        if(!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'recently_edited'")) {
    881885        $wpdb->query("INSERT INTO $wpdb->options (option_name, option_type, option_value, option_admin_level) VALUES ('recently_edited', 3, '', 8)");
    882886    }