diff --git a/docs/code-reference/acf-field-group-functions-file.md b/docs/code-reference/acf-field-group-functions-file.md index f8a9a701..477834fc 100644 --- a/docs/code-reference/acf-field-group-functions-file.md +++ b/docs/code-reference/acf-field-group-functions-file.md @@ -92,7 +92,7 @@ acf_get_raw_field_groups acf_filter_field_groups -* Returns a filtered aray of field groups based on the given $args. +* Returns a filtered array of field groups based on the given $args. * @date 29/11/2013 * @since ACF 5.0.0 * @param array $field_groups An array of field groups. @@ -259,7 +259,7 @@ acf_prepare_field_group_for_import acf_import_field_group -* Imports a field group into the databse. +* Imports a field group into the database. * @date 11/03/2014 * @since ACF 5.0.0 * @param array $field_group The field group array. diff --git a/docs/code-reference/acf-helper-functions-file.md b/docs/code-reference/acf-helper-functions-file.md index e5158c40..560e1a8d 100644 --- a/docs/code-reference/acf-helper-functions-file.md +++ b/docs/code-reference/acf-helper-functions-file.md @@ -74,7 +74,7 @@ acf_enable_filter * Enables a filter with the given name. * @date 14/7/16 * @since ACF 5.4.0 -* @param string name The modifer name. +* @param string $name The modifier name. * @return void ## `acf_disable_filter()` @@ -84,7 +84,7 @@ acf_disable_filter * Disables a filter with the given name. * @date 14/7/16 * @since ACF 5.4.0 -* @param string name The modifer name. +* @param string $name The modifier name. * @return void ## `acf_is_filter_enabled()` @@ -94,7 +94,7 @@ acf_is_filter_enabled * Returns the state of a filter for the given name. * @date 14/7/16 * @since ACF 5.4.0 -* @param string name The modifer name. +* @param string $name The modifier name. * @return array ## `acf_get_filters()` @@ -113,7 +113,7 @@ acf_set_filters * Sets an array of filter states. * @date 14/7/16 * @since ACF 5.4.0 -* @param array $filters An Array of modifers +* @param array $filters An Array of modifiers. * @return array ## `acf_disable_filters()` @@ -132,7 +132,7 @@ acf_enable_filters * Enables all or an array of specific filters and returns the previous state. * @date 14/7/16 * @since ACF 5.4.0 -* @param array $filters An Array of modifers +* @param array $filters An Array of modifiers. * @return array ## `acf_idval()` @@ -221,7 +221,7 @@ Returns the length of a string that has been submitted via $_POST. 1. Unslash the string because posted values will be slashed. 2. Decode special characters because wp_kses() will normalize entities. 3. Treat line-breaks as a single character instead of two. -4. Use mb_strlen() to accomodate special characters. +4. Use mb_strlen() to accommodate special characters. * @date 04/06/2020 * @since ACF 5.9.0 diff --git a/docs/code-reference/api/api-helpers-file.md b/docs/code-reference/api/api-helpers-file.md index 33af2f56..2fc4cb74 100644 --- a/docs/code-reference/api/api-helpers-file.md +++ b/docs/code-reference/api/api-helpers-file.md @@ -395,7 +395,7 @@ acf_get_posts _acf_query_remove_post_type * This function will remove the 'wp_posts.post_type' WHERE clause completely -When using 'post__in', this clause is unneccessary and slow. +When using 'post__in', this clause is unnecessary and slow. * @since ACF 5.1.5 * @param $sql (string) * @return $sql @@ -494,8 +494,8 @@ acf_encode_choices acf_str_replace * This function will replace an array of strings much like str_replace -The difference is the extra logic to avoid replacing a string that has alread been replaced -This is very useful for replacing date characters as they overlap with eachother +The difference is the extra logic to avoid replacing a string that has already been replaced +This is very useful for replacing date characters as they overlap with each other * @since ACF 5.3.8 * @param $post_id (int) * @return $post_id (int) @@ -504,7 +504,7 @@ This is very useful for replacing date characters as they overlap with eachother acf_split_date_time -* This function will split a format string into seperate date and time +* This function will split a format string into separate date and time * @since ACF 5.3.8 * @param $date_time (string) * @return $formats (array) @@ -513,7 +513,7 @@ acf_split_date_time acf_convert_date_to_php -* This fucntion converts a date format string from JS to PHP +* This function converts a date format string from JS to PHP * @since ACF 5.0.0 * @param $date (string) * @return (string) @@ -522,7 +522,7 @@ acf_convert_date_to_php acf_convert_date_to_js -* This fucntion converts a date format string from PHP to JS +* This function converts a date format string from PHP to JS * @since ACF 5.0.0 * @param $date (string) * @return (string) @@ -531,7 +531,7 @@ acf_convert_date_to_js acf_convert_time_to_php -* This fucntion converts a time format string from JS to PHP +* This function converts a time format string from JS to PHP * @since ACF 5.0.0 * @param $time (string) * @return (string) @@ -540,7 +540,7 @@ acf_convert_time_to_php acf_convert_time_to_js -* This fucntion converts a date format string from PHP to JS +* This function converts a date format string from PHP to JS * @since ACF 5.0.0 * @param $time (string) * @return (string) @@ -611,7 +611,7 @@ This function will walk through the $_FILES data and upload each found. acf_upload_file -* This function will uploade a $_FILE +* This function will upload a $_FILE * @since ACF 5.0.9 * @param $uploaded_file (array) array found from $_FILE data * @return $id (int) new attachment ID @@ -734,8 +734,8 @@ acf_translate * This function will translate a string using the new 'l10n_textdomain' setting Also works for arrays which is great for fields - select -> choices * @since ACF 5.3.2 -* @param $string (mixed) string or array containins strings to be translated -* @return $string +* @param mixed $string String or array containing strings to be translated. +* @return mixed ## `acf_maybe_add_action()` @@ -769,7 +769,7 @@ Return an image tag for the provided attachment ID acf_get_post_thumbnail -* This function will return a thumbail image url for a given post +* This function will return a thumbnail image url for a given post * @since ACF 5.3.8 * @param $post (obj) * @param $size (mixed) @@ -787,7 +787,7 @@ acf_get_browser acf_is_ajax -* This function will reutrn true if performing a wp ajax call +* This function will return true if performing a wp ajax call * @since ACF 5.3.8 * @param n/a * @return (boolean) @@ -910,8 +910,8 @@ Useful to preserve numeric keys when performing array_multisort ## `acf_connect_attachment_to_post()` -This function will connect an attacment (image etc) to the post -Used to connect attachements uploaded directly to media that have not been attaced to a post +This function will connect an attachment (image etc) to the post +Used to connect attachments uploaded directly to media that have not been attached to a post * @since ACF 5.8.0 Added filter to prevent connection. * @since ACF 5.5.4 @@ -970,7 +970,7 @@ acf_convert_rules_to_groups acf_register_ajax -* Regsiters an ajax callback. +* Registers an ajax callback. * @since ACF 5.7.7 * @param string $name The ajax action name. * @param array $callback The callback function or array. @@ -991,7 +991,7 @@ Thanks to label" grouped by category +Returns an multi-dimensional array of field types "name => label" grouped by category * @since ACF 5.0.0 * @return array diff --git a/docs/code-reference/upgrades-file.md b/docs/code-reference/upgrades-file.md index 2b042a48..87805905 100644 --- a/docs/code-reference/upgrades-file.md +++ b/docs/code-reference/upgrades-file.md @@ -4,7 +4,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 ACF 5.7.4 * @return boolean diff --git a/docs/code-reference/validation-file.md b/docs/code-reference/validation-file.md index dbead703..77d8cdc6 100644 --- a/docs/code-reference/validation-file.md +++ b/docs/code-reference/validation-file.md @@ -8,7 +8,7 @@ Add validation error. * @type function * @date 6/10/13 * @since ACF 5.0.0 -* @param string $input name attribute of DOM elmenet. +* @param string $input name attribute of DOM element. * @param string $message error message. * @return void @@ -31,7 +31,7 @@ Get the validation error. * @date 6/10/13 * @since ACF 5.0.0 * @since 6.4.1 Added the $input parameter, which is required in the get_error method. -* @param string $input name attribute of DOM elmenet. +* @param string $input name attribute of DOM element. * @return string|bool ## `acf_reset_validation_errors()` diff --git a/includes/Blocks/Bindings.php b/includes/Blocks/Bindings.php index 5d4edcf3..4c043eba 100644 --- a/includes/Blocks/Bindings.php +++ b/includes/Blocks/Bindings.php @@ -40,7 +40,7 @@ public function register_binding_sources() { } /** - * Handle returing the block binding value for an ACF meta value. + * Handle returning the block binding value for an ACF meta value. * * @since ACF 6.2.8 * diff --git a/includes/acf-field-functions.php b/includes/acf-field-functions.php index 360759cf..054e01de 100644 --- a/includes/acf-field-functions.php +++ b/includes/acf-field-functions.php @@ -57,7 +57,7 @@ function acf_get_field( $id = 0 ) { */ $field = apply_filters( 'acf/load_field', $field ); - // Store field using aliasses to also find via key, ID and name. + // Store field using aliases to also find via key, ID and name. $store->set( $field['key'], $field ); $store->alias( $field['key'], $field['ID'], $field['name'] ); diff --git a/includes/acf-field-group-functions.php b/includes/acf-field-group-functions.php index 51997aa3..d63013ac 100644 --- a/includes/acf-field-group-functions.php +++ b/includes/acf-field-group-functions.php @@ -135,7 +135,7 @@ function acf_get_raw_field_groups() { /** * acf_filter_field_groups * - * Returns a filtered aray of field groups based on the given $args. + * Returns a filtered array of field groups based on the given $args. * * @date 29/11/2013 * @since ACF 5.0.0 @@ -467,7 +467,7 @@ function acf_prepare_field_group_for_import( $field_group ) { /** * acf_import_field_group * - * Imports a field group into the databse. + * Imports a field group into the database. * * @date 11/03/2014 * @since ACF 5.0.0 diff --git a/includes/acf-helper-functions.php b/includes/acf-helper-functions.php index 2832a836..d0ff06c1 100644 --- a/includes/acf-helper-functions.php +++ b/includes/acf-helper-functions.php @@ -141,7 +141,7 @@ function acf_request_arg( $name = '', $default = null ) { * @date 14/7/16 * @since ACF 5.4.0 * - * @param string name The modifer name. + * @param string $name The modifier name. * @return void */ function acf_enable_filter( $name = '' ) { @@ -156,7 +156,7 @@ function acf_enable_filter( $name = '' ) { * @date 14/7/16 * @since ACF 5.4.0 * - * @param string name The modifer name. + * @param string $name The modifier name. * @return void */ function acf_disable_filter( $name = '' ) { @@ -171,7 +171,7 @@ function acf_disable_filter( $name = '' ) { * @date 14/7/16 * @since ACF 5.4.0 * - * @param string name The modifer name. + * @param string $name The modifier name. * @return array */ function acf_is_filter_enabled( $name = '' ) { @@ -200,7 +200,7 @@ function acf_get_filters() { * @date 14/7/16 * @since ACF 5.4.0 * - * @param array $filters An Array of modifers + * @param array $filters An Array of modifiers. * @return array */ function acf_set_filters( $filters = array() ) { @@ -222,7 +222,7 @@ function acf_disable_filters() { // Get state. $prev_state = acf_get_filters(); - // Set all modifers as false. + // Set all modifiers as false. acf_set_filters( array_map( '__return_false', $prev_state ) ); // Return prev state. @@ -237,7 +237,7 @@ function acf_disable_filters() { * @date 14/7/16 * @since ACF 5.4.0 * - * @param array $filters An Array of modifers + * @param array $filters An Array of modifiers. * @return array */ function acf_enable_filters( $filters = array() ) { @@ -249,7 +249,7 @@ function acf_enable_filters( $filters = array() ) { if ( $filters ) { acf_set_filters( $filters ); - // Set all modifers as true. + // Set all modifiers as true. } else { acf_set_filters( array_map( '__return_true', $prev_state ) ); } @@ -416,7 +416,7 @@ function acf_did( $name ) { if ( acf_get_data( "acf_did_$name" ) ) { return true; - // Otherwise, update store and return false (alowing event). + // Otherwise, update store and return false (allowing event). } else { acf_set_data( "acf_did_$name", true ); return false; @@ -430,7 +430,7 @@ function acf_did( $name ) { * 1. Unslash the string because posted values will be slashed. * 2. Decode special characters because wp_kses() will normalize entities. * 3. Treat line-breaks as a single character instead of two. - * 4. Use mb_strlen() to accomodate special characters. + * 4. Use mb_strlen() to accommodate special characters. * * @date 04/06/2020 * @since ACF 5.9.0 diff --git a/includes/acf-hook-functions.php b/includes/acf-hook-functions.php index 18f8f62b..23edc7d6 100644 --- a/includes/acf-hook-functions.php +++ b/includes/acf-hook-functions.php @@ -29,7 +29,7 @@ function acf_add_filter_variations( $filter = '', $variations = array(), $index ); // Add generic handler. - // Use a priotiry of 10, and accepted args of 10 (ignored by WP). + // Use a priority of 10, and accepted args of 10 (ignored by WP). add_filter( $filter, '_acf_apply_hook_variations', 10, 10 ); } @@ -59,7 +59,7 @@ function acf_add_action_variations( $action = '', $variations = array(), $index ); // Add generic handler. - // Use a priotiry of 10, and accepted args of 10 (ignored by WP). + // Use a priority of 10, and accepted args of 10 (ignored by WP). add_action( $action, '_acf_apply_hook_variations', 10, 10 ); } diff --git a/includes/acf-user-functions.php b/includes/acf-user-functions.php index 03f3b56c..08147434 100644 --- a/includes/acf-user-functions.php +++ b/includes/acf-user-functions.php @@ -79,7 +79,7 @@ function acf_get_user_role_labels( $roles = array() ) { $roles = array_keys( $all_roles ); } - // Loop over roles and populare labels. + // Loop over roles and populate labels. $lables = array(); foreach ( $roles as $role ) { if ( isset( $all_roles[ $role ] ) ) { diff --git a/includes/acf-utility-functions.php b/includes/acf-utility-functions.php index b90d6453..323b2041 100644 --- a/includes/acf-utility-functions.php +++ b/includes/acf-utility-functions.php @@ -3,7 +3,7 @@ // Globals. global $acf_stores, $acf_instances; -// Initialize plaeholders. +// Initialize placeholders. $acf_stores = array(); $acf_instances = array(); diff --git a/includes/admin/admin-upgrade.php b/includes/admin/admin-upgrade.php index 42f49177..91fa5cb6 100644 --- a/includes/admin/admin-upgrade.php +++ b/includes/admin/admin-upgrade.php @@ -50,7 +50,7 @@ public function __construct() { /** * Function admin_menu * - * Setus up logic if DB Upgrade is needed on a single site. + * Setup up logic if DB Upgrade is needed on a single site. * * @date 24/8/18 * @since ACF 5.7.4 @@ -59,7 +59,7 @@ public function __construct() { */ public function admin_menu() { - // check if upgrade is avaialble + // check if upgrade is available if ( acf_has_upgrade() ) { // add notice diff --git a/includes/admin/post-types/admin-field-groups.php b/includes/admin/post-types/admin-field-groups.php index 7ec81b0c..9df4e244 100644 --- a/includes/admin/post-types/admin-field-groups.php +++ b/includes/admin/post-types/admin-field-groups.php @@ -178,7 +178,7 @@ public function render_admin_table_column_locations( $field_group ) { $rules[ $j ]['object_subtype'] = $location_object_subtype; } - // Now that each $rule conains object type data... + // Now that each $rule contains object type data... $object_types = array_column( $rules, 'object_type' ); $object_types = array_filter( $object_types ); $object_types = array_values( $object_types ); diff --git a/includes/admin/post-types/admin-taxonomy.php b/includes/admin/post-types/admin-taxonomy.php index eb2dcbec..f0f06fbb 100644 --- a/includes/admin/post-types/admin-taxonomy.php +++ b/includes/admin/post-types/admin-taxonomy.php @@ -2,7 +2,7 @@ /** * ACF Admin Taxonomy Class * - * @class ACF_Admin_Taxonomiy + * @class ACF_Admin_Taxonomy * * @package ACF * @subpackage Admin diff --git a/includes/admin/views/upgrade/network.php b/includes/admin/views/upgrade/network.php index 90202b5c..c6e1d277 100644 --- a/includes/admin/views/upgrade/network.php +++ b/includes/admin/views/upgrade/network.php @@ -2,7 +2,7 @@ /** * Network Admin Database Upgrade * - * Shows the databse upgrade process. + * Shows the database upgrade process. * * @package wordpress/secure-custom-fields */ @@ -20,7 +20,7 @@

