added an option for enabling the display of the query count and page load info in the footer

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2010-01-07 02:29:32 -08:00
parent 656d78b152
commit 163b318e49
4 changed files with 16 additions and 3 deletions

View File

@ -59,7 +59,8 @@ function comicpress_admin() {
'disable_blogheader',
'enable_comicpress_debug',
'enable_full_post_check',
'enable_scroll_to_top'
'enable_scroll_to_top',
'enable_page_load_info'
) as $key) {
$comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false );
}

View File

@ -35,7 +35,9 @@
<?php } ?>
</p>
<?php } ?>
<p><?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds.</p>
<?php if ($comicpress_options['enable_page_load_info']) { ?>
<p><?php echo get_num_queries() ?> queries. <?php timer_stop(1) ?> seconds.</p>
<?php } ?>
</div>
<?php if (!$comicpress_options['disable_page_restraints']) { ?>

View File

@ -205,7 +205,8 @@ function comicpress_load_options() {
'enable_blogroll_off_links' => false,
'enable_comment_count_in_rss' => false,
'enable_scroll_to_top' => false
'enable_scroll_to_top' => false,
'enable_page_load_info' => false
) as $field => $value) {
$comicpress_options[$field] = $value;

View File

@ -212,6 +212,15 @@
<?php _e('Enable this if you would like to check ALL of your posts to see if there are any category problems and inconsistancies.', 'comicpress'); ?>
</td>
</tr>
<tr class="alternate">
<th scope="row"><label for="enable_page_load_info"><?php _e('Enable the page load info in the footer?','comicpress'); ?></label></th>
<td>
<input id="enable_page_load_info" name="enable_page_load_info" type="checkbox" value="1" <?php checked(true, $comicpress_options['enable_page_load_info']); ?> />
</td>
<td>
<?php _e('Will display information on how many queries and how fast it took to load the page in the footer.', 'comicpress'); ?>
</td>
</tr>
</table>
</div>