php - How do WordPress restore trashed posts to previous status? -



php - How do WordPress restore trashed posts to previous status? -

i'm creating simple administration scheme 1 of sites, , creating blog inspired wordpress' posts system.

in blog can save either draft or published version. , want create way, when delete blog, alter "trashed" in database. , when restore it, restored same type again, wordpress.

but how wordpress restore it's trashed posts, original post_status? have looked @ wordpress database, couldn't figure out, how it, cause original post_status replaced "trash" when trashed , not stored other place in table.

so how "remember" it's original post_status? hope understand i'm asking :d

sorry not beingness code-related question, couldn't find reply other places.

thanks

this basic stuff frank. should @ wp_posts table , see difference between trashed , published post ( , possibly, others too). wordpress changing post_status column particular row of data. way knows current status of post concerned.

it might not related reply looking reply question, should consider looking @ info source, i.e. database of scheme trying learn... wordpress or moodle.

php mysql wordpress

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -