disable quickedit for specific custom post type user role

You can try post_row_actions hook: /** * Hide quick edit * * @internal Used as a callback. * * @see https://developer.wordpress.org/reference/hooks/post_row_actions/ */ function wpse288663_hide_quick_edit($actions, $post) { // Replace `{$cap}` with your specific capability. if (CPT_SLUG === $post->post_type && current_user_can({$cap})) { unset($actions[‘inline hide-if-no-js’]); } return $actions; } // Hook up. add_filter(‘post_row_actions’, ‘wpse288663_hide_quick_edit’, 10, 2);

Delete post after x minutes if user role is

This is a simple question, but it involves quite some work, so I’ll just give you an outline: First, you need to define a cron job that runs every minute or so. This will allow you to define an action that is run automatically. Beware that this will run only when the site is visited, … Read more

Add post with approval by the admin

Set New User Default Role to Contributor. Change user role of existing users as well, if needed. UPDATE Add this to your functions.php file. It’ll allow your contributor and author users to add WooCommerce products. And then set default user role to contributor as I suggested before. function wpse_306836_wc_custom_permission( $args, $post_type ) { if ( … Read more

How can I prevent certain custom roles from seeing other custom roles on the user list page?

Method 1, SQL Notes about your SQL [Unknown column ‘wp_usermeta.meta_key’ in ‘where clause’] This is solved by adding this to the JOIN part of the query: JOIN wp_usermeta ON ( wp_usermeta.user_id = wp_users.ID ) You could check the value of the JOINS and, if false === strpos( ‘wp_usermeta’, $joins ), adding it yourself. When getting … Read more

Updater user with multiple roles

Roles are assigned one per user. That’s default for WordPress. Instead of using roles, I recommend using capabilities to keep track of different types of users. You can assign multiple capabilities per user and set some default capabilities for the role. See: add_cap() and remove_cap()

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