remove realpath check on abspath, messes up on badly-behaved webhosts
This commit is contained in:
parent
4f4c0e8810
commit
87fedb04c7
|
@ -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
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ function comicpress_admin() {
|
|||
$comicpress_options['disable_lrsidebars_frontpage'] = (bool)($_REQUEST['disable_lrsidebars_frontpage'] == 1 ? true : false );
|
||||
$comicpress_options['disable_footer_text'] = (bool)($_REQUEST['disable_footer_text'] == 1 ? true : false );
|
||||
$comicpress_options['disable_blogheader'] = (bool)($_REQUEST['disable_blogheader'] == 1 ? true : false );
|
||||
$comicpress_options['disable_rss_comments_count'] = (bool)($_REQUEST['disable_rss_comments_count'] == 1 ? true : false );
|
||||
$comicpress_options['enable_comicpress_debug'] = (bool)($_REQUEST['enable_comicpress_debug'] == 1 ? true : false );
|
||||
$comicpress_options['enable_full_post_check'] = (bool)($_REQUEST['enable_full_post_check'] == 1 ? true : false );
|
||||
$tab = 'general';
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -47,6 +47,15 @@
|
|||
<?php _e('Checkmark this and your site will not display the contents of #blogheader.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="disable_rss_comments_count"><?php _e('Disable RSS comments count','comicpress'); ?></label></th>
|
||||
<td>
|
||||
<input id="disable_rss_comments_count" name="disable_rss_comments_count" type="checkbox" value="1" <?php checked(true, $comicpress_options['disable_rss_comments_count']); ?> />
|
||||
</td>
|
||||
<td>
|
||||
<?php _e('Enable this option to not show comment counts in RSS feed post titles.','comicpress'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="widefat">
|
||||
|
@ -194,4 +203,3 @@
|
|||
</form>
|
||||
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue