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

Commit cce9704

Browse files
committed
Fix deprecated jQuery
Signed-off-by: Kevin Provance <kevin.provance@gmail.com>
1 parent 3482e13 commit cce9704

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

redux-core/inc/fields/spinner/class-redux-spinner.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ public function enqueue() {
123123
'redux-field-spinner-custom-js',
124124
Redux_Core::$url . 'inc/fields/spinner/vendor/jquery.ui.spinner' . Redux_Functions::is_min() . '.js',
125125
array( 'jquery', 'redux-js' ),
126-
$this->timestamp,
126+
Redux_Core::$version,
127127
true
128128
);
129129

130130
wp_enqueue_script(
131131
'redux-field-spinner-js',
132132
Redux_Core::$url . 'inc/fields/spinner/redux-spinner' . Redux_Functions::is_min() . '.js',
133133
array( 'jquery', 'redux-field-spinner-custom-js', 'jquery-ui-core', 'jquery-ui-dialog', 'redux-js' ),
134-
$this->timestamp,
134+
Redux_Core::$version,
135135
true
136136
);
137137

@@ -140,8 +140,7 @@ public function enqueue() {
140140
'redux-field-spinner-css',
141141
Redux_Core::$url . 'inc/fields/spinner/redux-spinner.css',
142142
array(),
143-
$this->timestamp,
144-
'all'
143+
$this->timestamp
145144
);
146145
}
147146
}
@@ -171,15 +170,15 @@ public function output( $style = '' ) {
171170
* Compile CSS data for output.
172171
*
173172
* @param mixed $value Value.
174-
* @param array $output .
173+
* @param mixed $output .
175174
*
176175
* @return string
177176
*/
178-
private function parse_css( $value, $output ) {
177+
private function parse_css( $value, $output ): string {
179178
// No notices.
180179
$css = '';
181180

182-
$unit = isset( $this->field['output_unit'] ) ? $this->field['output_unit'] : 'px';
181+
$unit = $this->field['output_unit'] ?? 'px';
183182

184183
// Must be an array.
185184
if ( is_array( $output ) ) {

redux-core/inc/fields/spinner/vendor/jquery.ui.spinner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ jQuery.uaMatch = function( ua ) {
468468
'focus' + eventNamespace,
469469
function() {
470470
function selectAll() {
471-
_this.element.select();
471+
_this.element.trigger( 'select' );
472472
}
473473

474474
if ( msie ) {
@@ -746,7 +746,7 @@ jQuery.uaMatch = function( ua ) {
746746

747747
if ( ! suppressFireEvent ) {
748748
_this.selfChange = true;
749-
_this.element.change();
749+
_this.element.trigger( 'change' );
750750
_this.selfChange = false;
751751
}
752752
},

redux-core/inc/fields/spinner/vendor/jquery.ui.spinner.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)