mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
git-svn-id: http://svn.automattic.com/wordpress/trunk@11050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a4bfe6e799
commit
8d96798043
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
setTimeout( function() {
|
setTimeout( function() {
|
||||||
if ( tx ) {
|
if ( tx ) {
|
||||||
tx = tx.replace( /<.[^<>]*?>/g, ' ' ).replace( / /gi, ' ' );
|
tx = tx.replace( /<.[^<>]*?>/g, ' ' ).replace( / | /gi, ' ' );
|
||||||
tx = tx.replace( /[0-9.(),;:!?%#$¿'"_+=\\/-]*/g, '' );
|
tx = tx.replace( /[0-9.(),;:!?%#$¿'"_+=\\/-]*/g, '' );
|
||||||
tx.replace( /\S\s+/g, function(){tc++;} );
|
tx.replace( /\S\s+/g, function(){tc++;} );
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
(function(a){wpWordCount={init:function(){var b=this,c=0,d=a("#content");a("#wp-word-count").html(wordCountL10n.count.replace(/%d/,'<span id="word-count">0</span>'));b.block=0;b.wc(d.val());d.keyup(function(f){if(f.keyCode==c){return true}if(13==f.keyCode||8==c||46==c){b.wc(d.val())}c=f.keyCode;return true})},wc:function(d){var e=this,c=a("#word-count"),b=0;if(e.block){return}e.block=1;setTimeout(function(){if(d){d=d.replace(/<.[^<>]*?>/g," ").replace(/ /gi," ");d=d.replace(/[0-9.(),;:!?%#$¿'"_+=\\/-]*/g,"");d.replace(/\S\s+/g,function(){b++})}c.html(b.toString());setTimeout(function(){e.block=0},2000)},1)}};a(document).ready(function(){wpWordCount.init()})}(jQuery));
|
(function(a){wpWordCount={init:function(){var b=this,c=0,d=a("#content");a("#wp-word-count").html(wordCountL10n.count.replace(/%d/,'<span id="word-count">0</span>'));b.block=0;b.wc(d.val());d.keyup(function(f){if(f.keyCode==c){return true}if(13==f.keyCode||8==c||46==c){b.wc(d.val())}c=f.keyCode;return true})},wc:function(d){var e=this,c=a("#word-count"),b=0;if(e.block){return}e.block=1;setTimeout(function(){if(d){d=d.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");d=d.replace(/[0-9.(),;:!?%#$¿'"_+=\\/-]*/g,"");d.replace(/\S\s+/g,function(){b++})}c.html(b.toString());setTimeout(function(){e.block=0},2000)},1)}};a(document).ready(function(){wpWordCount.init()})}(jQuery));
|
@ -333,7 +333,7 @@ function wp_default_scripts( &$scripts ) {
|
|||||||
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable' ), '20090413a' );
|
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable' ), '20090413a' );
|
||||||
$scripts->add_data( 'admin-widgets', 'group', 1 );
|
$scripts->add_data( 'admin-widgets', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20090102' );
|
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20090422' );
|
||||||
$scripts->add_data( 'word-count', 'group', 1 );
|
$scripts->add_data( 'word-count', 'group', 1 );
|
||||||
$scripts->localize( 'word-count', 'wordCountL10n', array(
|
$scripts->localize( 'word-count', 'wordCountL10n', array(
|
||||||
'count' => __('Word count: %d'),
|
'count' => __('Word count: %d'),
|
||||||
|
Loading…
Reference in New Issue
Block a user