Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in JS files #76

Merged
merged 4 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/inc/color-picker-alpha/wp-color-picker-alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
* @since ACF 3.0.0
* @access private
*
* @param {Object|*} The color instance if not defined return the cuurent color.
* @param {Object|*} The color instance if not defined return the current color.
*
* @return {string} The element's color.
*/
Expand Down
2 changes: 1 addition & 1 deletion assets/inc/select2/3/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ the specific language governing permissions and limitations under the Apache Lic
data: data,
success: function ( data ) {
// TODO - replace query.page with query so users have access to term, page, etc.
// added query as third paramter to keep backwards compatibility
// added query as third parameter to keep backwards compatibility
var results = options.results(
data,
query.page,
Expand Down
6 changes: 3 additions & 3 deletions assets/inc/select2/4/select2.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -5230,7 +5230,7 @@
'data'
);

// Don't re-select already selected resulte
// Don't re-select already selected result
if (
( data.element != null && data.element.selected ) ||
( data.element == null && data.selected )
Expand Down Expand Up @@ -7546,7 +7546,7 @@
deltaY = 0;
}

// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatibility
delta = deltaY === 0 ? deltaX : deltaY;

// New school wheel delta (wheel event)
Expand Down Expand Up @@ -7658,7 +7658,7 @@
}

function shouldAdjustOldDeltas( orgEvent, absDelta ) {
// If this is an older event and the delta is divisable by 120,
// If this is an older event and the delta is divisible by 120,
// then we are assuming that the browser is treating this as an
// older mouse wheel event and that we should divide the deltas
// by 40 to try and get a more usable deltaFactor.
Expand Down
2 changes: 1 addition & 1 deletion assets/inc/select2/4/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -5238,7 +5238,7 @@
'data'
);

// Don't re-select already selected resulte
// Don't re-select already selected result
if (
( data.element != null && data.element.selected ) ||
( data.element == null && data.selected )
Expand Down
2 changes: 1 addition & 1 deletion assets/inc/timepicker/jquery-ui-timepicker-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2566,7 +2566,7 @@

/*
* override parseDate() because UI 1.8.14 throws an error about "Extra characters"
* An option in datapicker to ignore extra format characters would be nicer.
* An option in datepicker to ignore extra format characters would be nicer.
*/
$.datepicker._base_parseDate = $.datepicker.parseDate;
$.datepicker.parseDate = function ( format, value, settings ) {
Expand Down
6 changes: 3 additions & 3 deletions assets/src/js/_acf-compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @since ACF 5.6.9
*
* @param object instance The object to modify.
* @param object compatibilty Optional. The compatibilty layer.
* @param object compatibilty Optional. The compatibility layer.
* @return object compatibilty
*/

Expand Down Expand Up @@ -94,7 +94,7 @@
k1 = k1 || '';
k2 = k2 || '';

// compability
// compatibility
var compatKey = k2 ? k1 + '.' + k2 : k1;
var compats = {
'image.select': 'Select Image',
Expand Down Expand Up @@ -281,7 +281,7 @@
/*
* acf.model
*
* This model acts as a scafold for action.event driven modules
* This model acts as a scaffold for action.event driven modules
*
* @type object
* @date 8/09/2014
Expand Down
4 changes: 2 additions & 2 deletions assets/src/js/_acf-condition.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
var fieldType = field.get( 'type' );
var operator = rule.operator;

// get avaibale conditions
// get available conditions
var conditionTypes = acf.getConditionTypes( {
fieldType: fieldType,
operator: operator,
Expand Down Expand Up @@ -211,7 +211,7 @@
operator: '',
} );

// clonse available types
// clone available types
var types = [];

// loop
Expand Down
4 changes: 2 additions & 2 deletions assets/src/js/_acf-field-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// bail early if is cell
if ( this.$el.is( 'td' ) ) return;

// enpoint
// endpoint
if ( this.get( 'endpoint' ) ) {
return this.remove();
}
Expand Down Expand Up @@ -201,7 +201,7 @@
},

onClick: function ( e, $el ) {
// prevent Defailt
// prevent Default
e.preventDefault();

// open close
Expand Down
8 changes: 4 additions & 4 deletions assets/src/js/_acf-field-google-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
* @since ACF 5.0.0
*
* @param object|string val The new value.
* @param object map The Google Map isntance.
* @param object map The Google Map instance.
* @param object field The field instance.
*/
acf.doAction( 'google_map_change', val, this.map, this );
Expand Down Expand Up @@ -223,7 +223,7 @@
* @date 12/02/2014
* @since ACF 5.0.0
*
* @param object map The Google Map isntance.
* @param object map The Google Map instance.
* @param object marker The Google Map marker isntance.
* @param object field The field instance.
*/
Expand Down Expand Up @@ -560,12 +560,12 @@
/**
* withAPI
*
* Loads the Google Maps API library and troggers callback.
* Loads the Google Maps API library and triggers callback.
*
* @date 28/3/19
* @since ACF 5.7.14
*
* @param function callback The callback to excecute.
* @param function callback The callback to execute.
* @return void
*/

Expand Down
4 changes: 2 additions & 2 deletions assets/src/js/_acf-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
// inherit $field data
this.inherit( $field );

// inherit controll data
// inherit control data
this.inherit( this.$control() );
},

Expand Down Expand Up @@ -511,7 +511,7 @@
// hasValue: true
} );

// clonse available types
// clone available types
var types = [];

