Make WordPress Core

Changeset 4196


Ignore:
Timestamp:
09/19/2006 06:11:42 AM (18 years ago)
Author:
matt
Message:

Options cleanup and some styling changes.

Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/index.php

    r4130 r4196  
    1111<div class="wrap">
    1212
    13 <h2><?php _e('Dashboard'); ?></h2>
     13<h2><?php _e('Welcome to WordPress'); ?></h2>
    1414
    1515<div id="zeitgeist">
     
    114114</div>
    115115
    116 <h3><?php _e('Welcome to WordPress'); ?></h3>
    117 
    118116<p><?php _e('Use these links to get started:'); ?></p>
    119117
     
    130128<?php endif; ?>
    131129</ul>
    132 
    133 <p><?php _e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p>
     130<p><?php _e("Need help with WordPress? Please see our <a href='http://codex.wordpress.org/'>documentation</a> or visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p>
    134131<?php
    135132$rss = @fetch_rss('http://wordpress.org/development/feed/');
    136133if ( isset($rss->items) && 0 != count($rss->items) ) {
    137134?>
    138 <h3><?php _e('WordPress Development Blog'); ?></h3>
     135<h3><?php _e('WordPress Development News'); ?></h3>
    139136<?php
    140137$rss->items = array_slice($rss->items, 0, 3);
  • trunk/wp-admin/options-discussion.php

    r4161 r4196  
    66
    77include('admin-header.php');
    8 
    9 if ($action == 'retrospam') {
    10     if ( $_GET['move'] == 'true' ) {
    11         retrospam_mgr::move_spam( $_GET[ids] );
    12     }
    13     $retrospaminator = new retrospam_mgr();
    14     $result = $retrospaminator->find_spam();
    15     echo $retrospaminator->display_edit_form( $result );
    16     include('./admin-footer.php');
    17     exit;
    18 }
    198?>
    209
     
    2312<form method="post" action="options.php">
    2413<?php wp_nonce_field('update-options') ?>
     14<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
    2515<fieldset class="options">
    2616<legend><?php _e('Usual settings for an article:<br /><small><em>(These settings may be overridden for individual articles.)</em></small>') ?></legend>
     
    6454<label for="comment_moderation">
    6555<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
    66 <?php _e('An administrator must approve the comment (regardless of any matches below)') ?> </label>
     56<?php _e('An administrator must always approve the comment') ?> </label>
    6757</li>
    6858<li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li>
     
    7464<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_option('comment_max_links'). '" />' ) ?></p>
    7565
    76 <p><?php _e('When a comment contains any of these words in its content, name, URL, 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>
     66<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the <a href="moderation.php">moderation queue</a>. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p>
    7767<p>
    7868<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>
    81 <a id="retrospambutton" href="options-discussion.php?action=retrospam"><?php _e('Check past comments against moderation list'); ?></a>
    8269</p>
    8370</fieldset>
    8471<fieldset class="options">
    8572<legend><?php _e('Comment Blacklist') ?></legend>
    86 <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>
     73<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be deleted. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p>
    8774<p>
    8875<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>
    8976</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_option('open_proxy_check')); ?> />
    92 <?php _e('Blacklist comments from open and insecure proxies.') ?></label></p>
    9377</fieldset>
    9478<p class="submit">
  • trunk/wp-admin/options-general.php

    r4144 r4196  
    1212<form method="post" action="options.php">
    1313<?php wp_nonce_field('update-options') ?>
     14<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
    1415<table class="optiontable">
    1516<tr valign="top">
     
    6566<th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th>
    6667<td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" />
    67 <?php _e('hours') ?> </td>
     68<?php _e('hours') ?> (<?php _e('Your timezone offset, for example <code>-6</code> for Central Time.'); ?>)</td>
    6869</tr>
    6970<tr>
  • trunk/wp-admin/options-misc.php

    r4144 r4196  
    1313<form method="post" action="options.php">
    1414<?php wp_nonce_field('update-options') ?>
     15<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
    1516<fieldset class="options">
    1617<legend><?php _e('Uploading'); ?></legend>
  • trunk/wp-admin/options-permalink.php

    r4144 r4196  
    103103<div class="wrap">
    104104  <h2><?php _e('Customize Permalink Structure') ?></h2>
     105<form name="form" action="options-permalink.php" method="post">
     106<?php wp_nonce_field('update-permalink') ?>
     107<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
    105108  <p><?php _e('By default WordPress uses web <abbr title="Universal Resource Locator">URL</abbr>s which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL 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>
    106109
     
    117120    );
    118121?>
    119 <form name="form" action="options-permalink.php" method="post">
    120 <?php wp_nonce_field('update-permalink') ?>
    121122<h3><?php _e('Common options:'); ?></h3>
    122123<p>
  • trunk/wp-admin/options-privacy.php

    r4165 r4196  
    1616<th scope="row"><?php _e('Blog visibility:') ?> </th>
    1717<td>
    18 <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />
    19     <label for="blog-public"><?php _e('I would like my blog to be visible to anyone who visits, including search engines and archivers') ?></label>
    20 <br />
    21 <input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />
    22     <label for="blog-norobots"><?php _e('I would like to block search engines, but allow normal folks') ?></label>
     18<p><input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />
     19<label for="blog-public"><?php _e('I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers');?></label></p>
     20<p><input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />
     21<label for="blog-norobots"><?php _e('I would like to block search engines, but allow normal visitors'); ?></label></p>
    2322<?php do_action('blog_privacy_selector'); ?>
    2423</td>
  • trunk/wp-admin/options-reading.php

    r4144 r4196  
    1212<form name="form1" method="post" action="options.php">
    1313<?php wp_nonce_field('update-options') ?>
    14 
     14<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
    1515<?php if ( get_pages() ): ?>
    1616<fieldset class="options">
    1717<legend><?php _e('Front Page') ?></legend>
    18 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
     18<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
    1919<tr valign="top">
    2020<th width="33%" scope="row"><?php _e('Front page displays:')?></th>
    2121<td>
    22     <label>
     22    <p><label>
    2323        <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> />
    24         <?php _e('The latest posts'); ?>
     24        <?php _e('Your latest posts'); ?>
    2525    </label>
    26     <br />
    27     <label>
     26    </p>
     27    <p><label>
    2828        <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> />
    29         <?php printf(__('A static <a href="%s">page</a> (select below)'), 'edit-pages.php'); ?>
     29        <?php printf(__('A <a href="%s">static page</a> (select below)'), 'edit-pages.php'); ?>
    3030    </label>
     31    </p>
    3132<ul>
    32     <li><?php printf(__('Show this page on the front page: %s'), wp_dropdown_pages("name=page_on_front&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_on_front'))); ?></li>
    33     <li><?php printf(__('Show the latest posts on this page: %s'), wp_dropdown_pages("name=page_for_posts&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_for_posts'))); ?></li>
     33    <li><?php printf(__('Front page: %s'), wp_dropdown_pages("name=page_on_front&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_on_front'))); ?></li>
     34    <li><?php printf(__('Posts page: %s'), wp_dropdown_pages("name=page_for_posts&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_for_posts'))); ?></li>
    3435</ul>
    3536<?php if ( 'page' == get_option('show_on_front') && get_option('page_for_posts') == get_option('page_on_front') ) : ?>
     
    4950<fieldset class="options">
    5051<legend><?php _e('Blog Pages') ?></legend>
    51 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
     52<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
    5253<tr valign="top">
    5354<th width="33%" scope="row"><?php _e('Show at most:') ?></th>
     
    6566<fieldset class="options">
    6667<legend><?php _e('Syndication Feeds') ?></legend>
    67 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
     68<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
    6869<tr valign="top">
    6970<th width="33%" scope="row"><?php _e('Show the most recent:') ?></th>
     
    7374<th scope="row"><?php _e('For each article, show:') ?> </th>
    7475<td>
    75 <label><input name="rss_use_excerpt"  type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?>    /> <?php _e('Full text') ?></label><br />
    76 <label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label>
     76<p><label><input name="rss_use_excerpt"  type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?> /> <?php _e('Full text') ?></label><br />
     77<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label></p>
     78<p><?php _e('Note: If you use the <code>&lt;--more--&gt;</code> feature, it will cut off posts in RSS feeds.'); ?></p>
    7779</td>
    7880</tr>
    7981</table>
    8082</fieldset>
    81 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
     83<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
    8284<tr valign="top">
    8385<th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th>
  • trunk/wp-admin/options-writing.php

    r4144 r4196  
    1212<form method="post" action="options.php">
    1313<?php wp_nonce_field('update-options') ?>
    14 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
     14<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>
     15<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
    1516<tr valign="top">
    1617<th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th>
     
    5859
    5960<fieldset class="options">
    60 <legend><?php _e('Writing by e-mail') ?></legend>
     61<legend><?php _e('Post via e-mail') ?></legend>
    6162<p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <code>%s</code>, <code>%s</code>, <code>%s</code>.'), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5)) ?></p>
    6263
    63 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
     64<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
    6465<tr valign="top">
    6566<th scope="row"><?php _e('Mail server:') ?></th>
     
    8081</tr>
    8182<tr valign="top">
    82 <th scope="row"><?php _e('Default post by mail category:') ?></th>
     83<th scope="row"><?php _e('Default mail category:') ?></th>
    8384<td><select name="default_email_category" id="default_email_category">
    8485<?php
  • trunk/wp-admin/profile.php

    r4112 r4196  
    9494<fieldset>
    9595<legend><?php _e('About Yourself'); ?></legend>
    96 <p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
     96<p class="desc"><?php _e('Share a little biographical information. '); ?></p>
    9797<p><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea></p>
    9898</fieldset>
  • trunk/wp-admin/upgrade-schema.php

    r4076 r4196  
    207207    add_option('blacklist_keys');
    208208    add_option('comment_registration', 0);
    209     add_option('open_proxy_check', 0);
    210209    add_option('rss_language', 'en');
    211210    add_option('html_type', 'text/html');
  • trunk/wp-admin/users.php

    r4192 r4196  
    409409<?php endif; ?>
    410410
    411     <h2><?php _e('Update Users'); ?></h2>
     411    <h3><?php _e('Update Selected'); ?></h3>
    412412    <ul style="list-style:none;">
    413413        <li><input type="radio" name="action" id="action0" value="delete" /> <label for="action0"><?php _e('Delete checked users.'); ?></label></li>
  • trunk/wp-admin/wp-admin.css

    r4124 r4196  
    119119
    120120fieldset.options legend {
    121     font-size: 16px;
     121    font-size: 1.5em;
     122    font-weight: bold;
     123    font-family: Georgia, "Times New Roman", Times, serif;
    122124}
    123125
     
    332334    width: 33%;
    333335    text-align: right;
     336    font-size: 1.3em;
     337    font-weight: normal;
    334338}
    335339
     
    394398
    395399#adminmenu {
    396     background: #6da6d1;
     400    background: #83B4D8;
    397401    border-top: 3px solid #448abd;
    398402    margin: 0;
    399     padding: .2em .2em .2em 2em;
     403    padding: .2em .2em .3em 2em;
    400404}
    401405
    402406#adminmenu .current, #submenu .current {
    403407    font-weight: bold;
     408    text-decoration: none;
    404409}
    405410
     
    410415    margin: 0;
    411416    padding: 3px 5px;
    412     text-decoration: none;
    413 }
    414 
    415 #adminmenu a:hover, .current {
     417    text-decoration: underline;
     418    border-bottom: none;
     419}
     420
     421#adminmenu a:hover, #adminmenu a.current {
    416422    background: #ddeaf4;
    417423    color: #333;
     
    917923    float: left;
    918924    width: 40%;
    919     padding: .5em 2em;
     925    padding: .5em 2em 1em;
    920926    margin: 1em 1em 1em 0;
    921927}
  • trunk/wp-content/themes/default/functions.php

    r4144 r4196  
    374374                <input type="button" name="revert" value="Revert" onclick="kRevert()" />
    375375                <input type="button" value="Advanced" onclick="toggleAdvanced()" />
    376                 <input type="submit" name="submitform" class="defbutton" value="Save" onclick="cp.hidePopup('prettyplease')" />
    377376                <input type="hidden" name="action" value="save" />
    378377                <input type="hidden" name="fontdisplay" id="fontdisplay" value="<?php echo kubrick_header_display(); ?>" />
     
    381380                <input type="hidden" name="lowercolor" id="lowercolor" value="<?php echo kubrick_lower_color(); ?>" />
    382381                <input type="hidden" name="headerimage" id="headerimage" value="<?php echo kubrick_header_image(); ?>" />
     382                <p class="submit"><input type="submit" name="submitform" class="defbutton" value="<?php _e('Update Header &raquo;'); ?>" onclick="cp.hidePopup('prettyplease')" /></p>
    383383            </form>
    384384            <div id="colorPickerDiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;visibility:hidden;"> </div>
  • trunk/wp-includes/classes.php

    r4195 r4196  
    11<?php
    2 
    3 class retrospam_mgr {
    4     var $spam_words;
    5     var $comments_list;
    6     var $found_comments;
    7 
    8     function retrospam_mgr() {
    9         global $wpdb;
    10 
    11         $list = explode("\n", get_option('moderation_keys') );
    12         $list = array_unique( $list );
    13         $this->spam_words = $list;
    14 
    15         $this->comment_list = $wpdb->get_results("SELECT comment_ID AS ID, comment_content AS text, comment_approved AS approved, comment_author_url AS url, comment_author_ip AS ip, comment_author_email AS email FROM $wpdb->comments ORDER BY comment_ID ASC");
    16     }   // End of class constructor
    17 
    18     function move_spam( $id_list ) {
    19         global $wpdb;
    20         $cnt = 0;
    21         $id_list = explode( ',', $id_list );
    22 
    23         foreach ( $id_list as $comment ) {
    24             if ( $wpdb->query("update $wpdb->comments set comment_approved = '0' where comment_ID = '$comment'") ) {
    25                 $cnt++;
    26             }
    27         }
    28         echo "<div class='updated'><p> ";
    29         printf(__('%d comment(s) moved to the moderation queue.'), $cnt);
    30         echo "</p></div>\n";
    31     }   // End function move_spam
    32 
    33     function find_spam() {
    34         $in_queue = 0;
    35 
    36         foreach( $this->comment_list as $comment ) {
    37             if( $comment->approved == 1 ) {
    38                 foreach( $this->spam_words as $word ) {
    39                     $word = trim($word);
    40                     if ( empty( $word ) )
    41                         continue;
    42                     $fulltext = strtolower($comment->email.' '.$comment->url.' '.$comment->ip.' '.$comment->text);
    43                     if( false !== strpos( $fulltext, strtolower($word) ) ) {
    44                         $this->found_comments[] = $comment->ID;
    45                         break;
    46                     }
    47                 }
    48             } else {
    49                 $in_queue++;
    50             }
    51         }
    52         return array( 'found' => $this->found_comments, 'in_queue' => $in_queue );
    53     }   // End function find_spam
    54 
    55     function display_edit_form( $counters ) {
    56         $numfound = count($counters[found]);
    57         $numqueue = $counters[in_queue];
    58 
    59         $body = '<p>' . sprintf(__('Suspected spam comments: %s'), "<strong>$numfound</strong>") . '</p>';
    60 
    61         if ( count($counters[found]) > 0 ) {
    62             $id_list = implode( ',', $counters[found] );
    63             $body .= '<p><a href="options-discussion.php?action=retrospam&amp;move=true&amp;ids='.$id_list.'">'. __('Move suspect comments to moderation queue &raquo;') . '</a></p>';
    64 
    65         }
    66         $head = '<div class="wrap"><h2>' . __('Check Comments Results:') . '</h2>';
    67 
    68         $foot .= '<p><a href="options-discussion.php">' . __('&laquo; Return to Discussion Options page.') . '</a></p></div>';
    69 
    70         return $head . $body . $foot;
    71     }   // End function display_edit_form
    72 
    73 }
    742
    753class WP {
  • trunk/wp-includes/comment.php

    r4186 r4196  
    256256        if ( preg_match($pattern, $user_ip   ) ) return true;
    257257        if ( preg_match($pattern, $user_agent) ) return true;
    258     }
    259 
    260     if ( isset($_SERVER['REMOTE_ADDR']) ) {
    261         if ( wp_proxy_check($_SERVER['REMOTE_ADDR']) ) return true;
    262258    }
    263259
  • trunk/wp-includes/functions.php

    r4194 r4196  
    10031003}
    10041004
    1005 function wp_proxy_check($ipnum) {
    1006     if ( get_option('open_proxy_check') && isset($ipnum) ) {
    1007         $ipnum = preg_replace( '/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/', '$1', $ipnum );
    1008         $rev_ip = implode( '.', array_reverse( explode( '.', $ipnum ) ) );
    1009         $lookup = $rev_ip . '.sbl-xbl.spamhaus.org.';
    1010         if ( $lookup != gethostbyname( $lookup ) )
    1011             return true;
    1012     }
    1013 
    1014     return false;
    1015 }
    1016 
    10171005function wp_explain_nonce($action) {
    10181006    if ( $action !== -1 && preg_match('/([a-z]+)-([a-z]+)(_(.+))?/', $action, $matches) ) {
Note: See TracChangeset for help on using the changeset viewer.