diff --git a/comicpress-options.php b/comicpress-options.php index 760a62d..57e4799 100644 --- a/comicpress-options.php +++ b/comicpress-options.php @@ -57,7 +57,8 @@ function comicpress_admin() { 'disable_footer_text', 'disable_blogheader', 'enable_comicpress_debug', - 'enable_full_post_check' + 'enable_full_post_check', + 'enable_scroll_to_top' ) as $key) { $comicpress_options[$key] = (bool)( $_REQUEST[$key] == 1 ? true : false ); } diff --git a/footer.php b/footer.php index fb82da8..d277b59 100644 --- a/footer.php +++ b/footer.php @@ -27,13 +27,15 @@ | Subscribe: RSS + | -
queries. seconds. +

+

queries. seconds.

diff --git a/functions.php b/functions.php index 9bf255a..22ea955 100644 --- a/functions.php +++ b/functions.php @@ -42,6 +42,7 @@ function __comicpress_widgets_init() { function __comicpress_init() { global $comicpress_options, $__comicpress_handlable_classes; + $comicpress_options = array(); // Check if the $comicpress_options exist, if not set defaults $comicpress_options = comicpress_load_options(); @@ -54,7 +55,9 @@ function __comicpress_init() { } // Queue up the scripts. - wp_enqueue_script('comicpress_scroll', get_template_directory_uri() . '/js/scroll.js'); + if (!is_admin() && $comicpress_options['enable_scroll_to_top']) { + wp_enqueue_script('comicpress_scroll', get_template_directory_uri() . '/js/scroll.js'); + } // remove intense debates control over the comment numbers if (function_exists('id_get_comment_number')) { @@ -199,7 +202,8 @@ function comicpress_load_options() { 'enable_blogroll_off_links' => false, - 'enable_comment_count_in_rss' => false + 'enable_comment_count_in_rss' => false, + 'enable_scroll_to_top' => false ) as $field => $value) { $comicpress_options[$field] = $value; diff --git a/options/generaloptions.php b/options/generaloptions.php index 7c05603..7492170 100644 --- a/options/generaloptions.php +++ b/options/generaloptions.php @@ -47,7 +47,7 @@ - + /> @@ -55,7 +55,7 @@ - + @@ -160,6 +160,15 @@ Widgets-> Footer.', 'comicpress'); ?> + + + + +
+ /> + + +