Skip to content

Commit 31670e3

Browse files
authored
Fix typos in JS files (#76)
* Correct typo * Fix JS spelling errors * fix correction error
1 parent 708e591 commit 31670e3

22 files changed

+48
-48
lines changed

assets/inc/color-picker-alpha/wp-color-picker-alpha.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
* @since ACF 3.0.0
7777
* @access private
7878
*
79-
* @param {Object|*} The color instance if not defined return the cuurent color.
79+
* @param {Object|*} The color instance if not defined return the current color.
8080
*
8181
* @return {string} The element's color.
8282
*/

assets/inc/select2/3/select2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ the specific language governing permissions and limitations under the Apache Lic
13221322
data: data,
13231323
success: function ( data ) {
13241324
// TODO - replace query.page with query so users have access to term, page, etc.
1325-
// added query as third paramter to keep backwards compatibility
1325+
// added query as third parameter to keep backwards compatibility
13261326
var results = options.results(
13271327
data,
13281328
query.page,

assets/inc/select2/4/select2.full.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5230,7 +5230,7 @@
52305230
'data'
52315231
);
52325232

5233-
// Don't re-select already selected resulte
5233+
// Don't re-select already selected result
52345234
if (
52355235
( data.element != null && data.element.selected ) ||
52365236
( data.element == null && data.selected )
@@ -7546,7 +7546,7 @@
75467546
deltaY = 0;
75477547
}
75487548

7549-
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
7549+
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatibility
75507550
delta = deltaY === 0 ? deltaX : deltaY;
75517551

75527552
// New school wheel delta (wheel event)
@@ -7658,7 +7658,7 @@
76587658
}
76597659

76607660
function shouldAdjustOldDeltas( orgEvent, absDelta ) {
7661-
// If this is an older event and the delta is divisable by 120,
7661+
// If this is an older event and the delta is divisible by 120,
76627662
// then we are assuming that the browser is treating this as an
76637663
// older mouse wheel event and that we should divide the deltas
76647664
// by 40 to try and get a more usable deltaFactor.

assets/inc/select2/4/select2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5238,7 +5238,7 @@
52385238
'data'
52395239
);
52405240

5241-
// Don't re-select already selected resulte
5241+
// Don't re-select already selected result
52425242
if (
52435243
( data.element != null && data.element.selected ) ||
52445244
( data.element == null && data.selected )

assets/inc/timepicker/jquery-ui-timepicker-addon.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,7 @@
25662566

25672567
/*
25682568
* override parseDate() because UI 1.8.14 throws an error about "Extra characters"
2569-
* An option in datapicker to ignore extra format characters would be nicer.
2569+
* An option in datepicker to ignore extra format characters would be nicer.
25702570
*/
25712571
$.datepicker._base_parseDate = $.datepicker.parseDate;
25722572
$.datepicker.parseDate = function ( format, value, settings ) {

assets/src/js/_acf-compatibility.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @since ACF 5.6.9
99
*
1010
* @param object instance The object to modify.
11-
* @param object compatibilty Optional. The compatibilty layer.
11+
* @param object compatibilty Optional. The compatibility layer.
1212
* @return object compatibilty
1313
*/
1414

@@ -94,7 +94,7 @@
9494
k1 = k1 || '';
9595
k2 = k2 || '';
9696

97-
// compability
97+
// compatibility
9898
var compatKey = k2 ? k1 + '.' + k2 : k1;
9999
var compats = {
100100
'image.select': 'Select Image',
@@ -281,7 +281,7 @@
281281
/*
282282
* acf.model
283283
*
284-
* This model acts as a scafold for action.event driven modules
284+
* This model acts as a scaffold for action.event driven modules
285285
*
286286
* @type object
287287
* @date 8/09/2014

assets/src/js/_acf-condition.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
var fieldType = field.get( 'type' );
9797
var operator = rule.operator;
9898

99-
// get avaibale conditions
99+
// get available conditions
100100
var conditionTypes = acf.getConditionTypes( {
101101
fieldType: fieldType,
102102
operator: operator,
@@ -211,7 +211,7 @@
211211
operator: '',
212212
} );
213213

214-
// clonse available types
214+
// clone available types
215215
var types = [];
216216

217217
// loop

assets/src/js/_acf-field-accordion.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// bail early if is cell
2020
if ( this.$el.is( 'td' ) ) return;
2121

22-
// enpoint
22+
// endpoint
2323
if ( this.get( 'endpoint' ) ) {
2424
return this.remove();
2525
}
@@ -201,7 +201,7 @@
201201
},
202202

203203
onClick: function ( e, $el ) {
204-
// prevent Defailt
204+
// prevent Default
205205
e.preventDefault();
206206

207207
// open close

assets/src/js/_acf-field-google-map.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
* @since ACF 5.0.0
7979
*
8080
* @param object|string val The new value.
81-
* @param object map The Google Map isntance.
81+
* @param object map The Google Map instance.
8282
* @param object field The field instance.
8383
*/
8484
acf.doAction( 'google_map_change', val, this.map, this );
@@ -223,7 +223,7 @@
223223
* @date 12/02/2014
224224
* @since ACF 5.0.0
225225
*
226-
* @param object map The Google Map isntance.
226+
* @param object map The Google Map instance.
227227
* @param object marker The Google Map marker isntance.
228228
* @param object field The field instance.
229229
*/
@@ -560,12 +560,12 @@
560560
/**
561561
* withAPI
562562
*
563-
* Loads the Google Maps API library and troggers callback.
563+
* Loads the Google Maps API library and triggers callback.
564564
*
565565
* @date 28/3/19
566566
* @since ACF 5.7.14
567567
*
568-
* @param function callback The callback to excecute.
568+
* @param function callback The callback to execute.
569569
* @return void
570570
*/
571571

assets/src/js/_acf-field.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
// inherit $field data
4444
this.inherit( $field );
4545

46-
// inherit controll data
46+
// inherit control data
4747
this.inherit( this.$control() );
4848
},
4949

@@ -511,7 +511,7 @@
511511
// hasValue: true
512512
} );
513513

514-
// clonse available types
514+
// clone available types
515515
var types = [];
516516

517517
// loop

assets/src/js/_acf-helpers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* mountHelper
3131
*
32-
* Adds compatiblity for the 'unmount' and 'remount' actions added in 5.8.0
32+
* Adds compatibility for the 'unmount' and 'remount' actions added in 5.8.0
3333
*
3434
* @date 7/3/19
3535
* @since ACF 5.7.14
@@ -164,7 +164,7 @@
164164
return false;
165165
}
166166

