Skip to content

Commit

Permalink
Merge branch 'release/2.1.2' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
JDGrimes committed Sep 13, 2016
2 parents 5dce2c5 + bc0ae91 commit 4805032
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wordpoints",
"version": "2.1.1",
"version": "2.1.2",
"description": "Gamify your WordPress site with points.",
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions src/admin/assets/js/hooks/views.manifested.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ Fields = Backbone.Model.extend({

if ( _.isArray( field ) ) {

field = _.clone( field );

if ( 1 === field.length ) {
field = field.shift();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,27 @@ hooks.on( 'init', function () {
hooks.Reactors.add( new hooks.reactor.Points( data.points_legacy ) );
}

// Register the legacy periods extension.
hooks.Extensions.add(
new hooks.extension.Periods( { slug: 'points_legacy_periods' } )
);

// Don't show regular periods extension when legacy periods are in use.
var periods = hooks.Extensions.get( 'periods' ),
nativeShowForReaction = periods.showForReaction;

// Legacy periods extension.
var LegacyPeriods = new hooks.extension.Periods(
{ slug: 'points_legacy_periods' }
);

LegacyPeriods.showForReaction = function ( reaction ) {

if ( ! reaction.model.get( 'points_legacy_periods' ) ) {
return false;
}

return nativeShowForReaction( reaction );
};

// Register the legacy periods extension.
hooks.Extensions.add( LegacyPeriods );

// Don't show regular periods extension when legacy periods are in use.
periods.showForReaction = function ( reaction ) {

if ( reaction.model.get( 'points_legacy_periods' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion src/includes/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @const WORDPOINTS_VERSION
*/
define( 'WORDPOINTS_VERSION', '2.1.1' );
define( 'WORDPOINTS_VERSION', '2.1.2' );

/**
* The full path to the plugin's main directory.
Expand Down
Binary file modified src/languages/wordpoints-es_ES.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions src/languages/wordpoints-es_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WordPoints 1.5.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpoints\n"
"POT-Creation-Date: 2016-09-12 19:58:08+00:00\n"
"POT-Creation-Date: 2016-09-13 15:40:46+00:00\n"
"PO-Revision-Date: 2015-02-24 19:20+0200\n"
"Last-Translator: Gonzalo Exequiel Pedone <hipersayan.x@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/wordpoints/"
Expand Down Expand Up @@ -198,7 +198,7 @@ msgstr "Por %s"
msgid "Visit module site"
msgstr "Visitar sitio módulo"

#. #-#-#-#-# wordpoints.pot (WordPoints 2.1.1) #-#-#-#-#
#. #-#-#-#-# wordpoints.pot (WordPoints 2.1.2) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: admin/includes/functions.php:69
#: components/points/admin/includes/functions.php:316
Expand Down
Binary file modified src/languages/wordpoints-lt.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions src/languages/wordpoints-lt.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WordPoints 1.10.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpoints\n"
"POT-Creation-Date: 2016-09-12 19:58:08+00:00\n"
"POT-Creation-Date: 2016-09-13 15:40:46+00:00\n"
"PO-Revision-Date: 2015-06-22 19:24+0200\n"
"Last-Translator: Rimantas <info@auksinas.lt>\n"
"Language-Team: Lithuanian <https://hosted.weblate.org/projects/wordpoints/"
Expand Down Expand Up @@ -200,7 +200,7 @@ msgstr ""
msgid "Visit module site"
msgstr "Apsilankyti modulio puslapyje"

#. #-#-#-#-# wordpoints.pot (WordPoints 2.1.1) #-#-#-#-#
#. #-#-#-#-# wordpoints.pot (WordPoints 2.1.2) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: admin/includes/functions.php:69
#: components/points/admin/includes/functions.php:316
Expand Down
Binary file modified src/languages/wordpoints-pt_BR.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions src/languages/wordpoints-pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WordPoints_pt_BR\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpoints\n"
"POT-Creation-Date: 2016-09-12 19:58:08+00:00\n"
"POT-Creation-Date: 2016-09-13 15:40:46+00:00\n"
"PO-Revision-Date: 2015-08-27 23:54+0200\n"
"Last-Translator: Leonardo Faria <leomedufu@yahoo.com.br>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
Expand Down Expand Up @@ -197,7 +197,7 @@ msgstr "Por %s"
msgid "Visit module site"
msgstr "Visite o site de módulos"

#. #-#-#-#-# wordpoints.pot (WordPoints 2.1.1) #-#-#-#-#
#. #-#-#-#-# wordpoints.pot (WordPoints 2.1.2) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: admin/includes/functions.php:69
#: components/points/admin/includes/functions.php:316
Expand Down
6 changes: 3 additions & 3 deletions src/languages/wordpoints.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the same license as the WordPoints package.
msgid ""
msgstr ""
"Project-Id-Version: WordPoints 2.1.1\n"
"Project-Id-Version: WordPoints 2.1.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpoints\n"
"POT-Creation-Date: 2016-09-12 19:58:08+00:00\n"
"POT-Creation-Date: 2016-09-13 15:40:46+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -191,7 +191,7 @@ msgstr ""
msgid "Visit module site"
msgstr ""

#. #-#-#-#-# wordpoints.pot (WordPoints 2.1.1) #-#-#-#-#
#. #-#-#-#-# wordpoints.pot (WordPoints 2.1.2) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: admin/includes/functions.php:69
#: components/points/admin/includes/functions.php:316
Expand Down
13 changes: 12 additions & 1 deletion src/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TPXS6
Tags: points, awards, rewards, cubepoints, credits, gamify, multisite, ranks
Requires at least: 4.4
Tested up to: 4.7-alpha-38178
Stable tag: 2.1.1
Stable tag: 2.1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -117,6 +117,13 @@ screens.

This plugin adheres to [Semantic Versioning](http://semver.org/).

= 2.1.2 = 2016-09-13 =

##### Fixed

- The form for legacy Rate Limits being displayed on non-legacy reactions. It is only
supposed to display on reactions imported with the Importer module.

= 2.1.1 - 2016-09-12 =

##### Fixed
Expand Down Expand Up @@ -433,6 +440,10 @@ choosing the points type to add it to.
* Initial release

== Upgrade Notice ==
= 2.1.2 =
* Fixes a bug that caused two Rate Limit forms to be displayed for the Visit event
reactions.

= 2.1.1 =
* Fixes the Rate Limits for the Visit event.

Expand Down
4 changes: 2 additions & 2 deletions src/wordpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: WordPoints
* Plugin URI: http://wordpoints.org/
* Description: Create one or more points systems for your site, and reward user activity.
* Version: 2.1.1
* Version: 2.1.2
* Author: J.D. Grimes
* Author URI: http://codesymphony.co/
* License: GPLv2
Expand Down Expand Up @@ -40,8 +40,8 @@
*
* @package WordPoints
* @author J.D. Grimes <jdg@codesymphony.co>
* @version 2.1.1
* @license http://opensource.org/licenses/gpl-license.php GPL, version 2 or later.
* @version 2.1.2
* @copyright 2013-2015 J.D. Grimes
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
$I->waitForElement( '#points-user_visit .wordpoints-hook-reaction' );
$I->click( 'Edit', '#points-user_visit .wordpoints-hook-reaction' );
$I->see( 'Rate Limit', '#points-user_visit .wordpoints-hook-reaction' );
$I->cantSeeElement( '#points-user_visit .wordpoints-hook-reaction [name="points_legacy_periods[fire][0][length]"]' );
$I->canSeeOptionIsSelected(
'#points-user_visit .wordpoints-hook-reaction [name="periods[fire][0][length]"]'
, 'Minute'
Expand Down
2 changes: 2 additions & 0 deletions unbuilt/admin/assets/js/hooks/controllers/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Fields = Backbone.Model.extend({

if ( _.isArray( field ) ) {

field = _.clone( field );

if ( 1 === field.length ) {
field = field.shift();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,27 @@ hooks.on( 'init', function () {
hooks.Reactors.add( new hooks.reactor.Points( data.points_legacy ) );
}

// Register the legacy periods extension.
hooks.Extensions.add(
new hooks.extension.Periods( { slug: 'points_legacy_periods' } )
);

// Don't show regular periods extension when legacy periods are in use.
var periods = hooks.Extensions.get( 'periods' ),
nativeShowForReaction = periods.showForReaction;

// Legacy periods extension.
var LegacyPeriods = new hooks.extension.Periods(
{ slug: 'points_legacy_periods' }
);

LegacyPeriods.showForReaction = function ( reaction ) {

if ( ! reaction.model.get( 'points_legacy_periods' ) ) {
return false;
}

return nativeShowForReaction( reaction );
};

// Register the legacy periods extension.
hooks.Extensions.add( LegacyPeriods );

// Don't show regular periods extension when legacy periods are in use.
periods.showForReaction = function ( reaction ) {

if ( reaction.model.get( 'points_legacy_periods' ) ) {
Expand Down

0 comments on commit 4805032

Please sign in to comment.