// loop
Expand Down
4 changes: 2 additions & 2 deletions assets/src/js/_acf-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* mountHelper
*
* Adds compatiblity for the 'unmount' and 'remount' actions added in 5.8.0
* Adds compatibility for the 'unmount' and 'remount' actions added in 5.8.0
*
* @date 7/3/19
* @since ACF 5.7.14
Expand Down Expand Up @@ -164,7 +164,7 @@
return false;
}

// visiblity
// visibility
$ths.each( function ( i ) {
// vars
var $th = $( this );
Expand Down
10 changes: 5 additions & 5 deletions assets/src/js/_acf-media.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
// add events
this.addFrameEvents( frame, options );

// strore frame
// store frame
this.frame = frame;
},

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

// add _acfuplaoder to search
// add _acfuploader to search
var search = toolbar.get( 'search' );
search.model.attributes._acfuploader = field;

Expand Down Expand Up @@ -715,7 +715,7 @@
// data[ pair.name ] = pair.value;
//});

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

this.controller.trigger( 'attachment:compat:waiting', [
Expand Down
6 changes: 3 additions & 3 deletions assets/src/js/_acf-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/**
* Model
*
* Base class for all inheritence
* Base class for all inheritance
*
* @date 14/12/17
* @since ACF 5.6.5
Expand All @@ -60,7 +60,7 @@
*/

var Model = ( acf.Model = function () {
// generate uique client id
// generate unique client id
this.cid = acf.uniqueId( 'acf' );

// set vars to avoid modifying prototype
Expand Down Expand Up @@ -743,7 +743,7 @@
/**
* remove
*
* Removes the element and listenters
* Removes the element and listeners
*
* @date 19/12/17
* @since ACF 5.6.5
Expand Down
2 changes: 1 addition & 1 deletion assets/src/js/_acf-postbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
},

setup: function ( props ) {
// compatibilty
// compatibility
if ( props.editLink ) {
props.edit = props.editLink;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/src/js/_acf-select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
this.$el.select2( 'destroy' );
}

// destory via HTML (duplicating HTML does not contain data)
// destroy via HTML (duplicating HTML does not contain data)
this.$el.siblings( '.select2-container' ).remove();
},
} );
Expand Down
4 changes: 2 additions & 2 deletions assets/src/js/_acf-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
.removeClass( 'right left bottom top' )
.css( { top: 0, left: 0 } );

// Declare tollerance to edge of screen.
// Declare tolerance to edge of screen.
var tolerance = 10;

// Find target position.
Expand Down Expand Up @@ -142,7 +142,7 @@
$tooltip.addClass( 'bottom' );
top = targetTop + targetHeight - tooltipTop;

// No colision with edges.
// No collision with edges.
} else {
$tooltip.addClass( 'top' );
}
Expand Down
10 changes: 5 additions & 5 deletions assets/src/js/_acf-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
/**
* validate
*
* Vaildates the form via AJAX.
* Validates the form via AJAX.
*
* @date 4/9/18
* @since ACF 5.7.5
Expand Down Expand Up @@ -596,7 +596,7 @@
/**
* acf.lockForm
*
* Locks a form by disabeling its primary inputs and showing a spinner.
* Locks a form by disabling its primary inputs and showing a spinner.
*
* @date 4/9/18
* @since ACF 5.7.5
Expand All @@ -622,7 +622,7 @@
/**
* acf.unlockForm
*
* Unlocks a form by enabeling its primary inputs and hiding all spinners.
* Unlocks a form by enabling its primary inputs and hiding all spinners.
*
* @date 4/9/18
* @since ACF 5.7.5
Expand Down Expand Up @@ -1034,7 +1034,7 @@
return;
}

// Custommize the editor.
// Customize the editor.
this.customizeEditor();
},
customizeEditor: function () {
Expand Down Expand Up @@ -1129,7 +1129,7 @@
} );
}

// Rejext promise and prevent savePost().
// Reject promise and prevent savePost().
reject( 'Validation failed.' );
},
success: function () {
Expand Down
6 changes: 3 additions & 3 deletions assets/src/js/_acf.js
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@
* @date 17/12/18
* @since ACF 5.8.0
*
* @param jQUery $el The element or form to serialize.
* @param jQuery $el The element or form to serialize.
* @return object
*/
acf.serializeForAjax = function ( $el ) {
Expand Down Expand Up @@ -2012,7 +2012,7 @@
/**
* acf.renderSelect
*
* Renders the innter html for a select field.
* Renders the inner html for a select field.
*
* @date 19/2/18
* @since ACF 5.6.9
Expand Down Expand Up @@ -2266,7 +2266,7 @@
/**
* acf.onceInView
*
* Watches for a dom element to become visible in the browser and then excecutes the passed callback.
* Watches for a dom element to become visible in the browser and then executes the passed callback.
*
* @date 28/8/19
* @since ACF 5.8.1
Expand Down
2 changes: 1 addition & 1 deletion assets/src/js/_browse-fields-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
}

// Select first tab with selected field type
// If type selected is wthin Popular, select Popular Tab
// If type selected is within Popular, select Popular Tab
// Else select first tab the type belongs
const fieldTypes = this.getFieldTypes();
const isFieldTypePopular =
Expand Down
4 changes: 2 additions & 2 deletions assets/src/js/_field-group-conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
choice.disabled = true;
}

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

Expand Down Expand Up @@ -331,7 +331,7 @@
},

onClickAdd: function ( e, $el ) {
// duplciate
// duplicate
var $rule = acf.duplicate( $el.closest( '.rule' ) );

// render
Expand Down
Loading