Ticket #986: 986-admin.diff

File 986-admin.diff, 172.1 KB (added by Nazgul, 6 years ago)
  • wp-admin/admin-ajax.php

     
    139139        break; 
    140140case 'add-cat' : // From Manage->Categories 
    141141        if ( !current_user_can( 'manage_categories' ) ) 
    142                 die('-1'); 
     142                die('-1'); 
    143143        if ( !$cat = wp_insert_category( $_POST ) ) 
    144144                die('0'); 
    145145        if ( !$cat = get_category( $cat ) ) 
  • wp-admin/admin-db.php

     
    4848        if ( ! $user->has_cap('edit_others_posts') ) { 
    4949                if ( $user->has_cap('edit_posts') || $exclude_zeros == false ) 
    5050                        return array($user->id); 
    51                 else  
     51                else 
    5252                        return false; 
    5353        } 
    5454 
     
    9393                $update = false; 
    9494 
    9595        $cat_name = apply_filters('pre_category_name', $cat_name); 
    96          
     96 
    9797        if (empty ($category_nicename)) 
    9898                $category_nicename = sanitize_title($cat_name); 
    9999        else 
     
    192192                        $cats = array($default_cat); 
    193193                else 
    194194                        $cats = array_diff($cats, array($cat_ID)); 
    195                 wp_set_post_categories($post_id, $cats);  
     195                wp_set_post_categories($post_id, $cats); 
    196196        } 
    197197 
    198198        $default_link_cat = get_option('default_link_category'); 
     
    203203                        $cats = array($default_link_cat); 
    204204                else 
    205205                        $cats = array_diff($cats, array($cat_ID)); 
    206                 wp_set_link_cats($link_id, $cats);  
     206                wp_set_link_cats($link_id, $cats); 
    207207        } 
    208          
     208 
    209209        wp_cache_delete($cat_ID, 'category'); 
    210210        wp_cache_delete('all_category_ids', 'category'); 
    211211 
     
    279279 
    280280function wp_revoke_user($id) { 
    281281        $id = (int) $id; 
    282          
     282 
    283283        $user = new WP_User($id); 
    284         $user->remove_all_caps();        
     284        $user->remove_all_caps(); 
    285285} 
    286286 
    287287function wp_insert_link($linkdata) { 
     
    347347        $link = add_magic_quotes($link); 
    348348 
    349349        // Passed link category list overwrites existing category list if not empty. 
    350         if ( isset($linkdata['link_category']) && is_array($linkdata['link_category']) 
     350        if ( isset($linkdata['link_category']) && is_array($linkdata['link_category']) 
    351351                         && 0 != count($linkdata['link_category']) ) 
    352                 $link_cats = $linkdata['link_category']; 
    353         else  
    354                 $link_cats = $link['link_category']; 
     352                $link_cats = $linkdata['link_category']; 
     353        else 
     354                $link_cats = $link['link_category']; 
    355355 
    356356        // Merge old and new fields with new fields overwriting old ones. 
    357357        $linkdata = array_merge($link, $linkdata); 
    358         $linkdata['link_category'] = $link_cats; 
     358        $linkdata['link_category'] = $link_cats; 
    359359 
    360360        return wp_insert_link($linkdata); 
    361361} 
     
    364364        global $wpdb; 
    365365 
    366366        do_action('delete_link', $link_id); 
    367          
     367 
    368368        $categories = wp_get_link_cats($link_id); 
    369369        if( is_array( $categories ) ) { 
    370370                foreach ( $categories as $category ) { 
     
    380380function wp_get_link_cats($link_ID = 0) { 
    381381        global $wpdb; 
    382382 
    383         $sql = "SELECT category_id  
    384                 FROM $wpdb->link2cat  
    385                 WHERE link_id = $link_ID  
     383        $sql = "SELECT category_id 
     384                FROM $wpdb->link2cat 
     385                WHERE link_id = $link_ID 
    386386                ORDER BY category_id"; 
    387387 
    388388        $result = $wpdb->get_col($sql); 
     
    403403 
    404404        // First the old categories 
    405405        $old_categories = $wpdb->get_col(" 
    406                 SELECT category_id  
    407                 FROM $wpdb->link2cat  
     406                SELECT category_id 
     407                FROM $wpdb->link2cat 
    408408                WHERE link_id = $link_ID"); 
    409409 
    410410        if (!$old_categories) { 
     
    419419        if ($delete_cats) { 
    420420                foreach ($delete_cats as $del) { 
    421421                        $wpdb->query(" 
    422                                 DELETE FROM $wpdb->link2cat  
    423                                 WHERE category_id = $del  
    424                                         AND link_id = $link_ID  
     422                                DELETE FROM $wpdb->link2cat 
     423                                WHERE category_id = $del 
     424                                        AND link_id = $link_ID 
    425425                                "); 
    426426                } 
    427427        } 
     
    432432        if ($add_cats) { 
    433433                foreach ($add_cats as $new_cat) { 
    434434                        $wpdb->query(" 
    435                                 INSERT INTO $wpdb->link2cat (link_id, category_id)  
     435                                INSERT INTO $wpdb->link2cat (link_id, category_id) 
    436436                                VALUES ($link_ID, $new_cat)"); 
    437437                } 
    438438        } 
    439          
     439 
    440440        // Update category counts. 
    441441        $all_affected_cats = array_unique(array_merge($link_categories, $old_categories)); 
    442442        foreach ( $all_affected_cats as $cat_id ) { 
  • wp-admin/admin-functions.php

     
    316316                $text       = wp_specialchars(stripslashes(urldecode($_REQUEST['text']))); 
    317317                $text       = funky_javascript_fix($text); 
    318318                $popupurl   = wp_specialchars($_REQUEST['popupurl']); 
    319         $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text"; 
    320     } 
     319                $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text"; 
     320        } 
    321321 
    322322        if ( !empty($_REQUEST['excerpt']) ) 
    323323                $post_excerpt = wp_specialchars(stripslashes($_REQUEST['excerpt'])); 
     
    581581 
    582582        if ($post_ID) { 
    583583                $checked_categories = $wpdb->get_col(" 
    584                      SELECT category_id 
    585                      FROM $wpdb->categories, $wpdb->post2cat 
    586                      WHERE $wpdb->post2cat.category_id = cat_ID AND $wpdb->post2cat.post_id = '$post_ID' 
    587                      "); 
     584                        SELECT category_id 
     585                        FROM $wpdb->categories, $wpdb->post2cat 
     586                        WHERE $wpdb->post2cat.category_id = cat_ID AND $wpdb->post2cat.post_id = '$post_ID' 
     587                        "); 
    588588 
    589589                if (count($checked_categories) == 0) { 
    590590                        // No selected categories, strange 
     
    592592                } 
    593593        } else if ($link_id) { 
    594594                $checked_categories = $wpdb->get_col(" 
    595                      SELECT category_id 
    596                      FROM $wpdb->categories, $wpdb->link2cat 
    597                      WHERE $wpdb->link2cat.category_id = cat_ID AND $wpdb->link2cat.link_id = '$link_id' 
    598                      "); 
     595                        SELECT category_id 
     596                        FROM $wpdb->categories, $wpdb->link2cat 
     597                        WHERE $wpdb->link2cat.category_id = cat_ID AND $wpdb->link2cat.link_id = '$link_id' 
     598                        "); 
    599599 
    600600                if (count($checked_categories) == 0) { 
    601601                        // No selected categories, strange 
    602602                        $checked_categories[] = $default; 
    603                 }        
     603                } 
    604604        } else { 
    605605                $checked_categories[] = $default; 
    606606        } 
     
    664664                                        $edit = ''; 
    665665 
    666666                                $class = ('alternate' == $class) ? '' : 'alternate'; 
    667                                  
     667 
    668668                                $category->category_count = number_format( $category->category_count ); 
    669669                                $category->link_count = number_format( $category->link_count ); 
    670670                                echo "<tr id='cat-$category->cat_ID' class='$class'><th scope='row'>$category->cat_ID</th><td>$pad $category->cat_name</td> 
     
    700700                $id = $post->ID; 
    701701                $class = ('alternate' == $class) ? '' : 'alternate'; 
    702702?> 
    703   <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>  
    704     <th scope="row"><?php echo $post->ID; ?></th>  
    705     <td> 
    706       <?php echo $pad; ?><?php the_title() ?> 
    707       <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?> 
    708     </td>  
    709     <td><?php the_author() ?></td> 
    710     <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>  
    711         <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td> 
    712     <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='page.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>  
    713     <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='" . wp_nonce_url("page.php?action=delete&amp;post=$id", 'delete-page_' . $id) .  "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), js_escape(get_the_title()) ) . "' );\">" . __('Delete') . "</a>"; } ?></td>  
    714   </tr>  
     703        <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'> 
     704                <th scope="row"><?php echo $post->ID; ?></th> 
     705                <td> 
     706                        <?php echo $pad; ?><?php the_title() ?> 
     707                        <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?> 
     708                </td> 
     709                <td><?php the_author() ?></td> 
     710                <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td> 
     711                <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td> 
     712                <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='page.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td> 
     713                <td><?php if ( current_user_can('edit_page', $id) ) { echo "<a href='" . wp_nonce_url("page.php?action=delete&amp;post=$id", 'delete-page_' . $id) .  "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), js_escape(get_the_title()) ) . "' );\">" . __('Delete') . "</a>"; } ?></td> 
     714        </tr> 
    715715 
    716716<?php 
    717717                if ( $hierarchy) page_rows($id, $level + 1, $pages); 
     
    985985        $metavalue = $wpdb->escape(stripslashes(trim($_POST['metavalue']))); 
    986986 
    987987        if ( ('0' === $metavalue || !empty ($metavalue)) && ((('#NONE#' != $metakeyselect) && !empty ($metakeyselect)) || !empty ($metakeyinput)) ) { 
    988                 // We have a key/value pair. If both the select and the  
     988                // We have a key/value pair. If both the select and the 
    989989                // input for the key have data, the input takes precedence: 
    990990 
    991                 if ('#NONE#' != $metakeyselect) 
     991                if ('#NONE#' != $metakeyselect) 
    992992                        $metakey = $metakeyselect; 
    993993 
    994994                if ($metakeyinput) 
    995995                        $metakey = $metakeyinput; // default 
    996996 
    997997                $result = $wpdb->query(" 
    998                                                 INSERT INTO $wpdb->postmeta  
    999                                                 (post_id,meta_key,meta_value)  
     998                                                INSERT INTO $wpdb->postmeta 
     999                                                (post_id,meta_key,meta_value) 
    10001000                                                VALUES ('$post_ID','$metakey','$metavalue') 
    10011001                                        "); 
    10021002                return $wpdb->insert_id; 
     
    10301030 
    10311031        if ( $for_post ) 
    10321032                $edit = ( ('draft' == $post->post_status) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date) ) ? false : true; 
    1033   
     1033 
    10341034        echo '<fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" /> <label for="timestamp">'.__('Edit timestamp').'</label></legend>'; 
    10351035 
    10361036        $time_adj = time() + (get_settings('gmt_offset') * 3600); 
     
    10521052?> 
    10531053</select> 
    10541054<input type="text" id="jj" name="jj" value="<?php echo $jj; ?>" size="2" maxlength="2" onchange="edit_date.checked=true"/> 
    1055 <input type="text" id="aa" name="aa" value="<?php echo $aa ?>" size="4" maxlength="5" onchange="edit_date.checked=true" /> @  
    1056 <input type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> :  
    1057 <input type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />  
    1058 <input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" />  
     1055<input type="text" id="aa" name="aa" value="<?php echo $aa ?>" size="4" maxlength="5" onchange="edit_date.checked=true" /> @ 
     1056<input type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> : 
     1057<input type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> 
     1058<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> 
    10591059<?php 
    10601060        if ( $edit ) { 
    10611061                _e('Existing timestamp'); 
     
    12011201                var startPos = myField.selectionStart; 
    12021202                var endPos = myField.selectionEnd; 
    12031203                myField.value = myField.value.substring(0, startPos) 
    1204                               + myValue  
    1205                       + myField.value.substring(endPos, myField.value.length); 
     1204                        + myValue 
     1205                        + myField.value.substring(endPos, myField.value.length); 
    12061206                myField.focus(); 
    12071207                myField.selectionStart = startPos + myValue.length; 
    12081208                myField.selectionEnd = startPos + myValue.length; 
     
    13141314        global $menu_nopriv; 
    13151315 
    13161316        $parent = get_admin_page_parent(); 
    1317          
     1317 
    13181318        if ( isset($menu_nopriv[$pagenow]) ) 
    13191319                return false; 
    13201320 
     
    13411341                                return false; 
    13421342                } 
    13431343        } 
    1344          
     1344 
    13451345        return true; 
    13461346} 
    13471347 
     
    14131413                                $parent_file = $plugin_page; 
    14141414                                if ( isset($real_parent_file[$parent_file]) ) 
    14151415                                        $parent_file = $real_parent_file[$parent_file]; 
    1416                                          
     1416 
    14171417                                return $parent_file; 
    14181418                        } 
    14191419                } 
     
    18531853 
    18541854        // Compute the URL 
    18551855        $url = $uploads['url'] . "/$filename"; 
    1856          
     1856 
    18571857        $return = apply_filters( 'wp_handle_upload', array('file' => $new_file, 'url' => $url, 'type' => $type) ); 
    18581858 
    18591859        return $return; 
  • wp-admin/admin.php

     
    22if ( defined('ABSPATH') ) 
    33        require_once( ABSPATH . 'wp-config.php'); 
    44else 
    5     require_once('../wp-config.php'); 
     5        require_once('../wp-config.php'); 
    66 
    77if ( get_option('db_version') != $wp_db_version ) 
    88        die (sprintf(__("Your database is out-of-date.  Please <a href='%s'>upgrade</a>."), get_option('siteurl') . '/wp-admin/upgrade.php')); 
    9      
     9 
    1010require_once(ABSPATH . 'wp-admin/admin-functions.php'); 
    1111require_once(ABSPATH . 'wp-admin/admin-db.php'); 
    1212require_once(ABSPATH . WPINC . '/registration.php'); 
  • wp-admin/bookmarklet.php

     
    3535else 
    3636        $post->post_title = $popuptitle; 
    3737 
    38    
     38 
    3939$content  = wp_specialchars($_REQUEST['content']); 
    4040$popupurl = wp_specialchars($_REQUEST['popupurl']); 
    41     if ( !empty($content) ) { 
    42         $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) ); 
    43     } else { 
    44         $post->post_content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text"; 
    45     } 
     41if ( !empty($content) ) { 
     42        $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) ); 
     43} else { 
     44        $post->post_content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text"; 
     45} 
    4646 
    47     /* /big funky fixes */ 
     47/* /big funky fixes */ 
    4848 
    4949?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    5050<html xmlns="http://www.w3.org/1999/xhtml"> 
     
    7777} 
    7878 
    7979#wpbookmarklet .wrap { 
    80     border: 0px; 
     80        border: 0px; 
    8181} 
    8282 
    8383#wpbookmarklet #postdiv { 
    84     margin-bottom: 0.5em; 
     84        margin-bottom: 0.5em; 
    8585} 
    8686 
    8787#wpbookmarklet #titlediv { 
    88     margin-bottom: 1em; 
     88        margin-bottom: 1em; 
    8989} 
    9090 
    9191--> 
  • wp-admin/categories.php

     
    3030        $cat_name = get_catname($cat_ID); 
    3131 
    3232        // Don't delete the default cats. 
    33     if ( $cat_ID == get_option('default_category') ) 
     33        if ( $cat_ID == get_option('default_category') ) 
    3434                die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 
    3535 
    36     if ( $cat_ID == get_option('default_link_category') ) 
     36        if ( $cat_ID == get_option('default_link_category') ) 
    3737                die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one for bookmarks"), $cat_name)); 
    3838 
    3939        wp_delete_category($cat_ID); 
     
    4444 
    4545case 'edit': 
    4646 
    47     require_once ('admin-header.php'); 
    48     $cat_ID = (int) $_GET['cat_ID']; 
    49     $category = get_category_to_edit($cat_ID); 
    50     include('edit-category-form.php'); 
     47        require_once ('admin-header.php'); 
     48        $cat_ID = (int) $_GET['cat_ID']; 
     49        $category = get_category_to_edit($cat_ID); 
     50        include('edit-category-form.php'); 
    5151 
    5252break; 
    5353 
     
    8787        <thead> 
    8888        <tr> 
    8989                <th scope="col"><?php _e('ID') ?></th> 
    90         <th scope="col" style="text-align: left"><?php _e('Name') ?></th> 
    91         <th scope="col" style="text-align: left"><?php _e('Description') ?></th> 
    92         <th scope="col" width="90"><?php _e('Posts') ?></th> 
    93         <th scope="col" width="90"><?php _e('Bookmarks') ?></th> 
    94         <th colspan="2"><?php _e('Action') ?></th> 
     90                <th scope="col" style="text-align: left"><?php _e('Name') ?></th> 
     91                <th scope="col" style="text-align: left"><?php _e('Description') ?></th> 
     92                <th scope="col" width="90"><?php _e('Posts') ?></th> 
     93                <th scope="col" width="90"><?php _e('Bookmarks') ?></th> 
     94                <th colspan="2"><?php _e('Action') ?></th> 
    9595        </tr> 
    9696        </thead> 
    9797        <tbody id="the-list"> 
  • wp-admin/comment.php

     
    8989                $noredir = false; 
    9090        } 
    9191 
    92         $postdata = get_post($p) or  
     92        $postdata = get_post($p) or 
    9393                die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 
    9494 
    9595        if ( ! $comment = get_comment($comment) ) 
     
    114114case 'unapprovecomment': 
    115115        $comment = (int) $_GET['comment']; 
    116116        check_admin_referer('unapprove-comment_' . $comment); 
    117          
     117 
    118118        $p = (int) $_GET['p']; 
    119119        if (isset($_GET['noredir'])) { 
    120120                $noredir = true; 
  • wp-admin/custom-fields.js

     
    1414        for ( var i=0; i < inputs.length; i++ ) { 
    1515                if ('text' == inputs[i].type) { 
    1616                        inputs[i].setAttribute('autocomplete', 'off'); 
    17                         inputs[i].onkeypress = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.name.slice(5),10) + '");', e); }; 
     17                        inputs[i].onkeypress = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.name.slice(5),10) + '");', e); }; 
    1818                } 
    1919                if ('updatemeta' == inputs[i].className) { 
    20                         inputs[i].onclick = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.parentNode.parentNode.id.slice(5),10) + '");', e); }; 
     20                        inputs[i].onclick = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.parentNode.parentNode.id.slice(5),10) + '");', e); }; 
    2121                } 
    2222        } 
    2323 
  • wp-admin/dbx-admin-key-js.php

     
    99                break; 
    1010        case 'page.php' : 
    1111        case 'page-new.php' : 
    12                 $man = 'pagemeta';  
     12                $man = 'pagemeta'; 
    1313                break; 
    1414        case 'link.php' : 
    1515                $man = 'linkmeta'; 
  • wp-admin/edit-category-form.php

     
    2222<?php wp_nonce_field($nonce_action); ?> 
    2323        <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 
    2424                <tr> 
    25                   <th width="33%" scope="row" valign="top"><label for="cat_name"><?php _e('Category name:') ?></label></th> 
    26                   <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo wp_specialchars($category->cat_name); ?>" size="40" /></td> 
     25                        <th width="33%" scope="row" valign="top"><label for="cat_name"><?php _e('Category name:') ?></label></th> 
     26                        <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo wp_specialchars($category->cat_name); ?>" size="40" /></td> 
    2727                </tr> 
    2828                <tr> 
    2929                        <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category slug:') ?></label></th> 
     
    3131                </tr> 
    3232                <tr> 
    3333                        <th scope="row" valign="top"><label for="category_parent"><?php _e('Category parent:') ?></label></th> 
    34                         <td>         
     34                        <td> 
    3535                        <select name='category_parent' id='category_parent'> 
    36           <option value='0' <?php if (!$category->category_parent) echo " selected='selected'"; ?>><?php _e('None') ?></option> 
    37           <?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?> 
    38           </select></td> 
     36                        <option value='0' <?php if (!$category->category_parent) echo " selected='selected'"; ?>><?php _e('None') ?></option> 
     37                        <?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?> 
     38                        </select></td> 
    3939                </tr> 
    4040                <tr> 
    4141                        <th scope="row" valign="top"><label for="category_description"><?php _e('Description: (optional)') ?></label></th> 
  • wp-admin/edit-comments.php

     
    3939</script> 
    4040<div class="wrap"> 
    4141<h2><?php _e('Comments'); ?></h2> 
    42 <form name="searchform" action="" method="get" id="editcomments">  
    43   <fieldset>  
    44   <legend><?php _e('Show Comments That Contain...') ?></legend>  
    45   <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />  
    46   <input type="submit" name="submit" value="<?php _e('Search') ?>"  />   
    47   <input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 
    48   <?php _e('(Searches within comment text, e-mail, URI, and IP address.)') ?> 
    49   </fieldset>  
     42<form name="searchform" action="" method="get" id="editcomments"> 
     43        <fieldset> 
     44        <legend><?php _e('Show Comments That Contain...') ?></legend> 
     45        <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" /> 
     46        <input type="submit" name="submit" value="<?php _e('Search') ?>"  /> 
     47        <input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 
     48        <?php _e('(Searches within comment text, e-mail, URI, and IP address.)') ?> 
     49        </fieldset> 
    5050</form> 
    5151<p><a href="?mode=view"><?php _e('View Mode') ?></a> | <a href="?mode=edit"><?php _e('Mass Edit Mode') ?></a></p> 
    5252<?php 
     
    105105                ++$i; $class = ''; 
    106106                $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); 
    107107                        $comment_status = wp_get_comment_status($comment->comment_ID); 
    108                         if ('unapproved' == $comment_status)  
     108                        if ('unapproved' == $comment_status) 
    109109                                $class .= ' unapproved'; 
    110110                        if ($i % 2) 
    111111                                $class .= ' alternate'; 
     
    115115 
    116116<?php comment_text() ?> 
    117117 
    118 <p><?php comment_date('M j, g:i A');  ?> &#8212; [  
     118<p><?php comment_date('M j, g:i A');  ?> &#8212; [ 
    119119<?php 
    120120if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
    121121        echo " <a href='comment.php?action=editcomment&amp;comment=".$comment->comment_ID."'>" .  __('Edit') . '</a>'; 
     
    143143 
    144144                ?> 
    145145                <p> 
    146         <strong><?php _e('No comments found.') ?></strong></p> 
     146                        <strong><?php _e('No comments found.') ?></strong></p> 
    147147 
    148148                <?php 
    149149        } // end if ($comments) 
     
    154154                wp_nonce_field('bulk-comments'); 
    155155                echo '<table class="widefat"> 
    156156<thead> 
    157   <tr> 
    158     <th scope="col"><input type="checkbox" onclick="checkAll(document.getElementById(\'deletecomments\'));" /></th> 
    159     <th scope="col" style="text-align: left">' .  __('Name') . '</th> 
    160     <th scope="col" style="text-align: left">' .  __('E-mail') . '</th> 
    161     <th scope="col" style="text-align: left">' . __('IP') . '</th> 
    162     <th scope="col" style="text-align: left">' . __('Comment Excerpt') . '</th> 
    163         <th scope="col" colspan="3">' .  __('Actions') . '</th> 
    164   </tr> 
     157        <tr> 
     158                <th scope="col"><input type="checkbox" onclick="checkAll(document.getElementById(\'deletecomments\'));" /></th> 
     159                <th scope="col" style="text-align: left">' .  __('Name') . '</th> 
     160                <th scope="col" style="text-align: left">' .  __('E-mail') . '</th> 
     161                <th scope="col" style="text-align: left">' . __('IP') . '</th> 
     162                <th scope="col" style="text-align: left">' . __('Comment Excerpt') . '</th> 
     163                <th scope="col" colspan="3">' .  __('Actions') . '</th> 
     164        </tr> 
    165165</thead>'; 
    166166                foreach ($comments as $comment) { 
    167167                $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); 
     
    169169                $class = ('alternate' == $class) ? '' : 'alternate'; 
    170170                $class .= ('unapproved' == $comment_status) ? ' unapproved' : ''; 
    171171?> 
    172   <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'> 
    173     <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> 
    174     <td><?php comment_author_link() ?></td> 
    175     <td><?php comment_author_email_link() ?></td> 
    176     <td><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></td> 
    177     <td><?php comment_excerpt(); ?></td> 
    178     <td> 
    179         <?php if ('unapproved' == $comment_status) { ?> 
    180                 (Unapproved) 
    181         <?php } else { ?> 
    182                 <a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a> 
    183         <?php } ?> 
    184     </td> 
    185     <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
    186         echo "<a href='comment.php?action=editcomment&amp;comment=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a>"; } ?></td> 
    187     <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
    188                 echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape( $comment->comment_author ))  . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> "; 
     172        <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'> 
     173                <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> 
     174                <td><?php comment_author_link() ?></td> 
     175                <td><?php comment_author_email_link() ?></td> 
     176                <td><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></td> 
     177                <td><?php comment_excerpt(); ?></td> 
     178                <td> 
     179                        <?php if ('unapproved' == $comment_status) { ?> 
     180                                (Unapproved) 
     181                        <?php } else { ?> 
     182                                <a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a> 
     183                        <?php } ?> 
     184                </td> 
     185                <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
     186                        echo "<a href='comment.php?action=editcomment&amp;comment=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a>"; } ?></td> 
     187                <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
     188                        echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape( $comment->comment_author ))  . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> "; 
    189189                } ?></td> 
    190   </tr> 
    191                 <?php  
     190        </tr> 
     191                <?php 
    192192                } // end foreach 
    193193        ?></table> 
    194194<p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments &raquo;') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n  \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" /> 
    195195                        <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam &raquo;') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n  \'Cancel\' to stop, \'OK\' to mark as spam.") ?>')" /></p> 
    196   </form> 
     196</form> 
    197197<div id="ajax-response"></div> 
    198198<?php 
    199199        } else { 
  • wp-admin/edit-form-advanced.php

     
    88<?php endif; ?> 
    99 
    1010<form name="post" action="post.php" method="post" id="post"> 
    11 <?php if ( (isset($mode) && 'bookmarklet' == $mode) ||  
    12             isset($_GET['popupurl']) ): ?> 
     11<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?> 
    1312<input type="hidden" name="mode" value="bookmarklet" /> 
    1413<?php endif; ?> 
    1514 
     
    8382<input name="advanced_view" type="hidden" value="1" /> 
    8483<label for="comment_status" class="selectit"> 
    8584<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> 
    86 <?php _e('Allow Comments') ?></label>  
     85<?php _e('Allow Comments') ?></label> 
    8786<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label> 
    8887</div> 
    8988</fieldset> 
    9089 
    9190<fieldset id="passworddiv" class="dbx-box"> 
    92 <h3 class="dbx-handle"><?php _e('Password-Protect Post') ?></h3>  
     91<h3 class="dbx-handle"><?php _e('Password-Protect Post') ?></h3> 
    9392<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div> 
    9493</fieldset> 
    9594 
    9695<fieldset id="slugdiv" class="dbx-box"> 
    97 <h3 class="dbx-handle"><?php _e('Post slug') ?></h3>  
     96<h3 class="dbx-handle"><?php _e('Post slug') ?></h3> 
    9897<div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo $post->post_name ?>" /></div> 
    9998</fieldset> 
    10099 
    101100<fieldset class="dbx-box"> 
    102 <h3 class="dbx-handle"><?php _e('Post Status') ?></h3>  
     101<h3 class="dbx-handle"><?php _e('Post Status') ?></h3> 
    103102<div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?> 
    104103<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label> 
    105104<?php endif; ?> 
    106           <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label> 
    107           <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div> 
     105        <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label> 
     106        <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div> 
    108107</fieldset> 
    109108 
    110109<?php if ( current_user_can('edit_posts') ) : ?> 
     
    119118<h3 class="dbx-handle"><?php _e('Post author'); ?>:</h3> 
    120119<div class="dbx-content"> 
    121120<select name="post_author_override" id="post_author_override"> 
    122 <?php  
     121<?php 
    123122foreach ($authors as $o) : 
    124123$o = get_userdata( $o->ID ); 
    125124if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"'; 
     
    138137</div> 
    139138 
    140139<fieldset id="titlediv"> 
    141   <legend><?php _e('Title') ?></legend>  
    142   <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div> 
     140        <legend><?php _e('Title') ?></legend> 
     141        <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div> 
    143142</fieldset> 
    144143 
    145144<fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"> 
     
    151150<?php echo $form_prevstatus ?> 
    152151 
    153152 
    154 <p class="submit"><?php echo $saveasdraft; ?> <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" />  
    155 <?php  
     153<p class="submit"><?php echo $saveasdraft; ?> <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" /> 
     154<?php 
    156155if ('publish' != $post->post_status || 0 == $post_ID) { 
    157156?> 
    158157<?php if ( current_user_can('publish_posts') ) : ?> 
    159         <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />  
     158        <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 
    160159<?php endif; ?> 
    161160<?php 
    162161} 
    163162?> 
    164 <input name="referredby" type="hidden" id="referredby" value="<?php  
     163<input name="referredby" type="hidden" id="referredby" value="<?php 
    165164if ( !empty($_REQUEST['popupurl']) ) 
    166165        echo wp_specialchars($_REQUEST['popupurl']); 
    167166else if ( url_to_postid(wp_get_referer()) == $post_ID ) 
     
    192191<fieldset class="dbx-box"> 
    193192<h3 class="dbx-handle"><?php _e('Trackbacks') ?></h3> 
    194193<div class="dbx-content"><?php _e('Send trackbacks to'); ?>: <?php echo $form_trackback; ?> (<?php _e('Separate multiple URIs with spaces'); ?>) 
    195 <?php  
     194<?php 
    196195if ( ! empty($pings) ) 
    197196        echo $pings; 
    198197?> 
     
    205204<table cellpadding="3"> 
    206205<?php 
    207206$metadata = has_meta($post_ID); 
    208 list_meta($metadata);  
     207list_meta($metadata); 
    209208?> 
    210209 
    211210</table> 
  • wp-admin/edit-form-comment.php

     
    1818addLoadEvent(focusit); 
    1919</script> 
    2020<fieldset id="namediv"> 
    21     <legend><label for="name"><?php _e('Name:') ?></label></legend> 
     21        <legend><label for="name"><?php _e('Name:') ?></label></legend> 
    2222        <div> 
    23           <input type="text" name="newcomment_author" size="25" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" /> 
    24     </div> 
     23                <input type="text" name="newcomment_author" size="25" value="<?php echo $comment->comment_author ?>" tabindex="1" id="name" /> 
     24        </div> 
    2525</fieldset> 
    2626<fieldset id="emaildiv"> 
    27         <legend><label for="email"><?php _e('E-mail:') ?></label></legend> 
    28                 <div> 
    29                   <input type="text" name="newcomment_author_email" size="20" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" /> 
    30     </div> 
     27        <legend><label for="email"><?php _e('E-mail:') ?></label></legend> 
     28        <div> 
     29                <input type="text" name="newcomment_author_email" size="20" value="<?php echo $comment->comment_author_email ?>" tabindex="2" id="email" /> 
     30        </div> 
    3131</fieldset> 
    3232<fieldset id="uridiv"> 
    33         <legend><label for="URL"><?php _e('URI:') ?></label></legend> 
    34                 <div> 
    35                   <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo $comment->comment_author_url ?>" tabindex="3" id="URL" /> 
    36     </div> 
     33        <legend><label for="URL"><?php _e('URI:') ?></label></legend> 
     34        <div> 
     35                <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo $comment->comment_author_url ?>" tabindex="3" id="URL" /> 
     36        </div> 
    3737</fieldset> 
    3838 
    3939<fieldset style="clear: both;"> 
    40         <legend><?php _e('Comment') ?></legend> 
     40        <legend><?php _e('Comment') ?></legend> 
    4141        <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url'); ?> 
    4242</fieldset> 
    4343 
    4444<p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" /> 
    45   <input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" /> 
     45        <input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" /> 
    4646</p> 
    4747 
    4848</div> 
     
    5454        <tr> 
    5555                <th scope="row" valign="top"><?php _e('Comment Status') ?>:</th> 
    5656                <td><label for="comment_status_approved" class="selectit"><input id="comment_status_approved" name="comment_status" type="radio" value="1" <?php checked($comment->comment_approved, '1'); ?> /> <?php _e('Approved') ?></label><br /> 
    57           <label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment->comment_approved, '0'); ?> /> <?php _e('Moderated') ?></label><br /> 
    58           <label for="comment_status_spam" class="selectit"><input id="comment_status_spam" name="comment_status" type="radio" value="spam" <?php checked($comment->comment_approved, 'spam'); ?> /> <?php _e('Spam') ?></label></td> 
     57                <label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment->comment_approved, '0'); ?> /> <?php _e('Moderated') ?></label><br /> 
     58                <label for="comment_status_spam" class="selectit"><input id="comment_status_spam" name="comment_status" type="radio" value="spam" <?php checked($comment->comment_approved, 'spam'); ?> /> <?php _e('Spam') ?></label></td> 
    5959        </tr> 
    6060 
    6161<?php if ( current_user_can('edit_posts') ) : ?> 
     
    6767 
    6868        <tr> 
    6969                <th scope="row" valign="top"><?php _e('Delete'); ?>:</th> 
    70                 <td><input name="deletecomment" class="button" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"return confirm('" . __("You are about to delete this comment \\n  \'Cancel\' to stop, \'OK\' to delete.") . "')\""; ?> />  
     70                <td><input name="deletecomment" class="button" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"return confirm('" . __("You are about to delete this comment \\n  \'Cancel\' to stop, \'OK\' to delete.") . "')\""; ?> /> 
    7171                <input type="hidden" name="comment" value="<?php echo $comment->comment_ID ?>" /> 
    7272                <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> 
    7373                <input type="hidden" name="noredir" value="1" /> 
  • wp-admin/edit-form.php

     
    1919</script> 
    2020 
    2121<div id="poststuff"> 
    22     <fieldset id="titlediv"> 
    23       <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>  
    24           <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div> 
    25     </fieldset> 
     22        <fieldset id="titlediv"> 
     23                <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend> 
     24                <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div> 
     25        </fieldset> 
    2626 
    27     <fieldset id="categorydiv"> 
    28       <legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend>  
    29           <div><?php dropdown_categories($post->post_category); ?></div> 
    30     </fieldset> 
     27        <fieldset id="categorydiv"> 
     28                <legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend> 
     29                <div><?php dropdown_categories($post->post_category); ?></div> 
     30        </fieldset> 
    3131 
    3232<br /> 
    3333<fieldset id="postdiv"> 
    34     <legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend> 
     34        <legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend> 
    3535<?php the_quicktags(); ?> 
    3636<?php 
    3737 $rows = get_settings('default_post_edit_rows'); 
    3838 if (($rows < 3) || ($rows > 100)) { 
    39      $rows = 10; 
     39        $rows = 10; 
    4040 } 
    4141?> 
    4242<div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content"><?php echo $post->post_content ?></textarea></div> 
     
    5454<p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Identifier">URI</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') ?> 
    5555        <input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p> 
    5656 
    57 <p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />  
    58   <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" /> 
     57<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" /> 
     58        <input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" /> 
    5959 
    6060         <?php if ( current_user_can('edit_posts') ) : ?> 
    61   <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" />  
     61        <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="<?php _e('Publish') ?>" /> 
    6262<?php endif; ?> 
    6363 
    6464<?php if ('bookmarklet' != $mode) { 
    65       echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' .  __('Advanced Editing &raquo;') . '" />'; 
    66   } ?> 
    67   <input name="referredby" type="hidden" id="referredby" value="<?php if ( wp_get_referer() ) echo urlencode(wp_get_referer()); ?>" /> 
     65                echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' .  __('Advanced Editing &raquo;') . '" />'; 
     66        } ?> 
     67        <input name="referredby" type="hidden" id="referredby" value="<?php if ( wp_get_referer() ) echo urlencode(wp_get_referer()); ?>" /> 
    6868</p> 
    6969 
    7070<?php do_action('simple_edit_form', ''); ?> 
  • wp-admin/edit-link-form.php

     
    3030} 
    3131?> 
    3232 
    33 <div class="wrap">  
     33<div class="wrap"> 
    3434<h2><?php echo $heading ?></h2> 
    3535<?php echo $form ?> 
    3636<?php wp_nonce_field($nonce_action); ?> 
     
    4848</fieldset> 
    4949 
    5050<fieldset class="dbx-box"> 
    51 <h3 class="dbx-handle"><?php _e('Target') ?></h3>  
     51<h3 class="dbx-handle"><?php _e('Target') ?></h3> 
    5252<div class="dbx-content"> 
    5353<label for="link_target_blank" class="selectit"> 
    5454<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo(($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> /> 
     
    6363</fieldset> 
    6464 
    6565<fieldset class="dbx-box"> 
    66 <h3 class="dbx-handle"><?php _e('Visible') ?></h3>  
     66<h3 class="dbx-handle"><?php _e('Visible') ?></h3> 
    6767<div class="dbx-content"> 
    6868<label for="link_visible_yes" class="selectit"> 
    6969<input id="link_visible_yes" type="radio" name="link_visible" <?php if ($link->link_visible == 'Y') echo "checked='checked'"; ?> value="Y" /> 
  • wp-admin/edit-page-form.php

     
    1717$sendto = wp_get_referer(); 
    1818 
    1919if ( 0 != $post_ID && $sendto == get_permalink($post_ID) ) 
    20         $sendto = 'redo'; 
     20        $sendto = 'redo'; 
    2121$sendto = wp_specialchars( $sendto ); 
    2222 
    2323?> 
     
    2828wp_nonce_field($nonce_action); 
    2929 
    3030if (isset($mode) && 'bookmarklet' == $mode) { 
    31     echo '<input type="hidden" name="mode" value="bookmarklet" />'; 
     31        echo '<input type="hidden" name="mode" value="bookmarklet" />'; 
    3232} 
    3333?> 
    3434<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" /> 
     
    5454<input name="advanced_view" type="hidden" value="1" /> 
    5555<label for="comment_status" class="selectit"> 
    5656<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> 
    57 <?php _e('Allow Comments') ?></label>  
     57<?php _e('Allow Comments') ?></label> 
    5858<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label> 
    5959</div> 
    6060</fieldset> 
    6161 
    6262<fieldset class="dbx-box"> 
    63 <h3 class="dbx-handle"><?php _e('Page Status') ?></h3>  
     63<h3 class="dbx-handle"><?php _e('Page Status') ?></h3> 
    6464<div class="dbx-content"><?php if ( current_user_can('publish_pages') ) : ?> 
    6565<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label> 
    6666<?php endif; ?> 
    67           <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label> 
    68           <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div> 
     67        <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label> 
     68        <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div> 
    6969</fieldset> 
    7070 
    7171<fieldset id="passworddiv" class="dbx-box"> 
    72 <h3 class="dbx-handle"><?php _e('Password-Protect Page') ?></h3>  
     72<h3 class="dbx-handle"><?php _e('Password-Protect Page') ?></h3> 
    7373<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div> 
    7474</fieldset> 
    7575 
    7676<fieldset id="pageparent" class="dbx-box"> 
    77 <h3 class="dbx-handle"><?php _e('Page Parent') ?></h3>  
     77<h3 class="dbx-handle"><?php _e('Page Parent') ?></h3> 
    7878<div class="dbx-content"><p><select name="parent_id"> 
    7979<option value='0'><?php _e('Main Page (no parent)'); ?></option> 
    8080<?php parent_dropdown($post->post_parent); ?> 
     
    8484 
    8585<?php if ( 0 != count( get_page_templates() ) ) { ?> 
    8686<fieldset id="pageparent" class="dbx-box"> 
    87 <h3 class="dbx-handle"><?php _e('Page Template:') ?></h3>  
     87<h3 class="dbx-handle"><?php _e('Page Template:') ?></h3> 
    8888<div class="dbx-content"><p><select name="page_template"> 
    8989                <option value='default'><?php _e('Default Template'); ?></option> 
    9090                <?php page_template_dropdown($post->page_template); ?> 
     
    9494<?php } ?> 
    9595 
    9696<fieldset id="slugdiv" class="dbx-box"> 
    97 <h3 class="dbx-handle"><?php _e('Page slug') ?></h3>  
     97<h3 class="dbx-handle"><?php _e('Page slug') ?></h3> 
    9898<div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo $post->post_name ?>" /></div> 
    9999</fieldset> 
    100100 
     
    103103<h3 class="dbx-handle"><?php _e('Page author'); ?>:</h3> 
    104104<div class="dbx-content"> 
    105105<select name="post_author_override" id="post_author_override"> 
    106 <?php  
     106<?php 
    107107foreach ($authors as $o) : 
    108108$o = get_userdata( $o->ID ); 
    109109if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"'; 
     
    117117<?php endif; ?> 
    118118 
    119119<fieldset id="pageorder" class="dbx-box"> 
    120 <h3 class="dbx-handle"><?php _e('Page Order') ?></h3>  
     120<h3 class="dbx-handle"><?php _e('Page Order') ?></h3> 
    121121<div class="dbx-content"><p><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $post->menu_order ?>" /></p></div> 
    122122</fieldset> 
    123123 
     
    127127</div> 
    128128 
    129129<fieldset id="titlediv"> 
    130   <legend><?php _e('Page Title') ?></legend>  
    131   <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div> 
     130        <legend><?php _e('Page Title') ?></legend> 
     131        <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div> 
    132132</fieldset> 
    133133 
    134134 
    135135<fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"> 
    136     <legend><?php _e('Page Content') ?></legend> 
     136        <legend><?php _e('Page Content') ?></legend> 
    137137        <?php the_editor($post->post_content); ?> 
    138138</fieldset> 
    139139 
    140140<p class="submit"> 
    141141<input name="save" type="submit" id="save" tabindex="3" value="<?php _e('Save and Continue Editing'); ?>" /> 
    142 <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" />  
    143 <?php  
     142<input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" /> 
     143<?php 
    144144if ('publish' != $post->post_status || 0 == $post_ID): 
    145145?> 
    146146<?php if ( current_user_can('publish_pages') ) : ?> 
    147         <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />  
     147        <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 
    148148<?php endif; endif;?> 
    149149<input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" /> 
    150150</p> 
     
    167167<h3 class="dbx-handle"><?php _e('Custom Fields') ?></h3> 
    168168<div id="postcustomstuff" class="dbx-content"> 
    169169<table cellpadding="3"> 
    170 <?php  
     170<?php 
    171171$metadata = has_meta($post_ID); 
    172 list_meta($metadata);  
     172list_meta($metadata); 
    173173?> 
    174174 
    175175</table> 
     
    184184</div> 
    185185 
    186186<?php if ('edit' == $action) : 
    187         $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID );  
     187        $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID ); 
    188188        if ( current_user_can('delete_page', $post->ID) ) ?> 
    189189                <input name="deletepost" class="button" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 
    190190<?php endif; ?> 
  • wp-admin/edit-pages.php

     
    1010<h2><?php _e('Page Management'); ?></h2> 
    1111<p><?php _e('Pages are like posts except they live outside of the normal blog chronology and can be hierarchical. You can use pages to organize and manage any amount of content.'); ?> <a href="page-new.php"><?php _e('Create a new page &raquo;'); ?></a></p> 
    1212 
    13 <form name="searchform" action="" method="get">  
    14   <fieldset>  
    15   <legend><?php _e('Search Pages&hellip;') ?></legend> 
    16   <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />  
    17   <input type="submit" name="submit" value="<?php _e('Search') ?>"  />  
    18   </fieldset> 
     13<form name="searchform" action="" method="get"> 
     14        <fieldset> 
     15        <legend><?php _e('Search Pages&hellip;') ?></legend> 
     16        <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" /> 
     17        <input type="submit" name="submit" value="<?php _e('Search') ?>"  /> 
     18        </fieldset> 
    1919</form> 
    2020 
    2121<?php 
     
    2828 
    2929if ($posts) { 
    3030?> 
    31 <table class="widefat">  
    32   <thead> 
    33   <tr> 
    34     <th scope="col"><?php _e('ID') ?></th> 
    35     <th scope="col" style="text-align: left"><?php _e('Title') ?></th> 
    36     <th scope="col" style="text-align: left"><?php _e('Owner') ?></th> 
    37         <th scope="col" style="text-align: left"><?php _e('Updated') ?></th> 
    38         <th scope="col" colspan="3"><?php _e('Action'); ?></th> 
    39   </tr> 
    40   </thead> 
    41   <tbody id="the-list"> 
     31<table class="widefat"> 
     32        <thead> 
     33                <tr> 
     34                        <th scope="col"><?php _e('ID') ?></th> 
     35                        <th scope="col" style="text-align: left"><?php _e('Title') ?></th> 
     36                        <th scope="col" style="text-align: left"><?php _e('Owner') ?></th> 
     37                        <th scope="col" style="text-align: left"><?php _e('Updated') ?></th> 
     38                        <th scope="col" colspan="3"><?php _e('Action'); ?></th> 
     39                </tr> 
     40        </thead> 
     41        <tbody id="the-list"> 
    4242<?php 
    4343page_rows(0, 0, $posts, $all); 
    4444?> 
    45   </tbody> 
     45        </tbody> 
    4646</table> 
    4747 
    4848<div id="ajax-response"></div> 
     
    5353<p><?php _e('No pages yet.') ?></p> 
    5454<?php 
    5555} // end if ($posts) 
    56 ?>  
     56?> 
    5757 
    5858<h3><a href="page-new.php"><?php _e('Create New Page &raquo;'); ?></a></h3> 
    5959 
    6060</div> 
    6161 
    62 <?php include('admin-footer.php'); ?>  
     62<?php include('admin-footer.php'); ?> 
  • wp-admin/edit.php

     
    1212$other_drafts = get_others_drafts( $user_ID); 
    1313 
    1414if ($drafts || $other_drafts) { 
    15 ?>  
     15?> 
    1616<div class="wrap"> 
    1717<?php if ($drafts) { ?> 
    18     <p><strong><?php _e('Your Drafts:') ?></strong>  
    19     <?php 
     18        <p><strong><?php _e('Your Drafts:') ?></strong> 
     19        <?php 
    2020        $i = 0; 
    2121        foreach ($drafts as $draft) { 
    2222                if (0 != $i) 
     
    2727                echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>"; 
    2828                ++$i; 
    2929                } 
    30         ?>  
    31     .</p>  
     30        ?> 
     31        .</p> 
    3232<?php } ?> 
    3333 
    34 <?php if ($other_drafts) { ?>  
    35     <p><strong><?php _e('Other&#8217;s Drafts:') ?></strong>  
    36     <?php 
     34<?php if ($other_drafts) { ?> 
     35        <p><strong><?php _e('Other&#8217;s Drafts:') ?></strong> 
     36        <?php 
    3737        $i = 0; 
    3838        foreach ($other_drafts as $draft) { 
    3939                if (0 != $i) 
     
    4444                echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>"; 
    4545                ++$i; 
    4646                } 
    47         ?>  
    48     .</p>  
     47        ?> 
     48        .</p> 
    4949 
    5050<?php } ?> 
    5151 
     
    7373?> 
    7474</h2> 
    7575 
    76 <form name="searchform" action="" method="get" style="float: left; width: 16em; margin-right: 3em;">  
    77   <fieldset>  
    78   <legend><?php _e('Search Posts&hellip;') ?></legend>  
    79   <input type="text" name="s" value="<?php if (isset($s)) echo wp_specialchars($s, 1); ?>" size="17" />  
    80   <input type="submit" name="submit" value="<?php _e('Search') ?>"  />  
    81   </fieldset> 
     76<form name="searchform" action="" method="get" style="float: left; width: 16em; margin-right: 3em;"> 
     77        <fieldset> 
     78        <legend><?php _e('Search Posts&hellip;') ?></legend> 
     79        <input type="text" name="s" value="<?php if (isset($s)) echo wp_specialchars($s, 1); ?>" size="17" /> 
     80        <input type="submit" name="submit" value="<?php _e('Search') ?>"  /> 
     81        </fieldset> 
    8282</form> 
    8383 
    8484<?php $arc_result = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC"); 
     
    8888<form name="viewarc" action="" method="get" style="float: left; width: 20em; margin-bottom: 1em;"> 
    8989        <fieldset> 
    9090        <legend><?php _e('Browse Month&hellip;') ?></legend> 
    91     <select name='m'> 
     91        <select name='m'> 
    9292        <?php 
    9393                foreach ($arc_result as $arc_row) { 
    9494                        if ( $arc_row->yyear == 0 ) 
     
    106106                } 
    107107        ?> 
    108108        </select> 
    109                 <input type="submit" name="submit" value="<?php _e('Show Month') ?>"  />  
     109                <input type="submit" name="submit" value="<?php _e('Show Month') ?>"  /> 
    110110        </fieldset> 
    111111</form> 
    112112 
     
    117117<?php 
    118118// define the columns to display, the syntax is 'internal name' => 'display name' 
    119119$posts_columns = array( 
    120   'id'         => __('ID'), 
    121   'date'       => __('When'), 
    122   'title'      => __('Title'), 
    123   'categories' => __('Categories'), 
    124   'comments'   => __('Comments'), 
    125   'author'     => __('Author') 
     120        'id'         => __('ID'), 
     121        'date'       => __('When'), 
     122        'title'      => __('Title'), 
     123        'categories' => __('Categories'), 
     124        'comments'   => __('Comments'), 
     125        'author'     => __('Author') 
    126126); 
    127127$posts_columns = apply_filters('manage_posts_columns', $posts_columns); 
    128128 
     
    133133 
    134134?> 
    135135 
    136 <table class="widefat">  
     136<table class="widefat"> 
    137137        <thead> 
    138138        <tr> 
    139139 
     
    150150foreach ($posts as $post) { start_wp(); 
    151151add_filter('the_title','wp_specialchars'); 
    152152$class = ('alternate' == $class) ? '' : 'alternate'; 
    153 ?>  
     153?> 
    154154        <tr id='post-<?php echo $id; ?>' class='<?php echo $class; ?>'> 
    155155 
    156156<?php 
     
    185185 
    186186        case 'comments': 
    187187                ?> 
    188                 <td style="text-align: center"><a href="edit.php?p=<?php echo $id ?>&amp;c=1">  
    189       <?php comments_number(__('0'), __('1'), __('%')) ?>  
    190       </a></td> 
     188                <td style="text-align: center"><a href="edit.php?p=<?php echo $id ?>&amp;c=1"> 
     189                        <?php comments_number(__('0'), __('1'), __('%')) ?> 
     190                        </a></td> 
    191191                <?php 
    192192                break; 
    193193 
     
    223223        } 
    224224} 
    225225?> 
    226         </tr>  
     226        </tr> 
    227227<?php 
    228228} 
    229229} else { 
    230230?> 
    231   <tr style='background-color: <?php echo $bgcolor; ?>'>  
    232     <td colspan="8"><?php _e('No posts found.') ?></td>  
    233   </tr>  
     231        <tr style='background-color: <?php echo $bgcolor; ?>'> 
     232                <td colspan="8"><?php _e('No posts found.') ?></td> 
     233        </tr> 
    234234<?php 
    235235} // end if ($posts) 
    236236?> 
     
    249249 
    250250        $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date"); 
    251251        if ($comments) { 
    252         ?>  
    253 <h3 id="comments"><?php _e('Comments') ?></h3>  
    254 <ol id="the-comment-list" class="commentlist">  
     252        ?> 
     253<h3 id="comments"><?php _e('Comments') ?></h3> 
     254<ol id="the-comment-list" class="commentlist"> 
    255255<?php 
    256256$i = 0; 
    257257foreach ($comments as $comment) { 
     
    259259                ++$i; $class = ''; 
    260260                $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); 
    261261                        $comment_status = wp_get_comment_status($comment->comment_ID); 
    262                         if ('unapproved' == $comment_status)  
     262                        if ('unapproved' == $comment_status) 
    263263                                $class .= ' unapproved'; 
    264264                        if ($i % 2) 
    265265                                $class .= ' alternate'; 
     
    289289        echo '</ol>'; 
    290290        }//end if comments 
    291291        ?> 
    292 <?php } ?>  
    293 </div>  
    294 <?php  
     292<?php } ?> 
     293</div> 
     294<?php 
    295295 include('admin-footer.php'); 
    296 ?>  
     296?> 
  • wp-admin/export.php

     
    3333$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt ASC"); 
    3434?> 
    3535<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" created="<?php echo date('Y-m-d H:m'); ?>"--> 
    36 <rss version="2.0"  
     36<rss version="2.0" 
    3737        xmlns:content="http://purl.org/rss/1.0/modules/content/" 
    3838        xmlns:wfw="http://wellformedweb.org/CommentAPI/" 
    3939        xmlns:dc="http://purl.org/dc/elements/1.1/" 
     
    6868<wp:post_parent><?php echo $post->post_parent; ?></wp:post_parent> 
    6969<wp:post_type><?php echo $post->post_type; ?></wp:post_type> 
    7070<?php 
    71 $postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID");  
     71$postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID"); 
    7272if ( $postmeta ) { 
    7373?> 
    7474<?php foreach( $postmeta as $meta ) { ?> 
     
    7979<?php } ?> 
    8080<?php } ?> 
    8181<?php 
    82 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID");  
     82$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID"); 
    8383if ( $comments ) { foreach ( $comments as $c ) { ?> 
    8484<wp:comment> 
    8585<wp:comment_author><?php echo $c->comment_author; ?></wp:comment_author> 
  • wp-admin/index.php

     
    11<?php 
    2 require_once('admin.php');  
    3 $title = __('Dashboard');  
     2require_once('admin.php'); 
     3$title = __('Dashboard'); 
    44require_once('admin-header.php'); 
    55require_once (ABSPATH . WPINC . '/rss.php'); 
    66 
     
    4545<?php endif; ?> 
    4646 
    4747<ul> 
    48 <?php  
     48<?php 
    4949if ( $comments ) { 
    5050foreach ($comments as $comment) { 
    5151        echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>'); 
    52         edit_comment_link(__("Edit"), ' <small>(', ')</small>');  
     52        edit_comment_link(__("Edit"), ' <small>(', ')</small>'); 
    5353        echo '</li>'; 
    5454} 
    5555} 
     
    7979 
    8080<?php 
    8181if ( $scheduled = $wpdb->get_results("SELECT ID, post_title, post_date_gmt FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'future' ORDER BY post_date ASC") ) : 
    82 ?>  
     82?> 
    8383<div> 
    8484<h3><?php _e('Scheduled Entries:') ?></h3> 
    8585<ul> 
     
    8989                $post->post_title = sprintf(__('Post #%s'), $post->ID); 
    9090        echo "<li>" . sprintf(__('%1$s in %2$s'), "<a href='post.php?action=edit&amp;post=$post->ID' title='" . __('Edit this post') . "'>$post->post_title</a>", human_time_diff( current_time('timestamp', 1), strtotime($post->post_date_gmt. ' GMT') ))  . "</li>"; 
    9191} 
    92 ?>  
     92?> 
    9393</ul> 
    9494</div> 
    9595<?php endif; ?> 
     
    9898<h3><?php _e('Blog Stats'); ?></h3> 
    9999<?php 
    100100$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); 
    101 if (0 < $numposts) $numposts = number_format($numposts);  
     101if (0 < $numposts) $numposts = number_format($numposts); 
    102102 
    103103$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); 
    104104if (0 < $numcomms) $numcomms = number_format($numcomms); 
  • wp-admin/install-helper.php

     
    99 **           false on error 
    1010 */ 
    1111function maybe_create_table($table_name, $create_ddl) { 
    12     global $wpdb; 
    13     foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 
    14         if ($table == $table_name) { 
    15             return true; 
    16         } 
    17     } 
    18     //didn't find it try to create it. 
    19     $q = $wpdb->query($create_ddl); 
    20     // we cannot directly tell that whether this succeeded! 
    21     foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 
    22         if ($table == $table_name) { 
    23             return true; 
    24         } 
    25     } 
    26     return false; 
     12        global $wpdb; 
     13        foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 
     14                if ($table == $table_name) { 
     15                        return true; 
     16                } 
     17        } 
     18        //didn't find it try to create it. 
     19        $q = $wpdb->query($create_ddl); 
     20        // we cannot directly tell that whether this succeeded! 
     21        foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 
     22                if ($table == $table_name) { 
     23                        return true; 
     24                } 
     25        } 
     26        return false; 
    2727} 
    2828 
    2929/** 
     
    3333 **           false on error 
    3434 */ 
    3535function maybe_add_column($table_name, $column_name, $create_ddl) { 
    36     global $wpdb, $debug; 
    37     foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { 
    38         if ($debug) echo("checking $column == $column_name<br />"); 
    39         if ($column == $column_name) { 
    40             return true; 
    41         } 
    42     } 
    43     //didn't find it try to create it. 
    44     $q = $wpdb->query($create_ddl); 
    45     // we cannot directly tell that whether this succeeded! 
    46     foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { 
    47         if ($column == $column_name) { 
    48             return true; 
    49         } 
    50     } 
    51     return false; 
     36        global $wpdb, $debug; 
     37        foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { 
     38                if ($debug) echo("checking $column == $column_name<br />"); 
     39                        if ($column == $column_name) { 
     40                                return true; 
     41                        } 
     42        } 
     43        //didn't find it try to create it. 
     44        $q = $wpdb->query($create_ddl); 
     45        // we cannot directly tell that whether this succeeded! 
     46        foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { 
     47                if ($column == $column_name) { 
     48                        return true; 
     49                } 
     50        } 
     51        return false; 
    5252} 
    5353 
    5454 
     
    5959 **           false on error 
    6060 */ 
    6161function maybe_drop_column($table_name, $column_name, $drop_ddl) { 
    62     global $wpdb; 
    63     foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { 
    64         if ($column == $column_name) { 
    65             //found it try to drop it. 
    66             $q = $wpdb->query($drop_ddl); 
    67             // we cannot directly tell that whether this succeeded! 
    68             foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { 
    69                 if ($column == $column_name) { 
    70                     return false; 
    71                 } 
    72             } 
    73         } 
    74     } 
    75     // else didn't find it 
    76     return true; 
     62        global $wpdb; 
     63        foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { 
     64                if ($column == $column_name) { 
     65                        //found it try to drop it. 
     66                        $q = $wpdb->query($drop_ddl); 
     67                        // we cannot directly tell that whether this succeeded! 
     68                        foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { 
     69                                if ($column == $column_name) { 
     70                                        return false; 
     71                                } 
     72                        } 
     73                } 
     74        } 
     75        // else didn't find it 
     76        return true; 
    7777} 
    7878 
    7979 
     
    9292 **      Extra 
    9393 */ 
    9494function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) { 
    95     global $wpdb, $debug; 
    96     $diffs = 0; 
    97     $results = $wpdb->get_results("DESC $table_name"); 
    98      
    99     foreach ($results as $row ) { 
    100         if ($debug > 1) print_r($row); 
    101         if ($row->Field == $col_name) { 
    102             // got our column, check the params 
    103             if ($debug) echo ("checking $row->Type against $col_type\n"); 
    104             if (($col_type != null) && ($row->Type != $col_type)) { 
    105                 ++$diffs; 
    106             } 
    107             if (($is_null != null) && ($row->Null != $is_null)) { 
    108                 ++$diffs; 
    109             } 
    110             if (($key != null) && ($row->Key  != $key)) { 
    111                 ++$diffs; 
    112             } 
    113             if (($default != null) && ($row->Default != $default)) { 
    114                 ++$diffs; 
    115             } 
    116             if (($extra != null) && ($row->Extra != $extra)) { 
    117                 ++$diffs; 
    118             } 
    119             if ($diffs > 0) { 
    120                 if ($debug) echo ("diffs = $diffs returning false\n"); 
    121                 return false; 
    122             } 
    123             return true; 
    124         } // end if found our column 
    125     } 
    126     return false; 
     95        global $wpdb, $debug; 
     96        $diffs = 0; 
     97        $results = $wpdb->get_results("DESC $table_name"); 
     98 
     99        foreach ($results as $row ) { 
     100                if ($debug > 1) print_r($row); 
     101                        if ($row->Field == $col_name) { 
     102                                // got our column, check the params 
     103                                if ($debug) echo ("checking $row->Type against $col_type\n"); 
     104                                if (($col_type != null) && ($row->Type != $col_type)) { 
     105                                        ++$diffs; 
     106                                } 
     107                                if (($is_null != null) && ($row->Null != $is_null)) { 
     108                                        ++$diffs; 
     109                                } 
     110                                if (($key != null) && ($row->Key  != $key)) { 
     111                                        ++$diffs; 
     112                                } 
     113                                if (($default != null) && ($row->Default != $default)) { 
     114                                        ++$diffs; 
     115                                } 
     116                                if (($extra != null) && ($row->Extra != $extra)) { 
     117                                        ++$diffs; 
     118                                } 
     119                                if ($diffs > 0) { 
     120                                        if ($debug) echo ("diffs = $diffs returning false\n"); 
     121                                        return false; 
     122                                } 
     123                                return true; 
     124                        } // end if found our column 
     125        } 
     126        return false; 
    127127} 
    128      
     128 
    129129/* 
    130130echo "<p>testing</p>"; 
    131131echo "<pre>"; 
    132132 
    133 //check_column('wp_links', 'link_description', 'mediumtext');  
     133//check_column('wp_links', 'link_description', 'mediumtext'); 
    134134//if (check_column($wpdb->comments, 'comment_author', 'tinytext')) 
    135135//    echo "ok\n"; 
    136136$error_count = 0; 
     
    138138// check the column 
    139139if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) 
    140140{ 
    141     $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' "; 
    142     $q = $wpdb->query($ddl); 
     141        $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' "; 
     142        $q = $wpdb->query($ddl); 
    143143} 
    144144if (check_column($wpdb->links, 'link_description', 'varchar(255)')) { 
    145     $res .= $tablename . ' - ok <br />'; 
     145        $res .= $tablename . ' - ok <br />'; 
    146146} else { 
    147     $res .= 'There was a problem with ' . $tablename . '<br />'; 
    148     ++$error_count; 
     147        $res .= 'There was a problem with ' . $tablename . '<br />'; 
     148        ++$error_count; 
    149149} 
    150150echo "</pre>"; 
    151151*/ 
  • wp-admin/install.php

     
    11<?php 
    22define('WP_INSTALLING', true); 
    3 if (!file_exists('../wp-config.php'))  
    4     die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file."); 
     3if (!file_exists('../wp-config.php')) 
     4        die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file."); 
    55 
    66require_once('../wp-config.php'); 
    77require_once('./upgrade-functions.php'); 
     
    6262                text-align: right; 
    6363        } 
    6464        #footer { 
    65                 text-align: center;  
    66                 border-top: 1px solid #ccc;  
    67                 padding-top: 1em;  
     65                text-align: center; 
     66                border-top: 1px solid #ccc; 
     67                padding-top: 1em; 
    6868                font-style: italic; 
    6969        } 
    7070        --> 
     
    104104<tr> 
    105105<th scope="row"  valign="top"> <?php __('Privacy:'); ?></th> 
    106106<td><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('I would like my blog to appear in search engines like Google and Technorati.'); ?></label></td> 
    107 </tr>  
     107</tr> 
    108108</table> 
    109109<p><em><?php _e('Double-check that email address before continuing.'); ?></em></p> 
    110110<h2 class="step"> 
  • wp-admin/link-add.php

     
    77 
    88 
    99wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 
    10                        'description', 'visible', 'target', 'category', 'link_id', 
    11                        'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 
    12                        'notes', 'linkcheck[]')); 
     10        'description', 'visible', 'target', 'category', 'link_id', 
     11        'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 
     12        'notes', 'linkcheck[]')); 
    1313 
    1414wp_enqueue_script( array('xfn', 'dbx-admin-key?pagenow=link.php') ); 
    1515if ( current_user_can( 'manage_categories' ) ) 
  • wp-admin/link-import.php

     
    1212?> 
    1313<?php 
    1414switch ($step) { 
    15     case 0: 
    16     { 
    17         include_once('admin-header.php'); 
    18         if ( !current_user_can('manage_links') ) 
    19             die (__("Cheatin&#8217; uh?")); 
     15        case 0: 
     16        { 
     17                include_once('admin-header.php'); 
     18                if ( !current_user_can('manage_links') ) 
     19                        die (__("Cheatin&#8217; uh?")); 
    2020 
    21         $opmltype = 'blogrolling'; // default. 
     21                $opmltype = 'blogrolling'; // default. 
    2222?> 
    2323 
    2424<div class="wrap"> 
     
    6060 
    6161</div> 
    6262<?php 
    63                 break; 
    64             } // end case 0 
     63                break; 
     64        } // end case 0 
    6565 
    66     case 1: { 
     66        case 1: { 
    6767                check_admin_referer('import-bookmarks'); 
    6868 
    69                 include_once('admin-header.php'); 
    70                 if ( !current_user_can('manage_links') ) 
    71                     die (__("Cheatin' uh ?")); 
     69                include_once('admin-header.php'); 
     70                if ( !current_user_can('manage_links') ) 
     71                        die (__("Cheatin' uh ?")); 
    7272?> 
    7373<div class="wrap"> 
    7474 
    75     <h2><?php _e('Importing...') ?></h2> 
     75        <h2><?php _e('Importing...') ?></h2> 
    7676<?php 
    77                 $cat_id = $_POST['cat_id']; 
    78                 if (($cat_id == '') || ($cat_id == 0)) { 
    79                     $cat_id  = 1; 
    80                 } 
     77                $cat_id = $_POST['cat_id']; 
     78                if (($cat_id == '') || ($cat_id == 0)) { 
     79                        $cat_id  = 1; 
     80                } 
    8181 
    82                 $opml_url = $_POST['opml_url']; 
    83                 if (isset($opml_url) && $opml_url != '' && $opml_url != 'http://') { 
    84                                         $blogrolling = true; 
    85                 } 
    86                 else // try to get the upload file. 
    87                                 { 
    88                                         $overrides = array('test_form' => false, 'test_type' => false); 
    89                                         $file = wp_handle_upload($_FILES['userfile'], $overrides); 
     82                $opml_url = $_POST['opml_url']; 
     83                if (isset($opml_url) && $opml_url != '' && $opml_url != 'http://') { 
     84                        $blogrolling = true; 
     85                } 
     86                else // try to get the upload file. 
     87                { 
     88                        $overrides = array('test_form' => false, 'test_type' => false); 
     89                        $file = wp_handle_upload($_FILES['userfile'], $overrides); 
    9090 
    91                                         if ( isset($file['error']) ) 
    92                                                 die($file['error']); 
     91                        if ( isset($file['error']) ) 
     92                                die($file['error']); 
    9393 
    94                                         $url = $file['url']; 
    95                                         $opml_url = $file['file']; 
    96                                         $blogrolling = false; 
    97                                 } 
     94                        $url = $file['url']; 
     95                        $opml_url = $file['file']; 
     96                        $blogrolling = false; 
     97                } 
    9898 
    99                 if (isset($opml_url) && $opml_url != '') { 
    100                     $opml = wp_remote_fopen($opml_url); 
    101                     include_once('link-parse-opml.php'); 
     99                if (isset($opml_url) && $opml_url != '') { 
     100                        $opml = wp_remote_fopen($opml_url); 
     101                        include_once('link-parse-opml.php'); 
    102102 
    103                     $link_count = count($names); 
    104                     for ($i = 0; $i < $link_count; $i++) { 
    105                         if ('Last' == substr($titles[$i], 0, 4)) 
    106                             $titles[$i] = ''; 
    107                         if ('http' == substr($titles[$i], 0, 4)) 
    108                             $titles[$i] = ''; 
    109                         $link = array( 'link_url' => $urls[$i], 'link_name' => $wpdb->escape($names[$i]), 'link_category' => array($cat_id), 'link_description' => $wpdb->escape($descriptions[$i]), 'link_owner' => $user_ID, 'link_rss' => $feeds[$i]);                                
    110                                                 wp_insert_link($link); 
    111                                                 echo sprintf('<p>'.__('Inserted <strong>%s</strong>').'</p>', $names[$i]); 
    112                     } 
     103                        $link_count = count($names); 
     104                        for ($i = 0; $i < $link_count; $i++) { 
     105                                if ('Last' == substr($titles[$i], 0, 4)) 
     106                                        $titles[$i] = ''; 
     107                                if ('http' == substr($titles[$i], 0, 4)) 
     108                                        $titles[$i] = ''; 
     109                                $link = array( 'link_url' => $urls[$i], 'link_name' => $wpdb->escape($names[$i]), 'link_category' => array($cat_id), 'link_description' => $wpdb->escape($descriptions[$i]), 'link_owner' => $user_ID, 'link_rss' => $feeds[$i]); 
     110                                wp_insert_link($link); 
     111                                echo sprintf('<p>'.__('Inserted <strong>%s</strong>').'</p>', $names[$i]); 
     112                        } 
    113113?> 
    114     <p><?php printf(__('Inserted %1$d bookmarks into category %2$s. All done! Go <a href="%3$s">manage those bookmarks</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p> 
     114                <p><?php printf(__('Inserted %1$d bookmarks into category %2$s. All done! Go <a href="%3$s">manage those bookmarks</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p> 
    115115<?php 
    116                 } // end if got url 
    117                 else 
    118                 { 
    119                     echo "<p>" . __("You need to supply your OPML url. Press back on your browser and try again") . "</p>\n"; 
    120                 } // end else 
     116                } // end if got url 
     117                else 
     118                { 
     119                        echo "<p>" . __("You need to supply your OPML url. Press back on your browser and try again") . "</p>\n"; 
     120                } // end else 
    121121 
    122122                                if ( ! $blogrolling ) 
    123123                                        @unlink($opml_url); 
    124124?> 
    125125</div> 
    126126<?php 
    127                 break; 
    128             } // end case 1 
     127                break; 
     128        } // end case 1 
    129129} // end switch 
    130130 
    131131include('admin-footer.php'); 
  • wp-admin/link-manager.php

     
    7676<h2><?php _e('Bookmark Management'); ?></h2> 
    7777<p><?php _e('Here you add links to sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it&#8217;s called a &#8220;blogroll.&#8221;'); ?></p> 
    7878<form id="cats" method="get" action=""> 
    79 <p>Currently showing  
     79<p>Currently showing 
    8080<?php $categories = get_categories("hide_empty=1&type=link"); ?> 
    8181<select name="cat_id"> 
    8282<option value="all" <?php echo ($cat_id == 'all') ? " selected='selected'" : ''; ?>><?php _e('All') ?></option> 
     
    8585</option> 
    8686<?php endforeach; ?> 
    8787</select> 
    88 bookmarks ordered by  
     88bookmarks ordered by 
    8989<select name="order_by"> 
    9090<option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option> 
    9191<option value="order_name" <?php if ($order_by == 'order_name') echo " selected='selected'";?>><?php _e('Name') ?></option> 
     
    142142                echo $link->link_description . "</td>"; 
    143143                echo "<td><a href=\"$link->link_url\" title=\"".sprintf(__('Visit %s'), $link->link_name)."\">$short_url</a></td>"; 
    144144                ?> 
    145         <td> 
    146         <?php 
     145                <td> 
     146                <?php 
    147147 
    148148                $cat_names = array(); 
    149149                foreach ($link->link_category as $category) { 
     
    156156                echo implode(', ', $cat_names); 
    157157                ?> 
    158158                </td> 
    159         <td><?php echo $link->link_rel; ?></td> 
    160         <td align='center'><?php echo $visible; ?></td> 
     159                <td><?php echo $link->link_rel; ?></td> 
     160                <td align='center'><?php echo $visible; ?></td> 
    161161<?php 
    162162 
    163163                echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>'; 
  • wp-admin/link-parse-opml.php

     
    44// columns we wish to find are:  link_url, link_name, link_target, link_description 
    55// we need to map XML attribute names to our columns 
    66$opml_map = array('URL'         => 'link_url', 
    7                   'HTMLURL'     => 'link_url', 
    8                   'TEXT'        => 'link_name', 
    9                   'TITLE'       => 'link_name', 
    10                   'TARGET'      => 'link_target', 
    11                   'DESCRIPTION' => 'link_description', 
    12                   'XMLURL'      => 'link_rss' 
     7        'HTMLURL'     => 'link_url', 
     8        'TEXT'        => 'link_name', 
     9        'TITLE'       => 'link_name', 
     10        'TARGET'      => 'link_target', 
     11        'DESCRIPTION' => 'link_description', 
     12        'XMLURL'      => 'link_rss' 
    1313); 
    1414 
    1515$map = $opml_map; 
     
    2020 **/ 
    2121function startElement($parser, $tagName, $attrs) { 
    2222        global $updated_timestamp, $all_links, $map; 
    23     global $names, $urls, $targets, $descriptions, $feeds; 
     23        global $names, $urls, $targets, $descriptions, $feeds; 
    2424 
    2525        if ($tagName == 'OUTLINE') { 
    26         foreach (array_keys($map) as $key) { 
    27             if (isset($attrs[$key])) { 
    28                 $$map[$key] = $attrs[$key]; 
    29             } 
    30         } 
     26                foreach (array_keys($map) as $key) { 
     27                        if (isset($attrs[$key])) { 
     28                                $$map[$key] = $attrs[$key]; 
     29                        } 
     30                } 
    3131 
    32         //echo("got data: link_url = [$link_url], link_name = [$link_name], link_target = [$link_target], link_description = [$link_description]<br />\n"); 
     32                //echo("got data: link_url = [$link_url], link_name = [$link_name], link_target = [$link_target], link_description = [$link_description]<br />\n"); 
    3333 
    34         // save the data away. 
    35         $names[] = $link_name; 
    36         $urls[] = $link_url; 
    37         $targets[] = $link_target; 
     34                // save the data away. 
     35                $names[] = $link_name; 
     36                $urls[] = $link_url; 
     37                $targets[] = $link_target; 
    3838                $feeds[] = $link_rss; 
    39         $descriptions[] = $link_description; 
    40     } // end if outline 
     39                $descriptions[] = $link_description; 
     40        } // end if outline 
    4141} 
    4242 
    4343/** 
     
    5555xml_set_element_handler($xml_parser, "startElement", "endElement"); 
    5656 
    5757if (!xml_parse($xml_parser, $opml, true)) { 
    58     echo(sprintf(__('XML error: %1$s at line %2$s'), 
    59                    xml_error_string(xml_get_error_code($xml_parser)), 
    60                    xml_get_current_line_number($xml_parser))); 
     58        echo(sprintf(__('XML error: %1$s at line %2$s'), 
     59        xml_error_string(xml_get_error_code($xml_parser)), 
     60        xml_get_current_line_number($xml_parser))); 
    6161} 
    6262 
    6363// Free up memory used by the XML parser 
  • wp-admin/link.php

     
    2929                $deleted = 0; 
    3030                foreach ($linkcheck as $link_id) { 
    3131                        $link_id = (int) $link_id; 
    32                          
     32 
    3333                        if ( wp_delete_link($link_id) ) 
    3434                                $deleted++; 
    3535                } 
  • wp-admin/list-manipulation-js.php

     
    130130                                }else if(inputs[a][i].tagName.match(/select/i)){ 
    131131                                        this.inputData+='&'+inputs[a][i].name+'='+encodeURIComponent(inputs[a][i].options[inputs[a][i].selectedIndex].value);this.clearInputs.push(inputs[a][i].id); 
    132132                                } 
    133                         }        
     133                        } 
    134134                } 
    135135        } 
    136136        this.getListPos=function(id,n){for(var i=0;i<listItems.length;i++){if(id==listItems[i]){var pos=i;break;}}if(!n){if(pos<this.recolorPos)this.recolorPos=pos;}return pos;} 
  • wp-admin/menu-header.php

     
    1010 
    1111        // 0 = name, 1 = capability, 2 = file 
    1212        if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"'; 
    13      
     13 
    1414        if ( !empty($submenu[$item[2]]) || current_user_can($item[1]) ) { 
    1515                if ( file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") ) 
    1616                        echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; 
     
    2727if ( isset($submenu["$parent_file"]) ) : 
    2828?> 
    2929<ul id="submenu"> 
    30 <?php  
    31 foreach ($submenu["$parent_file"] as $item) :  
     30<?php 
     31foreach ($submenu["$parent_file"] as $item) : 
    3232         if ( !current_user_can($item[1]) ) 
    3333                 continue; 
    3434 
     
    4141$menu_hook = get_plugin_page_hook($item[2], $parent_file); 
    4242 
    4343if (file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") || ! empty($menu_hook)) { 
    44         if ( 'admin.php' == $pagenow ) 
     44        if ( 'admin.php' == $pagenow ) 
    4545                echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; 
    4646        else 
    4747                echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>"; 
     
    5454</ul> 
    5555<?php 
    5656 
    57 endif;  
     57endif; 
    5858 
    5959do_action('admin_notices'); 
    6060 
  • wp-admin/menu.php

     
    7878                        unset($submenu[$parent][$index]); 
    7979                } 
    8080        } 
    81          
     81 
    8282        if ( empty($submenu[$parent]) ) 
    8383                unset($submenu[$parent]); 
    8484} 
     
    8686// Loop over the top-level menu. 
    8787// Remove menus that have no accessible submenus and require privs that the user does not have. 
    8888// Menus for which the original parent is not acessible due to lack of privs will have the next 
    89 // submenu in line be assigned as the new menu parent.  
     89// submenu in line be assigned as the new menu parent. 
    9090foreach ( $menu as $id => $data ) { 
    9191        // If submenu is empty... 
    9292        if ( empty($submenu[$data[2]]) ) { 
     
    105105                if ( $new_parent != $old_parent ) { 
    106106                        $real_parent_file[$old_parent] = $new_parent; 
    107107                        $menu[$id][2] = $new_parent; 
    108                          
     108 
    109109                        foreach ($submenu[$old_parent] as $index => $data) { 
    110110                                $submenu[$new_parent][$index] = $submenu[$old_parent][$index]; 
    111111                                unset($submenu[$old_parent][$index]); 
    112112                        } 
    113                         unset($submenu[$old_parent]);    
     113                        unset($submenu[$old_parent]); 
    114114                } 
    115115        } 
    116116} 
  • wp-admin/moderation.php

     
    3131        foreach($comment as $key => $value) { 
    3232        if ($feelinglucky && 'later' == $value) 
    3333                $value = 'delete'; 
    34             switch($value) { 
     34                switch($value) { 
    3535                        case 'later': 
    3636                                // do nothing with that comment 
    3737                                // wp_set_comment_status($key, "hold"); 
     
    4141                                wp_set_comment_status($key, 'delete'); 
    4242                                ++$item_deleted; 
    4343                                break; 
    44                         case 'spam': 
    45                                 wp_set_comment_status($key, 'spam'); 
    46                                 ++$item_spam; 
    47                                 break; 
     44                        case 'spam': 
     45                                wp_set_comment_status($key, 'spam'); 
     46                                ++$item_spam; 
     47                                break; 
    4848                        case 'approve': 
    4949                                wp_set_comment_status($key, 'approve'); 
    5050                                if ( get_settings('comments_notify') == true ) { 
     
    5252                                } 
    5353                                ++$item_approved; 
    5454                                break; 
    55             } 
     55                } 
    5656        } 
    5757 
    5858        $file = basename(__FILE__); 
     
    8585                        echo sprintf(__("%s comments deleted"), $deleted) . " <br/>\n"; 
    8686                } 
    8787        } 
    88         if ($spam) { 
    89                 if ('1' == $spam) { 
     88        if ($spam) { 
     89                if ('1' == $spam) { 
    9090                        echo __("1 comment marked as spam") . " <br/>\n"; 
    91                 } else { 
    92                         echo sprintf(__("%s comments marked as spam"), $spam) . " <br/>\n"; 
    93                 } 
    94         } 
     91                } else { 
     92                        echo sprintf(__("%s comments marked as spam"), $spam) . " <br/>\n"; 
     93                } 
     94        } 
    9595        if ($ignored) { 
    9696                if ('1' == $ignored) { 
    9797                        echo __("1 comment unchanged") . " <br/>\n"; 
     
    113113        $comments = ''; 
    114114 
    115115if ($comments) { 
    116     // list all comments that are waiting for approval 
    117     $file = basename(__FILE__); 
     116        // list all comments that are waiting for approval 
     117        $file = basename(__FILE__); 
    118118?> 
    119     <h2><?php _e('Moderation Queue') ?></h2> 
    120     <form name="approval" action="moderation.php" method="post"> 
    121     <?php wp_nonce_field('moderate-comments') ?> 
    122     <input type="hidden" name="action" value="update" /> 
    123     <ol id="the-comment-list" class="commentlist"> 
     119        <h2><?php _e('Moderation Queue') ?></h2> 
     120        <form name="approval" action="moderation.php" method="post"> 
     121        <?php wp_nonce_field('moderate-comments') ?> 
     122        <input type="hidden" name="action" value="update" /> 
     123        <ol id="the-comment-list" class="commentlist"> 
    124124<?php 
    125125$i = 0; 
    126     foreach($comments as $comment) { 
    127         ++$i; 
    128         $comment_date = mysql2date(get_settings("date_format") . " @ " . get_settings("time_format"), $comment->comment_date); 
    129         $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID='$comment->comment_post_ID'"); 
    130         if ($i % 2) $class = 'js-unapproved alternate'; 
    131         else $class = 'js-unapproved'; 
    132         echo "\n\t<li id='comment-$comment->comment_ID' class='$class'>";  
     126        foreach($comments as $comment) { 
     127                ++$i; 
     128                $comment_date = mysql2date(get_settings("date_format") . " @ " . get_settings("time_format"), $comment->comment_date); 
     129                $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID='$comment->comment_post_ID'"); 
     130                if ($i % 2) $class = 'js-unapproved alternate'; 
     131                else $class = 'js-unapproved'; 
     132                echo "\n\t<li id='comment-$comment->comment_ID' class='$class'>"; 
    133133        ?> 
    134134        <p><strong><?php comment_author() ?></strong> <?php if ($comment->comment_author_email) { ?>| <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) { ?> | <?php comment_author_url_link() ?> <?php } ?>| <?php _e('IP:') ?> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p> 
    135135<?php comment_text() ?> 
     
    151151 
    152152        </li> 
    153153<?php 
    154     } 
     154        } 
    155155?> 
    156     </ol> 
     156        </ol> 
    157157 
    158158<div id="ajax-response"></div> 
    159159 
    160     <p class="submit"><input type="submit" name="submit" value="<?php _e('Bulk Moderate Comments &raquo;') ?>" /></p> 
     160<p class="submit"><input type="submit" name="submit" value="<?php _e('Bulk Moderate Comments &raquo;') ?>" /></p> 
    161161<script type="text/javascript"> 
    162162// <![CDATA[ 
    163163function markAllForDelete() { 
     
    197197                <input name="feelinglucky" type="checkbox" id="feelinglucky" value="true" /> <label for="feelinglucky"><?php _e('Delete every comment marked "defer." <strong>Warning: This can&#8217;t be undone.</strong>'); ?></label> 
    198198        </p> 
    199199</noscript> 
    200     </form> 
     200</form> 
    201201<?php 
    202202} else { 
    203     // nothing to approve 
     203        // nothing to approve 
    204204        echo '<p>'.__("Currently there are no comments for you to moderate.") . "</p>\n"; 
    205205} 
    206206?> 
  • wp-admin/options-discussion.php

     
    1818} 
    1919?> 
    2020 
    21 <div class="wrap">  
    22 <h2><?php _e('Discussion Options') ?></h2>  
    23 <form method="post" action="options.php">  
     21<div class="wrap"> 
     22<h2><?php _e('Discussion Options') ?></h2> 
     23<form method="post" action="options.php"> 
    2424<?php wp_nonce_field('update-options') ?> 
    2525<fieldset class="options"> 
    26 <legend><?php _e('Usual settings for an article:<br /><small><em>(These settings may be overridden for individual articles.)</em></small>') ?></legend>  
    27 <ul>  
    28 <li>  
    29 <label for="default_pingback_flag">  
    30 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_settings('default_pingback_flag')); ?> />  
    31 <?php _e('Attempt to notify any Weblogs linked to from the article (slows down posting.)') ?></label>  
    32 </li>  
    33 <li>  
    34 <label for="default_ping_status">  
    35 <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_settings('default_ping_status')); ?> />  
    36 <?php _e('Allow link notifications from other Weblogs (pingbacks and trackbacks.)') ?></label>  
    37 </li>  
    38 <li>  
    39 <label for="default_comment_status">  
    40 <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_settings('default_comment_status')); ?> />  
    41 <?php _e('Allow people to post comments on the article') ?></label>  
    42 </li>  
    43 </ul>  
     26<legend><?php _e('Usual settings for an article:<br /><small><em>(These settings may be overridden for individual articles.)</em></small>') ?></legend> 
     27<ul> 
     28<li> 
     29<label for="default_pingback_flag"> 
     30<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_settings('default_pingback_flag')); ?> /> 
     31<?php _e('Attempt to notify any Weblogs linked to from the article (slows down posting.)') ?></label> 
     32</li> 
     33<li> 
     34<label for="default_ping_status"> 
     35<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_settings('default_ping_status')); ?> /> 
     36<?php _e('Allow link notifications from other Weblogs (pingbacks and trackbacks.)') ?></label> 
     37</li> 
     38<li> 
     39<label for="default_comment_status"> 
     40<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_settings('default_comment_status')); ?> /> 
     41<?php _e('Allow people to post comments on the article') ?></label> 
     42</li> 
     43</ul> 
    4444</fieldset> 
    4545<fieldset class="options"> 
    46 <legend><?php _e('E-mail me whenever:') ?></legend>  
    47 <ul>  
    48 <li>  
    49 <label for="comments_notify">  
    50 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_settings('comments_notify')); ?> />  
    51 <?php _e('Anyone posts a comment') ?> </label>  
    52 </li>  
    53 <li>  
    54 <label for="moderation_notify">  
    55 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_settings('moderation_notify')); ?> />  
    56 <?php _e('A comment is held for moderation') ?> </label>  
    57 </li>  
    58 </ul>  
     46<legend><?php _e('E-mail me whenever:') ?></legend> 
     47<ul> 
     48<li> 
     49<label for="comments_notify"> 
     50<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_settings('comments_notify')); ?> /> 
     51<?php _e('Anyone posts a comment') ?> </label> 
     52</li> 
     53<li> 
     54<label for="moderation_notify"> 
     55<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_settings('moderation_notify')); ?> /> 
     56<?php _e('A comment is held for moderation') ?> </label> 
     57</li> 
     58</ul> 
    5959</fieldset> 
    6060<fieldset class="options"> 
    61 <legend><?php _e('Before a comment appears:') ?></legend>  
     61<legend><?php _e('Before a comment appears:') ?></legend> 
    6262<ul> 
    6363<li> 
    64 <label for="comment_moderation">  
    65 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_settings('comment_moderation')); ?> />  
    66 <?php _e('An administrator must approve the comment (regardless of any matches below)') ?> </label>  
    67 </li>  
    68 <li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_settings('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li>  
    69 <li><label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_settings('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li>  
    70 </ul>  
     64<label for="comment_moderation"> 
     65<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_settings('comment_moderation')); ?> /> 
     66<?php _e('An administrator must approve the comment (regardless of any matches below)') ?> </label> 
     67</li> 
     68<li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_settings('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li> 
     69<li><label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_settings('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li> 
     70</ul> 
    7171</fieldset> 
    7272<fieldset class="options"> 
    7373<legend><?php _e('Comment Moderation') ?></legend> 
    7474<p><?php printf(__('Hold a comment in the queue if it contains more than %s links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_settings('comment_max_links'). '" />' ) ?></p> 
    7575 
    7676<p><?php _e('When a comment contains any of these words in its content, name, URI, e-mail, or IP, hold it in the moderation queue: (Separate multiple words with new lines.) <a href="http://codex.wordpress.org/Spam_Words">Common spam words</a>.') ?></p> 
    77 <p>  
    78 <textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('moderation_keys'); ?></textarea>  
    79 </p>  
    8077<p> 
     78<textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('moderation_keys'); ?></textarea> 
     79</p> 
     80<p> 
    8181<a id="retrospambutton" href="options-discussion.php?action=retrospam"><?php _e('Check past comments against moderation list'); ?></a> 
    82 </p>  
     82</p> 
    8383</fieldset> 
    8484<fieldset class="options"> 
    8585<legend><?php _e('Comment Blacklist') ?></legend> 
    8686<p><?php _e('This is a list of words that you want completely blacklisted from your blog. Be very careful what you add here, because if a comment matches something here it will be completely nuked and there will be no notification. Remember that partial words can match, so if there is any chance something here might match it would be better to put it in the moderation box above.') ?></p> 
    87 <p>  
    88 <textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>  
     87<p> 
     88<textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea> 
    8989</p> 
    90 <p><label for="open_proxy_check">  
    91 <input name="open_proxy_check" type="checkbox" id="open_proxy_check" value="1" <?php checked('1', get_settings('open_proxy_check')); ?> />  
     90<p><label for="open_proxy_check"> 
     91<input name="open_proxy_check" type="checkbox" id="open_proxy_check" value="1" <?php checked('1', get_settings('open_proxy_check')); ?> /> 
    9292<?php _e('Blacklist comments from open and insecure proxies.') ?></label></p> 
    9393</fieldset> 
    9494<p class="submit"> 
    95 <input type="hidden" name="action" value="update" />  
    96 <input type="hidden" name="page_options" value="default_pingback_flag,default_ping_status,default_comment_status,comments_notify,moderation_notify,comment_moderation,require_name_email,comment_whitelist,comment_max_links,moderation_keys,blacklist_keys,open_proxy_check" />  
    97 <input type="submit" name="Submit" value="<?php _e('Update Options') ?>" />  
    98 </p>  
    99 </form>  
     95<input type="hidden" name="action" value="update" /> 
     96<input type="hidden" name="page_options" value="default_pingback_flag,default_ping_status,default_comment_status,comments_notify,moderation_notify,comment_moderation,require_name_email,comment_whitelist,comment_max_links,moderation_keys,blacklist_keys,open_proxy_check" /> 
     97<input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /> 
     98</p> 
     99</form> 
    100100</div> 
    101101<?php include('./admin-footer.php'); ?> 
  • wp-admin/options-general.php

     
    66 
    77include('./admin-header.php'); 
    88?> 
    9   
     9 
    1010<div class="wrap"> 
    1111<h2><?php _e('General Options') ?></h2> 
    12 <form method="post" action="options.php">  
     12<form method="post" action="options.php"> 
    1313<?php wp_nonce_field('update-options') ?> 
    14 <table class="optiontable">  
    15 <tr valign="top">  
    16 <th scope="row"><?php _e('Weblog title:') ?></th>  
    17 <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td>  
    18 </tr>  
    19 <tr valign="top">  
    20 <th scope="row"><?php _e('Tagline:') ?></th>  
     14<table class="optiontable"> 
     15<tr valign="top"> 
     16<th scope="row"><?php _e('Weblog title:') ?></th> 
     17<td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td> 
     18</tr> 
     19<tr valign="top"> 
     20<th scope="row"><?php _e('Tagline:') ?></th> 
    2121<td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php form_option('blogdescription'); ?>" size="45" /> 
    2222<br /> 
    23 <?php _e('In a few words, explain what this weblog is about.') ?></td>  
    24 </tr>  
    25 <tr valign="top">  
    26 <th scope="row"><?php _e('WordPress address (URI):') ?></th>  
    27 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code" /></td>  
    28 </tr>  
     23<?php _e('In a few words, explain what this weblog is about.') ?></td> 
     24</tr> 
    2925<tr valign="top"> 
     26<th scope="row"><?php _e('WordPress address (URI):') ?></th> 
     27<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code" /></td> 
     28</tr> 
     29<tr valign="top"> 
    3030<th scope="row"><?php _e('Blog address (URI):') ?></th> 
    3131<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code" /><br /><?php _e('If you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different than the directory</a> you installed WordPress in, enter that address here.'); ?></td> 
    3232</tr> 
    33 <tr valign="top">  
    34 <th scope="row"><?php _e('E-mail address:') ?> </th>  
     33<tr valign="top"> 
     34<th scope="row"><?php _e('E-mail address:') ?> </th> 
    3535<td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" size="40" class="code" /> 
    3636<br /> 
    37 <?php _e('This address is used only for admin purposes.') ?></td>  
     37<?php _e('This address is used only for admin purposes.') ?></td> 
    3838</tr> 
    39 <tr valign="top">  
    40 <th scope="row"><?php _e('Membership:') ?></th>  
    41 <td> <label for="users_can_register">  
    42 <input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_settings('users_can_register')); ?> />  
     39<tr valign="top"> 
     40<th scope="row"><?php _e('Membership:') ?></th> 
     41<td> <label for="users_can_register"> 
     42<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_settings('users_can_register')); ?> /> 
    4343<?php _e('Anyone can register') ?></label><br /> 
    4444<label for="comment_registration"> 
    45 <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_settings('comment_registration')); ?> />  
     45<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_settings('comment_registration')); ?> /> 
    4646<?php _e('Users must be registered and logged in to comment') ?> 
    4747</label> 
    48 </td>  
    49 </tr>  
    50 <tr valign="top">  
    51 <th scope="row"><?php _e('New User Default Role:') ?></th>  
    52 <td><label for="default_role">  
     48</td> 
     49</tr> 
     50<tr valign="top"> 
     51<th scope="row"><?php _e('New User Default Role:') ?></th> 
     52<td><label for="default_role"> 
    5353<select name="default_role" id="default_role"><?php wp_dropdown_roles( get_settings('default_role') ); ?></select></label> 
    54 </td>  
    55 </tr>  
    56 </table>  
    57 <fieldset class="options">  
    58 <legend><?php _e('Date and Time') ?></legend>  
    59 <table class="optiontable">  
    60 <tr>  
    61 <th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th>  
    62 <td><code><?php echo gmdate('Y-m-d g:i:s a'); ?></code></td>  
     54</td> 
    6355</tr> 
     56</table> 
     57<fieldset class="options"> 
     58<legend><?php _e('Date and Time') ?></legend> 
     59<table class="optiontable"> 
    6460<tr> 
     61<th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th> 
     62<td><code><?php echo gmdate('Y-m-d g:i:s a'); ?></code></td> 
     63</tr> 
     64<tr> 
    6565<th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th> 
    66 <td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" />  
     66<td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" /> 
    6767<?php _e('hours') ?> </td> 
    6868</tr> 
    6969<tr> 
     
    7575<th scope="row"><?php _e('Default time format:') ?></th> 
    7676<td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br /> 
    7777<?php _e('Output:') ?> <strong><?php echo gmdate(get_settings('time_format'), current_time('timestamp')); ?></strong></td> 
    78 </tr>  
     78</tr> 
    7979<tr> 
    8080<th scope="row">&nbsp;</th> 
    8181<td><?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Save option to update sample output.') ?> </td> 
     
    9292</select></td> 
    9393</tr> 
    9494</table> 
    95 </fieldset>  
     95</fieldset> 
    9696 
    9797<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /> 
    98 <input type="hidden" name="action" value="update" />  
    99 <input type="hidden" name="page_options" value="blogname,blogdescription,siteurl,admin_email,users_can_register,gmt_offset,date_format,time_format,home,start_of_week,comment_registration,default_role,blog_public" />  
     98<input type="hidden" name="action" value="update" /> 
     99<input type="hidden" name="page_options" value="blogname,blogdescription,siteurl,admin_email,users_can_register,gmt_offset,date_format,time_format,home,start_of_week,comment_registration,default_role,blog_public" /> 
    100100</p> 
    101101</form> 
    102102 
    103 </div>  
     103</div> 
    104104 
    105105<?php include('./admin-footer.php') ?> 
  • wp-admin/options-misc.php

     
    77include('admin-header.php'); 
    88 
    99?> 
    10   
    11 <div class="wrap">  
    12 <h2><?php _e('Miscellaneous Options') ?></h2>  
     10 
     11<div class="wrap"> 
     12<h2><?php _e('Miscellaneous Options') ?></h2> 
    1313<form method="post" action="options.php"> 
    1414<?php wp_nonce_field('update-options') ?> 
    1515<fieldset class="options"> 
     
    4242 
    4343<p class="submit"> 
    4444<input type="hidden" name="action" value="update" /> 
    45 <input type="hidden" name="page_options" value="hack_file,use_linksupdate,uploads_use_yearmonth_folders,upload_path" />  
     45<input type="hidden" name="page_options" value="hack_file,use_linksupdate,uploads_use_yearmonth_folders,upload_path" /> 
    4646<input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /> 
    4747</p> 
    48 </form>  
     48</form> 
    4949</div> 
    5050 
    5151<?php include('./admin-footer.php'); ?> 
     52 No newline at end of file 
  • wp-admin/options-permalink.php

     
    9696if ($writable) 
    9797        _e('Permalink structure updated.'); 
    9898else 
    99         _e('You should update your .htaccess now.');  
     99        _e('You should update your .htaccess now.'); 
    100100?></p></div> 
    101101<?php endif; ?> 
    102102 
    103 <div class="wrap">  
    104   <h2><?php _e('Customize Permalink Structure') ?></h2>  
    105   <p><?php _e('By default WordPress uses web URIs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URI structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p> 
     103<div class="wrap"> 
     104        <h2><?php _e('Customize Permalink Structure') ?></h2> 
     105        <p><?php _e('By default WordPress uses web URIs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URI structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p> 
    106106 
    107107<?php 
    108108$prefix = ''; 
     
    116116        $prefix . '/archives/%post_id%' 
    117117        ); 
    118118?> 
    119 <form name="form" action="options-permalink.php" method="post">  
     119<form name="form" action="options-permalink.php" method="post"> 
    120120<?php wp_nonce_field('update-permalink') ?> 
    121121<h3><?php _e('Common options:'); ?></h3> 
    122122<p> 
    123123        <label> 
    124 <input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> />  
    125 <?php _e('Default'); ?><br /> <span> &raquo; <code><?php echo get_settings('home'); ?>/?p=123</code></span> 
    126    </label> 
     124                <input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> /> 
     125                <?php _e('Default'); ?><br /> <span> &raquo; <code><?php echo get_settings('home'); ?>/?p=123</code></span> 
     126        </label> 
    127127</p> 
    128128<p> 
    129129        <label> 
    130 <input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> />  
    131 <?php _e('Date and name based'); ?><br /> <span> &raquo; <code><?php echo get_settings('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></span> 
    132    </label> 
     130                <input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> /> 
     131                <?php _e('Date and name based'); ?><br /> <span> &raquo; <code><?php echo get_settings('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></span> 
     132        </label> 
    133133</p> 
    134134<p> 
    135135        <label> 
    136 <input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> />  
    137 <?php _e('Numeric'); ?><br /> <span> &raquo; <code><?php echo get_settings('home') . $prefix  ; ?>/archives/123</code></span> 
    138    </label> 
     136                <input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> /> 
     137                <?php _e('Numeric'); ?><br /> <span> &raquo; <code><?php echo get_settings('home') . $prefix  ; ?>/archives/123</code></span> 
     138        </label> 
    139139</p> 
    140140<p> 
    141141<label> 
     
    143143<?php if ( !in_array($permalink_structure, $structures) ) { ?> 
    144144checked="checked" 
    145145<?php } ?> 
    146  />  
     146 /> 
    147147<?php _e('Custom, specify below'); ?> 
    148148</label> 
    149149<br /> 
     
    156156<?php else : ?> 
    157157        <p><?php _e('If you like, you may enter a custom prefix for your category URIs here. For example, <code>/index.php/taxonomy/tags</code> would make your category links like <code>http://example.org/index.php/taxonomy/tags/uncategorized/</code>. If you leave this blank the default will be used.') ?></p> 
    158158<?php endif; ?> 
    159         <p>  
    160   <?php _e('Category base'); ?>: <input name="category_base" type="text" class="code"  value="<?php echo $category_base; ?>" size="30" />  
    161      </p>  
    162     <p class="submit">  
    163       <input type="submit" name="submit" value="<?php _e('Update Permalink Structure &raquo;') ?>" />  
    164     </p>  
    165   </form>  
     159        <p> 
     160                <?php _e('Category base'); ?>: <input name="category_base" type="text" class="code"  value="<?php echo $category_base; ?>" size="30" /> 
     161        </p> 
     162        <p class="submit"> 
     163                <input type="submit" name="submit" value="<?php _e('Update Permalink Structure &raquo;') ?>" /> 
     164        </p> 
     165        </form> 
    166166<?php if ( $permalink_structure && !$usingpi && !$writable ) : ?> 
    167   <p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Make_a_Directory_Writable">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p> 
    168 <form action="options-permalink.php" method="post"> 
    169 <?php wp_nonce_field('update-permalink') ?> 
    170    <p> 
    171 <textarea rows="5" style="width: 98%;" name="rules"><?php echo $wp_rewrite->mod_rewrite_rules(); ?> 
    172 </textarea> 
    173     </p> 
     167        <p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Make_a_Directory_Writable">writable</a>, we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p> 
     168                <form action="options-permalink.php" method="post"> 
     169                <?php wp_nonce_field('update-permalink') ?> 
     170        <p> 
     171                <textarea rows="5" style="width: 98%;" name="rules"><?php echo $wp_rewrite->mod_rewrite_rules(); ?> 
     172                </textarea> 
     173        </p> 
    174174</form> 
    175175<?php endif; ?> 
    176176 
  • wp-admin/options-privacy.php

     
    66 
    77include('./admin-header.php'); 
    88?> 
    9   
     9 
    1010<div class="wrap"> 
    1111<h2><?php _e('Privacy Options') ?></h2> 
    12 <form method="post" action="options.php">  
     12<form method="post" action="options.php"> 
    1313<?php wp_nonce_field('update-options') ?> 
    14 <table class="optiontable">  
    15 <tr valign="top">  
    16 <th scope="row"><?php _e('Blog visibility:') ?> </th>  
     14<table class="optiontable"> 
     15<tr valign="top"> 
     16<th scope="row"><?php _e('Blog visibility:') ?> </th> 
    1717<td> 
    1818<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> /> 
    1919<label for="blog-public">I would like my blog to be visible to anyone who visits, including search engines and archivers</label> 
     
    2121<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> /> 
    2222<label for="blog-norobots">I would like to block search engines, but allow normal folks</label> 
    2323<?php do_action('blog_privacy_selector'); ?> 
    24 </td>  
     24</td> 
    2525</tr> 
    26 </table>  
     26</table> 
    2727 
    2828<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /> 
    29 <input type="hidden" name="action" value="update" />  
    30 <input type="hidden" name="page_options" value="blog_public" />  
     29<input type="hidden" name="action" value="update" /> 
     30<input type="hidden" name="page_options" value="blog_public" /> 
    3131</p> 
    3232</form> 
    3333 
    34 </div>  
     34</div> 
    3535 
    3636<?php include('./admin-footer.php') ?> 
  • wp-admin/options-reading.php

     
    77include('admin-header.php'); 
    88?> 
    99 
    10 <div class="wrap">  
    11 <h2><?php _e('Reading Options') ?></h2>  
     10<div class="wrap"> 
     11<h2><?php _e('Reading Options') ?></h2> 
    1212<form name="form1" method="post" action="options.php"> 
    1313<?php wp_nonce_field('update-options') ?> 
    1414 
    1515<?php if ( get_pages() ): ?> 
    16 <fieldset class="options">  
    17 <legend><?php _e('Front Page') ?></legend>  
    18 <table width="100%" cellspacing="2" cellpadding="5" class="editform">  
    19 <tr valign="top">  
    20 <th width="33%" scope="row"><?php _e('Front page displays:')?></th>  
     16<fieldset class="options"> 
     17<legend><?php _e('Front Page') ?></legend> 
     18<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
     19<tr valign="top"> 
     20<th width="33%" scope="row"><?php _e('Front page displays:')?></th> 
    2121<td> 
    2222        <label> 
    23                 <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> />  
     23                <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> /> 
    2424                <?php _e('The latest posts'); ?> 
    2525        </label> 
    2626        <br /> 
    2727        <label> 
    28                 <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> />  
     28                <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> /> 
    2929                <?php printf(__('A static <a href="%s">page</a> (select below)'), 'edit-pages.php'); ?> 
    3030        </label> 
    3131<ul> 
     
    4040</div> 
    4141<?php endif; ?> 
    4242</fieldset> 
    43 </td>  
    44 </tr>  
    45 </table>  
     43</td> 
     44</tr> 
     45</table> 
    4646</fieldset> 
    4747<?php endif; ?> 
    4848 
    49 <fieldset class="options">  
    50 <legend><?php _e('Blog Pages') ?></legend>  
    51 <table width="100%" cellspacing="2" cellpadding="5" class="editform">  
    52 <tr valign="top">  
    53 <th width="33%" scope="row"><?php _e('Show at most:') ?></th>  
     49<fieldset class="options"> 
     50<legend><?php _e('Blog Pages') ?></legend> 
     51<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
     52<tr valign="top"> 
     53<th width="33%" scope="row"><?php _e('Show at most:') ?></th> 
    5454<td> 
    55 <input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" size="3" />  
    56 <select name="what_to_show" id="what_to_show" >  
    57 <option value="days" <?php selected('days', get_settings('what_to_show')); ?>><?php _e('days') ?></option>  
    58 <option value="posts" <?php selected('posts', get_settings('what_to_show')); ?>><?php _e('posts') ?></option>  
     55<input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" size="3" /> 
     56<select name="what_to_show" id="what_to_show" > 
     57<option value="days" <?php selected('days', get_settings('what_to_show')); ?>><?php _e('days') ?></option> 
     58<option value="posts" <?php selected('posts', get_settings('what_to_show')); ?>><?php _e('posts') ?></option> 
    5959</select> 
    60 </td>  
    61 </tr>  
    62 </table>  
    63 </fieldset>  
     60</td> 
     61</tr> 
     62</table> 
     63</fieldset> 
    6464 
    65 <fieldset class="options">  
    66 <legend><?php _e('Syndication Feeds') ?></legend>  
    67 <table width="100%" cellspacing="2" cellpadding="5" class="editform">  
    68 <tr valign="top">  
    69 <th width="33%" scope="row"><?php _e('Show the most recent:') ?></th>  
    70 <td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php form_option('posts_per_rss'); ?>" size="3" /> <?php _e('posts') ?></td>  
     65<fieldset class="options"> 
     66<legend><?php _e('Syndication Feeds') ?></legend> 
     67<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
     68<tr valign="top"> 
     69<th width="33%" scope="row"><?php _e('Show the most recent:') ?></th> 
     70<td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php form_option('posts_per_rss'); ?>" size="3" /> <?php _e('posts') ?></td> 
    7171</tr> 
    7272<tr valign="top"> 
    7373<th scope="row"><?php _e('For each article, show:') ?> </th> 
     
    7575<label><input name="rss_use_excerpt"  type="radio" value="0" <?php checked(0, get_settings('rss_use_excerpt')); ?>      /> <?php _e('Full text') ?></label><br /> 
    7676<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_settings('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label> 
    7777</td> 
    78 </tr>  
    79 </table>  
    80 </fieldset>  
    81 <table width="100%" cellspacing="2" cellpadding="5" class="editform">  
    82 <tr valign="top">  
    83 <th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th>  
     78</tr> 
     79</table> 
     80</fieldset> 
     81<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
     82<tr valign="top"> 
     83<th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th> 
    8484<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" size="20" class="code" /><br /> 
    85 <?php _e('The character encoding you write your blog in (UTF-8 is <a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html">recommended</a>)') ?></td>  
     85<?php _e('The character encoding you write your blog in (UTF-8 is <a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html">recommended</a>)') ?></td> 
    8686</tr> 
    87 </table>  
     87</table> 
    8888<p> 
    89 <label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_settings('gzipcompression')); ?> />  
     89<label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_settings('gzipcompression')); ?> /> 
    9090<?php _e('WordPress should compress articles (gzip) if browsers ask for them') ?></label> 
    9191</p> 
    9292<p class="submit"> 
    93 <input type="hidden" name="action" value="update" />  
    94 <input type="hidden" name="page_options" value="posts_per_page,what_to_show,posts_per_rss,rss_use_excerpt,blog_charset,gzipcompression,show_on_front,page_on_front,page_for_posts" />  
    95 <input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" />  
    96 </p>  
    97 </form>  
    98 </div>  
     93<input type="hidden" name="action" value="update" /> 
     94<input type="hidden" name="page_options" value="posts_per_page,what_to_show,posts_per_rss,rss_use_excerpt,blog_charset,gzipcompression,show_on_front,page_on_front,page_for_posts" /> 
     95<input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /> 
     96</p> 
     97</form> 
     98</div> 
    9999<?php include('./admin-footer.php'); ?> 
     100 No newline at end of file 
  • wp-admin/options-writing.php

     
    77include('admin-header.php'); 
    88?> 
    99 
    10 <div class="wrap">  
    11 <h2><?php _e('Writing Options') ?></h2>  
    12 <form method="post" action="options.php">  
     10<div class="wrap"> 
     11<h2><?php _e('Writing Options') ?></h2> 
     12<form method="post" action="options.php"> 
    1313<?php wp_nonce_field('update-options') ?> 
    14 <table width="100%" cellspacing="2" cellpadding="5" class="editform">  
    15 <tr valign="top">  
    16 <th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th>  
    17 <td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " />  
    18 <?php _e('lines') ?></td>  
    19 </tr>  
     14<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
    2015<tr valign="top"> 
     16<th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th> 
     17<td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " /> 
     18<?php _e('lines') ?></td> 
     19</tr> 
     20<tr valign="top"> 
    2121<th scope="row"><?php _e('Formatting:') ?></th> 
    2222<td> 
    2323<label for="rich_editing"> 
     
    6464<tr valign="top"> 
    6565<th scope="row"><?php _e('Mail server:') ?></th> 
    6666<td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" size="40" /> 
    67 <label for="mailserver_port"><?php _e('Port:') ?></label>  
     67<label for="mailserver_port"><?php _e('Port:') ?></label> 
    6868<input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" size="6" /> 
    6969</td> 
    7070</tr> 
     
    102102</fieldset> 
    103103 
    104104<p class="submit"> 
    105 <input type="hidden" name="action" value="update" />  
    106 <input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,rich_editing,ping_sites,mailserver_url,mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category,use_balanceTags,default_link_category" />  
    107 <input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" />  
     105<input type="hidden" name="action" value="update" /> 
     106<input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,rich_editing,ping_sites,mailserver_url,mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category,use_balanceTags,default_link_category" /> 
     107<input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /> 
    108108</p> 
    109 </form>  
    110 </div>  
     109</form> 
     110</div> 
    111111 
    112112<?php include('./admin-footer.php') ?> 
     113 No newline at end of file 
  • wp-admin/options.php

     
    4848                        } 
    4949                } 
    5050        } 
    51      
     51 
    5252        if ($any_changed) { 
    5353                        // If siteurl or home changed, reset cookies. 
    5454                        if ( get_settings('siteurl') != $old_siteurl || get_settings('home') != $old_home ) { 
     
    6161                        } 
    6262 
    6363                        //$message = sprintf(__('%d setting(s) saved... '), $any_changed); 
    64     } 
    65      
     64        } 
     65 
    6666        $referred = remove_query_arg('updated' , wp_get_referer()); 
    6767        $goback = add_query_arg('updated', 'true', wp_get_referer()); 
    6868        $goback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $goback); 
    6969        wp_redirect($goback); 
    70     break; 
     70        break; 
    7171 
    7272default: 
    7373        include('admin-header.php'); ?> 
    7474 
    7575<div class="wrap"> 
    76   <h2><?php _e('All options'); ?></h2> 
    77   <form name="form" action="options.php" method="post"> 
    78   <?php wp_nonce_field('update-options') ?> 
    79   <input type="hidden" name="action" value="update" /> 
    80   <table width="98%"> 
     76        <h2><?php _e('All options'); ?></h2> 
     77        <form name="form" action="options.php" method="post"> 
     78        <?php wp_nonce_field('update-options') ?> 
     79        <input type="hidden" name="action" value="update" /> 
     80        <table width="98%"> 
    8181<?php 
    8282$options = $wpdb->get_results("SELECT * FROM $wpdb->options ORDER BY option_name"); 
    8383 
     
    9191</tr>"; 
    9292endforeach; 
    9393?> 
    94   </table> 
     94        </table> 
    9595<p class="submit"><input type="submit" name="Update" value="<?php _e('Update Settings &raquo;') ?>" /></p> 
    96   </form> 
     96        </form> 
    9797</div> 
    9898 
    9999 
  • wp-admin/page-new.php

     
    2020} 
    2121?> 
    2222 
    23 <?php include('admin-footer.php'); ?>  
    24  No newline at end of file 
     23<?php include('admin-footer.php'); ?> 
     24 No newline at end of file 
  • wp-admin/page.php

     
    116116                if ( ! wp_delete_attachment($page_id) ) 
    117117                        die( __('Error in deleting...') ); 
    118118        } else { 
    119                 if ( !wp_delete_post($page_id) )  
     119                if ( !wp_delete_post($page_id) ) 
    120120                        die( __('Error in deleting...') ); 
    121121        } 
    122122 
  • wp-admin/plugin-editor.php

     
    6060<?php if (isset($_GET['a'])) : ?> 
    6161 <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div> 
    6262<?php endif; ?> 
    63  <div class="wrap">  
    64   <?php 
     63 <div class="wrap"> 
     64        <?php 
    6565        if (is_writeable($real_file)) { 
    6666                echo '<h2>' . sprintf(__('Editing <strong>%s</strong>'), $file) . '</h2>'; 
    6767        } else { 
     
    7474<?php 
    7575if ($plugin_files) : 
    7676?> 
    77   <ul> 
    78 <?php foreach($plugin_files as $plugin_file) : ?> 
     77        <ul> 
     78        <?php foreach($plugin_files as $plugin_file) : ?> 
    7979                 <li><a href="plugin-editor.php?file=<?php echo "$plugin_file"; ?>"><?php echo $plugins[$plugin_file]['Name']; ?></a></li> 
    80 <?php endforeach; ?> 
    81   </ul> 
     80        <?php endforeach; ?> 
     81        </ul> 
    8282<?php endif; ?> 
    8383</div> 
    84         <?php   if (!$error) { ?>  
    85   <form name="template" id="template" action="plugin-editor.php" method="post"> 
    86   <?php wp_nonce_field('edit-plugin_' . $file) ?> 
    87                  <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>  
    88      <input type="hidden" name="action" value="update" />  
    89      <input type="hidden" name="file" value="<?php echo $file ?>" />  
     84<?php   if (!$error) { ?> 
     85        <form name="template" id="template" action="plugin-editor.php" method="post"> 
     86        <?php wp_nonce_field('edit-plugin_' . $file) ?> 
     87                <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> 
     88                <input type="hidden" name="action" value="update" /> 
     89                <input type="hidden" name="file" value="<?php echo $file ?>" /> 
    9090                </div> 
    9191<?php if ( is_writeable($real_file) ) : ?> 
    92      <p class="submit"> 
    93 <?php 
    94         echo "<input type='submit' name='submit' value='        " . __('Update File &raquo;') . "' tabindex='2' />"; 
    95 ?> 
    96 </p> 
     92        <p class="submit"> 
     93        <?php 
     94                echo "<input type='submit' name='submit' value='        " . __('Update File &raquo;') . "' tabindex='2' />"; 
     95        ?> 
     96        </p> 
    9797<?php else : ?> 
    98 <p><em><?php _e('If this file were writable you could edit it.'); ?></em></p> 
     98        <p><em><?php _e('If this file were writable you could edit it.'); ?></em></p> 
    9999<?php endif; ?> 
    100    </form>  
    101   <?php 
     100 </form> 
     101<?php 
    102102        } else { 
    103103                echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>'; 
    104104        } 
    105         ?> 
     105?> 
    106106<div class="clear"> &nbsp; </div> 
    107 </div>  
     107</div> 
    108108<?php 
    109109break; 
    110110} 
    111111 
    112 include("admin-footer.php") ?>  
     112include("admin-footer.php") ?> 
  • wp-admin/post-new.php

     
    6060<?php 
    6161if ($is_NS4 || $is_gecko) { 
    6262?> 
    63 <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_settings('blogname'))); ?></a>  
     63<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_settings('blogname'))); ?></a> 
    6464<?php 
    6565} else if ($is_winIE) { 
    6666?> 
     
    7575<br /> 
    7676<br /> 
    7777<?php _e('One-click bookmarklet:') ?><br /> 
    78 <a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a>  
     78<a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a> 
    7979<?php 
    8080} else if ($is_opera) { 
    8181?> 
    82 <a href="javascript:location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/post-new.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>  
     82<a href="javascript:location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/post-new.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a> 
    8383<?php 
    8484} else if ($is_macIE) { 
    8585?> 
    86 <a href="javascript:Q='';location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>  
     86<a href="javascript:Q='';location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a> 
    8787<?php 
    8888} 
    8989?> 
  • wp-admin/post.php

     
    1515        $parent_file = 'post-new.php'; 
    1616        $submenu_file = 'post-new.php'; 
    1717        check_admin_referer('add-post'); 
    18          
     18 
    1919        $post_ID = 'post' == $action ? write_post() : edit_post(); 
    2020 
    2121        // Redirect. 
     
    8686case 'editpost': 
    8787        $post_ID = (int) $_POST['post_ID']; 
    8888        check_admin_referer('update-post_' . $post_ID); 
    89          
     89 
    9090        $post_ID = edit_post(); 
    9191 
    9292        if ($_POST['save']) { 
     
    123123                if ( ! wp_delete_attachment($post_id) ) 
    124124                        die( __('Error in deleting...') ); 
    125125        } else { 
    126                 if ( !wp_delete_post($post_id) )  
     126                if ( !wp_delete_post($post_id) ) 
    127127                        die( __('Error in deleting...') ); 
    128128        } 
    129129 
  • wp-admin/profile.php

     
    1 <?php  
     1<?php 
    22require_once('admin.php'); 
    33 
    44$title = __('Profile'); 
     
    117117 
    118118<?php do_action('profile_personal_options'); ?> 
    119119 
    120   <table width="99%"  border="0" cellspacing="2" cellpadding="3" class="editform"> 
    121     <?php 
    122     if(count($profileuser->caps) > count($profileuser->roles)): 
    123     ?> 
    124     <tr> 
    125       <th scope="row"><?php _e('Additional Capabilities:') ?></th> 
    126       <td><?php  
     120        <table width="99%"  border="0" cellspacing="2" cellpadding="3" class="editform"> 
     121                <?php 
     122                if(count($profileuser->caps) > count($profileuser->roles)): 
     123                ?> 
     124                <tr> 
     125                        <th scope="row"><?php _e('Additional Capabilities:') ?></th> 
     126                        <td><?php 
    127127                        $output = ''; 
    128128                        foreach($profileuser->caps as $cap => $value) { 
    129129                                if(!$wp_roles->is_role($cap)) { 
     
    133133                        } 
    134134                        echo $output; 
    135135                        ?></td> 
    136     </tr> 
    137     <?php 
    138     endif; 
    139     ?> 
    140   </table> 
     136                </tr> 
     137                <?php 
     138                endif; 
     139                ?> 
     140        </table> 
    141141<p class="submit"> 
    142142<input type="submit" value="<?php _e('Update Profile &raquo;') ?>" name="submit" /> 
    143143</p> 
  • wp-admin/setup-config.php

     
    22define('WP_INSTALLING', true); 
    33 
    44if (!file_exists('../wp-config-sample.php')) 
    5     die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.'); 
     5        die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.'); 
    66 
    77$configFile = file('../wp-config-sample.php'); 
    88 
     
    8282 
    8383switch($step) { 
    8484        case 0: 
    85 ?>  
     85?> 
    8686 
    87 <p>Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.</p>  
    88 <ol>  
    89   <li>Database name</li>  
    90   <li>Database username</li>  
    91   <li>Database password</li> 
    92   <li>Database host</li>  
    93   <li>Table prefix (if you want to run more than one WordPress in a single database) </li> 
    94 </ol>  
     87<p>Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.</p> 
     88<ol> 
     89        <li>Database name</li> 
     90        <li>Database username</li> 
     91        <li>Database password</li> 
     92        <li>Database host</li> 
     93        <li>Table prefix (if you want to run more than one WordPress in a single database) </li> 
     94</ol> 
    9595<p><strong>If for any reason this automatic file creation doesn't work, don't worry. All this does is fill in the database information to a configuration file. You may also simply open <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>. </strong></p> 
    9696<p>In all likelihood, these items were supplied to you by your ISP. If you do not have this information, then you will need to contact them before you can continue. If you&#8217;re all ready, <a href="setup-config.php?step=1">let&#8217;s go</a>! </p> 
    9797<?php 
    9898        break; 
    9999 
    100100        case 1: 
    101         ?>  
    102 </p>  
     101        ?> 
     102</p> 
    103103<form method="post" action="setup-config.php?step=2"> 
    104   <p>Below you should enter your database connection details. If you're not sure about these, contact your host. </p> 
    105   <table>  
    106     <tr>  
    107       <th scope="row">Database Name</th>  
    108       <td><input name="dbname" type="text" size="25" value="wordpress" /></td> 
    109       <td>The name of the database you want to run WP in. </td>  
    110     </tr>  
    111     <tr>  
    112       <th scope="row">User Name</th>  
    113       <td><input name="uname" type="text" size="25" value="username" /></td> 
    114       <td>Your MySQL username</td>  
    115     </tr>  
    116     <tr>  
    117       <th scope="row">Password</th>  
    118       <td><input name="pwd" type="text" size="25" value="password" /></td> 
    119       <td>...and MySQL password.</td>  
    120     </tr>  
    121     <tr>  
    122       <th scope="row">Database Host</th>  
    123       <td><input name="dbhost" type="text" size="25" value="localhost" /></td> 
    124       <td>99% chance you won't need to change this value.</td>  
    125     </tr> 
    126     <tr> 
    127       <th scope="row">Table Prefix</th> 
    128       <td><input name="prefix" type="text" id="prefix" value="wp_" size="25" /></td> 
    129       <td>If you want to run multiple WordPress installations in a single database, change this.</td> 
    130     </tr>  
    131   </table> 
    132   <h2 class="step"> 
    133   <input name="submit" type="submit" value="Submit" /> 
    134   </h2> 
    135 </form>  
     104        <p>Below you should enter your database connection details. If you're not sure about these, contact your host. </p> 
     105        <table> 
     106                <tr> 
     107                        <th scope="row">Database Name</th> 
     108                        <td><input name="dbname" type="text" size="25" value="wordpress" /></td> 
     109                        <td>The name of the database you want to run WP in. </td> 
     110                </tr> 
     111                <tr> 
     112                        <th scope="row">User Name</th> 
     113                        <td><input name="uname" type="text" size="25" value="username" /></td> 
     114                        <td>Your MySQL username</td> 
     115                </tr> 
     116                <tr> 
     117                        <th scope="row">Password</th> 
     118                        <td><input name="pwd" type="text" size="25" value="password" /></td> 
     119                        <td>...and MySQL password.</td> 
     120                </tr> 
     121                <tr> 
     122                        <th scope="row">Database Host</th> 
     123                        <td><input name="dbhost" type="text" size="25" value="localhost" /></td> 
     124                        <td>99% chance you won't need to change this value.</td> 
     125                </tr> 
     126                <tr> 
     127                        <th scope="row">Table Prefix</th> 
     128                        <td><input name="prefix" type="text" id="prefix" value="wp_" size="25" /></td> 
     129                        <td>If you want to run multiple WordPress installations in a single database, change this.</td> 
     130                </tr> 
     131        </table> 
     132        <h2 class="step"> 
     133        <input name="submit" type="submit" value="Submit" /> 
     134        </h2> 
     135</form> 
    136136<?php 
    137137        break; 
    138138 
    139139        case 2: 
    140140        $dbname  = trim($_POST['dbname']); 
    141     $uname   = trim($_POST['uname']); 
    142     $passwrd = trim($_POST['pwd']); 
    143     $dbhost  = trim($_POST['dbhost']); 
     141        $uname   = trim($_POST['uname']); 
     142        $passwrd = trim($_POST['pwd']); 
     143        $dbhost  = trim($_POST['dbhost']); 
    144144        $prefix  = trim($_POST['prefix']); 
    145145        if (empty($prefix)) $prefix = 'wp_'; 
    146146 
    147     // Test the db connection. 
    148     define('DB_NAME', $dbname); 
    149     define('DB_USER', $uname); 
    150     define('DB_PASSWORD', $passwrd); 
    151     define('DB_HOST', $dbhost); 
     147        // Test the db connection. 
     148        define('DB_NAME', $dbname); 
     149        define('DB_USER', $uname); 
     150        define('DB_PASSWORD', $passwrd); 
     151        define('DB_HOST', $dbhost); 
    152152 
    153     // We'll fail here if the values are no good. 
    154     require_once('../wp-includes/wp-db.php'); 
     153        // We'll fail here if the values are no good. 
     154        require_once('../wp-includes/wp-db.php'); 
    155155        $handle = fopen('../wp-config.php', 'w'); 
    156156 
    157     foreach ($configFile as $line_num => $line) { 
    158         switch (substr($line,0,16)) { 
    159             case "define('DB_NAME'": 
    160                 fwrite($handle, str_replace("wordpress", $dbname, $line)); 
    161                 break; 
    162             case "define('DB_USER'": 
    163                 fwrite($handle, str_replace("'username'", "'$uname'", $line)); 
    164                 break; 
    165             case "define('DB_PASSW": 
    166                 fwrite($handle, str_replace("'password'", "'$passwrd'", $line)); 
    167                 break; 
    168             case "define('DB_HOST'": 
    169                 fwrite($handle, str_replace("localhost", $dbhost, $line)); 
    170                 break; 
     157        foreach ($configFile as $line_num => $line) { 
     158                switch (substr($line,0,16)) { 
     159                        case "define('DB_NAME'": 
     160                                fwrite($handle, str_replace("wordpress", $dbname, $line)); 
     161                                break; 
     162                        case "define('DB_USER'": 
     163                                fwrite($handle, str_replace("'username'", "'$uname'", $line)); 
     164                                break; 
     165                        case "define('DB_PASSW": 
     166                                fwrite($handle, str_replace("'password'", "'$passwrd'", $line)); 
     167                                break; 
     168                        case "define('DB_HOST'": 
     169                                fwrite($handle, str_replace("localhost", $dbhost, $line)); 
     170                                break; 
    171171                        case '$table_prefix  =': 
    172172                                fwrite($handle, str_replace('wp_', $prefix, $line)); 
    173173                                break; 
    174             default: 
    175                 fwrite($handle, $line); 
    176         } 
    177     } 
    178     fclose($handle); 
     174                        default: 
     175                                fwrite($handle, $line); 
     176                } 
     177        } 
     178        fclose($handle); 
    179179        chmod('../wp-config.php', 0666); 
    180 ?>  
    181 <p>All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to <a href="install.php">run the install!</a></p>  
     180?> 
     181<p>All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to <a href="install.php">run the install!</a></p> 
    182182<?php 
    183183        break; 
    184184} 
  • wp-admin/sidebar.php

     
    3434        padding: 3px; 
    3535} 
    3636.sidebar-categories { 
    37     display: block; 
    38     height: 6.6em; 
    39     overflow: auto; 
    40     background-color: #f4f4f4; 
     37        display: block; 
     38        height: 6.6em; 
     39        overflow: auto; 
     40        background-color: #f4f4f4; 
    4141} 
    4242.sidebar-categories label { 
    4343        font-size: 10px; 
    44     display: block; 
    45     width: 90%; 
     44        display: block; 
     45        width: 90%; 
    4646} 
    4747</style> 
    4848</head> 
     
    6565<textarea rows="8" cols="12" style="width: 100%" name="content" tabindex="2"></textarea> 
    6666</p> 
    6767<p> 
    68     <input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="Save as Draft" />  
     68        <input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="Save as Draft" /> 
    6969<?php if ( current_user_can('publish_posts') ) : ?> 
    70     <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="Publish" />  
     70        <input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="Publish" /> 
    7171<?php endif; ?> 
    7272</p> 
    7373</div> 
  • wp-admin/templates.php

     
    7878 <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div> 
    7979        <?php endif; ?> 
    8080<?php endif; ?> 
    81  <div class="wrap">  
     81 <div class="wrap"> 
    8282<?php 
    8383if (is_writeable($real_file)) { 
    8484        echo '<h2>' . sprintf(__('Editing <strong>%s</strong>'), wp_specialchars($file) ) . '</h2>'; 
     
    8787} 
    8888?> 
    8989<div id="templateside"> 
    90 <?php  
    91 if ( $recents ) :  
     90<?php 
     91if ( $recents ) : 
    9292?> 
    9393<h3><?php _e('Recent'); ?></h3> 
    9494<?php 
     
    106106         if (file_exists(ABSPATH . $old_file)) 
    107107                 $common_files[] = $old_file; 
    108108 } ?> 
    109   <ul> 
    110          <?php foreach ($common_files as $common_file) : ?> 
    111           <li><a href="templates.php?file=<?php echo $common_file?>"><?php echo get_file_description($common_file); ?></a></li> 
    112          <?php endforeach; ?> 
    113   </ul> 
     109<ul> 
     110        <?php foreach ($common_files as $common_file) : ?> 
     111                <li><a href="templates.php?file=<?php echo $common_file?>"><?php echo get_file_description($common_file); ?></a></li> 
     112        <?php endforeach; ?> 
     113</ul> 
    114114</div> 
    115115<?php if (!$error) { ?> 
    116   <form name="template" id="template" action="templates.php" method="post">  
    117   <?php wp_nonce_field('edit-file_' . $file) ?> 
    118      <div><textarea cols="70" rows="25" name="newcontent" id='newcontent' tabindex="1"><?php echo $content ?></textarea>  
    119      <input type="hidden" name="action" value="update" />  
    120      <input type="hidden" name="file" value="<?php echo $file ?>" />  
    121 </div> 
     116        <form name="template" id="template" action="templates.php" method="post"> 
     117        <?php wp_nonce_field('edit-file_' . $file) ?> 
     118                <div><textarea cols="70" rows="25" name="newcontent" id='newcontent' tabindex="1"><?php echo $content ?></textarea> 
     119                <input type="hidden" name="action" value="update" /> 
     120                <input type="hidden" name="file" value="<?php echo $file ?>" /> 
     121                </div> 
    122122<?php if ( is_writeable($real_file) ) : ?> 
    123      <p class="submit"> 
     123        <p class="submit"> 
    124124<?php 
    125125        echo "<input type='submit' name='submit' value='        " . __('Update File &raquo;') . "' tabindex='2' />"; 
    126126?> 
     
    128128<?php else : ?> 
    129129<p><em><?php _e('If this file were writable you could edit it.'); ?></em></p> 
    130130<?php endif; ?> 
    131    </form>  
    132   <?php 
     131        </form> 
     132        <?php 
    133133        } else { 
    134134                echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>'; 
    135135        } 
     
    139139<div class="wrap"> 
    140140<h2><?php _e('Other Files') ?></h2> 
    141141 
    142   <p><?php _e('To edit a file, type its name here. You can edit any file <a href="http://codex.wordpress.org/Changing_File_Permissions" title="Read more about making files writable">writable by the server</a>, e.g. CHMOD 666.') ?></p>  
    143   <form name="file" action="templates.php" method="get">  
    144     <input type="text" name="file" />  
    145     <input type="submit" name="submit"  value="<?php _e('Edit file &raquo;') ?>" />  
    146   </form>  
     142        <p><?php _e('To edit a file, type its name here. You can edit any file <a href="http://codex.wordpress.org/Changing_File_Permissions" title="Read more about making files writable">writable by the server</a>, e.g. CHMOD 666.') ?></p> 
     143        <form name="file" action="templates.php" method="get"> 
     144                <input type="text" name="file" /> 
     145                <input type="submit" name="submit"  value="<?php _e('Edit file &raquo;') ?>" /> 
     146        </form> 
    147147 
    148   <p><?php _e('Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don&#8217;t have access to a text editor or FTP client.') ?></p> 
    149 </div>  
     148        <p><?php _e('Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don&#8217;t have access to a text editor or FTP client.') ?></p> 
     149</div> 
    150150<?php 
    151151 
    152152break; 
  • wp-admin/theme-editor.php

     
    7575 <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div> 
    7676<?php endif; ?> 
    7777 <div class="wrap"> 
    78   <form name="theme" action="theme-editor.php" method="post">  
     78        <form name="theme" action="theme-editor.php" method="post"> 
    7979                <?php _e('Select theme to edit:') ?> 
    8080                <select name="theme" id="theme"> 
    8181        <?php 
     
    8787                echo "\n\t<option value=\"$theme_name\" $selected>$theme_name</option>"; 
    8888        } 
    8989?> 
    90  </select> 
    91  <input type="submit" name="Submit" value="<?php _e('Select &raquo;') ?>" /> 
    92  </form> 
    93  </div> 
     90</select> 
     91<input type="submit" name="Submit" value="<?php _e('Select &raquo;') ?>" /> 
     92</form> 
     93</div> 
    9494 
    95  <div class="wrap">  
    96   <?php 
     95 <div class="wrap"> 
     96        <?php 
    9797        if ( is_writeable($real_file) ) { 
    9898                echo '<h2>' . sprintf(__('Editing <code>%s</code>'), $file_show) . '</h2>'; 
    9999        } else { 
     
    101101        } 
    102102        ?> 
    103103        <div id="templateside"> 
    104   <h3><?php printf(__("<strong>'%s'</strong> theme files"), $theme) ?></h3> 
     104        <h3><?php printf(__("<strong>'%s'</strong> theme files"), $theme) ?></h3> 
    105105 
    106106<?php 
    107107if ($allowed_files) : 
    108108?> 
    109   <ul> 
     109        <ul> 
    110110<?php foreach($allowed_files as $allowed_file) : ?> 
    111111                 <li><a href="theme-editor.php?file=<?php echo "$allowed_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>"><?php echo get_file_description($allowed_file); ?></a></li> 
    112112<?php endforeach; ?> 
    113   </ul> 
     113        </ul> 
    114114<?php endif; ?> 
    115 </div>  
     115</div> 
    116116        <?php 
    117117        if (!$error) { 
    118         ?>  
    119   <form name="template" id="template" action="theme-editor.php" method="post"> 
    120   <?php wp_nonce_field('edit-theme_' . $file . $theme) ?> 
    121                  <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>  
    122      <input type="hidden" name="action" value="update" />  
    123      <input type="hidden" name="file" value="<?php echo $file ?>" />  
    124     <input type="hidden" name="theme" value="<?php echo $theme ?>" /> 
     118        ?> 
     119        <form name="template" id="template" action="theme-editor.php" method="post"> 
     120        <?php wp_nonce_field('edit-theme_' . $file . $theme) ?> 
     121                 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> 
     122                 <input type="hidden" name="action" value="update" /> 
     123                 <input type="hidden" name="file" value="<?php echo $file ?>" /> 
     124                <input type="hidden" name="theme" value="<?php echo $theme ?>" /> 
    125125                 </div> 
    126126<?php if ( is_writeable($real_file) ) : ?> 
    127      <p class="submit"> 
     127        <p class="submit"> 
    128128<?php 
    129129        echo "<input type='submit' name='submit' value='        " . __('Update File &raquo;') . "' tabindex='2' />"; 
    130130?> 
     
    132132<?php else : ?> 
    133133<p><em><?php _e('If this file were writable you could edit it.'); ?></em></p> 
    134134<?php endif; ?> 
    135    </form>  
    136   <?php 
     135        </form> 
     136        <?php 
    137137        } else { 
    138138                echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>'; 
    139139        } 
    140140        ?> 
    141141<div class="clear"> &nbsp; </div> 
    142 </div>  
     142</div> 
    143143<?php 
    144144break; 
    145145} 
    146146 
    147 include("admin-footer.php") ?>  
     147include("admin-footer.php") ?> 
  • wp-admin/themes.php

     
    112112 
    113113                $theme = ('class="alternate"' == $theme) ? '' : 'class="alternate"'; 
    114114                echo " 
    115           <tr $theme> 
    116             <td>$title</td> 
    117             <td>$description</td> 
    118           </tr>"; 
     115                <tr $theme> 
     116                        <td>$title</td> 
     117                        <td>$description</td> 
     118                </tr>"; 
    119119        } 
    120120?> 
    121121</table> 
  • wp-admin/update-links.php

     
    2828        while ( !feof($fs) ) 
    2929                $response .= fgets($fs, 1160); // One TCP-IP packet 
    3030        fclose($fs); 
    31      
     31 
    3232        $response = explode("\r\n\r\n", $response, 2); 
    3333        $body = trim( $response[1] ); 
    3434        $body = str_replace(array("\r\n", "\r"), "\n", $body); 
    35      
     35 
    3636        $returns = explode("\n", $body); 
    37      
     37 
    3838        foreach ($returns as $return) : 
    3939                $time = $wpdb->escape( substr($return, 0, 19) ); 
    4040                $uri = $wpdb->escape( preg_replace('/(.*?) | (.*?)/', '$2', $return) ); 
  • wp-admin/upgrade-functions.php

     
    121121http://wordpress.org/ 
    122122"), $blog_url, $name, $password); 
    123123 
    124         @wp_mail($email, __('New WordPress Blog'), $message, $message_headers);  
     124        @wp_mail($email, __('New WordPress Blog'), $message, $message_headers); 
    125125} 
    126126endif; 
    127127 
     
    138138        wp_cache_flush(); 
    139139        make_db_current_silent(); 
    140140        upgrade_all(); 
    141         wp_cache_flush();        
     141        wp_cache_flush(); 
    142142} 
    143143endif; 
    144144 
     
    188188        $posts = $wpdb->get_results("SELECT ID, post_title, post_name FROM $wpdb->posts WHERE post_name = ''"); 
    189189        if ($posts) { 
    190190                foreach($posts as $post) { 
    191                         if ('' == $post->post_name) {  
     191                        if ('' == $post->post_name) { 
    192192                                $newtitle = sanitize_title($post->post_title); 
    193193                                $wpdb->query("UPDATE $wpdb->posts SET post_name = '$newtitle' WHERE ID = '$post->ID'"); 
    194194                        } 
     
    197197 
    198198        $categories = $wpdb->get_results("SELECT cat_ID, cat_name, category_nicename FROM $wpdb->categories"); 
    199199        foreach ($categories as $category) { 
    200                 if ('' == $category->category_nicename) {  
     200                if ('' == $category->category_nicename) { 
    201201                        $newtitle = sanitize_title($category->cat_name); 
    202202                        $wpdb->query("UPDATE $wpdb->categories SET category_nicename = '$newtitle' WHERE cat_ID = '$category->cat_ID'"); 
    203203                } 
     
    252252function upgrade_110() { 
    253253        global $wpdb; 
    254254 
    255     // Set user_nicename. 
     255        // Set user_nicename. 
    256256        $users = $wpdb->get_results("SELECT ID, user_nickname, user_nicename FROM $wpdb->users"); 
    257         foreach ($users as $user) { 
    258                 if ('' == $user->user_nicename) {  
    259                         $newname = sanitize_title($user->user_nickname); 
    260                         $wpdb->query("UPDATE $wpdb->users SET user_nicename = '$newname' WHERE ID = '$user->ID'"); 
    261                 } 
    262         } 
     257        foreach ($users as $user) { 
     258                if ('' == $user->user_nicename) { 
     259                        $newname = sanitize_title($user->user_nickname); 
     260                        $wpdb->query("UPDATE $wpdb->users SET user_nicename = '$newname' WHERE ID = '$user->ID'"); 
     261                } 
     262        } 
    263263 
    264264        $users = $wpdb->get_results("SELECT ID, user_pass from $wpdb->users"); 
    265265        foreach ($users as $row) { 
    266266                if (!preg_match('/^[A-Fa-f0-9]{32}$/', $row->user_pass)) { 
    267                            $wpdb->query('UPDATE '.$wpdb->users.' SET user_pass = MD5(\''.$row->user_pass.'\') WHERE ID = \''.$row->ID.'\''); 
     267                        $wpdb->query('UPDATE '.$wpdb->users.' SET user_pass = MD5(\''.$row->user_pass.'\') WHERE ID = \''.$row->ID.'\''); 
    268268                } 
    269269        } 
    270270 
     
    306306} 
    307307 
    308308function upgrade_130() { 
    309     global $wpdb; 
     309        global $wpdb; 
    310310 
    311     // Remove extraneous backslashes. 
     311        // Remove extraneous backslashes. 
    312312        $posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt, guid, post_date, post_name, post_status, post_author FROM $wpdb->posts"); 
    313313        if ($posts) { 
    314314                foreach($posts as $post) { 
    315             $post_content = addslashes(deslash($post->post_content)); 
    316             $post_title = addslashes(deslash($post->post_title)); 
    317             $post_excerpt = addslashes(deslash($post->post_excerpt)); 
     315                        $post_content = addslashes(deslash($post->post_content)); 
     316                        $post_title = addslashes(deslash($post->post_title)); 
     317                        $post_excerpt = addslashes(deslash($post->post_excerpt)); 
    318318                        if ( empty($post->guid) ) 
    319319                                $guid = get_permalink($post->ID); 
    320320                        else 
    321321                                $guid = $post->guid; 
    322322 
    323             $wpdb->query("UPDATE $wpdb->posts SET post_title = '$post_title', post_content = '$post_content', post_excerpt = '$post_excerpt', guid = '$guid' WHERE ID = '$post->ID'"); 
     323                        $wpdb->query("UPDATE $wpdb->posts SET post_title = '$post_title', post_content = '$post_content', post_excerpt = '$post_excerpt', guid = '$guid' WHERE ID = '$post->ID'"); 
    324324                } 
    325325        } 
    326326 
    327     // Remove extraneous backslashes. 
     327        // Remove extraneous backslashes. 
    328328        $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_content FROM $wpdb->comments"); 
    329329        if ($comments) { 
    330330                foreach($comments as $comment) { 
    331             $comment_content = addslashes(deslash($comment->comment_content)); 
    332             $comment_author = addslashes(deslash($comment->comment_author)); 
    333             $wpdb->query("UPDATE $wpdb->comments SET comment_content = '$comment_content', comment_author = '$comment_author' WHERE comment_ID = '$comment->comment_ID'"); 
     331                        $comment_content = addslashes(deslash($comment->comment_content)); 
     332                        $comment_author = addslashes(deslash($comment->comment_author)); 
     333                        $wpdb->query("UPDATE $wpdb->comments SET comment_content = '$comment_content', comment_author = '$comment_author' WHERE comment_ID = '$comment->comment_ID'"); 
    334334                } 
    335335        } 
    336336 
    337     // Remove extraneous backslashes. 
     337        // Remove extraneous backslashes. 
    338338        $links = $wpdb->get_results("SELECT link_id, link_name, link_description FROM $wpdb->links"); 
    339339        if ($links) { 
    340340                foreach($links as $link) { 
    341             $link_name = addslashes(deslash($link->link_name)); 
    342             $link_description = addslashes(deslash($link->link_description)); 
    343             $wpdb->query("UPDATE $wpdb->links SET link_name = '$link_name', link_description = '$link_description' WHERE link_id = '$link->link_id'"); 
     341                        $link_name = addslashes(deslash($link->link_name)); 
     342                        $link_description = addslashes(deslash($link->link_description)); 
     343                        $wpdb->query("UPDATE $wpdb->links SET link_name = '$link_name', link_description = '$link_description' WHERE link_id = '$link->link_id'"); 
    344344                } 
    345345        } 
    346346 
    347     // The "paged" option for what_to_show is no more. 
    348     if ($wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'what_to_show'") == 'paged') { 
    349         $wpdb->query("UPDATE $wpdb->options SET option_value = 'posts' WHERE option_name = 'what_to_show'"); 
    350     } 
     347        // The "paged" option for what_to_show is no more. 
     348        if ($wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'what_to_show'") == 'paged') { 
     349                $wpdb->query("UPDATE $wpdb->options SET option_value = 'posts' WHERE option_name = 'what_to_show'"); 
     350        } 
    351351 
    352                 $active_plugins = __get_option('active_plugins'); 
     352        $active_plugins = __get_option('active_plugins'); 
    353353 
    354                 // If plugins are not stored in an array, they're stored in the old 
    355                 // newline separated format.  Convert to new format. 
    356                 if ( !is_array( $active_plugins ) ) { 
    357                         $active_plugins = explode("\n", trim($active_plugins)); 
    358                         update_option('active_plugins', $active_plugins); 
    359                 } 
     354        // If plugins are not stored in an array, they're stored in the old 
     355        // newline separated format.  Convert to new format. 
     356        if ( !is_array( $active_plugins ) ) { 
     357                $active_plugins = explode("\n", trim($active_plugins)); 
     358                update_option('active_plugins', $active_plugins); 
     359        } 
    360360 
    361361        // Obsolete tables 
    362362        $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optionvalues'); 
     
    500500                // Give future posts a post_status of future. 
    501501                $now = gmdate('Y-m-d H:i:59'); 
    502502                $wpdb->query ("UPDATE $wpdb->posts SET post_status = 'future' WHERE post_status = 'publish' AND post_date_gmt > '$now'"); 
    503                  
     503 
    504504                $posts = $wpdb->get_results("SELECT ID, post_date FROM $wpdb->posts WHERE post_status ='future'"); 
    505505                if ( !empty($posts) ) 
    506506                        foreach ( $posts as $post ) 
     
    509509        if ( $wp_current_db_version < 3570 ) { 
    510510                // Create categories for link categories if a category with the same 
    511511                // name doesn't exist.  Create a map of link cat IDs to cat IDs. 
    512                 $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");   
     512                $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories"); 
    513513                foreach ( $link_cats as $link_cat) { 
    514514                        if ( $cat_id = category_exists($link_cat->cat_name) ) { 
    515515                                $link_cat_id_map[$link_cat->cat_id] = $cat_id; 
     
    528528                        if (!$cat && 0 != $link->link_category) { 
    529529                                $wpdb->query("INSERT INTO $wpdb->link2cat (link_id, category_id) 
    530530                                        VALUES ('$link->link_id', '$link_cat')"); 
    531                         }                        
     531                        } 
    532532                } 
    533                  
     533 
    534534                // Set default to the last category we grabbed during the upgrade loop. 
    535535                update_option('default_link_category', $default_link_cat); 
    536536 
     
    549549 
    550550// General 
    551551function maybe_create_table($table_name, $create_ddl) { 
    552     global $wpdb; 
    553     foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 
    554         if ($table == $table_name) { 
    555             return true; 
    556         } 
    557     } 
    558     //didn't find it try to create it. 
    559     $q = $wpdb->query($create_ddl); 
    560     // we cannot directly tell that whether this succeeded! 
    561     foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 
    562         if ($table == $table_name) { 
    563             return true; 
    564         } 
    565     } 
    566     return false; 
     552        global $wpdb; 
     553        foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 
     554                if ($table == $table_name) { 
     555                        return true; 
     556                } 
     557        } 
     558        //didn't find it try to create it. 
     559        $q = $wpdb->query($create_ddl); 
     560        // we cannot directly tell that whether this succeeded! 
     561        foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { 
     562                if ($table == $table_name) { 
     563                        return true; 
     564                } 
     565        } 
     566        return false; 
    567567} 
    568568 
    569569function drop_index($table, $index) { 
     
    592592 **           false on error 
    593593 */ 
    594594function maybe_add_column($table_name, $column_name, $create_ddl) { 
    595     global $wpdb, $debug; 
    596     foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { 
    597         if ($debug) echo("checking $column == $column_name<br />"); 
    598         if ($column == $column_name) { 
    599             return true; 
    600         } 
    601     } 
    602     //didn't find it try to create it. 
    603     $q = $wpdb->query($create_ddl); 
    604     // we cannot directly tell that whether this succeeded! 
    605     foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { 
    606         if ($column == $column_name) { 
    607             return true; 
    608         } 
    609     } 
    610     return false; 
     595        global $wpdb, $debug; 
     596        foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { 
     597                if ($debug) echo("checking $column == $column_name<br />"); 
     598                if ($column == $column_name) { 
     599                        return true; 
     600                } 
     601        } 
     602        //didn't find it try to create it. 
     603        $q = $wpdb->query($create_ddl); 
     604        // we cannot directly tell that whether this succeeded! 
     605        foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { 
     606                if ($column == $column_name) { 
     607                        return true; 
     608                } 
     609        } 
     610        return false; 
    611611} 
    612612 
    613613 
     
    616616        global $wpdb; 
    617617        if ($options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options")) { 
    618618                foreach ($options as $option) { 
    619                         // "When trying to design a foolproof system,  
     619                        // "When trying to design a foolproof system, 
    620620                        //  never underestimate the ingenuity of the fools :)" -- Dougal 
    621621                        if ('siteurl' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); 
    622622                        if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); 
     
    647647} 
    648648 
    649649function deslash($content) { 
    650     // Note: \\\ inside a regex denotes a single backslash. 
     650        // Note: \\\ inside a regex denotes a single backslash. 
    651651 
    652     // Replace one or more backslashes followed by a single quote with 
    653     // a single quote. 
    654     $content = preg_replace("/\\\+'/", "'", $content); 
     652        // Replace one or more backslashes followed by a single quote with 
     653        // a single quote. 
     654        $content = preg_replace("/\\\+'/", "'", $content); 
    655655 
    656     // Replace one or more backslashes followed by a double quote with 
    657     // a double quote. 
    658     $content = preg_replace('/\\\+"/', '"', $content); 
     656        // Replace one or more backslashes followed by a double quote with 
     657        // a double quote. 
     658        $content = preg_replace('/\\\+"/', '"', $content); 
    659659 
    660     // Replace one or more backslashes with one backslash. 
    661     $content = preg_replace("/\\\+/", "\\", $content); 
     660        // Replace one or more backslashes with one backslash. 
     661        $content = preg_replace("/\\\+/", "\\", $content); 
    662662 
    663     return $content; 
     663        return $content; 
    664664} 
    665665 
    666666function dbDelta($queries, $execute = true) { 
     
    827827                                                                $index_columns .= '('.$column_data['subpart'].')'; 
    828828                                                        } 
    829829                                                } 
    830                                                 // Add the column list to the index create string  
     830                                                // Add the column list to the index create string 
    831831                                                $index_string .= ' ('.$index_columns.')'; 
    832832 
    833833                                                if(!(($aindex = array_search($index_string, $indices)) === false)) { 
  • wp-admin/upgrade-schema.php

     
    22// Here we keep the DB structure and option values 
    33 
    44$wp_queries="CREATE TABLE $wpdb->categories ( 
    5   cat_ID bigint(20) NOT NULL auto_increment, 
    6   cat_name varchar(55) NOT NULL default '', 
    7   category_nicename varchar(200) NOT NULL default '', 
    8   category_description longtext NOT NULL, 
    9   category_parent bigint(20) NOT NULL default '0', 
    10   category_count bigint(20) NOT NULL default '0', 
    11   link_count bigint(20) NOT NULL default '0', 
    12   posts_private tinyint(1) NOT NULL default '0', 
    13   links_private tinyint(1) NOT NULL default '0', 
    14   PRIMARY KEY  (cat_ID), 
    15   KEY category_nicename (category_nicename) 
     5        cat_ID bigint(20) NOT NULL auto_increment, 
     6        cat_name varchar(55) NOT NULL default '', 
     7        category_nicename varchar(200) NOT NULL default '', 
     8        category_description longtext NOT NULL, 
     9        category_parent bigint(20) NOT NULL default '0', 
     10        category_count bigint(20) NOT NULL default '0', 
     11        link_count bigint(20) NOT NULL default '0', 
     12        posts_private tinyint(1) NOT NULL default '0', 
     13        links_private tinyint(1) NOT NULL default '0', 
     14        PRIMARY KEY  (cat_ID), 
     15        KEY category_nicename (category_nicename) 
    1616); 
    1717CREATE TABLE $wpdb->comments ( 
    18   comment_ID bigint(20) unsigned NOT NULL auto_increment, 
    19   comment_post_ID int(11) NOT NULL default '0', 
    20   comment_author tinytext NOT NULL, 
    21   comment_author_email varchar(100) NOT NULL default '', 
    22   comment_author_url varchar(200) NOT NULL default '', 
    23   comment_author_IP varchar(100) NOT NULL default '', 
    24   comment_date datetime NOT NULL default '0000-00-00 00:00:00', 
    25   comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', 
    26   comment_content text NOT NULL, 
    27   comment_karma int(11) NOT NULL default '0', 
    28   comment_approved enum('0','1','spam') NOT NULL default '1', 
    29   comment_agent varchar(255) NOT NULL default '', 
    30   comment_type varchar(20) NOT NULL default '', 
    31   comment_parent bigint(20) NOT NULL default '0', 
    32   user_id bigint(20) NOT NULL default '0', 
    33   PRIMARY KEY  (comment_ID), 
    34   KEY comment_approved (comment_approved), 
    35   KEY comment_post_ID (comment_post_ID) 
     18        comment_ID bigint(20) unsigned NOT NULL auto_increment, 
     19        comment_post_ID int(11) NOT NULL default '0', 
     20        comment_author tinytext NOT NULL, 
     21        comment_author_email varchar(100) NOT NULL default '', 
     22        comment_author_url varchar(200) NOT NULL default '', 
     23        comment_author_IP varchar(100) NOT NULL default '', 
     24        comment_date datetime NOT NULL default '0000-00-00 00:00:00', 
     25        comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', 
     26        comment_content text NOT NULL, 
     27        comment_karma int(11) NOT NULL default '0', 
     28        comment_approved enum('0','1','spam') NOT NULL default '1', 
     29        comment_agent varchar(255) NOT NULL default '', 
     30        comment_type varchar(20) NOT NULL default '', 
     31        comment_parent bigint(20) NOT NULL default '0', 
     32        user_id bigint(20) NOT NULL default '0', 
     33        PRIMARY KEY  (comment_ID), 
     34        KEY comment_approved (comment_approved), 
     35        KEY comment_post_ID (comment_post_ID) 
    3636); 
    3737CREATE TABLE $wpdb->link2cat ( 
    38   rel_id bigint(20) NOT NULL auto_increment, 
    39   link_id bigint(20) NOT NULL default '0', 
    40   category_id bigint(20) NOT NULL default '0', 
    41   PRIMARY KEY  (rel_id), 
    42   KEY link_id (link_id,category_id) 
     38        rel_id bigint(20) NOT NULL auto_increment, 
     39        link_id bigint(20) NOT NULL default '0', 
     40        category_id bigint(20) NOT NULL default '0', 
     41        PRIMARY KEY  (rel_id), 
     42        KEY link_id (link_id,category_id) 
    4343); 
    4444CREATE TABLE $wpdb->links ( 
    45   link_id bigint(20) NOT NULL auto_increment, 
    46   link_url varchar(255) NOT NULL default '', 
    47   link_name varchar(255) NOT NULL default '', 
    48   link_image varchar(255) NOT NULL default '', 
    49   link_target varchar(25) NOT NULL default '', 
    50   link_category bigint(20) NOT NULL default '0', 
    51   link_description varchar(255) NOT NULL default '', 
    52   link_visible enum('Y','N') NOT NULL default 'Y', 
    53   link_owner int(11) NOT NULL default '1', 
    54   link_rating int(11) NOT NULL default '0', 
    55   link_updated datetime NOT NULL default '0000-00-00 00:00:00', 
    56   link_rel varchar(255) NOT NULL default '', 
    57   link_notes mediumtext NOT NULL, 
    58   link_rss varchar(255) NOT NULL default '', 
    59   PRIMARY KEY  (link_id), 
    60   KEY link_category (link_category), 
    61   KEY link_visible (link_visible) 
     45        link_id bigint(20) NOT NULL auto_increment, 
     46        link_url varchar(255) NOT NULL default '', 
     47        link_name varchar(255) NOT NULL default '', 
     48        link_image varchar(255) NOT NULL default '', 
     49        link_target varchar(25) NOT NULL default '', 
     50        link_category bigint(20) NOT NULL default '0', 
     51        link_description varchar(255) NOT NULL default '', 
     52        link_visible enum('Y','N') NOT NULL default 'Y', 
     53        link_owner int(11) NOT NULL default '1', 
     54        link_rating int(11) NOT NULL default '0', 
     55        link_updated datetime NOT NULL default '0000-00-00 00:00:00', 
     56        link_rel varchar(255) NOT NULL default '', 
     57        link_notes mediumtext NOT NULL, 
     58        link_rss varchar(255) NOT NULL default '', 
     59        PRIMARY KEY  (link_id), 
     60        KEY link_category (link_category), 
     61        KEY link_visible (link_visible) 
    6262); 
    6363CREATE TABLE $wpdb->options ( 
    64   option_id bigint(20) NOT NULL auto_increment, 
    65   blog_id int(11) NOT NULL default '0', 
    66   option_name varchar(64) NOT NULL default '', 
    67   option_can_override enum('Y','N') NOT NULL default 'Y', 
    68   option_type int(11) NOT NULL default '1', 
    69   option_value longtext NOT NULL, 
    70   option_width int(11) NOT NULL default '20', 
    71   option_height int(11) NOT NULL default '8', 
    72   option_description tinytext NOT NULL, 
    73   option_admin_level int(11) NOT NULL default '1', 
    74   autoload enum('yes','no') NOT NULL default 'yes', 
    75   PRIMARY KEY  (option_id,blog_id,option_name), 
    76   KEY option_name (option_name) 
     64        option_id bigint(20) NOT NULL auto_increment, 
     65        blog_id int(11) NOT NULL default '0', 
     66        option_name varchar(64) NOT NULL default '', 
     67        option_can_override enum('Y','N') NOT NULL default 'Y', 
     68        option_type int(11) NOT NULL default '1', 
     69        option_value longtext NOT NULL, 
     70        option_width int(11) NOT NULL default '20', 
     71        option_height int(11) NOT NULL default '8', 
     72        option_description tinytext NOT NULL, 
     73        option_admin_level int(11) NOT NULL default '1', 
     74        autoload enum('yes','no') NOT NULL default 'yes', 
     75        PRIMARY KEY  (option_id,blog_id,option_name), 
     76        KEY option_name (option_name) 
    7777); 
    7878CREATE TABLE $wpdb->post2cat ( 
    79   rel_id bigint(20) NOT NULL auto_increment, 
    80   post_id bigint(20) NOT NULL default '0', 
    81   category_id bigint(20) NOT NULL default '0', 
    82   PRIMARY KEY  (rel_id), 
    83   KEY post_id (post_id,category_id) 
     79        rel_id bigint(20) NOT NULL auto_increment, 
     80        post_id bigint(20) NOT NULL default '0', 
     81        category_id bigint(20) NOT NULL default '0', 
     82        PRIMARY KEY  (rel_id), 
     83        KEY post_id (post_id,category_id) 
    8484); 
    8585CREATE TABLE $wpdb->postmeta ( 
    86   meta_id bigint(20) NOT NULL auto_increment, 
    87   post_id bigint(20) NOT NULL default '0', 
    88   meta_key varchar(255) default NULL, 
    89   meta_value longtext, 
    90   PRIMARY KEY  (meta_id), 
    91   KEY post_id (post_id), 
    92   KEY meta_key (meta_key) 
     86        meta_id bigint(20) NOT NULL auto_increment, 
     87        post_id bigint(20) NOT NULL default '0', 
     88        meta_key varchar(255) default NULL, 
     89        meta_value longtext, 
     90        PRIMARY KEY  (meta_id), 
     91        KEY post_id (post_id), 
     92        KEY meta_key (meta_key) 
    9393); 
    9494CREATE TABLE $wpdb->posts ( 
    95   ID bigint(20) unsigned NOT NULL auto_increment, 
    96   post_author bigint(20) NOT NULL default '0', 
    97   post_date datetime NOT NULL default '0000-00-00 00:00:00', 
    98   post_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', 
    99   post_content longtext NOT NULL, 
    100   post_title text NOT NULL, 
    101   post_category int(4) NOT NULL default '0', 
    102   post_excerpt text NOT NULL, 
    103   post_status enum('publish','draft','private','static','object','attachment','inherit','future') NOT NULL default 'publish', 
    104   comment_status enum('open','closed','registered_only') NOT NULL default 'open', 
    105   ping_status enum('open','closed') NOT NULL default 'open', 
    106   post_password varchar(20) NOT NULL default '', 
    107   post_name varchar(200) NOT NULL default '', 
    108   to_ping text NOT NULL, 
    109   pinged text NOT NULL, 
    110   post_modified datetime NOT NULL default '0000-00-00 00:00:00', 
    111   post_modified_gmt datetime NOT NULL default '0000-00-00 00:00:00', 
    112   post_content_filtered text NOT NULL, 
    113   post_parent bigint(20) NOT NULL default '0', 
    114   guid varchar(255) NOT NULL default '', 
    115   menu_order int(11) NOT NULL default '0', 
    116   post_type varchar(20) NOT NULL default 'post', 
    117   post_mime_type varchar(100) NOT NULL default '', 
    118   comment_count bigint(20) NOT NULL default '0', 
    119   PRIMARY KEY  (ID), 
    120   KEY post_name (post_name), 
    121   KEY type_status_date (post_type, post_status, post_date, ID) 
     95        ID bigint(20) unsigned NOT NULL auto_increment, 
     96        post_author bigint(20) NOT NULL default '0', 
     97        post_date datetime NOT NULL default '0000-00-00 00:00:00', 
     98        post_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', 
     99        post_content longtext NOT NULL, 
     100        post_title text NOT NULL, 
     101        post_category int(4) NOT NULL default '0', 
     102        post_excerpt text NOT NULL, 
     103        post_status enum('publish','draft','private','static','object','attachment','inherit','future') NOT NULL default 'publish', 
     104        comment_status enum('open','closed','registered_only') NOT NULL default 'open', 
     105        ping_status enum('open','closed') NOT NULL default 'open', 
     106        post_password varchar(20) NOT NULL default '', 
     107        post_name varchar(200) NOT NULL default '', 
     108        to_ping text NOT NULL, 
     109        pinged text NOT NULL, 
     110        post_modified datetime NOT NULL default '0000-00-00 00:00:00', 
     111        post_modified_gmt datetime NOT NULL default '0000-00-00 00:00:00', 
     112        post_content_filtered text NOT NULL, 
     113        post_parent bigint(20) NOT NULL default '0', 
     114        guid varchar(255) NOT NULL default '', 
     115        menu_order int(11) NOT NULL default '0', 
     116        post_type varchar(20) NOT NULL default 'post', 
     117        post_mime_type varchar(100) NOT NULL default '', 
     118        comment_count bigint(20) NOT NULL default '0', 
     119        PRIMARY KEY  (ID), 
     120        KEY post_name (post_name), 
     121        KEY type_status_date (post_type, post_status, post_date, ID) 
    122122); 
    123123CREATE TABLE $wpdb->users ( 
    124   ID bigint(20) unsigned NOT NULL auto_increment, 
    125   user_login varchar(60) NOT NULL default '', 
    126   user_pass varchar(64) NOT NULL default '', 
    127   user_nicename varchar(50) NOT NULL default '', 
    128   user_email varchar(100) NOT NULL default '', 
    129   user_url varchar(100) NOT NULL default '', 
    130   user_registered datetime NOT NULL default '0000-00-00 00:00:00', 
    131   user_activation_key varchar(60) NOT NULL default '', 
    132   user_status int(11) NOT NULL default '0', 
    133   display_name varchar(250) NOT NULL default '', 
    134   PRIMARY KEY  (ID), 
    135   KEY user_login_key (user_login) 
     124        ID bigint(20) unsigned NOT NULL auto_increment, 
     125        user_login varchar(60) NOT NULL default '', 
     126        user_pass varchar(64) NOT NULL default '', 
     127        user_nicename varchar(50) NOT NULL default '', 
     128        user_email varchar(100) NOT NULL default '', 
     129        user_url varchar(100) NOT NULL default '', 
     130        user_registered datetime NOT NULL default '0000-00-00 00:00:00', 
     131        user_activation_key varchar(60) NOT NULL default '', 
     132        user_status int(11) NOT NULL default '0', 
     133        display_name varchar(250) NOT NULL default '', 
     134        PRIMARY KEY  (ID), 
     135        KEY user_login_key (user_login) 
    136136); 
    137137CREATE TABLE $wpdb->usermeta ( 
    138   umeta_id bigint(20) NOT NULL auto_increment, 
    139   user_id bigint(20) NOT NULL default '0', 
    140   meta_key varchar(255) default NULL, 
    141   meta_value longtext, 
    142   PRIMARY KEY  (umeta_id), 
    143   KEY user_id (user_id), 
    144   KEY meta_key (meta_key) 
     138        umeta_id bigint(20) NOT NULL auto_increment, 
     139        user_id bigint(20) NOT NULL default '0', 
     140        meta_key varchar(255) default NULL, 
     141        meta_value longtext, 
     142        PRIMARY KEY  (umeta_id), 
     143        KEY user_id (user_id), 
     144        KEY meta_key (meta_key) 
    145145);"; 
    146146 
    147147function populate_options() { 
     
    224224                add_option('uploads_use_yearmonth_folders', 1); 
    225225                add_option('upload_path', 'wp-content/uploads'); 
    226226        } 
    227          
     227 
    228228        // 2.0.3 
    229229        add_option('secret', md5(uniqid(microtime()))); 
    230230 
  • wp-admin/upgrade.php

     
    6868 
    6969        case 0: 
    7070        $goback = wp_specialchars(wp_get_referer()); 
    71 ?>  
    72 <p><?php _e('This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.'); ?></p>  
     71?> 
     72<p><?php _e('This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.'); ?></p> 
    7373        <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2> 
    7474<?php 
    7575        break; 
     
    8181                $backto = __get_option('home'); 
    8282        else 
    8383                $backto = wp_specialchars( $_GET['backto'] , 1 ); 
    84 ?>  
    85 <h2><?php _e('Step 1'); ?></h2>  
     84?> 
     85<h2><?php _e('Step 1'); ?></h2> 
    8686        <p><?php printf(__("There's actually only one step. So if you see this, you're done. <a href='%s'>Have fun</a>!"),  $backto); ?></p> 
    8787 
    8888<!-- 
     
    9696<?php 
    9797        break; 
    9898} 
    99 ?>  
     99?> 
    100100</body> 
    101101</html> 
  • wp-admin/user-edit.php

     
    182182<?php do_action('edit_user_profile'); ?> 
    183183 
    184184<br clear="all" /> 
    185   <table width="99%"  border="0" cellspacing="2" cellpadding="3" class="editform"> 
    186     <?php 
    187     if(count($profileuser->caps) > count($profileuser->roles)): 
    188     ?> 
    189     <tr> 
    190       <th scope="row"><?php _e('Additional Capabilities:') ?></th> 
    191       <td><?php  
     185        <table width="99%"  border="0" cellspacing="2" cellpadding="3" class="editform"> 
     186                <?php 
     187                if(count($profileuser->caps) > count($profileuser->roles)): 
     188                ?> 
     189                <tr> 
     190                        <th scope="row"><?php _e('Additional Capabilities:') ?></th> 
     191                        <td><?php 
    192192                        $output = ''; 
    193193                        foreach($profileuser->caps as $cap => $value) { 
    194194                                if(!$wp_roles->is_role($cap)) { 
     
    198198                        } 
    199199                        echo $output; 
    200200                        ?></td> 
    201     </tr> 
    202     <?php 
    203     endif; 
    204     ?> 
    205   </table> 
     201                </tr> 
     202                <?php 
     203                endif; 
     204                ?> 
     205        </table> 
    206206<p class="submit"> 
    207207        <input type="hidden" name="action" value="update" /> 
    208208        <input type="hidden" name="user_id" id="user_id" value="<?php echo $user_id; ?>" /> 
    209     <input type="submit" value="<?php _e('Update User &raquo;') ?>" name="submit" /> 
     209        <input type="submit" value="<?php _e('Update User &raquo;') ?>" name="submit" /> 
    210210 </p> 
    211211</form> 
    212212</div> 
  • wp-admin/wp-admin.css

     
    258258} 
    259259 
    260260.commentlist li { 
    261         border-bottom: 1px solid #ccc;  
     261        border-bottom: 1px solid #ccc; 
    262262        padding: 1em 1em .2em; 
    263263        margin: 0; 
    264264} 
     
    762762} 
    763763 
    764764/* A handy div class for hiding controls. 
    765    Some browsers will disable them when you 
    766    set display:none; */ 
     765Some browsers will disable them when you 
     766set display:none; */ 
    767767.zerosize { 
    768768        height: 0px; 
    769769        width: 0px; 
     
    803803} 
    804804 
    805805/**************************************************************** 
    806   avoid padding, margins or borders on dbx-box,  
    807   to reduce visual discrepancies between it and the clone.   
    808   overall, dbx-box is best left as visually unstyled as possible  
     806avoid padding, margins or borders on dbx-box, 
     807to reduce visual discrepancies between it and the clone. 
     808overall, dbx-box is best left as visually unstyled as possible 
    809809*****************************************************************/ 
    810810.dbx-box { 
    811811        margin:0; 
     
    870870        float: left; 
    871871        width: 40%; 
    872872        padding: .5em 2em; 
    873         margin: 1em;  
     873        margin: 1em; 
    874874} 
    875875 
    876876#your-profile fieldset input  { 
  • wp-admin/xfn.js

     
    1010} 
    1111 
    1212function meChecked() { 
    13   var undefined; 
    14   var eMe = document.getElementById('me'); 
    15   if (eMe == undefined) return false; 
    16   else return eMe.checked; 
     13        var undefined; 
     14        var eMe = document.getElementById('me'); 
     15        if (eMe == undefined) return false; 
     16        else return eMe.checked; 
    1717} 
    1818 
    1919function upit() {