Ticket #2480: blog_privacy.diff

File blog_privacy.diff, 6.0 kB (added by ryan, 3 years ago)

Blog Privacy

  • wp-includes/default-filters.php

    old new  
    8484// Actions 
    8585add_action('wp_head', 'rsd_link'); 
    8686add_action('publish_future_post', 'wp_publish_post', 10, 1); 
    87  
     87add_action('wp_head', 'noindex', 1); 
    8888?> 
  • wp-includes/template-functions-general.php

    old new  
    702702        echo '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('wpurl') . "/xmlrpc.php?rsd\" />\n"; 
    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?> 
  • wp-includes/version.php

    old new  
    33// This just holds the version number, in a separate file so we can bump it without cluttering the SVN 
    44 
    55$wp_version = '2.1-alpha1'; 
    6 $wp_db_version = 3531
     6$wp_db_version = 3548
    77 
    88?> 
  • wp-admin/upgrade-functions.php

    old new  
    3333        if ( $wp_current_db_version < 3308 ) 
    3434                upgrade_160(); 
    3535 
    36         if ( $wp_current_db_version < 3531
     36        if ( $wp_current_db_version < 3548
    3737                upgrade_210(); 
    3838 
    3939        $wp_rewrite->flush_rules(); 
  • wp-admin/options-general.php

    old new  
    2222<?php _e('In a few words, explain what this weblog is about.') ?></td>  
    2323</tr>  
    2424<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> 
     29<tr valign="top">  
    2530<th scope="row"><?php _e('WordPress address (URI):') ?></th>  
    2631<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code" /></td>  
    2732</tr>  
     
    101106 
    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> 
    107112 
  • wp-admin/install.php

    old new  
    107107<th><?php _e('Your e-mail:'); ?></th> 
    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> 
    112116<h2 class="step"> 
     
    121125// Fill in the data we gathered 
    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)) { 
    126131        die (__("<strong>ERROR</strong>: please type your e-mail address")); 
     
    144149 
    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); 
     156        update_option('ping_sites', '');         
     157} 
    147158 
    148159// Now drop in some default links 
    149160$wpdb->query("INSERT INTO $wpdb->linkcategories (cat_id, cat_name) VALUES (1, '".$wpdb->escape(__('Blogroll'))."')"); 
  • wp-admin/upgrade-schema.php

    old new  
    229229                add_option('uploads_use_yearmonth_folders', 1); 
    230230                add_option('upload_path', 'wp-content/uploads'); 
    231231        } 
     232        // 2.1 
     233        add_option('blog_public', 1); 
    232234 
    233235        // Delete unused options 
    234236        $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog');