WordPress.org

Make WordPress Core

Changeset 12854


Ignore:
Timestamp:
01/26/2010 08:42:37 PM (11 years ago)
Author:
ryan
Message:

Remove first page and first comment filters. They're no longer needed. see #11644

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r12784 r12854  
    194194
    195195    // Default comment
     196    $first_comment_author = __('Mr WordPress');
     197    $first_comment_url = 'http://wordpress.org/';
     198    $first_comment = __('Hi, this is a comment.<br />To delete a comment, just log in and view the post&#039;s comments. There you will have the option to edit or delete them.');
    196199    if ( is_multisite() ) {
    197         $first_comment_author = get_site_option( 'first_comment_author' );
    198         $first_comment_url = get_site_option( 'first_comment_url' );
    199         $first_comment = get_site_option( 'first_comment' );
    200     } else {
    201         $first_comment_author = __('Mr WordPress');
    202         $first_comment_url = 'http://wordpress.org/';
    203         $first_comment = __('Hi, this is a comment.<br />To delete a comment, just log in and view the post&#039;s comments. There you will have the option to edit or delete them.');
    204     }   
     200        $first_comment_author = get_site_option( 'first_comment_author', $first_comment_author );
     201        $first_comment_url = get_site_option( 'first_comment_url', 'http://' . $current_site->domain . $current_site->path );
     202        $first_comment = get_site_option( 'first_comment', $first_comment );
     203    }
    205204    $wpdb->insert( $wpdb->comments, array(
    206205                                'comment_post_ID' => 1,
    207206                                'comment_author' => $first_comment_author,
    208207                                'comment_author_email' => '',
    209                                 'comment_author_url' => 'http://wordpress.org/',
     208                                'comment_author_url' => $first_comment_url,
    210209                                'comment_date' => $now,
    211210                                'comment_date_gmt' => $now_gmt,
     
    214213
    215214    // First Page
    216     if ( is_multisite() && get_site_option( 'first_page' ) )
    217         $first_page = get_site_option( 'first_page' );
    218     else
    219         $first_page = __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.');
     215    $first_page = __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.');
     216    if ( is_multisite() )
     217        $first_page = get_site_option( 'first_page', $first_page );
    220218    $first_post_guid = get_option('home') . '/?page_id=2';
    221219    $wpdb->insert( $wpdb->posts, array(
  • trunk/wp-includes/functions.php

    r12851 r12854  
    418418    if ( !defined( 'WP_INSTALLING' ) || !is_multisite() )
    419419        $alloptions = wp_cache_get( 'alloptions', 'options' );
     420    else
     421        $alloptions = false;
    420422
    421423    if ( !$alloptions ) {
     
    430432                wp_cache_add( 'alloptions', $alloptions, 'options' );
    431433    }
     434
    432435    return $alloptions;
    433436}
  • trunk/wp-includes/ms-functions.php

    r12853 r12854  
    19821982add_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );
    19831983
    1984 function first_page_filter( $text ) {
    1985     if ( !$text )
    1986         return __( "This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress." );
    1987 
    1988     return $text;
    1989 }
    1990 add_filter( 'site_option_first_page', 'first_page_filter' );
    1991 
    1992 function first_comment_filter( $text ) {
    1993     if ( !$text )
    1994         return __( "This is an example of a WordPress comment, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many comments like this one or sub-comments as you like and manage all of your content inside of WordPress." );
    1995 
    1996     return $text;
    1997 }
    1998 add_filter( 'site_option_first_comment', 'first_comment_filter' );
    1999 
    2000 function first_comment_author_filter( $text ) {
    2001     if ( !$text )
    2002         return __( "Mr WordPress" );
    2003 
    2004     return $text;
    2005 }
    2006 add_filter( 'site_option_first_comment_author', 'first_comment_author_filter' );
    2007 
    2008 function first_comment_url_filter( $text ) {
    2009     global $current_site;
    2010     if ( !$text )
    2011         return 'http://' . $current_site->domain . $current_site->path;
    2012 
    2013     return $text;
    2014 }
    2015 add_filter( 'site_option_first_comment_url', 'first_comment_url_filter' );
    2016 
    20171984function mu_filter_plugins_list( $active_plugins ) {
    20181985    $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' );
Note: See TracChangeset for help on using the changeset viewer.