Apache Redirect based on WordPress permissions

What you’re describing is likely best done in a simple WordPress plugin. You’re user roles are already stored in WordPress, so a plugin to do this is likely only a few lines long. Also an existing plugin like File Away may accomplish what your attempting. This plugin surfaced when I did a plugin search for … Read more

Allow non-admin users to access plug-in

from Codex function add_theme_caps(){ global $pagenow; if ( ‘themes.php’ == $pagenow && isset( $_GET[‘activated’] ) ){ // Test if theme is activated // Theme is activated // gets the author role $role = get_role( ‘author’ ); // This only works, because it accesses the class instance. // would allow the author to edit others’ posts … Read more

Multisite Admin Roles

You can write a small custom function, that loop about the network and add in each site of the network the new role. See the source below als example to add_role. If you like update or change a existing role, then switch from add_role to add_cap. function fb_change_role_network_wide( $role ) { global $wpdb; $args = … Read more

Custom user roles doesn’t apply changes

in WP documentation: NB: This setting is saved to the database (in table wp_options, field wp_user_roles), so it might be better to run this on theme/plugin activation It means that when you first run your code it is saved to db, and if you try to do it one more time it will not be … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)