167-
// visiblity
167+
// visibility
168168
$ths.each( function ( i ) {
169169
// vars
170170
var $th = $( this );

assets/src/js/_acf-media.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
// add events
143143
this.addFrameEvents( frame, options );
144144

145-
// strore frame
145+
// store frame
146146
this.frame = frame;
147147
},
148148

@@ -201,8 +201,8 @@
201201
// add _acfuploader
202202
// this is super wack!
203203
// if you add _acfuploader to the options.library args, new uploads will not be added to the library view.
204-
// this has been traced back to the wp.media.model.Query initialize function (which can't be overriden)
205-
// Adding any custom args will cause the Attahcments to not observe the uploader queue
204+
// this has been traced back to the wp.media.model.Query initialize function (which can't be overridden)
205+
// Adding any custom args will cause the Attachments to not observe the uploader queue
206206
// To bypass this security issue, we add in the args AFTER the Query has been initialized
207207
// options.library._acfuploader = settings.field;
208208
if (
@@ -447,7 +447,7 @@
447447
filter.props._acfuploader = field;
448448
} );
449449

450-
// add _acfuplaoder to search
450+
// add _acfuploader to search
451451
var search = toolbar.get( 'search' );
452452
search.model.attributes._acfuploader = field;
453453

@@ -715,7 +715,7 @@
715715
// data[ pair.name ] = pair.value;
716716
//});
717717

718-
// Serialize data more thoroughly to allow chckbox inputs to save.
718+
// Serialize data more thoroughly to allow checkbox inputs to save.
719719
data = acf.serializeForAjax( this.$el );
720720

