|
588 | 588 |
|
589 | 589 | editButton.on( 'click', function( e ) {
|
590 | 590 | e.preventDefault();
|
591 |
| - component.editPost( { |
| 591 | + component.startEditPostFlow( { |
592 | 592 | postId: parseInt( control.setting.get(), 10 ),
|
593 | 593 | initiatingButton: $( this ),
|
594 | 594 | originatingConstruct: control,
|
|
598 | 598 | } );
|
599 | 599 | createButton.on( 'click', function( e ) {
|
600 | 600 | e.preventDefault();
|
601 |
| - |
602 |
| - component.createPost( { |
| 601 | + component.startCreatePostFlow( { |
603 | 602 | postType: 'page',
|
604 | 603 | initiatingButton: $( this ),
|
605 | 604 | originatingConstruct: control,
|
|
633 | 632 | * @param {Function} [args.breadcrumbReturnCallback] - Function that is called when breadcrumbs are followed back. The post setting is passed as its argument.
|
634 | 633 | * @returns {jQuery.promise} Promise from wp.customize.Posts.insertAutoDraftPost().
|
635 | 634 | */
|
636 |
| - component.createPost = function createPost( args ) { |
| 635 | + component.startCreatePostFlow = function startCreatePostFlow( args ) { |
637 | 636 | var promise, options, postTypeObj, errorCode = 'create_post_failure';
|
638 | 637 |
|
639 | 638 | options = _.extend(
|
|
753 | 752 | * @param {Function} [args.breadcrumbReturnCallback] - Function that is called when breadcrumbs are followed back. The post setting is passed as its argument.
|
754 | 753 | * @returns {jQuery.promise} Promise from wp.customize.Posts.ensurePosts().
|
755 | 754 | */
|
756 |
| - component.editPost = function editPost( args ) { |
| 755 | + component.startEditPostFlow = function startEditPostFlow( args ) { |
757 | 756 | var options, promise, errorCode = 'edit_post_failure';
|
758 | 757 |
|
759 | 758 | options = _.extend(
|
|
0 commit comments