diff --git a/classes/ComicPressMediaHandling.inc b/classes/ComicPressMediaHandling.inc
index e5fbb41..9f24ab1 100644
--- a/classes/ComicPressMediaHandling.inc
+++ b/classes/ComicPressMediaHandling.inc
@@ -83,7 +83,7 @@ class ComicPressMediaHandling {
// @codeCoverageIgnoreStart
function _abspath() {
- return trailingslashit($this->_resolve_regex_path(realpath(ABSPATH)));
+ return trailingslashit($this->_resolve_regex_path(ABSPATH));
}
// @codeCoverageIgnoreEnd
diff --git a/comicpress-options.php b/comicpress-options.php
index 436483c..5f41e1a 100644
--- a/comicpress-options.php
+++ b/comicpress-options.php
@@ -15,22 +15,22 @@ function comicpress_admin_page_head() { ?>
function comicpress_admin() {
global $upload_path, $blogcat;
$comicpress_options = get_option('comicpress_options'); ?>
-
+
-
+
-
- function hidemessage() { document.getElementById('message').style.display = 'none'; }
-
+
@@ -174,12 +175,12 @@ function comicpress_admin() {
-
+
-
\ No newline at end of file
+?>
diff --git a/functions/syndication.php b/functions/syndication.php
index f8668b4..c1b10cd 100644
--- a/functions/syndication.php
+++ b/functions/syndication.php
@@ -4,62 +4,9 @@
* Author: Philip M. Hofer (Frumph)
* In Testing
*/
-/*
-
-function cp_add_to_feed_count_rss() {
- $feedcount = get_option('comicpress_feed_count_rss');
- if (!empty($feedcount)) {
- $feedcount = $feedcount + 1;
- update_option('comicpress_feed_count_rss', $feedcount);
- } else {
- add_option('comicpress_feed_count_rss', 1, ' ', 'yes');
- }
-}
-
-add_action('do_feed_rss', 'cp_add_to_feed_count_rss',5);
-
-
-function cp_add_to_feed_count_rdf() {
- $feedcount = get_option('comicpress_feed_count_rdf');
- if (!empty($feedcount)) {
- $feedcount = $feedcount + 1;
- update_option('comicpress_feed_count_rdf', $feedcount);
- } else {
- add_option('comicpress_feed_count_rdf', 1, ' ', 'yes');
- }
-}
-
-add_action('do_feed_rdf', 'cp_add_to_feed_count_rdf',5);
-
-
-function cp_add_to_feed_count_atom() {
- $feedcount = get_option('comicpress_feed_count_atom');
- if (!empty($feedcount)) {
- $feedcount = $feedcount + 1;
- update_option('comicpress_feed_count_atom', $feedcount);
- } else {
- add_option('comicpress_feed_count_atom', 1, ' ', 'yes');
- }
-}
-
-add_action('do_feed_atom', 'cp_add_to_feed_count_atom',5);
-
-function cp_add_to_feed_count_rss2() {
- $feedcount = get_option('comicpress_feed_count_rss2');
- if (!empty($feedcount)) {
- $feedcount = $feedcount + 1;
- update_option('comicpress_feed_count_rss2', $feedcount);
- } else {
- add_option('comicpress_feed_count_rss2', 1, ' ', 'yes');
- }
-}
-
-add_action('do_feed_rss2', 'cp_add_to_feed_count_rss2',5);
-*/
/**
* Add the number of post comments to the title of the RSS feed items.
- * TODO Make this togglable via options.
* @param string $title The title of the post.
* @return string The filtered title of the post.
*/
@@ -86,5 +33,12 @@ function comicpress_export_wp() {
remove_filter('the_title_rss', 'comicpress_the_title_rss');
}
-add_filter('the_title_rss', 'comicpress_the_title_rss');
-add_action('export_wp', 'comicpress_export_wp');
+function comicpress_init_rss() {
+ $comicpress_options = comicpress_load_options();
+ if ($comicpress_options['disable_rss_comments_count']) {
+ add_filter('the_title_rss', 'comicpress_the_title_rss');
+ add_action('export_wp', 'comicpress_export_wp');
+ }
+}
+
+add_action('init', 'comicpress_init_rss');
diff --git a/options/generaloptions.php b/options/generaloptions.php
index 3e33812..ef23c8c 100644
--- a/options/generaloptions.php
+++ b/options/generaloptions.php
@@ -2,7 +2,7 @@
-
+
-
+
-
\ No newline at end of file