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

Commit a4a86d4

Browse files
committed
jQuery deprecation fix, callback validate requires casting for typesafe comparison.
Signed-off-by: Kevin Provance <kevin.provance@gmail.com>
1 parent 1197503 commit a4a86d4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

redux-core/inc/fields/multi_text/redux-multi-text.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363

6464
redux.field_objects.multi_text.remove( el );
6565

66-
el.find( '.redux-multi-text-add' ).click(
66+
el.find( '.redux-multi-text-add' ).on(
67+
'click',
6768
function() {
6869
var i;
6970
var lis;

sample/sample-config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,10 @@ function redux_validate_callback_function( $field, $value, $existing_value ) {
651651
$warning = false;
652652

653653
// Do your validation.
654-
if ( 1 === $value ) {
654+
if ( 1 === (int) $value ) {
655655
$error = true;
656656
$value = $existing_value;
657-
} elseif ( 2 === $value ) {
657+
} elseif ( 2 === (int) $value ) {
658658
$warning = true;
659659
$value = $existing_value;
660660
}

0 commit comments

Comments
 (0)