Demo site
-
I am running 3.0 multisite.
I would like to set up a site to function strictly as a demo site. Also I’ll use this site when trying out new plugins/themes/etc.
Specifically I want to be able to restrict the demo user from changing their password and to restrict the demo user from deleting the demo site. All other functions will be base administrator functions for the site.
To accomplish the password change restriction I created a small plugin as follows:
<?php /* Plugin Name: WordPress Demo */ function wpselect_personal_options_update($user_id) { if (wp_get_current_user()->ID == 3) wp_die(__( 'You do not have sufficient permissions to modify your profile on this site.')); return $user_id; } add_action( 'personal_options_update', 'wpselect_personal_options_update' ); ?>
To restrict the demo user from deleting the site I couldn’t find a way to do a plugin so I hacked ms-delete-site.php and changed:
if ( ! current_user_can( 'manage_options' ) )
to
if ( ! current_user_can( 'manage_sites' ) )
Is there a way to accomplish this without hacking the core wp files?Other than that I will set up a cron job to dump and restore the db tables for the demo site at a predetermined frequency.
Does anyone see any problems with the above plan?
- The topic ‘Demo site’ is closed to new replies.