721721
this.controller.trigger( 'attachment:compat:waiting', [

assets/src/js/_acf-model.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
/**
5151
* Model
5252
*
53-
* Base class for all inheritence
53+
* Base class for all inheritance
5454
*
5555
* @date 14/12/17
5656
* @since ACF 5.6.5
@@ -60,7 +60,7 @@
6060
*/
6161

6262
var Model = ( acf.Model = function () {
63-
// generate uique client id
63+
// generate unique client id
6464
this.cid = acf.uniqueId( 'acf' );
6565

6666
// set vars to avoid modifying prototype
@@ -743,7 +743,7 @@
743743
/**
744744
* remove
745745
*
746-
* Removes the element and listenters
746+
* Removes the element and listeners
747747
*
748748
* @date 19/12/17
749749
* @since ACF 5.6.5

assets/src/js/_acf-postbox.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
},
9191

9292
setup: function ( props ) {
93-
// compatibilty
93+
// compatibility
9494
if ( props.editLink ) {
9595
props.edit = props.editLink;
9696
}

assets/src/js/_acf-select2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
this.$el.select2( 'destroy' );
291291
}
292292

293-
// destory via HTML (duplicating HTML does not contain data)
293+
// destroy via HTML (duplicating HTML does not contain data)
294294
this.$el.siblings( '.select2-container' ).remove();
295295
},
296296
} );

assets/src/js/_acf-tooltip.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
.removeClass( 'right left bottom top' )
9797
.css( { top: 0, left: 0 } );
9898

99-
// Declare tollerance to edge of screen.
99+
// Declare tolerance to edge of screen.
100100
var tolerance = 10;
101101

102102
// Find target position.
@@ -142,7 +142,7 @@
142142
$tooltip.addClass( 'bottom' );
143143
top = targetTop + targetHeight - tooltipTop;
144144

145-
// No colision with edges.
145+
// No collision with edges.
146146
} else {
147147
$tooltip.addClass( 'top' );
148148
}

assets/src/js/_acf-validation.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
/**
287287
* validate
288288
*
289-
* Vaildates the form via AJAX.
289+
* Validates the form via AJAX.
290290
*
291291
* @date 4/9/18
292292
* @since ACF 5.7.5
@@ -596,7 +596,7 @@
596596
/**
597597
* acf.lockForm
598598
*
599-
* Locks a form by disabeling its primary inputs and showing a spinner.
599+
* Locks a form by disabling its primary inputs and showing a spinner.
600600
*
601601
* @date 4/9/18
602602
* @since ACF 5.7.5
@@ -622,7 +622,7 @@
622622
/**
623623
* acf.unlockForm
624624
*
625-
* Unlocks a form by enabeling its primary inputs and hiding all spinners.
625+
* Unlocks a form by enabling its primary inputs and hiding all spinners.
626626
*
627627
* @date 4/9/18
628628
* @since ACF 5.7.5
@@ -1034,7 +1034,7 @@
10341034
return;
10351035
}
10361036

1037-
// Custommize the editor.
1037+
// Customize the editor.
10381038
this.customizeEditor();
10391039
},
10401040
customizeEditor: function () {
@@ -1129,7 +1129,7 @@
11291129
} );
11301130
}
11311131

1132-
// Rejext promise and prevent savePost().
1132+
// Reject promise and prevent savePost().
11331133
reject( 'Validation failed.' );
11341134
},
11351135
success: function () {

assets/src/js/_acf.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@
838838
* @date 17/12/18
839839
* @since ACF 5.8.0
840840
*
841-
* @param jQUery $el The element or form to serialize.
841+
* @param jQuery $el The element or form to serialize.
842842
* @return object
843843
*/
844844
acf.serializeForAjax = function ( $el ) {
@@ -2012,7 +2012,7 @@
20122012
/**
20132013
* acf.renderSelect
20142014
*
2015-
* Renders the innter html for a select field.
2015+
* Renders the inner html for a select field.
20162016
*
20172017
* @date 19/2/18
20182018
* @since ACF 5.6.9
@@ -2266,7 +2266,7 @@
22662266
/**
22672267
* acf.onceInView
22682268
*
2269-
* Watches for a dom element to become visible in the browser and then excecutes the passed callback.
2269+
* Watches for a dom element to become visible in the browser and then executes the passed callback.
22702270
*
22712271
* @date 28/8/19
22722272
* @since ACF 5.8.1

assets/src/js/_browse-fields-modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
}
235235

236236
// Select first tab with selected field type
237-
// If type selected is wthin Popular, select Popular Tab
237+
// If type selected is within Popular, select Popular Tab
238238
// Else select first tab the type belongs
239239
const fieldTypes = this.getFieldTypes();
240240
const isFieldTypePopular =

assets/src/js/_field-group-conditions.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
choice.disabled = true;
141141
}
142142

143-
// calulate indents
143+
// calculate indents
144144
var indents = fieldObject.getParents().length;
145145
choice.text = '- '.repeat( indents ) + choice.text;
146146

@@ -331,7 +331,7 @@
331331
},
332332

333333
onClickAdd: function ( e, $el ) {
334-
// duplciate
334+
// duplicate
335335
var $rule = acf.duplicate( $el.closest( '.rule' ) );
336336

337337
// render

0 commit comments

Comments
 (0)