properly fix shortcode calling issues

This commit is contained in:
John Bintz 2009-12-20 09:21:55 -05:00
parent e33cd2d2fb
commit dbdfcf055c
5 changed files with 29 additions and 28 deletions

View File

@ -5,7 +5,7 @@ require_once('ComicPressStoryline.inc');
class ComicPressRelatedPosts {
var $related_categories;
function shortcode_related_comics($attrs = '') {
function display_related_comics($attrs = '') {
$rp = new ComicPressRelatedPosts();
return $rp->_handle_shortcode(
extract(ComicPressRelatedPosts::_handle_shortcode_attrs($attrs)),
@ -13,7 +13,7 @@ class ComicPressRelatedPosts {
);
}
function shortcode_related_posts($attrs = '') {
function display_related_posts($attrs = '') {
$rp = new ComicPressRelatedPosts();
return $rp->_handle_shortcode(
extract(ComicPressRelatedPosts::_handle_shortcode_attrs($attrs)),
@ -121,6 +121,6 @@ class ComicPressRelatedPosts {
// @codeCoverageIgnoreEnd
}
add_shortcode('related_posts', array('ComicPressRelatedPosts', 'shortcode_related_posts'));
add_shortcode('related_comics', array('ComicPressRelatedPosts', 'shortcode_related_comics'));
add_shortcode('related_posts', array('ComicPressRelatedPosts', 'display_related_posts'));
add_shortcode('related_comics', array('ComicPressRelatedPosts', 'display_related_comics'));

View File

@ -67,7 +67,7 @@ function display_blog_post() {
}
?>
<div class="clear"></div>
<?php if ($comicpress_options['enable_related_posts']) echo related_posts_shortcode(); ?>
<?php if ($comicpress_options['enable_related_posts']) echo ComicPressRelatedPosts::display_related_posts(); ?>
</div>
</div>
<div class="post-foot"></div>

View File

@ -70,7 +70,7 @@ function display_comic_post() {
}
?>
<div class="clear"></div>
<?php if ($comicpress_options['enable_related_comics']) echo related_comics_shortcode(); ?>
<?php if ($comicpress_options['enable_related_comics']) echo ComicPressRelatedPosts::display_related_comics(); ?>
</div>
</div>
<div class="post-comic-foot"></div>

View File

@ -6,7 +6,7 @@
* Usage: [related_comics]
*
*/
/*
function related_comics_shortcode( $atts = '' ) {
extract(shortcode_atts(array(
'limit' => '5',
@ -70,3 +70,4 @@ function related_comics_shortcode( $atts = '' ) {
?>
*/

View File

@ -6,7 +6,7 @@
* Usage: [related_posts]
*
*/
/*
function related_posts_shortcode( $atts = '' ) {
extract(shortcode_atts(array(
'limit' => '5',
@ -71,4 +71,4 @@ function related_posts_shortcode( $atts = '' ) {
// add_shortcode('related_posts', 'related_posts_shortcode');
?>
?>*/