Skip to content

Instantly share code, notes, and snippets.

@techies23
Last active June 9, 2016 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techies23/1b6fbad89e10da745efaf87ebb74f88e to your computer and use it in GitHub Desktop.
Save techies23/1b6fbad89e10da745efaf87ebb74f88e to your computer and use it in GitHub Desktop.
/**
* Temporary solution for zoom plugin wordpress; Shortcode for Loggedin Users
**/
function calling_nested_shortcode($atts) {
$a = shortcode_atts( array(
'meeting_id' => '',
'class' => 'test',
'id' => 'test',
'title' =>'test',
), $atts );
//Check is user Logged in
if( is_user_logged_in() ) {
//True
$link = do_shortcode( '[zoom_api_link meeting_id="'.$a['meeting_id'].'" class="'.$a['class'].'" id="'.$a['id'].'" title="'.$a['title'].'"]' );
} else {
//False
$link = 'User Must be logged in to See the link';
}
return link;
}
add_shortcode( 'another_shortcode', 'calling_nested_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment