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

Commit 7d1e373

Browse files
authored
Merge pull request #85 from xwp/develop
Release 0.5.2
2 parents 5e00a13 + 6f38e4c commit 7d1e373

6 files changed

+40
-13
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "xwp/wp-customize-snapshots",
33
"description": "Allow Customizer states to be drafted, and previewed with a private URL.",
4-
"version": "0.5.1",
4+
"version": "0.5.2",
55
"type": "wordpress-plugin",
66
"homepage": "https://github.com/xwp/wp-customize-snapshots",
77
"license": "GPL-2.0+",

customize-snapshots.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Customize Snapshots
44
* Plugin URI: https://github.com/xwp/wp-customize-snapshots
55
* Description: Allow Customizer states to be drafted, and previewed with a private URL.
6-
* Version: 0.5.1
6+
* Version: 0.5.2
77
* Author: XWP
88
* Author URI: https://xwp.co/
99
* License: GPLv2+

js/customize-snapshots.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,10 @@
407407

408408
api.state( 'saved' ).bind( function( saved ) {
409409
if ( saved && ! _.isEmpty( component.schedule.container ) ) {
410+
component.data.dirty = false;
410411
component.data.publishDate = component.getCurrentTime();
411-
component.updateSchedule();
412412
component.scheduleContainerDisplayed.set( false );
413-
component.data.dirty = false;
413+
component.updateSchedule();
414414
}
415415
} );
416416

@@ -765,9 +765,11 @@
765765

766766
// Change update button to schedule.
767767
if ( component.isFutureDate() ) {
768-
save.html( component.data.i18n.scheduleButton );
768+
save.text( component.data.i18n.scheduleButton );
769+
} else if ( api.state( 'snapshot-exists' ).get() ) {
770+
save.text( component.data.i18n.updateButton );
769771
} else {
770-
save.html( component.data.i18n.updateButton );
772+
save.text( component.data.i18n.saveButton );
771773
}
772774

