diff --git a/assets/build/js/_acf-condition.js b/assets/build/js/_acf-condition.js index c5fd7222..98ebc132 100644 --- a/assets/build/js/_acf-condition.js +++ b/assets/build/js/_acf-condition.js @@ -82,7 +82,7 @@ // - this field is used to setup the conditional logic events var field = target.getField( rule.field ); - // bail ealry if no target or no field (possible if field doesn't exist due to HTML error) + // bail early if no target or no field (possible if field doesn't exist due to HTML error) if( !target || !field ) { return false; } diff --git a/assets/build/js/_acf-conditions.js b/assets/build/js/_acf-conditions.js index 087ea81f..ddcb746d 100644 --- a/assets/build/js/_acf-conditions.js +++ b/assets/build/js/_acf-conditions.js @@ -276,7 +276,7 @@ // instantiate var condition = acf.newCondition( rule, this ); - // bail ealry if condition failed (field did not exist) + // bail early if condition failed (field did not exist) if( !condition ) { return false; } diff --git a/assets/build/js/_acf-field-date-picker.js b/assets/build/js/_acf-field-date-picker.js index 7efdb60a..b82da146 100644 --- a/assets/build/js/_acf-field-date-picker.js +++ b/assets/build/js/_acf-field-date-picker.js @@ -115,12 +115,12 @@ var rtl = acf.get('rtl'); var l10n = acf.get('datePickerL10n'); - // bail ealry if no l10n + // bail early if no l10n if( !l10n ) { return false; } - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.datepicker === 'undefined' ) { return false; } @@ -137,7 +137,7 @@ // add acf.newDatePicker = function( $input, args ){ - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.datepicker === 'undefined' ) { return false; } diff --git a/assets/build/js/_acf-field-date-time-picker.js b/assets/build/js/_acf-field-date-time-picker.js index 8cae782f..adc1dbb8 100644 --- a/assets/build/js/_acf-field-date-time-picker.js +++ b/assets/build/js/_acf-field-date-time-picker.js @@ -56,12 +56,12 @@ var rtl = acf.get('rtl'); var l10n = acf.get('dateTimePickerL10n'); - // bail ealry if no l10n + // bail early if no l10n if( !l10n ) { return false; } - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.timepicker === 'undefined' ) { return false; } @@ -79,7 +79,7 @@ // add acf.newDateTimePicker = function( $input, args ){ - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.timepicker === 'undefined' ) { return false; } diff --git a/assets/build/js/_acf-field-relationship.js b/assets/build/js/_acf-field-relationship.js index 13d535c1..105f364c 100644 --- a/assets/build/js/_acf-field-relationship.js +++ b/assets/build/js/_acf-field-relationship.js @@ -185,7 +185,7 @@ onClickRemove: function( e, $el ){ - // Prevent default here because generic handler wont be triggered. + // Prevent default here because generic handler won't be triggered. e.preventDefault(); // vars diff --git a/assets/build/js/_acf-field-time-picker.js b/assets/build/js/_acf-field-time-picker.js index b5caf560..b8ab1ec8 100644 --- a/assets/build/js/_acf-field-time-picker.js +++ b/assets/build/js/_acf-field-time-picker.js @@ -57,7 +57,7 @@ // add acf.newTimePicker = function( $input, args ){ - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.timepicker === 'undefined' ) { return false; } diff --git a/assets/build/js/_acf-field-true-false.js b/assets/build/js/_acf-field-true-false.js index 435cce67..80c95306 100644 --- a/assets/build/js/_acf-field-true-false.js +++ b/assets/build/js/_acf-field-true-false.js @@ -32,7 +32,7 @@ // vars var $switch = this.$switch(); - // bail ealry if no $switch + // bail early if no $switch if( !$switch.length ) return; // vars @@ -40,7 +40,7 @@ var $off = $switch.children('.acf-switch-off'); var width = Math.max( $on.width(), $off.width() ); - // bail ealry if no width + // bail early if no width if( !width ) return; // set widths diff --git a/assets/build/js/_acf-helpers.js b/assets/build/js/_acf-helpers.js index c54010a6..44e727d7 100644 --- a/assets/build/js/_acf-helpers.js +++ b/assets/build/js/_acf-helpers.js @@ -289,7 +289,7 @@ return false; } - // bail ealry if is .-left + // bail early if is .-left if( $el.hasClass('-left') ) { $fields.removeAttr('data-width'); $fields.css('width', 'auto'); diff --git a/assets/build/js/_acf-select2.js b/assets/build/js/_acf-select2.js index 87e640ff..25e5c372 100644 --- a/assets/build/js/_acf-select2.js +++ b/assets/build/js/_acf-select2.js @@ -659,7 +659,7 @@ var l10n = acf.get('select2L10n'); var version = getVersion(); - // bail ealry if no l10n + // bail early if no l10n if( !l10n ) { return false; } diff --git a/assets/build/js/_acf-tinymce.js b/assets/build/js/_acf-tinymce.js index 4dbaa7dd..3166a263 100644 --- a/assets/build/js/_acf-tinymce.js +++ b/assets/build/js/_acf-tinymce.js @@ -335,7 +335,7 @@ // bail early if( typeof switchEditors === 'undefined' ) return false; - // bail ealry if not initialized + // bail early if not initialized if( typeof tinyMCEPreInit.mceInit[ id ] === 'undefined' ) return false; // toggle diff --git a/assets/build/js/_acf-tooltip.js b/assets/build/js/_acf-tooltip.js index c4977c16..d7aeff93 100644 --- a/assets/build/js/_acf-tooltip.js +++ b/assets/build/js/_acf-tooltip.js @@ -286,7 +286,7 @@ // vars var title = $el.attr('title'); - // bail ealry if no title + // bail early if no title if( !title ) { return; } diff --git a/assets/build/js/_acf-unload.js b/assets/build/js/_acf-unload.js index d7a1c0f5..ec3f9171 100644 --- a/assets/build/js/_acf-unload.js +++ b/assets/build/js/_acf-unload.js @@ -30,7 +30,7 @@ startListening: function(){ - // bail ealry if already changed, not active + // bail early if already changed, not active if( this.changed || !this.active ) { return; } diff --git a/assets/build/js/_field-group-settings.js b/assets/build/js/_field-group-settings.js index f65a2a33..a8156031 100644 --- a/assets/build/js/_field-group-settings.js +++ b/assets/build/js/_field-group-settings.js @@ -54,7 +54,7 @@ var mid = modelId( type + ' ' + name ); var model = acf.models[ mid ] || null; - // bail ealry if no setting + // bail early if no setting if( model === null ) return false; // instantiate diff --git a/assets/build/js/_field-group.js b/assets/build/js/_field-group.js index 497db28c..01365c94 100644 --- a/assets/build/js/_field-group.js +++ b/assets/build/js/_field-group.js @@ -148,7 +148,7 @@ onNewField: function( field ){ - // bail ealry if not append + // bail early if not append if( !field.has('append') ) return; // vars diff --git a/assets/js/acf-field-group.js b/assets/js/acf-field-group.js index b0d76514..45104f31 100644 --- a/assets/js/acf-field-group.js +++ b/assets/js/acf-field-group.js @@ -148,7 +148,7 @@ onNewField: function( field ){ - // bail ealry if not append + // bail early if not append if( !field.has('append') ) return; // vars @@ -1046,7 +1046,7 @@ var mid = modelId( type + ' ' + name ); var model = acf.models[ mid ] || null; - // bail ealry if no setting + // bail early if no setting if( model === null ) return false; // instantiate diff --git a/assets/js/acf-input.js b/assets/js/acf-input.js index be153ee9..d7073849 100644 --- a/assets/js/acf-input.js +++ b/assets/js/acf-input.js @@ -3503,7 +3503,7 @@ startListening: function(){ - // bail ealry if already changed, not active + // bail early if already changed, not active if( this.changed || !this.active ) { return; } @@ -4217,7 +4217,7 @@ // vars var title = $el.attr('title'); - // bail ealry if no title + // bail early if no title if( !title ) { return; } @@ -5711,12 +5711,12 @@ var rtl = acf.get('rtl'); var l10n = acf.get('datePickerL10n'); - // bail ealry if no l10n + // bail early if no l10n if( !l10n ) { return false; } - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.datepicker === 'undefined' ) { return false; } @@ -5733,7 +5733,7 @@ // add acf.newDatePicker = function( $input, args ){ - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.datepicker === 'undefined' ) { return false; } @@ -5810,12 +5810,12 @@ var rtl = acf.get('rtl'); var l10n = acf.get('dateTimePickerL10n'); - // bail ealry if no l10n + // bail early if no l10n if( !l10n ) { return false; } - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.timepicker === 'undefined' ) { return false; } @@ -5833,7 +5833,7 @@ // add acf.newDateTimePicker = function( $input, args ){ - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.timepicker === 'undefined' ) { return false; } @@ -7381,7 +7381,7 @@ onClickRemove: function( e, $el ){ - // Prevent default here because generic handler wont be triggered. + // Prevent default here because generic handler won't be triggered. e.preventDefault(); // vars @@ -8550,7 +8550,7 @@ // add acf.newTimePicker = function( $input, args ){ - // bail ealry if no datepicker library + // bail early if no datepicker library if( typeof $.timepicker === 'undefined' ) { return false; } @@ -8603,7 +8603,7 @@ // vars var $switch = this.$switch(); - // bail ealry if no $switch + // bail early if no $switch if( !$switch.length ) return; // vars @@ -8611,7 +8611,7 @@ var $off = $switch.children('.acf-switch-off'); var width = Math.max( $on.width(), $off.width() ); - // bail ealry if no width + // bail early if no width if( !width ) return; // set widths @@ -8917,7 +8917,7 @@ // - this field is used to setup the conditional logic events var field = target.getField( rule.field ); - // bail ealry if no target or no field (possible if field doesn't exist due to HTML error) + // bail early if no target or no field (possible if field doesn't exist due to HTML error) if( !target || !field ) { return false; } @@ -9361,7 +9361,7 @@ // instantiate var condition = acf.newCondition( rule, this ); - // bail ealry if condition failed (field did not exist) + // bail early if condition failed (field did not exist) if( !condition ) { return false; } @@ -11926,7 +11926,7 @@ var l10n = acf.get('select2L10n'); var version = getVersion(); - // bail ealry if no l10n + // bail early if no l10n if( !l10n ) { return false; } @@ -12396,7 +12396,7 @@ // bail early if( typeof switchEditors === 'undefined' ) return false; - // bail ealry if not initialized + // bail early if not initialized if( typeof tinyMCEPreInit.mceInit[ id ] === 'undefined' ) return false; // toggle @@ -13756,7 +13756,7 @@ return false; } - // bail ealry if is .-left + // bail early if is .-left if( $el.hasClass('-left') ) { $fields.removeAttr('data-width'); $fields.css('width', 'auto'); diff --git a/includes/admin/admin-field-group.php b/includes/admin/admin-field-group.php index 99e5048a..24139e48 100644 --- a/includes/admin/admin-field-group.php +++ b/includes/admin/admin-field-group.php @@ -791,7 +791,7 @@ function ajax_move_field() { if( !$field_group['ID'] ) continue; - // bail ealry if is current + // bail early if is current if( $field_group['ID'] == $args['post_id'] ) continue; diff --git a/includes/admin/admin-upgrade.php b/includes/admin/admin-upgrade.php index 4e535a9c..a3d70712 100644 --- a/includes/admin/admin-upgrade.php +++ b/includes/admin/admin-upgrade.php @@ -37,7 +37,7 @@ function __construct() { */ function admin_menu() { - // check if upgrade is avaialble + // check if upgrade is available if( acf_has_upgrade() ) { // add notice @@ -84,7 +84,7 @@ function network_admin_menu() { restore_current_blog(); }} - // check if upgrade is avaialble + // check if upgrade is available if( $has_upgrade ) { // add notice diff --git a/includes/admin/views/field-group-locations.php b/includes/admin/views/field-group-locations.php index 12c76a8e..2a985035 100644 --- a/includes/admin/views/field-group-locations.php +++ b/includes/admin/views/field-group-locations.php @@ -14,7 +14,7 @@ $group ): - // bail ealry if no group + // bail early if no group if( empty($group) ) return; diff --git a/includes/api/api-helpers.php b/includes/api/api-helpers.php index 13669535..c9777a64 100644 --- a/includes/api/api-helpers.php +++ b/includes/api/api-helpers.php @@ -144,7 +144,7 @@ function acf_append_setting( $name, $value ) { // vars $setting = acf_raw_setting( $name ); - // bail ealry if not array + // bail early if not array if( !is_array($setting) ) { $setting = array(); } @@ -456,7 +456,7 @@ function acf_get_view( $path = '', $args = array() ) { function acf_merge_atts( $atts, $extra = array() ) { - // bail ealry if no $extra + // bail early if no $extra if( empty($extra) ) return $atts; @@ -1374,7 +1374,7 @@ function _acf_query_remove_post_type( $sql ) { global $wpdb; - // bail ealry if no 'wp_posts.ID IN' + // bail early if no 'wp_posts.ID IN' if( strpos($sql, "$wpdb->posts.ID IN") === false ) { return $sql; @@ -1491,7 +1491,7 @@ function acf_get_grouped_posts( $args ) { // sort into hierachial order! - // this will fail if a search has taken place because parents wont exist + // this will fail if a search has taken place because parents won't exist if( is_post_type_hierarchical($post_type) && empty($args['s'])) { // vars @@ -1870,7 +1870,7 @@ function acf_get_grouped_users( $args = array() ) { // populate $this_posts foreach( array_keys($users) as $key ) { - // bail ealry if not correct role + // bail early if not correct role if( !in_array($user_role_name, $users[ $key ]->roles) ) continue; @@ -1882,7 +1882,7 @@ function acf_get_grouped_users( $args = array() ) { $i++; - // bail ealry if too low + // bail early if too low if( $min && $i < $min ) continue; @@ -2768,7 +2768,7 @@ function acf_get_post_id_info( $post_id = 0 ) { function acf_isset_termmeta( $taxonomy = '' ) { - // bail ealry if no table + // bail early if no table if( get_option('db_version') < 34370 ) return false; @@ -2877,7 +2877,7 @@ function acf_upload_files( $ancestors = array() ) { } - // bail ealry if file has error (no file uploaded) + // bail early if file has error (no file uploaded) if( $file['error'] ) { return; @@ -2930,7 +2930,7 @@ function acf_upload_file( $uploaded_file ) { $file = wp_handle_upload( $uploaded_file, $upload_overrides ); - // bail ealry if upload failed + // bail early if upload failed if( isset($file['error']) ) { return $file['error']; @@ -3734,7 +3734,7 @@ function acf_translate_keys( $array, $keys ) { // translate foreach( $keys as $k ) { - // bail ealry if not exists + // bail early if not exists if( !isset($array[ $k ]) ) continue; @@ -4363,14 +4363,14 @@ function acf_send_ajax_results( $response ) { function acf_is_sequential_array( $array ) { - // bail ealry if not array + // bail early if not array if( !is_array($array) ) return false; // loop foreach( $array as $key => $value ) { - // bail ealry if is string + // bail early if is string if( is_string($key) ) return false; } @@ -4398,14 +4398,14 @@ function acf_is_sequential_array( $array ) { function acf_is_associative_array( $array ) { - // bail ealry if not array + // bail early if not array if( !is_array($array) ) return false; // loop foreach( $array as $key => $value ) { - // bail ealry if is string + // bail early if is string if( is_string($key) ) return true; } @@ -4530,12 +4530,12 @@ function acf_strip_protocol( $url ) { */ function acf_connect_attachment_to_post( $attachment_id = 0, $post_id = 0 ) { - // Bail ealry if $attachment_id is not valid. + // Bail early if $attachment_id is not valid. if( !$attachment_id || !is_numeric($attachment_id) ) { return false; } - // Bail ealry if $post_id is not valid. + // Bail early if $post_id is not valid. if( !$post_id || !is_numeric($post_id) ) { return false; } @@ -4589,7 +4589,7 @@ function acf_connect_attachment_to_post( $attachment_id = 0, $post_id = 0 ) { function acf_encrypt( $data = '' ) { - // bail ealry if no encrypt function + // bail early if no encrypt function if( !function_exists('openssl_encrypt') ) return base64_encode($data); @@ -4627,7 +4627,7 @@ function acf_encrypt( $data = '' ) { function acf_decrypt( $data = '' ) { - // bail ealry if no decrypt function + // bail early if no decrypt function if( !function_exists('openssl_decrypt') ) return base64_decode($data); diff --git a/includes/api/api-template.php b/includes/api/api-template.php index bfd0fd29..346f9c2c 100644 --- a/includes/api/api-template.php +++ b/includes/api/api-template.php @@ -203,7 +203,7 @@ function acf_maybe_get_field( $selector, $post_id = false, $strict = true ) { function acf_maybe_get_sub_field( $selectors, $post_id = false, $strict = true ) { - // bail ealry if not enough selectors + // bail early if not enough selectors if( !is_array($selectors) || count($selectors) < 3 ) return false; diff --git a/includes/api/api-term.php b/includes/api/api-term.php index 0eef7fda..6584ab1d 100644 --- a/includes/api/api-term.php +++ b/includes/api/api-term.php @@ -218,7 +218,7 @@ function acf_get_grouped_terms( $args ) { if( empty($this_terms) ) continue; // sort into hierachial order - // this will fail if a search has taken place because parents wont exist + // this will fail if a search has taken place because parents won't exist if( is_taxonomy_hierarchical($taxonomy) && empty($args['s'])) { // get all terms from this taxonomy diff --git a/includes/fields/class-acf-field-checkbox.php b/includes/fields/class-acf-field-checkbox.php index e9dd7a20..b322f188 100644 --- a/includes/fields/class-acf-field-checkbox.php +++ b/includes/fields/class-acf-field-checkbox.php @@ -207,7 +207,7 @@ function render_field_custom( $field ) { ); - // bail ealry if choice already exists + // bail early if choice already exists if( in_array( $esc_value, $this->_values ) ) continue; @@ -229,7 +229,7 @@ function render_field_custom( $field ) { function walk( $choices = array(), $args = array(), $depth = 0 ) { - // bail ealry if no choices + // bail early if no choices if( empty($choices) ) return ''; diff --git a/includes/fields/class-acf-field-date_picker.php b/includes/fields/class-acf-field-date_picker.php index 7f2e43c4..1cc09296 100644 --- a/includes/fields/class-acf-field-date_picker.php +++ b/includes/fields/class-acf-field-date_picker.php @@ -47,7 +47,7 @@ function initialize() { function input_admin_enqueue_scripts() { - // bail ealry if no enqueue + // bail early if no enqueue if( !acf_get_setting('enqueue_datepicker') ) { return; } diff --git a/includes/fields/class-acf-field-date_time_picker.php b/includes/fields/class-acf-field-date_time_picker.php index 06b4415d..2f62d3d2 100644 --- a/includes/fields/class-acf-field-date_time_picker.php +++ b/includes/fields/class-acf-field-date_time_picker.php @@ -47,7 +47,7 @@ function initialize() { function input_admin_enqueue_scripts() { - // bail ealry if no enqueue + // bail early if no enqueue if( !acf_get_setting('enqueue_datetimepicker') ) return; diff --git a/includes/fields/class-acf-field-file.php b/includes/fields/class-acf-field-file.php index 7e081d20..4b515632 100644 --- a/includes/fields/class-acf-field-file.php +++ b/includes/fields/class-acf-field-file.php @@ -393,11 +393,11 @@ function validate_value( $valid, $value, $field, $input ){ if( empty($value) ) return $valid; - // bail ealry if is numeric + // bail early if is numeric if( is_numeric($value) ) return $valid; - // bail ealry if not basic string + // bail early if not basic string if( !is_string($value) ) return $valid; diff --git a/includes/fields/class-acf-field-google-map.php b/includes/fields/class-acf-field-google-map.php index c9c4add1..86f42bee 100644 --- a/includes/fields/class-acf-field-google-map.php +++ b/includes/fields/class-acf-field-google-map.php @@ -60,7 +60,7 @@ function input_admin_enqueue_scripts() { )); - // bail ealry if no enqueue + // bail early if no enqueue if( !acf_get_setting('enqueue_google_maps') ) { return; } diff --git a/includes/fields/class-acf-field-group.php b/includes/fields/class-acf-field-group.php index 4e2cc5ff..b5ed1224 100644 --- a/includes/fields/class-acf-field-group.php +++ b/includes/fields/class-acf-field-group.php @@ -187,7 +187,7 @@ function update_value( $value, $post_id, $field ) { if( !acf_is_array($value) ) return null; - // bail ealry if no sub fields + // bail early if no sub fields if( empty($field['sub_fields']) ) return null; @@ -384,7 +384,7 @@ function render_field_table( $field ) { $sub_field = acf_prepare_field($sub_field); - // bail ealry if no field + // bail early if no field if( !$sub_field ) continue; @@ -662,7 +662,7 @@ function prepare_field_for_import( $field ) { function delete_value( $post_id, $meta_key, $field ) { - // bail ealry if no sub fields + // bail early if no sub fields if( empty($field['sub_fields']) ) return null; // modify names diff --git a/includes/fields/class-acf-field-page_link.php b/includes/fields/class-acf-field-page_link.php index 1521b566..9b2d4102 100644 --- a/includes/fields/class-acf-field-page_link.php +++ b/includes/fields/class-acf-field-page_link.php @@ -155,7 +155,7 @@ function ajax_query() { $archive_link = get_post_type_archive_link( $post_type ); - // bail ealry if no link + // bail early if no link if( !$archive_link ) continue; diff --git a/includes/fields/class-acf-field-select.php b/includes/fields/class-acf-field-select.php index 508441a3..4cae671a 100644 --- a/includes/fields/class-acf-field-select.php +++ b/includes/fields/class-acf-field-select.php @@ -58,7 +58,7 @@ function initialize() { function input_admin_enqueue_scripts() { - // bail ealry if no enqueue + // bail early if no enqueue if( !acf_get_setting('enqueue_select2') ) return; @@ -592,7 +592,7 @@ function format_value( $value, $post_id, $field ) { function format_value_single( $value, $post_id, $field ) { - // bail ealry if is empty + // bail early if is empty if( acf_is_empty($value) ) return $value; diff --git a/includes/fields/class-acf-field-taxonomy.php b/includes/fields/class-acf-field-taxonomy.php index 27b8371a..c8318cb6 100644 --- a/includes/fields/class-acf-field-taxonomy.php +++ b/includes/fields/class-acf-field-taxonomy.php @@ -177,7 +177,7 @@ function get_ajax_query( $options = array() ) { $parent = acf_maybe_get( $args, 'child_of', $parent ); - // this will fail if a search has taken place because parents wont exist + // this will fail if a search has taken place because parents won't exist if( !$is_search ) { // order terms @@ -474,7 +474,7 @@ function update_value( $value, $post_id, $field ) { function save_post( $post_id ) { - // bail ealry if no terms + // bail early if no terms if( empty($this->save_post_terms) ) return; diff --git a/includes/forms/form-customizer.php b/includes/forms/form-customizer.php index 5f32ad84..30b16dd0 100644 --- a/includes/forms/form-customizer.php +++ b/includes/forms/form-customizer.php @@ -86,7 +86,7 @@ function customize_controls_init() { function save_widget( $instance, $new_instance, $old_instance, $widget ) { - // bail ealry if not valid (customize + acf values + nonce) + // bail early if not valid (customize + acf values + nonce) if( !isset($_POST['wp_customize']) || !isset($new_instance['acf']) || !acf_verify_nonce('widget') ) return $instance; @@ -151,7 +151,7 @@ function settings( $customizer ) { $settings = $customizer->settings(); - // bail ealry if no settings + // bail early if no settings if( empty($settings) ) return false; @@ -188,7 +188,7 @@ function settings( $customizer ) { } - // bail ealry if no settings + // bail early if no settings if( empty($data) ) return false; @@ -217,7 +217,7 @@ function customize_preview_init( $customizer ) { $settings = $this->settings( $customizer ); - // bail ealry if no settings + // bail early if no settings if( empty($settings) ) return; @@ -235,7 +235,7 @@ function customize_preview_init( $customizer ) { } - // bail ealry if no preview_values + // bail early if no preview_values if( empty($this->preview_values) ) return; @@ -313,7 +313,7 @@ function customize_save( $customizer ) { $settings = $this->settings( $customizer ); - // bail ealry if no settings + // bail early if no settings if( empty($settings) ) return; @@ -352,7 +352,7 @@ function customize_save( $customizer ) { function pre_update_option( $value, $option, $old_value ) { - // bail ealry if no value + // bail early if no value if( empty($value) ) return $value; @@ -360,7 +360,7 @@ function pre_update_option( $value, $option, $old_value ) { // WP saves all widgets (of the same type) as an array of widgets foreach( $value as $i => $widget ) { - // bail ealry if no acf + // bail early if no acf if( !isset($widget['acf']) ) continue; @@ -434,7 +434,7 @@ function admin_footer() { var bit = signature[i]; - // bail ealry if acf is found + // bail early if acf is found if( bit.indexOf('acf') !== -1 ) continue; diff --git a/includes/forms/form-front.php b/includes/forms/form-front.php index 3c25cf9b..c461f168 100644 --- a/includes/forms/form-front.php +++ b/includes/forms/form-front.php @@ -364,7 +364,7 @@ function check_submit_form() { if( !acf_verify_nonce('acf_form') ) return; - // bail ealry if form not submit + // bail early if form not submit if( empty($_POST['_acf_form']) ) return; @@ -372,7 +372,7 @@ function check_submit_form() { $form = json_decode( acf_decrypt($_POST['_acf_form']), true ); - // bail ealry if form is corrupt + // bail early if form is corrupt if( empty($form) ) return; @@ -492,7 +492,7 @@ function render_form( $args = array() ) { $post_id = $args['post_id']; - // dont load values for 'new_post' + // don't load values for 'new_post' if( $post_id === 'new_post' ) $post_id = false; diff --git a/includes/forms/form-nav-menu.php b/includes/forms/form-nav-menu.php index 5bdc53ea..5c33e64a 100644 --- a/includes/forms/form-nav-menu.php +++ b/includes/forms/form-nav-menu.php @@ -177,7 +177,7 @@ function update_nav_menu( $menu_id ) { function update_nav_menu_items( $menu_id ) { - // bail ealry if not set + // bail early if not set if( empty($_POST['menu-item-acf']) ) return; @@ -254,7 +254,7 @@ function wp_edit_nav_menu_walker( $class, $menu_id = 0 ) { function acf_validate_save_post() { - // bail ealry if not set + // bail early if not set if( empty($_POST['menu-item-acf']) ) return; diff --git a/includes/forms/form-post.php b/includes/forms/form-post.php index 055f6853..eb7eb307 100644 --- a/includes/forms/form-post.php +++ b/includes/forms/form-post.php @@ -290,7 +290,7 @@ function allow_save_post( $post ) { function save_post( $post_id, $post ) { - // bail ealry if no allowed to save this post type + // bail early if no allowed to save this post type if( !$this->allow_save_post($post) ) { return $post_id; } diff --git a/includes/forms/form-widget.php b/includes/forms/form-widget.php index 489a7e8f..841e461d 100644 --- a/includes/forms/form-widget.php +++ b/includes/forms/form-widget.php @@ -101,7 +101,7 @@ function admin_enqueue_scripts() { function acf_validate_save_post() { - // bail ealry if not widget + // bail early if not widget if( !isset($_POST['_acf_widget_id']) ) return; @@ -228,7 +228,7 @@ function edit_widget( $widget, $return, $instance ) { function save_widget( $instance, $new_instance, $old_instance, $widget ) { - // bail ealry if not valid (!customize + acf values + nonce) + // bail early if not valid (!customize + acf values + nonce) if( isset($_POST['wp_customize']) || !isset($new_instance['acf']) || !acf_verify_nonce('widget') ) return $instance; diff --git a/includes/locations.php b/includes/locations.php index c18d6233..47e3492f 100644 --- a/includes/locations.php +++ b/includes/locations.php @@ -100,7 +100,7 @@ function get_locations() { // loop foreach( $this->locations as $location ) { - // bail ealry if not public + // bail early if not public if( !$location->public ) continue; diff --git a/includes/locations/class-acf-location-nav-menu.php b/includes/locations/class-acf-location-nav-menu.php index 1e873f90..cb2fb201 100644 --- a/includes/locations/class-acf-location-nav-menu.php +++ b/includes/locations/class-acf-location-nav-menu.php @@ -62,7 +62,7 @@ function rule_match( $result, $rule, $screen ) { $menu_locations = get_nav_menu_locations(); - // bail ealry if no location + // bail early if no location if( !isset($menu_locations[$location]) ) return false; diff --git a/includes/revisions.php b/includes/revisions.php index 4dcb8e72..d4fbca15 100644 --- a/includes/revisions.php +++ b/includes/revisions.php @@ -161,7 +161,7 @@ function wp_post_revision_fields( $fields, $post = null ) { $key = acf_maybe_get( $meta, '_'.$name ); - // bail ealry if no key + // bail early if no key if( !$key ) continue; @@ -256,7 +256,7 @@ function wp_post_revision_fields( $fields, $post = null ) { function wp_post_revision_field( $value, $field_name, $post = null, $direction = false) { - // bail ealry if is empty + // bail early if is empty if( empty($value) ) return $value; diff --git a/includes/upgrades.php b/includes/upgrades.php index b6acec8d..01aeb08a 100644 --- a/includes/upgrades.php +++ b/includes/upgrades.php @@ -3,7 +3,7 @@ /** * acf_has_upgrade * -* Returns true if this site has an upgrade avaialble. +* Returns true if this site has an upgrade available. * * @date 24/8/18 * @since 5.7.4 @@ -33,7 +33,7 @@ function acf_has_upgrade() { /** * acf_upgrade_all * -* Returns true if this site has an upgrade avaialble. +* Returns true if this site has an upgrade available. * * @date 24/8/18 * @since 5.7.4 diff --git a/includes/validation.php b/includes/validation.php index 070453f9..79598945 100644 --- a/includes/validation.php +++ b/includes/validation.php @@ -275,7 +275,7 @@ function acf_validate_save_post( $show_errors = false ) { $errors = acf_get_validation_errors(); - // bail ealry if no errors + // bail early if no errors if( !$errors ) return true; diff --git a/includes/wpml.php b/includes/wpml.php index 940a9f79..c2272652 100644 --- a/includes/wpml.php +++ b/includes/wpml.php @@ -125,7 +125,7 @@ function upgrade_500_field_group($field_group, $ofg) { 'post_acf-field-group', $field_group['ID'] ), ARRAY_A); - // bail ealry if no rows + // bail early if no rows if( !$old_row || !$new_row ) { return; }