Change color of audio player depending on user role

The below will check the post creators role and based on that role allow you to set colour of the audio player. Created in a plugin so to stop theme updates removing it on updating functions file when updating theme. Not sure how to do this based on each comment of a person embedding a … Read more

How to allow user to edit post in wordpress

It would seem like the Basic Authentication Plugin is modifying the contributor user role, removing their edit_posts capability. As you need this plugin activated, I see a couple of options Make a new user role with edit-post capabilities Create a new role that has only the capabilities you need it to have. That way you … Read more

Create Super Admin that cant be deleted

There are 2 approaches to get something equivalent to what you want, but, it isn’t possible to have exactly what you want. On a single site administrator is the highest level, so you can’t have higher than the highest. Instead, here are alternatives: Turn your site into a multisite install that contains only 1 site, … Read more

How to make a customize role and view a specific plugins base on that role?

You can a custom admin page with add_menu_page function. The function has a argument $capability which you can set the which users will be able to view and access the page add_menu_page https://developer.wordpress.org/reference/functions/add_menu_page/ Roles and capabilities https://wordpress.org/support/article/roles-and-capabilities/

How to show a admin bar menu item only to users with certain capabilities?

The check will be called too early if you just write it in your plugin file like this: if ( current_user_can( ‘add_movies’ ) ) { add_action( ‘admin_bar_menu’, ‘wpse17689_admin_bar_menu’ ); } function wpse17689_admin_bar_menu( &$wp_admin_bar ) { $wp_admin_bar->add_menu( /* … */ ); } Because it will execute when your plugins is loaded, which is very early in … Read more

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