I solved this problem by creating a new user type with unfiltered_html set to true
$result = add_role(
'jobseeker',
__( 'Job Seeker' ),
array(
'read' => true,
'edit_posts' => true,
'delete_posts' => true,
'delete_published_posts' => true,
'upload_files' => true,
'edit_others_posts' => false,
'delete_others_posts' => false,
'unfiltered_html' => true, //this line does the magic
)
);
if ( null !== $result ) {
echo 'Yay! New role created!';
}
else {
echo 'Oh... the basic_contributor role already exists.';
}
Related Posts:
- wp_update_post() example… how to update the_content in a textarea?
- Why wp_update_post() does not update GUID?
- What are the limitations of wp_update_post()?
- I need to bulk update all wordpress posts on a scheduled time
- wp_update_post does not update post_name
- How to disable saving/changing update date for certain admin users?
- “Internal Server Error” with wp_update_post
- wp_update_post using post_name
- how to get last revision id created after wp_update_post
- why wp_update_post cant update when value is empty?
- update a post with wp_update_post
- Updating posts not working
- Update a post’s info when clicking on a javascript button
- What ‘function’ will ‘update’ a post?
- wp_update_post meta causing 500 error
- Updating post_parent by id (many times)
- wp_update_post making my post sticky
- Is it possible to “Update” pages via SQL?
- Update post meta is slow while saving post
- Update post (published) date when changing category
- recursively update content
- wp_update_post ignores if/else
- $wpdb->update query incrementing value on it’s own!
- Update button (sometimes) greyed-out
- Set a post to draft once depending on a post meta value (passed certain date)?
- Fatal error: Call to undefined function wp_cache_get after update attempt
- How to avoid infinite loop in save_post callback
- wordpress function to change post status [duplicate]
- Connection lost. Saving has been disabled… (Updating Posts/Pages)
- Why doesn’t wp_update_post() update the post_status field?
- Post/Page Publish/Update button not clickable once I make an edit
- Automatically fill custom field value on post publish/update
- Scheduling posts to update once per day with wp_cron
- Fill post titles from post content?
- Keeping post_date same as the pending post_date on privately publishing the post
- How to generate slugs?
- bulk post_content update
- Mass Update lines of code for all posts
- Can I edit the wp_post > post_content right before its inserted/updated?
- wp_update_post based function works on existing posts, but not new posts
- Updating post title using wp_update_post
- How do I batch create revisions of all posts?
- post_status => publish not working
- Change the post date from a meta box
- How Can I Set the Post Author of a Post I Just Created With PHP?
- Change sticky status of posts from phpMyAdmin
- How to show Published date and/or Modified date
- Display success message after wp_update_post
- How to catch and modify custom field values when a page is updated
- wp_insert_post_data filter hook identify current action
- Update post title with category name after editing a category
- custom post scheduler for drafts
- List taxonomy terms for post as checkboxes
- Allow Post Author to be 0 on Update
- How to bulk edit image url in featured image and product description?
- How to get the Tags on Publish post hook?
- When User Meta amended update Title and Slug of Post programatically
- Set post_parent value for the images uploaded by Add Media button into post
- Updating / Saving items generated by wp_terms_checklist on frontend
- Post author for revision not being set on update/insert
- Changing random post publish time for repost
- Clear cache on post of one type when something happens to post of other type
- wp_update_post is not updating category
- How to automatic update date and time when save custom post type
- Use /prefix/postname as a slug in post_name?
- Gravity forms and wp_update_post [closed]
- $wpdb->update() always need a second try
- Update post if exist from PHP
- Is there a before_save_post hook or something similar
- Can’t update WordPress Page if post_content is Empty
- Odd behaviour for the update button when displaying a WP_List_Table
- Wp_editor doesn’t send the required data
- Custom wp_editor doesn’t update post_content
- How to use wp_update_post with ajax on frontend
- Trash Bin for Categories?
- remove_action(‘save_post’) in function that was triggered by save post not working
- Prevent other hooks from firing after wp_update_post() outside of editor
- Updating a custom post status after an expiry date rather than trashing it
- Update post “A” on comment submition on post “B”
- update_post_meta not working in template_redirect action
- Change the term based on the value of a $variable using wp_update_post in submitting a form
- How to update the children of a post?
- Bulk Post update_post_meta
- update flamingo_inbound post type after insert
- wp_update_post to set post IDs to drafts not working
- save_post affect creation and deletion
- how to update editor content from metabox
- Can I override the permalink/slug on creation
- set_post_format called after wp_update_post when using bulk edit?
- Auto draft posts when scheduled date is reached
- Update a Post after a user uploads a video
- Comparing pre-saved post_title to post-saved post_title
- Change custom post status to draft before today
- Setting a featured image while creating the post
- Function working in single.php but not working in custom template file
- How to create posts with a specific date in bulk
- wp_update_post does not change post status from draft to publish, returns 1
- How can I use wp_after_insert_post with $current_screen?
- Update post / page using API + python
- Set post status to draft after validating post meta values in save_post hook