wp_update_post behaves differently for different user role

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 ) ); … Read more

Change custom post status to draft before today

Do the other post have to be set to draft? Or would just showing today’s post work? If just showing today’s post works you could do something like the following $today = getdate(); $args = array( ‘category_name’ => ‘event’, ‘posts_per_page’ => 5, ‘year’ => $today[“year”], ‘monthnum’ => $today[“mon”], ‘day’ => $today[“mday”] ); query_posts( $args );

set_post_format called after wp_update_post when using bulk edit?

I was able to solve my problem by calling set_post_format in my save_post callback and making sure to check if its set and not equal to the “no change” option. Not sure if this is the best way to go, but it works. require( plugin_admin_dir . ‘plugin-sync.php’ ); add_action( ‘save_post’, ‘savethepost’, 2000); function savethepost($post_id) { … Read more

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