- +

diff --git a/includes/admin/views/upgrade/upgrade.php b/includes/admin/views/upgrade/upgrade.php index 2091f666..5053a43e 100644 --- a/includes/admin/views/upgrade/upgrade.php +++ b/includes/admin/views/upgrade/upgrade.php @@ -2,7 +2,7 @@ /** * Admin Database Upgrade * - * Shows the databse upgrade process. + * Shows the database upgrade process. * * @package wordpress/secure-custom-fields */ diff --git a/includes/ajax/class-acf-ajax-query-users.php b/includes/ajax/class-acf-ajax-query-users.php index 20cefbbe..335d0f9b 100644 --- a/includes/ajax/class-acf-ajax-query-users.php +++ b/includes/ajax/class-acf-ajax-query-users.php @@ -150,7 +150,7 @@ function prepare_args( $args ) { function get_results( $args ) { $results = array(); - // Prepare args for quey. + // Prepare args for query. $args = $this->prepare_args( $args ); // Get result groups. @@ -160,7 +160,7 @@ function get_results( $args ) { $roles = acf_get_user_role_labels(); } - // Return a flat array of results when searching or when queriying one group only. + // Return a flat array of results when searching or when querying one group only. if ( $this->is_search || count( $roles ) === 1 ) { // Query users and append to results. @@ -177,7 +177,7 @@ function get_results( $args ) { // Otherwise, group results via role. } else { - // Unset args that will interfer with query results. + // Unset args that will interfere with query results. unset( $args['role__in'], $args['role__not_in'] ); $args['search'] = $this->search ? $this->search : ''; diff --git a/includes/ajax/class-acf-ajax-upgrade.php b/includes/ajax/class-acf-ajax-upgrade.php index 30070d15..290ef27c 100644 --- a/includes/ajax/class-acf-ajax-upgrade.php +++ b/includes/ajax/class-acf-ajax-upgrade.php @@ -29,7 +29,7 @@ public function get_response( $request ) { switch_to_blog( $request['blog_id'] ); } - // Bail early if no upgrade avaiable. + // Bail early if no upgrade available. if ( ! acf_has_upgrade() ) { return new WP_Error( 'upgrade_error', __( 'No updates available.', 'secure-custom-fields' ) ); } diff --git a/includes/api/api-helpers.php b/includes/api/api-helpers.php index 5b165a6a..6bf4db86 100644 --- a/includes/api/api-helpers.php +++ b/includes/api/api-helpers.php @@ -899,7 +899,7 @@ function acf_get_taxonomy_terms( $taxonomies = array() ) { continue; } - // sort into hierachial order! + // sort into hierarchical order! if ( $is_hierarchical ) { $terms = _get_term_children( 0, $terms, $taxonomy ); } @@ -1203,7 +1203,7 @@ function acf_get_posts( $args = array() ) { * _acf_query_remove_post_type * * This function will remove the 'wp_posts.post_type' WHERE clause completely - * When using 'post__in', this clause is unneccessary and slow. + * When using 'post__in', this clause is unnecessary and slow. * * @since ACF 5.1.5 * @@ -1311,7 +1311,7 @@ function acf_get_grouped_posts( $args ) { continue; } - // sort into hierachial order! + // sort into hierarchical order! // this will fail if a search has taken place because parents wont exist if ( is_post_type_hierarchical( $post_type ) && empty( $args['s'] ) ) { @@ -1344,7 +1344,7 @@ function acf_get_grouped_posts( $args ) { // order posts $ordered_posts = get_page_children( $parent_id, $all_posts ); - // compare aray lengths + // compare array lengths // if $ordered_posts is smaller than $all_posts, WP has lost posts during the get_page_children() function // this is possible when get_post( $args ) filter out parents (via taxonomy, meta and other search parameters) if ( count( $ordered_posts ) == count( $all_posts ) ) { @@ -1451,10 +1451,10 @@ function acf_order_by_search( $array, $search ) { // detect search match if ( $strpos !== false ) { - // set eright to length of match + // set weight to length of match $weight = strlen( $search ); - // increase weight if match starts at begining of string + // increase weight if match starts at beginning of string if ( $strpos == 0 ) { ++$weight; } @@ -1823,8 +1823,8 @@ function acf_decode_choices( $string = '', $array_keys = false ) { * acf_str_replace * * This function will replace an array of strings much like str_replace - * The difference is the extra logic to avoid replacing a string that has alread been replaced - * This is very useful for replacing date characters as they overlap with eachother + * The difference is the extra logic to avoid replacing a string that has already been replaced + * This is very useful for replacing date characters as they overlap with each other * * @since ACF 5.3.8 * @@ -1847,7 +1847,7 @@ function acf_str_replace( $string = '', $search_replace = array() ) { continue; } - // bail early if subsctring not found + // bail early if substring not found if ( strpos( $string, $search ) === false ) { continue; } @@ -1923,7 +1923,7 @@ function acf_str_replace( $string = '', $search_replace = array() ) { /** * acf_split_date_time * - * This function will split a format string into seperate date and time + * This function will split a format string into separate date and time * * @since ACF 5.3.8 * @@ -1970,7 +1970,7 @@ function acf_split_date_time( $date_time = '' ) { /** * acf_convert_date_to_php * - * This fucntion converts a date format string from JS to PHP + * This function converts a date format string from JS to PHP * * @since ACF 5.0.0 * @@ -1990,7 +1990,7 @@ function acf_convert_date_to_php( $date = '' ) { /** * acf_convert_date_to_js * - * This fucntion converts a date format string from PHP to JS + * This function converts a date format string from PHP to JS * * @since ACF 5.0.0 * @@ -2009,7 +2009,7 @@ function acf_convert_date_to_js( $date = '' ) { /** * acf_convert_time_to_php * - * This fucntion converts a time format string from JS to PHP + * This function converts a time format string from JS to PHP * * @since ACF 5.0.0 * @@ -2029,7 +2029,7 @@ function acf_convert_time_to_php( $time = '' ) { /** * acf_convert_time_to_js * - * This fucntion converts a date format string from PHP to JS + * This function converts a date format string from PHP to JS * * @since ACF 5.0.0 * @@ -2369,7 +2369,7 @@ function acf_upload_files( $ancestors = array() ) { /** * acf_upload_file * - * This function will uploade a $_FILE + * This function will upload a $_FILE * * @since ACF 5.0.9 * @@ -3000,7 +3000,7 @@ function acf_validate_attachment( $attachment, $field, $context = 'prepare' ) { * @param array $file An array of data for a single file. * @param array $attachment An array of attachment data which differs based on the context. * @param array $field The field array. - * @param string $context The curent context (uploading, preparing) + * @param string $context The current context (uploading, preparing) */ $errors = apply_filters( "acf/validate_attachment/type={$field['type']}", $errors, $file, $attachment, $field, $context ); $errors = apply_filters( "acf/validate_attachment/name={$field['_name']}", $errors, $file, $attachment, $field, $context ); @@ -3043,8 +3043,8 @@ function _acf_settings_uploader( $uploader ) { * * @since ACF 5.3.2 * - * @param $string (mixed) string or array containins strings to be translated - * @return $string + * @param mixed $string String or array containing strings to be translated. + * @return mixed */ function acf_translate( $string ) { @@ -3067,29 +3067,12 @@ function acf_translate( $string ) { return array_map( 'acf_translate', $string ); } - // bail early if not string - if ( ! is_string( $string ) ) { - return $string; - } - // bail early if empty - if ( $string === '' ) { + if ( '' === $string ) { return $string; } - // allow for var_export export - if ( acf_get_setting( 'l10n_var_export' ) ) { - - // bail early if already translated - if ( substr( $string, 0, 7 ) === '!!__(!!' ) { - return $string; - } - - // return - return "!!__(!!'" . $string . "!!', !!'" . $textdomain . "!!')!!"; - } - - // vars + // translate return __( $string, $textdomain ); } @@ -3167,7 +3150,7 @@ function acf_get_attachment_image( $attachment_id = 0, $size = 'thumbnail' ) { /** * acf_get_post_thumbnail * - * This function will return a thumbail image url for a given post + * This function will return a thumbnail image url for a given post * * @since ACF 5.3.8 * @@ -3264,7 +3247,7 @@ function acf_get_browser() { /** * acf_is_ajax * - * This function will reutrn true if performing a wp ajax call + * This function will return true if performing a wp ajax call * * @since ACF 5.3.8 * @@ -3620,8 +3603,8 @@ function acf_remove_array_key_prefix( $array, $prefix ) { } /** - * This function will connect an attacment (image etc) to the post - * Used to connect attachements uploaded directly to media that have not been attaced to a post + * This function will connect an attachment (image etc) to the post + * Used to connect attachments uploaded directly to media that have not been attached to a post * * @since ACF 5.8.0 Added filter to prevent connection. * @since ACF 5.5.4 @@ -3758,7 +3741,7 @@ function acf_parse_markdown( $text = '' ) { '/= (.+?) =/' => '

$1

', // headings '/\[([^\[]+)\]\(([^\)]+)\)/' => '$1', // links '/(\*\*)(.*?)\1/' => '$2', // bold - '/(\*)(.*?)\1/' => '$2', // intalic + '/(\*)(.*?)\1/' => '$2', // italic '/`(.*?)`/' => '$1', // inline code '/\n\*(.*)/' => "\n", // ul lists '/\n[0-9]+\.(.*)/' => "\n
    \n\t
  1. $1
  2. \n
", // ol lists @@ -3852,7 +3835,7 @@ function acf_convert_rules_to_groups( $rules, $anyorall = 'any' ) { /** * acf_register_ajax * - * Regsiters an ajax callback. + * Registers an ajax callback. * * @since ACF 5.7.7 * @@ -3893,7 +3876,7 @@ function acf_str_camel_case( $string = '' ) { /** * acf_array_camel_case * - * Converts all aray keys to camelCase. + * Converts all array keys to camelCase. * * @since ACF 5.8.0 * diff --git a/includes/api/api-template.php b/includes/api/api-template.php index 6fad751f..c91c563c 100644 --- a/includes/api/api-template.php +++ b/includes/api/api-template.php @@ -2,7 +2,7 @@ /** * This function will return a custom field value for a specific field name/key + post_id. - * There is a 3rd parameter to turn on/off formating. This means that an image field will not use + * There is a 3rd parameter to turn on/off formatting. This means that an image field will not use * its 'return option' to format the value but return only what was saved in the database * * @since ACF 3.6 @@ -1517,7 +1517,7 @@ function delete_sub_row( $selector, $i = 1, $post_id = false ) { /** - * Depreceated Functions + * Deprecated Functions * * These functions are outdated * diff --git a/includes/api/api-term.php b/includes/api/api-term.php index 3c8d703c..ca80b7d7 100644 --- a/includes/api/api-term.php +++ b/includes/api/api-term.php @@ -213,7 +213,7 @@ function acf_get_grouped_terms( $args ) { continue; } - // sort into hierachial order + // sort into hierarchical order // this will fail if a search has taken place because parents wont exist if ( is_taxonomy_hierarchical( $taxonomy ) && empty( $args['s'] ) ) { @@ -246,7 +246,7 @@ function acf_get_grouped_terms( $args ) { $parent = acf_maybe_get( $args, 'child_of', $parent ); $ordered_terms = _get_term_children( $parent, $all_terms, $taxonomy ); - // compare aray lengths + // compare array lengths // if $ordered_posts is smaller than $all_posts, WP has lost posts during the get_page_children() function // this is possible when get_post( $args ) filter out parents (via taxonomy, meta and other search parameters) if ( count( $ordered_terms ) == count( $all_terms ) ) { diff --git a/includes/assets.php b/includes/assets.php index f6cde315..cc0ad19b 100644 --- a/includes/assets.php +++ b/includes/assets.php @@ -142,7 +142,7 @@ public function register_scripts() { } /** - * Enqueues a script and sets up actions for priting supplemental scripts. + * Enqueues a script and sets up actions for printing supplemental scripts. * * @date 27/4/20 * @since ACF 5.9.0 @@ -192,7 +192,7 @@ private function add_actions() { /** * Extends the add_action() function with two additional features: * 1. Renames $action depending on the current page (customizer, login, front-end). - * 2. Alters the priotiry or calls the method directly if the action has already passed. + * 2. Alters the priority or calls the method directly if the action has already passed. * * @date 28/4/20 * @since ACF 5.9.0 diff --git a/includes/blocks.php b/includes/blocks.php index 5387b519..e8546a08 100644 --- a/includes/blocks.php +++ b/includes/blocks.php @@ -973,7 +973,7 @@ function acf_ajax_fetch_block() { // Vars. $response = array( 'clientId' => $client_id ); - // Check if we've recieved serialised form data + // Check if we've received serialised form data $use_post_data = false; if ( ! empty( $block['data'] ) && is_array( $block['data'] ) ) { // Ensure we've got field keys posted. diff --git a/includes/class-acf-data.php b/includes/class-acf-data.php index 8197f344..9cacd357 100644 --- a/includes/class-acf-data.php +++ b/includes/class-acf-data.php @@ -83,7 +83,7 @@ function prop( $name = '', $value = null ) { /** * _key * - * Returns a key for the given name allowing aliasses to work. + * Returns a key for the given name allowing aliases to work. * * @date 18/1/19 * @since ACF 5.7.10 diff --git a/includes/class-acf-options-page.php b/includes/class-acf-options-page.php index c1109d1f..9ed9782a 100644 --- a/includes/class-acf-options-page.php +++ b/includes/class-acf-options-page.php @@ -404,7 +404,7 @@ function acf_get_options_pages() { $page = acf_get_options_page( $slug ); } - // calculate parent => child redirectes + // calculate parent => child redirects foreach ( $pages as $slug => &$page ) { // bail early if is child diff --git a/includes/fields.php b/includes/fields.php index a83fc303..70aa88b7 100644 --- a/includes/fields.php +++ b/includes/fields.php @@ -80,7 +80,7 @@ function is_field_type( $name ) { /** * This function will store a basic array of info about the field type - * to later be overriden by the above register_field_type function + * to later be overridden by the above register_field_type function * * @type function * @date 29/5/17 @@ -336,7 +336,7 @@ function acf_get_field_categories_i18n() { /** - * Returns an multi-dimentional array of field types "name => label" grouped by category + * Returns an multi-dimensional array of field types "name => label" grouped by category * * @since ACF 5.0.0 * diff --git a/includes/fields/class-acf-field-accordion.php b/includes/fields/class-acf-field-accordion.php index e92f3f22..100890b7 100644 --- a/includes/fields/class-acf-field-accordion.php +++ b/includes/fields/class-acf-field-accordion.php @@ -114,7 +114,7 @@ function render_field_settings( $field ) { /** - * This filter is appied to the $field after it is loaded from the database + * This filter is applied to the $field after it is loaded from the database * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-button-group.php b/includes/fields/class-acf-field-button-group.php index dabb004f..a1dc40b1 100644 --- a/includes/fields/class-acf-field-button-group.php +++ b/includes/fields/class-acf-field-button-group.php @@ -51,7 +51,7 @@ public function render_field( $field ) { $buttons = array(); $value = esc_attr( $field['value'] ); - // bail ealrly if no choices + // bail early if no choices if ( empty( $field['choices'] ) ) { return; } @@ -89,7 +89,7 @@ public function render_field( $field ) { if ( $field['allow_null'] ) { $div['data-allow_null'] = 1; } - // hdden input + // hidden input $html .= acf_get_hidden_input( array( 'name' => $field['name'] ) ); // open @@ -216,7 +216,7 @@ function render_field_presentation_settings( $field ) { } /** - * This filter is appied to the $field before it is saved to the database + * This filter is applied to the $field before it is saved to the database * * @date 18/9/17 * @since ACF 5.6.3 @@ -231,7 +231,7 @@ function update_field( $field ) { /** - * This filter is appied to the $value after it is loaded from the db + * This filter is applied to the $value after it is loaded from the db * * @date 18/9/17 * @since ACF 5.6.3 @@ -263,7 +263,7 @@ function translate_field( $field ) { /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @date 18/9/17 * @since ACF 5.6.3 diff --git a/includes/fields/class-acf-field-checkbox.php b/includes/fields/class-acf-field-checkbox.php index eaae8db8..faca70fc 100644 --- a/includes/fields/class-acf-field-checkbox.php +++ b/includes/fields/class-acf-field-checkbox.php @@ -60,7 +60,7 @@ function render_field( $field ) { $field['value'] = acf_get_array( $field['value'] ); $field['choices'] = acf_get_array( $field['choices'] ); - // hiden input + // hidden input acf_hidden_input( array( 'name' => $field['name'] ) ); // vars @@ -191,7 +191,7 @@ function render_field_custom( $field ) { // loop foreach ( $field['value'] as $value ) { - // ignore if already eixsts + // ignore if already exists if ( isset( $field['choices'][ $value ] ) ) { continue; } @@ -428,7 +428,7 @@ function render_field_presentation_settings( $field ) { } /** - * This filter is appied to the $field before it is saved to the database + * This filter is applied to the $field before it is saved to the database * * @type filter * @since ACF 3.6 @@ -449,7 +449,7 @@ function update_field( $field ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 @@ -490,7 +490,7 @@ function update_value( $value, $post_id, $field ) { // loop foreach ( $value as $v ) { - // ignore if already eixsts + // ignore if already exists if ( isset( $field['choices'][ $v ] ) ) { continue; } @@ -531,7 +531,7 @@ function translate_field( $field ) { /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-clone.php b/includes/fields/class-acf-field-clone.php index 1acdd1e1..94544f93 100644 --- a/includes/fields/class-acf-field-clone.php +++ b/includes/fields/class-acf-field-clone.php @@ -260,7 +260,7 @@ public function acf_clone_field( $field, $clone_field ) { $field['key'] = $clone_field['key'] . '_' . $field['key']; // modify prefix allowing clone field to save sub fields - // - only used for parent seamless fields. Block or sub field's prefix will be overriden which also works + // - only used for parent seamless fields. Block or sub field's prefix will be overridden which also works $field['prefix'] = $clone_field['prefix'] . '[' . $clone_field['key'] . ']'; // modify parent @@ -412,7 +412,7 @@ public function load_value( $value, $post_id, $field ) { /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 3.6 @@ -522,7 +522,7 @@ public function update_value( $value, $post_id, $field ) { // empty } else { - // input is not set (hidden by conditioanl logic) + // input is not set (hidden by conditional logic) continue; } diff --git a/includes/fields/class-acf-field-date_picker.php b/includes/fields/class-acf-field-date_picker.php index 2244e489..9a85029b 100644 --- a/includes/fields/class-acf-field-date_picker.php +++ b/includes/fields/class-acf-field-date_picker.php @@ -229,7 +229,7 @@ function render_field_settings( $field ) { } /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-date_time_picker.php b/includes/fields/class-acf-field-date_time_picker.php index 91f5d4b2..b6bf34a4 100644 --- a/includes/fields/class-acf-field-date_time_picker.php +++ b/includes/fields/class-acf-field-date_time_picker.php @@ -216,7 +216,7 @@ function render_field_settings( $field ) { } /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-file.php b/includes/fields/class-acf-field-file.php index 8584fa0a..35263659 100644 --- a/includes/fields/class-acf-field-file.php +++ b/includes/fields/class-acf-field-file.php @@ -286,7 +286,7 @@ function render_field_validation_settings( $field ) { } /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 @@ -343,7 +343,7 @@ function get_media_item_args( $vars ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 @@ -365,7 +365,7 @@ function update_value( $value, $post_id, $field ) { // Parse value for id. $attachment_id = acf_idval( $value ); - // Connect attacment to post. + // Connect attachment to post. acf_connect_attachment_to_post( $attachment_id, $post_id ); // Return id. @@ -425,9 +425,9 @@ function validate_value( $valid, $value, $field, $input ) { /** * Validates file fields updated via the REST API. * - * @param boolean $valid The current validity booleean - * @param integer $value The value of the field - * @param array $field The field array + * @param boolean $valid The current validity boolean. + * @param integer $value The value of the field. + * @param array $field The field array. * @return boolean|WP_Error */ public function validate_rest_value( $valid, $value, $field ) { diff --git a/includes/fields/class-acf-field-flexible-content.php b/includes/fields/class-acf-field-flexible-content.php index bb2df54e..4fa675e1 100644 --- a/includes/fields/class-acf-field-flexible-content.php +++ b/includes/fields/class-acf-field-flexible-content.php @@ -199,7 +199,7 @@ public function get_sub_field( $sub_field, $id, $field ) { if ( $field['layouts'] ) { foreach ( $field['layouts'] as $layout ) { - // Restict to active layout if within a have_rows() loop. + // Restrict to active layout if within a have_rows() loop. if ( $active && $active !== $layout['name'] ) { continue; } @@ -731,7 +731,7 @@ public function load_value( $value, $post_id, $field ) { $rows[ $i ] = array(); $rows[ $i ]['acf_fc_layout'] = $l; - // bail early if layout deosnt contain sub fields + // bail early if layout doesn't contain sub fields if ( empty( $layouts[ $l ] ) ) { continue; } @@ -766,7 +766,7 @@ public function load_value( $value, $post_id, $field ) { /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 @@ -796,7 +796,7 @@ public function format_value( $value, $post_id, $field, $escape_html = false ) { // get layout name $l = $value[ $i ]['acf_fc_layout']; - // bail early if layout deosnt exist + // bail early if layout doesn't exist if ( empty( $layouts[ $l ] ) ) { continue; } @@ -1094,7 +1094,7 @@ public function update_row( $row, $i, $field, $post_id ) { } /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 @@ -1201,7 +1201,7 @@ public function delete_value( $post_id, $key, $field ) { /** - * This filter is appied to the $field before it is saved to the database + * This filter is applied to the $field before it is saved to the database * * @type filter * @since ACF 3.6 @@ -1256,7 +1256,7 @@ public function delete_field( $field ) { /** - * This filter is appied to the $field before it is duplicated and saved to the database + * This filter is applied to the $field before it is duplicated and saved to the database * * @type filter * @date 23/01/13 @@ -1481,7 +1481,7 @@ public function prepare_field_for_import( $field ) { if ( $sub_fields ) { foreach ( $sub_fields as $i => $sub_field ) { - // Update atttibutes + // Update attributes $sub_field['parent'] = $field['key']; $sub_field['parent_layout'] = $layout['key']; $sub_field['menu_order'] = $i; diff --git a/includes/fields/class-acf-field-gallery.php b/includes/fields/class-acf-field-gallery.php index 7369b647..1f8d5ab2 100644 --- a/includes/fields/class-acf-field-gallery.php +++ b/includes/fields/class-acf-field-gallery.php @@ -249,7 +249,7 @@ public function ajax_get_sort_order() { } /** - * Renders the sidebar HTML shown when selecting an attachmemnt. + * Renders the sidebar HTML shown when selecting an attachment. * * @date 13/12/2013 * @since ACF 5.0.0 @@ -259,7 +259,7 @@ public function ajax_get_sort_order() { * @return void */ public function render_attachment( $id, $field ) { - // Load attachmenet data. + // Load attachment data. $attachment = wp_prepare_attachment_for_js( $id ); $compat = get_compat_media_markup( $id ); @@ -391,7 +391,7 @@ public function render_field( $field ) { 'data-nonce' => wp_create_nonce( $field['key'] ), ); - // Set gallery height with deafult of 400px and minimum of 200px. + // Set gallery height with default of 400px and minimum of 200px. $height = acf_get_user_setting( 'gallery_height', 400 ); $height = max( $height, 200 ); $attrs['style'] = "height:{$height}px"; @@ -413,7 +413,7 @@ public function render_field( $field ) { ) ); - // Load attatchment data for each post. + // Load attachment data for each post. $attachments = array_map( 'acf_get_attachment', $posts ); } @@ -794,7 +794,7 @@ public function validate_value( $valid, $value, $field, $input ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 @@ -829,7 +829,7 @@ public function update_value( $value, $post_id, $field ) { /** * Validates file fields updated via the REST API. * - * @param boolean $valid The current validity booleean. + * @param boolean $valid The current validity boolean. * @param integer $value The value of the field. * @param array $field The field array. * @return boolean|WP diff --git a/includes/fields/class-acf-field-google-map.php b/includes/fields/class-acf-field-google-map.php index 55cd6d7b..14b1fc67 100644 --- a/includes/fields/class-acf-field-google-map.php +++ b/includes/fields/class-acf-field-google-map.php @@ -262,7 +262,7 @@ function load_value( $value, $post_id, $field ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-group.php b/includes/fields/class-acf-field-group.php index cd7ddb01..2ed951a9 100644 --- a/includes/fields/class-acf-field-group.php +++ b/includes/fields/class-acf-field-group.php @@ -41,7 +41,7 @@ function initialize() { /** - * This filter is appied to the $field after it is loaded from the database + * This filter is applied to the $field after it is loaded from the database * * @type filter * @since ACF 3.6 @@ -104,7 +104,7 @@ function load_value( $value, $post_id, $field ) { /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 @@ -143,7 +143,7 @@ public function format_value( $value, $post_id, $field, $escape_html = false ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 @@ -187,7 +187,7 @@ function update_value( $value, $post_id, $field ) { // empty } else { - // input is not set (hidden by conditioanl logic) + // input is not set (hidden by conditional logic) continue; } @@ -468,7 +468,7 @@ function validate_value( $valid, $value, $field, $input ) { /** - * This filter is appied to the $field before it is duplicated and saved to the database + * This filter is applied to the $field before it is duplicated and saved to the database * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-icon_picker.php b/includes/fields/class-acf-field-icon_picker.php index 014dbb01..570c247e 100644 --- a/includes/fields/class-acf-field-icon_picker.php +++ b/includes/fields/class-acf-field-icon_picker.php @@ -328,7 +328,7 @@ public function validate_value( $valid, $value, $field, $input ) { /** * format_value() * - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @since ACF 6.3 * diff --git a/includes/fields/class-acf-field-image.php b/includes/fields/class-acf-field-image.php index 784e99e2..d437965c 100644 --- a/includes/fields/class-acf-field-image.php +++ b/includes/fields/class-acf-field-image.php @@ -334,7 +334,7 @@ function render_field_presentation_settings( $field ) { } /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 @@ -391,7 +391,7 @@ function get_media_item_args( $vars ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 @@ -428,9 +428,9 @@ public function validate_value( $valid, $value, $field, $input ) { /** * Additional validation for the image field when submitted via REST. * - * @param boolean $valid The current validity booleean - * @param integer $value The value of the field - * @param array $field The field array + * @param boolean $valid The current validity boolean. + * @param integer $value The value of the field. + * @param array $field The field array. * @return boolean|WP_Error */ public function validate_rest_value( $valid, $value, $field ) { diff --git a/includes/fields/class-acf-field-link.php b/includes/fields/class-acf-field-link.php index 34744b46..dab299c0 100644 --- a/includes/fields/class-acf-field-link.php +++ b/includes/fields/class-acf-field-link.php @@ -158,7 +158,7 @@ function render_field_settings( $field ) { } /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 @@ -218,7 +218,7 @@ function validate_value( $valid, $value, $field, $input ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-message.php b/includes/fields/class-acf-field-message.php index 3a014f2b..a7cae765 100644 --- a/includes/fields/class-acf-field-message.php +++ b/includes/fields/class-acf-field-message.php @@ -139,7 +139,7 @@ function translate_field( $field ) { /** - * This filter is appied to the $field after it is loaded from the database + * This filter is applied to the $field after it is loaded from the database * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-number.php b/includes/fields/class-acf-field-number.php index 4bd62a5b..d9503717 100644 --- a/includes/fields/class-acf-field-number.php +++ b/includes/fields/class-acf-field-number.php @@ -250,7 +250,7 @@ function validate_value( $valid, $value, $field, $input ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 diff --git a/includes/fields/class-acf-field-oembed.php b/includes/fields/class-acf-field-oembed.php index af46e79a..741267c4 100644 --- a/includes/fields/class-acf-field-oembed.php +++ b/includes/fields/class-acf-field-oembed.php @@ -260,7 +260,7 @@ function render_field_settings( $field ) { } /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template. + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template. * * @type filter * @since ACF 3.6 3.6 diff --git a/includes/fields/class-acf-field-page_link.php b/includes/fields/class-acf-field-page_link.php index 77ad1fe8..49092481 100644 --- a/includes/fields/class-acf-field-page_link.php +++ b/includes/fields/class-acf-field-page_link.php @@ -527,7 +527,7 @@ function render_field_validation_settings( $field ) { } /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @type filter * @since ACF 3.6 @@ -569,7 +569,7 @@ function format_value( $value, $post_id, $field ) { $value[ $i ] = $post; } - // convert back from array if neccessary + // convert back from array if necessary if ( ! $field['multiple'] ) { $value = array_shift( $value ); } @@ -580,7 +580,7 @@ function format_value( $value, $post_id, $field ) { /** - * This filter is appied to the $value before it is updated in the db + * This filter is applied to the $value before it is updated in the db * * @type filter * @since ACF 3.6 @@ -618,9 +618,9 @@ function update_value( $value, $post_id, $field ) { /** * Validates page link fields updated via the REST API. * - * @param boolean $valid The current validity booleean - * @param integer $value The value of the field - * @param array $field The field array + * @param boolean $valid The current validity boolean. + * @param integer $value The value of the field. + * @param array $field The field array. * @return boolean|WP_Error */ public function validate_rest_value( $valid, $value, $field ) { diff --git a/includes/fields/class-acf-field-post_object.php b/includes/fields/class-acf-field-post_object.php index b9dc1c51..6cb53082 100644 --- a/includes/fields/class-acf-field-post_object.php +++ b/includes/fields/class-acf-field-post_object.php @@ -475,7 +475,7 @@ public function load_value( $value, $post_id, $field ) { /** - * This filter is appied to the $value after it is loaded from the db and before it is returned to the template + * This filter is applied to the $value after it is loaded from the db and before it is returned to the template * * @since ACF 3.6 * @@ -497,7 +497,7 @@ public function format_value( $value, $post_id, $field ) { $value = $this->get_posts( $value, $field ); } - // convert back from array if neccessary + // convert back from array if necessary if ( ! $field['multiple'] && is_array( $value ) ) { $value = current( $value ); } @@ -579,9 +579,9 @@ public function get_posts( $value, $field ) { * * @since ACF 5.11 * - * @param boolean $valid The current validity booleean - * @param integer $value The value of the field - * @param array $field The field array + * @param boolean $valid The current validity boolean. + * @param integer $value The value of the field. + * @param array $field The field array. * @return boolean|WP_Error */ public function validate_rest_value( $valid, $value, $field ) { diff --git a/includes/fields/class-acf-field-radio.php b/includes/fields/class-acf-field-radio.php index 96dcf641..f0100200 100644 --- a/includes/fields/class-acf-field-radio.php +++ b/includes/fields/class-acf-field-radio.php @@ -113,7 +113,7 @@ function render_field( $field ) { return; } - // Hiden input. + // Hidden input. $e .= acf_get_hidden_input( array( 'name' => $field['name'] ) ); // Open