When working with WordPress posts and you want to quickly change the status or date of one or more posts, it’s a simple affair via the built-in bulk and quick edit tools. However, when you’re dealing with custom post types and fields, it’s not so easy.
Please See The Update Below.
Until now…
During a recent tasking to help the Media Burn Archive with speeding up mass updates for video meta fields, we found the easiest solution to be via WordPress’s action calls. Specifically thebulk_edit_custom_box
andquick_edit_custom_box
actions.
While reading the documentation forbulk_edit_custom_box
andquick_edit_custom_box
initially only gave a clue, two further references shed more light to really getting things done.
- Manage WordPress Posts Using Bulk Edit and Quick Edit
- Saving custom fields in quick or bulk edit mode in WordPress
While putting all of these resources together helped greatly, the final solution adapts for custom post types and minor security checks. There’s still more to do, but for now, It’s Good Enough.
Feel free to check out the code via downloading below.
The Code
Screenshots
- Bulk Edit results
- Bulk Edit screen
- Bulk Edit selection
- Quick Edit link and screen
- Quick Edit results
Even better now!
I just wrote the Custom Bulk/Quick Edit plugin for WordPress. There’s also a premium version as well to enable working with custom post types.
出处:http://www.cnblogs.com/huangcong/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。