Hi Matt,
It’s not possible to really, really lock down the slideshows. You could add some code which makes sure the logged in user only sees the tabs for slideshows that they’ve created, but they could game the URL and access other peoples slideshows if they wanted to (it would take a bit of trial and error for them to find the correct ID’s).
The same goes for inserting the shortcode into posts – they could just change the ID of the slideshow to ‘access’ someone else’s slideshow.
To restrict the tabs in the interface to only list slideshows that the current user has created, please try adding this to your themes functions.php file:
add_filter('metaslider_all_meta_sliders_args', 'metaslider_restrict_tabs_to_current_user', 10, 1);
function metaslider_restrict_tabs_to_current_user($args) {
$args['author'] = get_current_user_id();
return $args;
}
Regards,
Tom
Hi Tom,
Thanks for that. I’m less concerned about people going out of their way to beat the system and more so about them either accidentally altering another users slideshow or taking an opportunity when provided one.
I’ll give your solution a go, I’m sure it will be sufficient – thanks!
Cool, that should do the trick then. Remember to make sure the single quotes aren’t converted to curly ones when you paste that code over into functions.php, it caught me out earlier today. To be safe, delete each single quote and replace it after you’ve pasted the code 🙂