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

Rename createPost to startCreatePostFlow and editPost to startEditPostFlow #284

Merged
merged 1 commit into from
Sep 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions js/customize-posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@

editButton.on( 'click', function( e ) {
e.preventDefault();
component.editPost( {
component.startEditPostFlow( {
postId: parseInt( control.setting.get(), 10 ),
initiatingButton: $( this ),
originatingConstruct: control,
Expand All @@ -598,8 +598,7 @@
} );
createButton.on( 'click', function( e ) {
e.preventDefault();

component.createPost( {
component.startCreatePostFlow( {
postType: 'page',
initiatingButton: $( this ),
originatingConstruct: control,
Expand Down Expand Up @@ -633,7 +632,7 @@
* @param {Function} [args.breadcrumbReturnCallback] - Function that is called when breadcrumbs are followed back. The post setting is passed as its argument.
* @returns {jQuery.promise} Promise from wp.customize.Posts.insertAutoDraftPost().
*/
component.createPost = function createPost( args ) {
component.startCreatePostFlow = function startCreatePostFlow( args ) {
var promise, options, postTypeObj, errorCode = 'create_post_failure';

options = _.extend(
Expand Down Expand Up @@ -753,7 +752,7 @@
* @param {Function} [args.breadcrumbReturnCallback] - Function that is called when breadcrumbs are followed back. The post setting is passed as its argument.
* @returns {jQuery.promise} Promise from wp.customize.Posts.ensurePosts().
*/
component.editPost = function editPost( args ) {
component.startEditPostFlow = function startEditPostFlow( args ) {
var options, promise, errorCode = 'edit_post_failure';

options = _.extend(
Expand Down