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 PHP files #78

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
4 changes: 2 additions & 2 deletions docs/code-reference/acf-field-group-functions-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions docs/code-reference/acf-helper-functions-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`
Expand All @@ -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()`
Expand All @@ -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()`
Expand All @@ -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()`
Expand All @@ -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()`
Expand Down Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions docs/code-reference/api/api-helpers-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()`

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -991,7 +991,7 @@ Thanks to <https://stackoverflow.com/questions/31274782/convert-array-keys-from-

acf_array_camel_case

* Converts all aray keys to camelCase.
* Converts all array keys to camelCase.
* @since ACF 5.8.0
* @param array $array The array to convert.
* @return array
Expand Down
4 changes: 2 additions & 2 deletions docs/code-reference/api/api-template-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## `get_field()`

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
Expand Down Expand Up @@ -317,7 +317,7 @@ This function will add a row of data to a field

## `create_field()`

Depreceated Functions
Deprecated Functions

* These functions are outdated
* @since ACF 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/code-reference/fields-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Returns an array of localised field categories.

## `acf_get_grouped_field_types()`

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
* @return array
Expand Down
2 changes: 1 addition & 1 deletion docs/code-reference/upgrades-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/code-reference/validation-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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()`
Expand Down
2 changes: 1 addition & 1 deletion includes/Blocks/Bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion includes/acf-field-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] );

Expand Down
4 changes: 2 additions & 2 deletions includes/acf-field-group-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions includes/acf-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '' ) {
Expand All @@ -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 = '' ) {
Expand All @@ -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 = '' ) {
Expand Down Expand Up @@ -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() ) {
Expand All @@ -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.
Expand All @@ -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() ) {
Expand All @@ -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 ) );
}
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions includes/acf-hook-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down Expand Up @@ -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 );
}

Expand Down
Loading