Make WordPress Core

Changeset 3548


Ignore:
Timestamp:
02/18/2006 07:40:43 AM (19 years ago)
Author:
ryan
Message:

Blog privacy. fixes #2480

Location:
trunk
Files:
8 edited

Legend:

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

    r3517 r3548  
    108108    <td><input name="admin_email" type="text" id="admin_email" size="25" /></td>
    109109</tr>
     110<tr>
     111<th scope="row"  valign="top"> <?php __('Privacy:'); ?></th>
     112<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>
     113</tr>
    110114</table>
    111115<p><em><?php _e('Double-check that email address before continuing.'); ?></em></p>
     
    122126$weblog_title = stripslashes($_POST['weblog_title']);
    123127$admin_email = stripslashes($_POST['admin_email']);
     128$public = (int) $_POST['blog_public'];
    124129// check e-mail address
    125130if (empty($admin_email)) {
     
    145150update_option('blogname', $weblog_title);
    146151update_option('admin_email', $admin_email);
     152update_option('blog_public', $public);
     153// If not a public blog, don't ping.
     154if ( ! $public )
     155    update_option('default_pingback_flag', 0);
    147156
    148157// Now drop in some default links
  • trunk/wp-admin/options-general.php

    r3541 r3548  
    2222<?php _e('In a few words, explain what this weblog is about.') ?></td>
    2323</tr>
     24<tr valign="top">
     25<th scope="row"><?php _e('Search Engines:') ?> </th>
     26<td><label><input type="checkbox" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> /> <?php _e('I would like my blog to appear in search engines like Google and Technorati.'); ?></label>
     27</td>
     28</tr>
    2429<tr valign="top">
    2530<th scope="row"><?php _e('WordPress address (URI):') ?></th>
     
    102107<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" />
    103108<input type="hidden" name="action" value="update" />
    104 <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" />
     109<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" />
    105110</p>
    106111</form>
  • trunk/wp-admin/upgrade-functions.php

    r3534 r3548  
    3434        upgrade_160();
    3535
    36     if ( $wp_current_db_version < 3531 )
     36    if ( $wp_current_db_version < 3548 )
    3737        upgrade_210();
    3838
  • trunk/wp-admin/upgrade-schema.php

    r3517 r3548  
    230230        add_option('upload_path', 'wp-content/uploads');
    231231    }
     232    // 2.1
     233    add_option('blog_public', 1);
    232234
    233235    // Delete unused options
  • trunk/wp-includes/default-filters.php

    r3524 r3548  
    8282add_filter('the_author', 'ent2ncr', 8);
    8383
     84// Misc filters
     85add_filter('option_ping_sites', 'privacy_ping_filter');
     86
    8487// Actions
    8588add_action('wp_head', 'rsd_link');
    8689add_action('publish_future_post', 'wp_publish_post', 10, 1);
    87 
     90add_action('wp_head', 'noindex', 1);
    8891?>
  • trunk/wp-includes/functions.php

    r3535 r3548  
    23822382}
    23832383
     2384function privacy_ping_filter( $sites ) {
     2385    if ( get_option('blog_public') )
     2386        return $sites;
     2387    else
     2388        return '';
     2389}
    23842390?>
  • trunk/wp-includes/template-functions-general.php

    r3518 r3548  
    703703}
    704704
     705function noindex() {
     706    // If the blog is not public, tell robots to go away.
     707    if ( ! get_option('blog_public') )
     708        echo '<meta name="robots" content="noindex,nofollow" />' . "\n";
     709}
    705710?>
  • trunk/wp-includes/version.php

    r3531 r3548  
    44
    55$wp_version = '2.1-alpha1';
    6 $wp_db_version = 3531;
     6$wp_db_version = 3548;
    77
    88?>
Note: See TracChangeset for help on using the changeset viewer.