1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
add_action( 'wp_footer', 'tcb_note_server_side_page_speed' ); function tcb_note_server_side_page_speed() { date_default_timezone_set( get_option( 'timezone_string' ) ); $content = '[ ' . date( 'Y-m-d H:i:s T' ) . ' ] '; $content .= 'Page created in '; $content .= timer_stop( $display = 0, $precision = 2 ); $content .= ' seconds from '; $content .= get_num_queries(); $content .= ' queries'; if( ! current_user_can( 'administrator' ) ) $content = "<!-- $content -->"; echo $content; } |
