I’ve using this function in my custom plugin to remove the iFrame Embed calendar text and button that is displayed inside EE > Events:
function tw_ee_filter_embed_buttons_output2( $embed_buttons ) {
//Remove the calendar embed button for all users other than admins.
if(! current_user_can( 'manage_options' ) ) {
unset($embed_buttons['calendar']);
}
return $embed_buttons;
}
add_filter('FHEE__EventEspresso_core_libraries_iframe_display_IframeEmbedButton__addIframeEmbedButtonsSection__embed_buttons', 'tw_ee_filter_embed_buttons_output2', 100, 1);
This function has been working fine for a while, however I recently noticed the iFrame text and button appears again. I have not made any changes in members permissions for manage_options. Please help to remove this again.
Finally, there’s a second iframe embed button that’s for embedding an upcoming events list (not the same as the calendar). You can remove both buttons by changing the code to be:
The support post ‘Remove iFrame Embed Calendar code from EE > Events’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.