-
-
Save techies23/1b6fbad89e10da745efaf87ebb74f88e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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