loitrewasのブログ -12ページ目

loitrewasのブログ

ブログの説明を入力します。

Disable WordPress 3.0 automatic draft Archiveseveral other WordPress blog yesterday to upgrade from 2.9.2 to 3.0.1, did not expect to find a number of issues, automatic archiving drafts previously solved problems has emerged, Shetenglebantian to solve. Id as a control, I always like to use digital id as the log file name, and WordPress since version 2.6 there have been a few very annoying feature: Post Revisions and Autosave, in the case of default, the Special Nike Air Force 1 Low Womens Pink Shoes log ID will no longer be contiguous, use ID as the user will see a Permalink structure address increasingly chaotic WordPress, annoying, then I by a plug-in is the perfect solution to this problem of discontinuity log ID, and has been used to the 2.9.2 no problem, after upgrading to 3.0.1, automatic draft came out, but the plug-in is still at work, by tracking found that just create a log, even if the content is not written, the database will automatically save a The draft articles, which is the phenomenon of the previous version of WordPress that are not also disable the reasons revisions and autosave plugin failure. Now that 2015 Latest Nike Shoes you've upgraded to WordPress 3.0.1, do not downgrade, but to think about how to solve the problem of Wordpress automatically save a draft, after searching, I found a not a very good way to disable the auto save draft. Solution WorPress 3.0.1 Automatic drafts are: still enable original disable revisions and autosave plugin, and then edit the wp-admin / includes / post.php file, add a line before the statement Nike Air Jordan 22 Air Presto Mens {if ($ create_in_db) $ Perfect Nike Air Force 1 Womens White Pink Shoes create_in_db = false; statement, after the actual test, after an increase of this line, the new journal, the database will not be an automatic archiving of drafts of. However, this method of modifying WordPress source code is Popular Nike Air Force 1 Unisex White Black Shoes very good, which would later lead to every WordPress upgrade, you need to modify a maintenance workload will increase, as resolved by way of plug-in, but at present it can not be found how to use plug-ins to solve this problem, if the next version of the official WordPress can fix it. Update: The above disable automatic draft (Auto-Draft) method only for Wordpress 3.1 the previous version, later versions of Wordpress 3.1 is invalid, after adding suggesting no permission to modify when you save the article. Wordpress 3.1 is the next version of the modification method: still edit wp-admin / includes / post.php file, locate the following two lines: $ post_id = wp_insert_post (array ('post_title' = __ ('Auto Draft'), 'post_type' = $ post_type, 'post_status' = 'auto-draft')); $ post = get_post ($ post_id); it can be replaced with the following lines: $ post_auto_draft = $ wpdb-get_row (SELECT * FROM $ wpdb-posts WHERE post_type = '$ post_type' AND post_status = 'auto-draft' LIMIT 1); if ($ post_auto_draft) {$ post = $ post_auto_draft;} else {$ post = get_post (wp_insert_post (array ('post_title' = __ ('Auto Draft '),' post_type '= $ post_type,' post_status' = 'auto-draft')));} summary: WordPress auto-save (Auto-Save), the historical version (Post Nike Blazer Unisex Revisions) and automatic draft (Auto-Draft ) function really in trouble, a large amount of garbage data in the database, and automatically draft (Auto-Draft) can only be achieved by modifying the source code, we hope to provide an official WordPress options, allowing users to choose whether to enable automatic draft ( Auto-Draft) function.