mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 13:38:37 +00:00
allow timer_stop() to use number_format() when returning. Props mdawaffe and nbachiyski. fixes #991
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a7050af4f7
commit
23ddeba64d
@ -2,7 +2,7 @@
|
|||||||
<div id="footer"><p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p>
|
<div id="footer"><p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p>
|
||||||
<p>
|
<p>
|
||||||
<a href="http://codex.wordpress.org/"><?php _e('Documentation'); ?></a> — <a href="http://wordpress.org/support/"><?php _e('Support Forums'); ?></a> <br />
|
<a href="http://codex.wordpress.org/"><?php _e('Documentation'); ?></a> — <a href="http://wordpress.org/support/"><?php _e('Support Forums'); ?></a> <br />
|
||||||
<?php bloginfo('version'); ?> — <?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?>
|
<?php bloginfo('version'); ?> — <?php printf(__('%s seconds'), timer_stop(0, 2)); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -844,9 +844,10 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(
|
|||||||
$mtime = $mtime[1] + $mtime[0];
|
$mtime = $mtime[1] + $mtime[0];
|
||||||
$timeend = $mtime;
|
$timeend = $mtime;
|
||||||
$timetotal = $timeend-$timestart;
|
$timetotal = $timeend-$timestart;
|
||||||
|
$r = number_format($timetotal, $precision);
|
||||||
if ( $display )
|
if ( $display )
|
||||||
echo number_format($timetotal,$precision);
|
echo $r;
|
||||||
return $timetotal;
|
return $r;
|
||||||
}
|
}
|
||||||
|
|
||||||
function weblog_ping($server = '', $path = '') {
|
function weblog_ping($server = '', $path = '') {
|
||||||
@ -2508,4 +2509,4 @@ function wp_die($message, $title = '') {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user