revert one revision of a post progmattically via code?

So via lots of head banging and experimentation I managed to get a solution to letting editors/admins review the post whilst a previous one stays live is rather convoluted but does work. The key thing I did was to create a new post status which I call awaiting. In the admin it appears as “changes … Read more

Do multiple revisions really slow down WordPress?

Having 2 revisions or 100,000 will not change front end performance in a default plugin-less WordPress setup However plugin and theme authors who do not query the database correctly, could end up accidentally searching/querying revisions, which could have some performance issues Here’s a snippet on it revisions take up space in your WordPress database. Some … Read more

Notice: Constant WP_POST_REVISIONS already defined

I have the same problem before. I put WP_POST_REVISIONS in the end of wp-config.php file and it didn’t work correctly. You should put your codes before defining ABSPATH and before this line: /* That’s all, stop editing! Happy blogging. */ it must be something like in the following: define( ‘WP_POST_REVISIONS’, 6 ); /* That’s all, … Read more

Per Post Type Revision Numbers

Remove the action ‘wp_save_post_revision’ from ‘pre_post_update’. It is set per default in wp-includes/default-filters.php with the default priority (10). Add your own function to this hook. You get the $post_ID as parameter, so detecting the post type is easy. In your callback copy the code from wp_save_post_revision() but use the constant WP_POST_REVISIONS for the post type … Read more

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