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

Commit

Permalink
Merge pull request #85 from xwp/develop
Browse files Browse the repository at this point in the history
Release 0.5.2
  • Loading branch information
westonruter authored Aug 28, 2016
2 parents 5e00a13 + 6f38e4c commit 7d1e373
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "xwp/wp-customize-snapshots",
"description": "Allow Customizer states to be drafted, and previewed with a private URL.",
"version": "0.5.1",
"version": "0.5.2",
"type": "wordpress-plugin",
"homepage": "https://github.com/xwp/wp-customize-snapshots",
"license": "GPL-2.0+",
Expand Down
2 changes: 1 addition & 1 deletion customize-snapshots.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Customize Snapshots
* Plugin URI: https://github.com/xwp/wp-customize-snapshots
* Description: Allow Customizer states to be drafted, and previewed with a private URL.
* Version: 0.5.1
* Version: 0.5.2
* Author: XWP
* Author URI: https://xwp.co/
* License: GPLv2+
Expand Down
10 changes: 6 additions & 4 deletions js/customize-snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,10 @@

api.state( 'saved' ).bind( function( saved ) {
if ( saved && ! _.isEmpty( component.schedule.container ) ) {
component.data.dirty = false;
component.data.publishDate = component.getCurrentTime();
component.updateSchedule();
component.scheduleContainerDisplayed.set( false );
component.data.dirty = false;
component.updateSchedule();
}
} );

Expand Down Expand Up @@ -765,9 +765,11 @@

// Change update button to schedule.
if ( component.isFutureDate() ) {
save.html( component.data.i18n.scheduleButton );
save.text( component.data.i18n.scheduleButton );
} else if ( api.state( 'snapshot-exists' ).get() ) {
save.text( component.data.i18n.updateButton );
} else {
save.html( component.data.i18n.updateButton );
save.text( component.data.i18n.saveButton );
}

if ( scheduled || component.data.dirty ) {
Expand Down
2 changes: 1 addition & 1 deletion php/class-customize-snapshot-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ public function enqueue_preview_scripts() {
* Enqueue Customizer frontend scripts.
*/
public function enqueue_frontend_scripts() {
if ( ! $this->snapshot ) {
if ( ! $this->snapshot || is_customize_preview() ) {
return;
}
$handle = 'customize-snapshots-frontend';
Expand Down
18 changes: 15 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Allow Customizer states to be drafted, and previewed with a private URL.
**Tags:** [customizer](https://wordpress.org/plugins/tags/customizer), [customize](https://wordpress.org/plugins/tags/customize), [snapshots](https://wordpress.org/plugins/tags/snapshots)
**Requires at least:** 4.5.3
**Tested up to:** 4.6
**Stable tag:** 0.5.1
**Stable tag:** 0.5.2
**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)

[![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)
Expand Down Expand Up @@ -87,15 +87,27 @@ if ( ! $bypass_object_cache ) {

## Changelog ##

### 0.5.2 - 2016-08-17 ###
* 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).
* 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).

See full commit log: [`0.5.1...0.5.2`](https://github.com/xwp/wp-customize-snapshots/compare/0.5.0...0.5.1)

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

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>)

### 0.5.1 - 2016-08-23 ###
* Added: Pass `Customize_Snapshot` instance as second param to `customize_snapshot_save` filter. See [#77](https://github.com/xwp/wp-customize-snapshots/pull/77).
* 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).
* 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).

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

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

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>)

### 0.5.0 - 2016-08-11 ###
Added:

Expand Down Expand Up @@ -125,7 +137,7 @@ Removed:

* 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>)

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

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

Expand Down
19 changes: 16 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: westonruter, valendesigns, xwp, newscorpau
Requires at least: 4.5.3
Tested up to: 4.6
Stable tag: 0.5.1
Stable tag: 0.5.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: customizer, customize, snapshots
Expand Down Expand Up @@ -64,11 +64,24 @@ if ( ! $bypass_object_cache ) {

== Changelog ==

= 0.5.2 - 2016-08-17 =

* 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).
* 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).

See full commit log: [`0.5.1...0.5.2`](https://github.com/xwp/wp-customize-snapshots/compare/0.5.0...0.5.1)

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

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>)

= 0.5.1 - 2016-08-23 =

* Added: Pass `Customize_Snapshot` instance as second param to `customize_snapshot_save` filter. See [#77](https://github.com/xwp/wp-customize-snapshots/pull/77).
* 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).
* 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).

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

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

Expand Down Expand Up @@ -104,7 +117,7 @@ Removed:

* 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>)

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

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

Expand Down

0 comments on commit 7d1e373

Please sign in to comment.