Expanding the allowed HTML tags in comments?

I have no problem doing this in a comment, as an administrator: <b>bold test</b> <i>italics test</i> <u>underline test</u> <font color=”#ff9900″> color test</font> But the subscribers can’t underline, add color to words nor add images. Is it that only the admin can use more HTML tags than those suggested under the comment form? <a href=”” title=””> … Read more

Allow AJAX call to other roles than admin

On my website, registered users (subscriber role) can send drafts and, if admins validate them, they are published. I’m trying to add a tag box to frontend editor used to send new posts. To implement the autocomplete feature I’m making an AJAX call to this URL: http://example.com/wp-admin/admin-ajax.php?action=ajax-tag-search&tax=post_tag That works great for an administrator user, but … Read more

How to enable a custom post type to custom user role in WordPress

I have created a custom post type called Course Documents using WordPress Custom Post Type UI plugin. Also, I have created a new user role called Teacher. add_role(‘rpt_teacher’, ‘Teacher’, array( ‘read’ => true, ‘edit_posts’ => false, ‘delete_posts’ => false, ‘publish_posts’ => false, ‘upload_files’ => true, ) ); And now I want to enable the custom … Read more

using add_role function to make some users to create a selected type post

how are you ? I have in my site (post_type called = books).. I need to make some users for example (Library) to create a books (post_type = books) .. this is the code to add rols (called = library) .. $library = add_role(‘library’, ‘library’, array( ‘read’ => true, ‘edit_posts’ => true, ‘delete_posts’ => false, … Read more

Why does this check to see if user is authorized to edit a post fail for all but super admins?

I’m trying to determine if a piece of content can be edited by a user. I would like all roles contributor and above to be authorized by a single check. Here’s my code: if( empty( $post_id ) || !current_user_can(‘edit_post’, $post_id) ) { return; } Unfortunately, the only users that don’t get the return are super … Read more