773775
if ( scheduled || component.data.dirty ) {

php/class-customize-snapshot-manager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ public function enqueue_preview_scripts() {
725725
* Enqueue Customizer frontend scripts.
726726
*/
727727
public function enqueue_frontend_scripts() {
728-
if ( ! $this->snapshot ) {
728+
if ( ! $this->snapshot || is_customize_preview() ) {
729729
return;
730730
}
731731
$handle = 'customize-snapshots-frontend';

readme.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Allow Customizer states to be drafted, and previewed with a private URL.
88
**Tags:** [customizer](https://wordpress.org/plugins/tags/customizer), [customize](https://wordpress.org/plugins/tags/customize), [snapshots](https://wordpress.org/plugins/tags/snapshots)
99
**Requires at least:** 4.5.3
1010
**Tested up to:** 4.6
11-
**Stable tag:** 0.5.1
11+
**Stable tag:** 0.5.2
1212
**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
1313

1414
[![Build Status](https://travis-ci.org/xwp/wp-customize-snapshots.svg?branch=master)](https://travis-ci.org/xwp/wp-customize-snapshots) [![Coverage Status](https://coveralls.io/repos/xwp/wp-customize-snapshots/badge.svg?branch=master)](https://coveralls.io/github/xwp/wp-customize-snapshots) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.svg)](http://gruntjs.com) [![devDependency Status](https://david-dm.org/xwp/wp-customize-snapshots/dev-status.svg)](https://david-dm.org/xwp/wp-customize-snapshots#info=devDependencies)
@@ -87,15 +87,27 @@ if ( ! $bypass_object_cache ) {
8787

8888
## Changelog ##
8989

90+
### 0.5.2 - 2016-08-17 ###
91+
* Fixed: Prevent enqueueing frontend JS in the customizer preview. This was erroneously causing the customize_snapshot_uuid param to get injected into links in the preview. See [#80](https://github.com/xwp/wp-customize-snapshots/pull/80).
92+
* Fixed: Ensure that Update button gets disabled and reset to Save once changes have been published. See [#83](https://github.com/xwp/wp-customize-snapshots/pull/83).
93+
94+
See full commit log: [`0.5.1...0.5.2`](https://github.com/xwp/wp-customize-snapshots/compare/0.5.0...0.5.1)
95+
96+
Issues in milestone: [`milestone:0.5.2`](https://github.com/xwp/wp-customize-snapshots/issues?q=milestone%3A0.5.2)
97+
98+
Props: Weston Ruter (<a href="https://github.com/westonruter" class="user-mention">@westonruter</a>), Utkarsh Patel (<a href="https://github.com/PatelUtkarsh" class="user-mention">@PatelUtkarsh</a>)
99+
100+
### 0.5.1 - 2016-08-23 ###
90101
* Added: Pass `Customize_Snapshot` instance as second param to `customize_snapshot_save` filter. See [#77](https://github.com/xwp/wp-customize-snapshots/pull/77).
91102
* Fixed: Restrict user from publishing or scheduling a snapshot unless they can `customize_publish`. See [#74](https://github.com/xwp/wp-customize-snapshots/pull/74).
92103
* Fixed: Fix logic for when to show the snapshot publish error admin notice and show underlying error codes when there are validity errors. See [#79](https://github.com/xwp/wp-customize-snapshots/pull/79).
93104

94-
See full commit log: [`0.5.0...0.5.1`](https://github.com/xwp/wp-customize-posts/compare/0.5.0...0.5.1)
105+
See full commit log: [`0.5.0...0.5.1`](https://github.com/xwp/wp-customize-snapshots/compare/0.5.0...0.5.1)
95106

96107
Issues in milestone: [`milestone:0.5.1`](https://github.com/xwp/wp-customize-snapshots/issues?q=milestone%3A0.5.1)
97108

98109
Props: Utkarsh Patel (<a href="https://github.com/PatelUtkarsh" class="user-mention">@PatelUtkarsh</a>), Luke Gedeon (<a href="https://github.com/lgedeon" class="user-mention">@lgedeon</a>), Weston Ruter (<a href="https://github.com/westonruter" class="user-mention">@westonruter</a>)
110+
99111
### 0.5.0 - 2016-08-11 ###
100112
Added:
101113

@@ -125,7 +137,7 @@ Removed:
125137

126138
* The <code>scope</code> parameter has been removed, as has storing non-<code>dirty</code> settings in a snapshot. (<a href="https://github.com/xwp/wp-customize-snapshots/pull/59" class="issue-link js-issue-link" data-url="https://github.com/xwp/wp-customize-snapshots/issues/59" data-id="164943805" >#59</a>)
127139

128-
See full commit log: [`0.4.0...0.5.0`](https://github.com/xwp/wp-customize-posts/compare/0.4.0...0.5.0)
140+
See full commit log: [`0.4.0...0.5.0`](https://github.com/xwp/wp-customize-snapshots/compare/0.4.0...0.5.0)
129141

130142
Issues in milestone: [`milestone:0.5.0`](https://github.com/xwp/wp-customize-snapshots/issues?q=milestone%3A0.5.0)
131143

readme.txt

+16-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: westonruter, valendesigns, xwp, newscorpau
33
Requires at least: 4.5.3
44
Tested up to: 4.6
5-
Stable tag: 0.5.1
5+
Stable tag: 0.5.2
66
License: GPLv2 or later
77
License URI: http://www.gnu.org/licenses/gpl-2.0.html
88
Tags: customizer, customize, snapshots
@@ -64,11 +64,24 @@ if ( ! $bypass_object_cache ) {
6464

6565
== Changelog ==
6666

67+
= 0.5.2 - 2016-08-17 =
68+
69+
* Fixed: Prevent enqueueing frontend JS in the customizer preview. This was erroneously causing the customize_snapshot_uuid param to get injected into links in the preview. See [#80](https://github.com/xwp/wp-customize-snapshots/pull/80).
70+
* Fixed: Ensure that Update button gets disabled and reset to Save once changes have been published. See [#83](https://github.com/xwp/wp-customize-snapshots/pull/83).
71+
72+
See full commit log: [`0.5.1...0.5.2`](https://github.com/xwp/wp-customize-snapshots/compare/0.5.0...0.5.1)
73+
74+
Issues in milestone: [`milestone:0.5.2`](https://github.com/xwp/wp-customize-snapshots/issues?q=milestone%3A0.5.2)
75+
76+
Props: Weston Ruter (<a href="https://github.com/westonruter" class="user-mention">@westonruter</a>), Utkarsh Patel (<a href="https://github.com/PatelUtkarsh" class="user-mention">@PatelUtkarsh</a>)
77+
78+
= 0.5.1 - 2016-08-23 =
79+
6780
* Added: Pass `Customize_Snapshot` instance as second param to `customize_snapshot_save` filter. See [#77](https://github.com/xwp/wp-customize-snapshots/pull/77).
6881
* Fixed: Restrict user from publishing or scheduling a snapshot unless they can `customize_publish`. See [#74](https://github.com/xwp/wp-customize-snapshots/pull/74).
6982
* Fixed: Fix logic for when to show the snapshot publish error admin notice and show underlying error codes when there are validity errors. See [#79](https://github.com/xwp/wp-customize-snapshots/pull/79).
7083

71-
See full commit log: [`0.5.0...0.5.1`](https://github.com/xwp/wp-customize-posts/compare/0.5.0...0.5.1)
84+
See full commit log: [`0.5.0...0.5.1`](https://github.com/xwp/wp-customize-snapshots/compare/0.5.0...0.5.1)
7285

7386
Issues in milestone: [`milestone:0.5.1`](https://github.com/xwp/wp-customize-snapshots/issues?q=milestone%3A0.5.1)
7487

@@ -104,7 +117,7 @@ Removed:
104117

105118
* The <code>scope</code> parameter has been removed, as has storing non-<code>dirty</code> settings in a snapshot. (<a href="https://github.com/xwp/wp-customize-snapshots/pull/59" class="issue-link js-issue-link" data-url="https://github.com/xwp/wp-customize-snapshots/issues/59" data-id="164943805" >#59</a>)
106119

107-
See full commit log: [`0.4.0...0.5.0`](https://github.com/xwp/wp-customize-posts/compare/0.4.0...0.5.0)
120+
See full commit log: [`0.4.0...0.5.0`](https://github.com/xwp/wp-customize-snapshots/compare/0.4.0...0.5.0)
108121

109122
Issues in milestone: [`milestone:0.5.0`](https://github.com/xwp/wp-customize-snapshots/issues?q=milestone%3A0.5.0)
110123

0 commit comments

Comments
 (0)