Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Allow new posts and pages to be created #48

Closed
westonruter opened this issue Mar 9, 2016 · 0 comments · Fixed by #134
Closed

Allow new posts and pages to be created #48

westonruter opened this issue Mar 9, 2016 · 0 comments · Fixed by #134
Assignees
Labels
Milestone

Comments

@westonruter
Copy link
Contributor

In addition to editing existing posts, entirely new posts/pages should also be able to be created in the Customizer. There are two approaches we could go here:

(1) It could use the approach of creating new nav_menu_item posts where the pre-created post has a negative post ID which is used to designate a post that has not been inserted yet.
(2) Or it could actually create an auto-draft post in the DB which would give us a real ID to reference.

It would definitely be less complicated to implement (2), since all the DB queries would work in the preview without having to inject pseudo-posts into query results. However, I also like (1) because it is more philosophically pure in that it truly does not touch the DB before Save & Publish.

Once the technical architecture for representing a pre-created post is settled, there is then the question of the UI for creating these posts. One integration option is in Customizer Nav Menus via the Add Item UI (see #49). Another integration option is to extend the post type's panel to add a “New Post” button before the list of post sections (see #50).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants