Live-update site title in toolbar when changing the corresponding field in General Settings.

props celloexpressions, avryl.
fixes #28682.
Built from https://develop.svn.wordpress.org/trunk@29963


git-svn-id: http://core.svn.wordpress.org/trunk@29710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-10-19 09:13:20 +00:00
parent 0eb758720a
commit 2c809dc24e
2 changed files with 14 additions and 1 deletions

View File

@ -27,6 +27,19 @@ function options_general_add_js() {
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function($){
var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first();
$( '#blogname' ).on( 'input', function() {
var title = $( this ).val();
// Truncate to 40 characters.
if ( 40 < title.length ) {
title = title.substring( 0, 40 ) + '\u2026';
}
$siteName.text( title );
});
$("input[name='date_format']").click(function(){
if ( "date_format_custom_radio" != $(this).attr("id") )
$("input[name='date_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-alpha-20141018';
$wp_version = '4.1-alpha-20141019';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.