Live-update site title in toolbar when changing the corresponding field in General Settings.
props celloexpressions, avryl. fixes #28682. git-svn-id: https://develop.svn.wordpress.org/trunk@29963 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5ab446aab7
commit
512ea93ae4
@ -27,6 +27,19 @@ function options_general_add_js() {
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
jQuery(document).ready(function($){
|
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(){
|
$("input[name='date_format']").click(function(){
|
||||||
if ( "date_format_custom_radio" != $(this).attr("id") )
|
if ( "date_format_custom_radio" != $(this).attr("id") )
|
||||||
$("input[name='date_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );
|
$("input[name='date_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );
|
||||||
|
Loading…
Reference in New Issue
Block a user