/wp-customize-posts

Edit posts and postmeta in the WordPress Customizer

Primary LanguagePHP

Customize Posts

Edit posts and postmeta in the Customizer. Stop editing your posts/postmeta blind!

Contributors: xwp, westonruter
Tags: customizer, customize, posts, preview, featured-image, page-template
Requires at least: 4.0
Tested up to: 4.1
Stable tag: trunk (master)
License: GPLv2 or later

Build Status

Description

The goal for this plugin is to be able to expose the editing of posts in the Customizer, allowing you to edit post data and postmeta for any number of posts, and preview the changes before saving them for others to see. This plugin was birthed out of the Widget Customizer feature-as-plugin project which was merged into WordPress Core in 3.9: as widgets can now be managed in the Customizer, so too should posts be editable in the Customizer as well.

Did you know that changing the featured image actually makes the change live even before you save the post? This is this very surprising/unexpected behavior. The only way to truly preview a change to a featured image is to use something like Customize Posts.

Likewise, did you know that changing a page template cannot be previewed from the post editor? When you change the selected page template, the change will not show up when you preview the post (see #11049). However, in Customize Posts you can preview changes to the page template just by changing the dropdown selection, and then you can see what your page would look like with the new template after the preview refreshes.

Most other changes to metaboxes containing data that gets saved to custom fields (postmeta) also get written when clicking the Preview button. The Customize Posts plugin provides a way to get around this, and also provides a live preview of the changes. Fixing this underlying issue of incorrectly persisting postmeta when doing a preview is captured in #20299. The current Customize Posts UI for editing postmeta is just a non-user-firendly first stab; future iterations should make it easy to add new controls to manage postmeta, just as metaboxes are added to the post editor.

This project is collaborating with the Front-end Editor project, which is also being re-written to leverage the Customizer as the framework for previewing and persisting changes. See #20 and wp-front-end-editor#87.

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.

This Customize Posts plugin is not to be confused with 10up's Post Customizer plugin which is a complimentary effort but seeks to address different use cases. The two plugin projects have opened a discussion to collaborate where possible.

Screenshots

Edit posts and postmeta in the Customizer to preview them

Edit posts and postmeta in the Customizer to preview them

Customize link is moved to top of admin bar, and is made available to authors and editors in addition to administrators

Customize link is moved to top of admin bar, and is made available to authors and editors in addition to administrators

Changelog

0.2.3

Change method for registering scripts/styles to fix conflict w/ Jetpack. PR #26

0.2.2

Add compatibility with WordPress 4.1 now that the Customizer has a proper JS API.

0.2.1

Supply missing selected attribute on post_status dropdown.

0.2.0

Initial release on WordPress.org. Key new features:

  • Postmeta can now be added, modified, and deleted—all of actions which are fully previewable.
  • Grant customize capability to authors and editors who normally can't access the Customizer, so they can edit posts there.
  • Move the “Customize” admin bar link to the top level, and add one for editors and authors.
  • Allow the Page Template and Featured Image to be modified and previewed.