WordPress.org

Ready to get started?Download WordPress

Forums

Page Shortcodes Plugin
title/content needs filtering (1 post)

  1. mrclay
    Member
    Posted 3 years ago #

    The shortcode output for content and title need to be run through apply_filters(). Here are a couple functions to replace in PageShortcodesPlugin.php:

    function handleWpShortcode_page_title($atts, $content = null) {
            $page = $this->findPage($atts, $content);
            if ( $page ) return apply_filters('wp_title', $page->post_title);
            return $content;
        }
    function handleWpShortcode_page_content($atts, $content = null) {
            $page = $this->findPage($atts, $content);
            if ( $page ) {
                $content = $page->post_content;
                // filtering suggested by http://codex.wordpress.org/Function_Reference/the_content
                $content = apply_filters('the_content', $content);
                $content = str_replace(']]>', ']]>', $content);
            }
            return $content;
        }

    http://wordpress.org/extend/plugins/page-shortcodes/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic