Skip to content

small typo fix #154

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions docs/usage/acf.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To echo a field for a specific post that is also an array, you can pass the post
@endfield
```

To check the existance of a field for a specific post, you can pass a post ID as a second parameter:
To check the existence of a field for a specific post, you can pass a post ID as a second parameter:

```php
@hasfield('list', 5)
Expand All @@ -64,7 +64,7 @@ If the field you are checking against is an array, you can pass the array key as
@endfield
```

To check the existance of a field that is an array for a specific post, you can pass the array key as a second parameter and the post ID as a third parameter:
To check the existence of a field that is an array for a specific post, you can pass the array key as a second parameter and the post ID as a third parameter:

```php
@hasfield('image', 'url', 1)
Expand Down Expand Up @@ -144,7 +144,7 @@ To retrieve fields for a specific post, you can pass a post ID as a second param
@endhasfields
```

To check the existance of a parent field (such as Repeater or Flexible Content) for a specific post, you can pass a post ID as a second parameter:
To check the existence of a parent field (such as Repeater or Flexible Content) for a specific post, you can pass a post ID as a second parameter:

```php
@hasfields('lists', 5)
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/wordpress.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ It accepts the same parameters as `@term`:

`@image` echo's an image using [`wp_get_attachment_image()`](https://developer.wordpress.org/reference/functions/wp_get_attachment_image/).

Since I find this mostly useful with ACF fields (being that it automatically handles responsive image sizes), if ACF is present and a field name in the form of a `string` is passed as the first parameter, `@image` will attempt to deep-dive `get_field()` and `get_sub_field()` to retrieve your image field. If the image returns as an array instead of an `id`, the directive will automatically check for the existance of `$image['id']` and pass that value to `wp_get_attachment_image()`.
Since I find this mostly useful with ACF fields (being that it automatically handles responsive image sizes), if ACF is present and a field name in the form of a `string` is passed as the first parameter, `@image` will attempt to deep-dive `get_field()` and `get_sub_field()` to retrieve your image field. If the image returns as an array instead of an `id`, the directive will automatically check for the existence of `$image['id']` and pass that value to `wp_get_attachment_image()`.

By default, `@image` uses the `thumbnail` image size and the default media library attachment `alt` tag.

Expand Down
Loading