$wpdb->update
-
I am currently using this in a plugin that I am creating for work.
global $wpdb; global $confirm; $wpdb->update( $wpdb->prefix . 'posts', array( 'post_password' => $confirm ), // Replace wpse with your password array( 'post_type' => 'final_decisions_cpt' ), // Replace post with the custom post type array( '%s' ), array( '%d' ) );
This code works and presets the password for me, however it is applying to all post types. I want it to be specific to my cpt only. Any thoughts?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘$wpdb->update’ is closed to new replies.