Guest User

Untitled

a guest
Nov 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. echo '<input type="submit" name="submit" id="submit" value="Submit" />';
  2. if (isset($_POST['submit']) && ($_POST['submit'] == 'Submit')) {
  3. $query = array(
  4. 'ID' => $post->ID,
  5. 'post_status' => 'publish',
  6. );
  7. wp_update_post( $query, true );
  8. }
Add Comment
Please, Sign In to add comment