Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a plugin that restricts contents for registered users only, on the other hand I have created a shortcode for showing a chat and I want to hide it using the restrictive shortcode;

[upme_private][chat][/upme_private]

But it doesnt work, what would be the best aproach?

The function to "Hide" restricted content uses;

function upme_private($atts, $content = null) {
        global $upme;
        return $upme->hidden_content($atts, $content);
    }

and the shortcode that i created is

add_shortcode( 'barchat', 'barc_chat_script' );

Essentially what I want is to be able to hide the barchat shortcode from users by;

[upme_private][chat][/upme_private]

But I dont know how to modify the return of the upme_private function to include do_shortcode() since its already returning another function (hidden_content)

share|improve this question
    
What doesn't work exactly? Post your code please. –  s_ha_dum Jun 20 '13 at 15:56

1 Answer 1

You're trying to create Nested Shortcodes so at the end of your handler which looks like function shortcode_handler($params, $content = null) do this :

 return do_shortcode($content);

instead of :

return $content;
share|improve this answer
    
Indeed it has something to do with nested shortcodes –  Jose David Garcia Llanos Jun 20 '13 at 17:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.