Make WordPress Core

Ticket #6009: 6009.diff

File 6009.diff, 23.7 KB (added by mdawaffe, 17 years ago)
  • wp-includes/js/jquery/jquery.color.js

     
    1 (function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}
    2 fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
    3 return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
    4 return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
    5 return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
    6 return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
    7 return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];return colors[jQuery.trim(color).toLowerCase()];}
    8 function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))
    9 break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};})(jQuery);
    10  No newline at end of file
     1/*
     2 * jQuery Color Animations
     3 * Copyright 2007 John Resig
     4 * Released under the MIT and GPL licenses.
     5 */
     6
     7(function(jQuery){
     8
     9    // We override the animation for all of these color styles
     10    jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
     11        jQuery.fx.step[attr] = function(fx){
     12            if ( fx.state == 0 ) {
     13                fx.start = getColor( fx.elem, attr );
     14                fx.end = getRGB( fx.end );
     15            }
     16
     17            fx.elem.style[attr] = "rgb(" + [
     18                Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
     19                Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
     20                Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
     21            ].join(",") + ")";
     22        }
     23    });
     24
     25    // Color Conversion functions from highlightFade
     26    // By Blair Mitchelmore
     27    // http://jquery.offput.ca/highlightFade/
     28
     29    // Parse strings looking for color tuples [255,255,255]
     30    function getRGB(color) {
     31        var result;
     32
     33        // Check if we're already dealing with an array of colors
     34        if ( color && color.constructor == Array && color.length == 3 )
     35            return color;
     36
     37        // Look for rgb(num,num,num)
     38        if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
     39            return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];
     40
     41        // Look for rgb(num%,num%,num%)
     42        if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
     43            return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
     44
     45        // Look for #a0b1c2
     46        if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
     47            return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
     48
     49        // Look for #fff
     50        if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
     51            return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
     52
     53        // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
     54        if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
     55            return colors['transparent']
     56
     57        // Otherwise, we're most likely dealing with a named color
     58        return colors[jQuery.trim(color).toLowerCase()];
     59    }
     60
     61    function getColor(elem, attr) {
     62        var color;
     63
     64        do {
     65            color = jQuery.curCSS(elem, attr);
     66
     67            // Keep going until we find an element that has color, or we hit the body
     68            if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
     69                break;
     70
     71            attr = "backgroundColor";
     72        } while ( elem = elem.parentNode );
     73
     74        return getRGB(color);
     75    };
     76
     77    // Some named colors to work with
     78    // From Interface by Stefan Petre
     79    // http://interface.eyecon.ro/
     80
     81    var colors = {
     82        aqua:[0,255,255],
     83        azure:[240,255,255],
     84        beige:[245,245,220],
     85        black:[0,0,0],
     86        blue:[0,0,255],
     87        brown:[165,42,42],
     88        cyan:[0,255,255],
     89        darkblue:[0,0,139],
     90        darkcyan:[0,139,139],
     91        darkgrey:[169,169,169],
     92        darkgreen:[0,100,0],
     93        darkkhaki:[189,183,107],
     94        darkmagenta:[139,0,139],
     95        darkolivegreen:[85,107,47],
     96        darkorange:[255,140,0],
     97        darkorchid:[153,50,204],
     98        darkred:[139,0,0],
     99        darksalmon:[233,150,122],
     100        darkviolet:[148,0,211],
     101        fuchsia:[255,0,255],
     102        gold:[255,215,0],
     103        green:[0,128,0],
     104        indigo:[75,0,130],
     105        khaki:[240,230,140],
     106        lightblue:[173,216,230],
     107        lightcyan:[224,255,255],
     108        lightgreen:[144,238,144],
     109        lightgrey:[211,211,211],
     110        lightpink:[255,182,193],
     111        lightyellow:[255,255,224],
     112        lime:[0,255,0],
     113        magenta:[255,0,255],
     114        maroon:[128,0,0],
     115        navy:[0,0,128],
     116        olive:[128,128,0],
     117        orange:[255,165,0],
     118        pink:[255,192,203],
     119        purple:[128,0,128],
     120        violet:[128,0,128],
     121        red:[255,0,0],
     122        silver:[192,192,192],
     123        white:[255,255,255],
     124        yellow:[255,255,0],
     125        transparent: [255,255,255]
     126    };
     127
     128})(jQuery);
  • wp-includes/js/wp-lists.js

     
    2121                                var err = '';
    2222                                errs.each( function() {
    2323                                        var code = $(this).attr('code');
    24                                         if ( formField = $('wp_error_data[@code="' + code + '"] form-field', x).text() )
     24                                        if ( formField = $('wp_error_data[code="' + code + '"] form-field', x).text() )
    2525                                                code = formField;
    26                                         wpAjax.invalidateForm( $('#' + e + ' :input[@name="' + code + '"]' ).parents('.form-field:first') );
     26                                        wpAjax.invalidateForm( $('#' + e + ' :input[name="' + code + '"]' ).parents('.form-field:first') );
    2727                                        err += '<p>' + this.firstChild.nodeValue + '</p>';
    2828                                } );
    2929                                return !re.html( '<div class="error">' + err + '</div>' );
     
    5858
    5959        nonce: function(e,s) {
    6060                var url = wpAjax.unserialize(e.attr('href'));
    61                 return s.nonce || url._ajax_nonce || $('#' + s.element + ' input[@name=_ajax_nonce]').val() || url._wpnonce || $('#' + s.element + ' input[@name=_wpnonce]').val() || 0;
     61                return s.nonce || url._ajax_nonce || $('#' + s.element + ' input[name=_ajax_nonce]').val() || url._wpnonce || $('#' + s.element + ' input[name=_wpnonce]').val() || 0;
    6262        },
    6363
    6464        parseClass: function(e,t) {
     
    7474                }, s || {} );
    7575                if ( $.isFunction( s.confirm ) ) {
    7676                        if ( 'add' != a ) {
    77                                 bg = $('#' + s.element).css('background-color');
    78                                 $('#' + s.element).css('background-color', '#FF9966');
     77                                bg = $('#' + s.element).css('backgroundColor');
     78                                $('#' + s.element).css('backgroundColor', '#FF9966');
    7979                        }
    8080                        r = s.confirm.call(this,e,s,a,bg);
    81                         if ( 'add' != a ) { $('#' + s.element).css('background-color', bg ); }
     81                        if ( 'add' != a ) { $('#' + s.element).css('backgroundColor', bg ); }
    8282                        if ( !r ) { return false; }
    8383                }
    8484                return s;
     
    9494                s = wpList.pre.call( list, e, s, 'add' );
    9595                if ( !s ) { return false; }
    9696
    97                 if ( !e.is("[@class^=add:" + list.id + ":]") ) { return !wpList.add.call( list, e, s ); }
     97                if ( !e.is("[class^=add:" + list.id + ":]") ) { return !wpList.add.call( list, e, s ); }
    9898
    9999                if ( !s.element ) { return true; }
    100100
     
    102102
    103103                s.nonce = wpList.nonce(e,s);
    104104
    105                 var es = $('#' + s.element + ' :input').not('[@name=_ajax_nonce], [@name=_wpnonce], [@name=action]');
    106                 var required = $('#' + s.element + ' .form-required:has(:input[@value=""]), #' + s.element + ' .form-required:input[@value=""]');
     105                var es = $('#' + s.element + ' :input').not('[name=_ajax_nonce], [name=_wpnonce], [name=action]');
     106                var required = $('#' + s.element + ' .form-required:has(:input[value=""]), #' + s.element + ' .form-required:input[value=""]');
    107107                if ( required.size() ) {
    108108                        wpAjax.invalidateForm( required );
    109109                        return false;
     
    172172                }
    173173                if ( !s.data._ajax_nonce ) { return true; }
    174174
    175                 var func = function() { list.wpList.recolor(); };
    176                 var hideTO = -1;
     175                var element = $('#' + s.element);
     176
    177177                if ( 'none' != s.delColor ) {
    178                         $('#' + s.element).animate( { backgroundColor:  s.delColor }, 100 ).slideUp();
    179                         hideTO = setTimeout(func, 500);
     178                        var anim = 'slideUp';
     179                        if ( element.css( 'display' ).match(/table/) )
     180                                anim = 'fadeOut'; // Can't slideup table rows and other table elements.  Known jQuery bug
     181                        element
     182                                .animate( { backgroundColor: s.delColor }, 'fast'  )[anim]( 'fast' )
     183                                .queue( function() { list.wpList.recolor(); $(this).dequeue(); } );
    180184                } else {
    181                         func();
     185                        list.wpList.recolor();
    182186                }
    183187
    184188                s.success = function(r) {
    185189                        if ( !wpAjax.parseAjaxResponse(r, s.response, s.element) ) {
    186                                 clearTimeout(hideTO);
    187                                 func = function() { $('#' + s.element).css( 'background-color', '#FF3333' ).show(); list.wpList.recolor(); };
    188                                 func(); setTimeout(func, 705); // In case it's still fading
     190                                element.stop().css( 'backgroundColor', '#FF3333' ).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } );
    189191                                return false;
    190192                        }
    191193                        if ( $.isFunction(s.delAfter) ) {
    192194                                var o = this.complete;
    193195                                this.complete = function(x,st) {
    194                                         var _s = $.extend( { xml: x, status: st }, s );
    195                                         s.delAfter( r, _s );
    196                                         if ( $.isFunction(o) ) { o(x,st); }
     196                                        element.queue( function() {
     197                                                var _s = $.extend( { xml: x, status: st }, s );
     198                                                s.delAfter( r, _s );
     199                                                if ( $.isFunction(o) ) { o(x,st); }
     200                                        } ).dequeue();
    197201                                };
    198202                        }
    199203                };
     
    227231                        if ( !s ) { return true; }
    228232                }
    229233
    230                 var thisclass = $('#' + s.element).attr('class');
    231                 if ( thisclass && thisclass.match(/alternate/) )
    232                         var color = '#f1f1f1';
    233                 else
    234                         var color =  '#fff';
    235                 var isClass = $('#' + s.element).toggleClass(s.dimClass).is('.' + s.dimClass);
    236                 if ( isClass && 'none' != s.dimAddColor ) {
    237                         $('#' + s.element).animate( { backgroundColor:  s.dimAddColor }, 50 ).animate( { backgroundColor: color }, 400 );
     234                var element = $('#' + s.element);
     235                var isClass = element.toggleClass(s.dimClass).is('.' + s.dimClass);
     236                var color = wpList.getColor( element );
     237                element.toggleClass( s.dimClass )
     238                var dimColor = isClass ? s.dimAddColor : s.dimDelColor;
     239                if ( 'none' != dimColor ) {
     240                        element
     241                                .animate( { backgroundColor: dimColor }, 'fast' )
     242                                .queue( function() { element.toggleClass(s.dimClass); $(this).dequeue(); } )
     243                                .animate( { backgroundColor: color }, { complete: function() { $(this).css( 'backgroundColor', '' ); } } );
    238244                }
    239                 else if ( !isClass && 'none' != s.dimDelColor ) {
    240                         $('#' + s.element).animate( { backgroundColor:  s.dimDelColor }, 50 ).animate( { backgroundColor: color }, 400 );
    241                 }
    242245
    243246                if ( !s.data._ajax_nonce ) { return true; }
    244247
    245248                s.success = function(r) {
    246249                        if ( !wpAjax.parseAjaxResponse(r, s.response, s.element) ) {
    247                                 clearTimeout(dimTO);
    248                                 func = function() { $('#' + s.element).css( 'background-color', '#FF3333' )[isClass?'removeClass':'addClass'](s.dimClass); };
    249                                 func(); setTimeout(func, 705);
     250                                element.stop().css( 'backgroundColor', '#FF3333' )[isClass?'removeClass':'addClass'](s.dimClass).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } );
    250251                                return false;
    251252                        }
    252253                        if ( $.isFunction(s.dimAfter) ) {
    253254                                var o = this.complete;
    254255                                this.complete = function(x,st) {
    255                                         var _s = $.extend( { xml: x, status: st }, s );
    256                                         s.dimAfter( r, _s );
    257                                         if ( $.isFunction(o) ) { o(x,st); }
     256                                        element.queue( function() {
     257                                                var _s = $.extend( { xml: x, status: st }, s );
     258                                                s.dimAfter( r, _s );
     259                                                if ( $.isFunction(o) ) { o(x,st); }
     260                                        } ).dequeue();
    258261                                };
    259262                        }
    260263                };
     
    263266                return false;
    264267        },
    265268
     269        // From jquery.color.js: jQuery Color Animation by John Resig
     270        getColor: function( el ) {
     271                if ( el.constructor == Object )
     272                        el = el.get(0);
     273                var elem = el, color, rgbaTrans = new RegExp( "rgba\\(\\s*0,\\s*0,\\s*0,\\s*0\\s*\\)", "i" );
     274                do {
     275                        color = jQuery.curCSS(elem, 'backgroundColor');
     276                        if ( color != '' && color != 'transparent' && !color.match(rgbaTrans) || jQuery.nodeName(elem, "body") )
     277                                break;
     278                } while ( elem = elem.parentNode );
     279                return color || '#ffffff';
     280        },
     281
    266282        add: function( e, s ) {
    267283                list = $(this);
    268284                e = $(e);
     
    271287                var _s = { pos: 0, id: 0, oldId: null };
    272288                if ( 'string' == typeof s ) { s = { what: s }; }
    273289                s = $.extend(_s, this.wpList.settings, s);
    274 
    275290                if ( !e.size() || !s.what ) { return false; }
    276291                if ( s.oldId ) { old = $('#' + s.what + '-' + s.oldId); }
    277292                if ( s.id && ( s.id != s.oldId || !old || !old.size() ) ) { $('#' + s.what + '-' + s.id).remove(); }
     
    299314                }
    300315
    301316                if ( 'none' != s.addColor ) {
    302                         var b = e.css( 'background-color' );
    303                         if ( b == 'transparent' ) { b = ''; }
    304                         e.css('background-color', s.addColor).animate( { backgroundColor: '#fff' }, 300 );
     317                        var color = wpList.getColor( e );
     318                        e.css( 'backgroundColor', s.addColor ).animate( { backgroundColor: color }, { complete: function() { $(this).css( 'backgroundColor', '' ); } } );
    305319                }
    306320                list.each( function() { this.wpList.process( e ); } );
    307321                return e;
     
    323337
    324338        process: function(el) {
    325339                var list = this;
    326                 var a = $("[@class^=add:" + list.id + ":]", el || null)
     340                $("[class^=add:" + list.id + ":]", el || null)
    327341                        .filter('form').submit( function() { return list.wpList.add(this); } ).end()
    328342                        .not('form').click( function() { return list.wpList.add(this); } ).each( function() {
    329343                                var addEl = this;
     
    343357                                        }
    344358                                } );
    345359                        } );
    346                 var d = $("[@class^=delete:" + list.id + ":]", el || null).click( function() { return list.wpList.del(this); } );
    347                 var c = $("[@class^=dim:" + list.id + ":]", el || null).click( function() { return list.wpList.dim(this); } );
     360                $("[class^=delete:" + list.id + ":]", el || null).click( function() { return list.wpList.del(this); } );
     361                $("[class^=dim:" + list.id + ":]", el || null).click( function() { return list.wpList.dim(this); } );
    348362        },
    349363
    350364        recolor: function() {
  • wp-includes/script-loader.php

     
    6767                        'delText' => __('Are you sure you want to delete this %thing%?')
    6868                ) );
    6969
    70                 $this->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('jquery'), '20080110' );
     70                $this->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('jquery'), '20080226' );
    7171                $this->localize( 'wp-lists', 'wpListL10n', array(
    7272                        'url' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php'
    7373                ) );
  • wp-admin/edit-comments.php

     
    8888<?php
    8989$status_links = array();
    9090$num_comments = wp_count_comments();
    91 $stati = array('moderated' => sprintf(__('Awaiting Moderation (%s)'), $num_comments->moderated), 'approved' => __('Approved'));
     91$stati = array('moderated' => sprintf(__('Awaiting Moderation (%s)'), "<span class='comment-count'>$num_comments->moderated</span>"), 'approved' => __('Approved'));
    9292foreach ( $stati as $status => $label ) {
    9393        $class = '';
    9494
     
    178178        foreach ($comments as $comment) {
    179179                $post = get_post($comment->comment_post_ID);
    180180                $authordata = get_userdata($post->post_author);
    181                 $comment_status = wp_get_comment_status($comment->comment_ID);
     181                $the_comment_status = wp_get_comment_status($comment->comment_ID);
    182182                $class = ('alternate' == $class) ? '' : '';
    183                 $class .= ('unapproved' == $comment_status) ? ' unapproved' : '';
     183                $class .= ('unapproved' == $the_comment_status) ? ' unapproved' : '';
    184184                $post_link = '<a href="' . get_comment_link() . '">' . get_the_title($comment->comment_post_ID) . '</a>';
    185185                $author_url = get_comment_author_url();
    186186                if ( 'http://' == $author_url )
     
    217217    <td><?php comment_date(__('Y/m/d')); ?></td>
    218218    <td>
    219219    <?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
    220         if ( 'approved' != $comment_status )
    221                 echo "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:33FF33:action=dim-comment' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';
     220        if ( 'approved' != $the_comment_status ) {
     221                if ( $comment_status ) // we're looking at list of only approved or only unapproved comments
     222                        echo "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:33FF33:action=dim-comment' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';
     223                else // we're looking at all comments
     224                        echo "<span class='approve'><a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:none:33FF33' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | </span>';
     225        }
    222226        echo "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a> | ';
    223227                echo "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . '</a>';
    224228        }
  • wp-admin/includes/template.php

     
    416416                $pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
    417417                if ( $left )
    418418                        echo '<strong>';
    419                 comments_number("<a href='edit-pages.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('0') . '</span></a>', "<a href='edit-pages.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('1') . '</span></a>', "<a href='edit-pages.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('%') . '</span></a>');
     419                comments_number("<a href='edit-pages.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-pages.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-pages.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
    420420                if ( $left )
    421421                        echo '</strong>';
    422422                ?>
  • wp-admin/js/edit-comments.js

     
    22jQuery(function($) {
    33
    44var dimAfter = function( r, settings ) {
    5         $('.comment-count span').each( function() {
     5        $('span.comment-count').each( function() {
    66                var a = $(this);
    77                var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
    88                a.html( n.toString() );
     
    1616}
    1717
    1818var delAfter = function( r, settings ) {
    19         $('.comment-count span').each( function() {
     19        $('span.comment-count').each( function() {
    2020                var a = $(this);
    2121                if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
    2222                        var n = parseInt(a.html(),10) - 1;
  • wp-admin/js/common.js

     
    22        // pulse
    33        jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
    44
     5        // Reveal
    56        jQuery('.wp-no-js-hidden').removeClass( 'wp-no-js-hidden' );
    67});
  • wp-admin/edit-post-rows.php

     
    113113                $pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
    114114                if ( $left )
    115115                        echo '<strong>';
    116                 comments_number("<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('0') . '</span></a>', "<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('1') . '</span></a>', "<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('%') . '</span></a>');
     116                comments_number("<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
    117117                if ( $left )
    118118                        echo '</strong>';
    119119                ?>
  • wp-admin/menu.php

     
    1717
    1818$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");
    1919$menu[15] = array(__('Design'), 'switch_themes', 'themes.php');
    20 $menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='comment-count'><span>$awaiting_mod</span></span>" ), 'edit_posts', 'edit-comments.php');
     20$menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod'><span class='comment-count'>$awaiting_mod</span></span>" ), 'edit_posts', 'edit-comments.php');
    2121$menu[30] = array(__('Settings'), 'manage_options', 'options-general.php');
    2222$menu[35] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
    2323if ( current_user_can('edit_users') )