Skip to content

Commit 66dba67

Browse files
committed
Administration: Change default site tagline to an empty string.
This changeset replaces the default "Just another WordPress site" tagline with an empty string for new installations. The reasoning is: 1. Not all themes display the tagline; 2. Not everyone changes the default tagline; 3. When people don't see the tagline in their theme, they may not realize it is still visible in some places, like feeds. The string "Just another WordPress site" and the related multisite string: "Just another {NETWORK} site" are now only used as a placeholder for the tagline admin option. Props markjaquith, Denis-de-Bernardy, westi, RyanMurphy, kovshenin, SergeyBiryukov, chriscct7, tyxla, hyperbrand, karmatosed, lukecavanagh, melchoyce, boemedia, khag7, sabernhardt, audrasjb, peterwilsoncc, costdev, martinkrcho, rafiahmedd. Fixes WordPress#6479. git-svn-id: https://develop.svn.wordpress.org/trunk@53815 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b5b0c8e commit 66dba67

6 files changed

Lines changed: 48 additions & 10 deletions

File tree

src/wp-admin/includes/schema.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,7 @@ function populate_options( array $options = array() ) {
401401
'siteurl' => $guessurl,
402402
'home' => $guessurl,
403403
'blogname' => __( 'My Site' ),
404-
/* translators: Site tagline. */
405-
'blogdescription' => __( 'Just another WordPress site' ),
404+
'blogdescription' => '',
406405
'users_can_register' => 0,
407406
'admin_email' => 'you@example.com',
408407
/* translators: Default start of the week. 0 = Sunday, 1 = Monday. */
@@ -555,8 +554,6 @@ function populate_options( array $options = array() ) {
555554

556555
// 3.0.0 multisite.
557556
if ( is_multisite() ) {
558-
/* translators: %s: Network title. */
559-
$defaults['blogdescription'] = sprintf( __( 'Just another %s site' ), get_network()->site_name );
560557
$defaults['permalink_structure'] = '/%year%/%monthnum%/%day%/%postname%/';
561558
}
562559

src/wp-admin/options-general.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,17 @@
6666
<td><input name="blogname" type="text" id="blogname" value="<?php form_option( 'blogname' ); ?>" class="regular-text" /></td>
6767
</tr>
6868

69+
<?php
70+
/* translators: Site tagline. */
71+
$sample_tagline = __( 'Just another WordPress site' );
72+
if ( is_multisite() ) {
73+
/* translators: %s: Network title. */
74+
$sample_tagline = sprintf( __( 'Just another %s site' ), get_network()->site_name );
75+
}
76+
?>
6977
<tr>
7078
<th scope="row"><label for="blogdescription"><?php _e( 'Tagline' ); ?></label></th>
71-
<td><input name="blogdescription" type="text" id="blogdescription" aria-describedby="tagline-description" value="<?php form_option( 'blogdescription' ); ?>" class="regular-text" />
79+
<td><input name="blogdescription" type="text" id="blogdescription" aria-describedby="tagline-description" value="<?php form_option( 'blogdescription' ); ?>" class="regular-text" placeholder="<?php echo $sample_tagline; ?>" />
7280
<p class="description" id="tagline-description"><?php _e( 'In a few words, explain what this site is about.' ); ?></p></td>
7381
</tr>
7482

tests/phpunit/tests/feed/atom.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
5151
wp_set_object_terms( $post, self::$category->slug, 'category' );
5252
}
5353

54+
// Assign a tagline option.
55+
update_option( 'blogdescription', 'Just another WordPress site' );
56+
5457
}
5558

5659
/**
@@ -63,6 +66,13 @@ public function set_up() {
6366
$this->excerpt_only = get_option( 'rss_use_excerpt' );
6467
}
6568

69+
/**
70+
* Tear down.
71+
*/
72+
public static function wpTearDownAfterClass() {
73+
delete_option( 'blogdescription' );
74+
}
75+
6676
/**
6777
* This is a bit of a hack used to buffer feed content.
6878
*/

tests/phpunit/tests/feed/rss2.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
5858
foreach ( self::$posts as $post ) {
5959
wp_set_object_terms( $post, self::$category->slug, 'category' );
6060
}
61+
62+
// Assign a tagline option.
63+
update_option( 'blogdescription', 'Just another WordPress site' );
64+
6165
}
6266

6367
/**
@@ -75,6 +79,13 @@ public function set_up() {
7579
create_initial_taxonomies();
7680
}
7781

82+
/**
83+
* Tear down.
84+
*/
85+
public static function wpTearDownAfterClass() {
86+
delete_option( 'blogdescription' );
87+
}
88+
7889
/**
7990
* This is a bit of a hack used to buffer feed content.
8091
*/

tests/phpunit/tests/general/wpGetDocumentTitle.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ public function add_title_tag_support() {
6060
public function test__wp_render_title_tag() {
6161
$this->go_to( '/' );
6262

63+
$this->expectOutputString( sprintf( "<title>%s</title>\n", $this->blog_name ) );
64+
_wp_render_title_tag();
65+
}
66+
67+
/**
68+
* @ticket 6479
69+
*/
70+
public function test__wp_render_title_tag_with_blog_description() {
71+
$this->go_to( '/' );
72+
73+
update_option( 'blogdescription', 'A blog description' );
74+
6375
$this->expectOutputString( sprintf( "<title>%s &#8211; %s</title>\n", $this->blog_name, get_option( 'blogdescription' ) ) );
6476
_wp_render_title_tag();
6577
}
@@ -99,12 +111,12 @@ public function test_front_page_title() {
99111
add_filter( 'document_title_parts', array( $this, 'front_page_title_parts' ) );
100112

101113
$this->go_to( '/' );
102-
$this->assertSame( sprintf( '%s &#8211; Just another WordPress site', $this->blog_name ), wp_get_document_title() );
114+
$this->assertSame( sprintf( '%s', $this->blog_name ), wp_get_document_title() );
103115

104116
update_option( 'show_on_front', 'posts' );
105117

106118
$this->go_to( '/' );
107-
$this->assertSame( sprintf( '%s &#8211; Just another WordPress site', $this->blog_name ), wp_get_document_title() );
119+
$this->assertSame( sprintf( '%s', $this->blog_name ), wp_get_document_title() );
108120
}
109121

110122
public function front_page_title_parts( $parts ) {
@@ -135,7 +147,7 @@ public function test_paged_title() {
135147

136148
add_filter( 'document_title_parts', array( $this, 'paged_title_parts' ) );
137149

138-
$this->assertSame( sprintf( '%s &#8211; Page 4 &#8211; Just another WordPress site', $this->blog_name ), wp_get_document_title() );
150+
$this->assertSame( sprintf( '%s &#8211; Page 4', $this->blog_name ), wp_get_document_title() );
139151
}
140152

141153
public function paged_title_parts( $parts ) {

tests/qunit/fixtures/wp-api-generated.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var mockedApiResponse = {};
77

88
mockedApiResponse.Schema = {
99
"name": "Test Blog",
10-
"description": "Just another WordPress site",
10+
"description": "",
1111
"url": "http://example.org",
1212
"home": "http://example.org",
1313
"gmt_offset": "0",
@@ -12286,7 +12286,7 @@ mockedApiResponse.CommentModel = {
1228612286

1228712287
mockedApiResponse.settings = {
1228812288
"title": "Test Blog",
12289-
"description": "Just another WordPress site",
12289+
"description": "",
1229012290
"url": "http://example.org",
1229112291
"email": "admin@example.org",
1229212292
"timezone": "",

0 commit comments

Comments
 (0)