diff --git a/CHANGELOG.md b/CHANGELOG.md index 1498eea2..00c8c9c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Renamed `fileSize` method to `minSize` and `maxSize` - Renamed `height` method to `minHeight` and `maxHeight` - Renamed `insert` method to `prependFiles` +- Renamed `instructions` method to `helperText` - Renamed `loadTerms` method to `load` - Renamed `mediaUpload` method to `disableMediaUpload` - Renamed `mimeTypes` method to `acceptableFileTypes` diff --git a/README.md b/README.md index 08305aa0..1b9b9564 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Extended ACF provides an object-oriented API to register groups and fields with - [Location](#location) - [Conditional Logic](#conditional-logic) - [Non-standards](#non-standards) - - [`instructions`](#instructions) + - [`helperText`](#helperText) - [`column`](#column) - [`dd` and `dump`](#dd-and-dump) - [`key`](#key) @@ -87,7 +87,7 @@ All fields, except the clone field, have a corresponding class. Each field requi use Extended\ACF\Fields\Text; Text::make('Title', 'heading') - ->instructions('Add the text value') + ->helperText('Add the text value') ->required() ``` @@ -101,7 +101,7 @@ Most fields have the methods `default`, `required`, and `wrapper`. The [basic fi use Extended\ACF\Fields\Email; Email::make('Email') - ->instructions('Add the employees email address.') + ->helperText('Add the employees email address.') ->required() ``` @@ -111,7 +111,7 @@ Email::make('Email') use Extended\ACF\Fields\Number; Number::make('Age') - ->instructions('Add the employees age.') + ->helperText('Add the employees age.') ->min(18) ->max(65) ->required() @@ -123,7 +123,7 @@ Number::make('Age') use Extended\ACF\Fields\Password; Password::make('Password') - ->instructions('Add the employees secret pwned password.') + ->helperText('Add the employees secret pwned password.') ->required() ``` @@ -133,7 +133,7 @@ Password::make('Password') use Extended\ACF\Fields\Range; Range::make('Rate') - ->instructions('Add the employees completion rate.') + ->helperText('Add the employees completion rate.') ->min(0) ->max(100) ->step(10) @@ -146,7 +146,7 @@ Range::make('Rate') use Extended\ACF\Fields\Text; Text::make('Name') - ->instructions('Add the employees name.') + ->helperText('Add the employees name.') ->maxLength(100) ->required() ``` @@ -157,7 +157,7 @@ Text::make('Name') use Extended\ACF\Fields\Textarea; Textarea::make('Biography') - ->instructions('Add the employees biography.') + ->helperText('Add the employees biography.') ->newLines('br') // br, wpautop ->maxLength(2000) ->rows(10) @@ -170,7 +170,7 @@ Textarea::make('Biography') use Extended\ACF\Fields\URL; URL::make('Website') - ->instructions('Add the employees website link.') + ->helperText('Add the employees website link.') ->required() ``` @@ -182,7 +182,7 @@ URL::make('Website') use Extended\ACF\Fields\ButtonGroup; ButtonGroup::make('Color') - ->instructions('Select the box shadow color.') + ->helperText('Select the box shadow color.') ->choices(['Forest Green', 'Sky Blue']) // ['forest_green' => 'Forest Green', 'sky_blue' => 'Sky Blue'] ->default('forest_green') ->format('value') // array, label, value (default) @@ -195,7 +195,7 @@ ButtonGroup::make('Color') use Extended\ACF\Fields\Checkbox; Checkbox::make('Color') - ->instructions('Select the border color.') + ->helperText('Select the border color.') ->choices(['Forest Green', 'Sky Blue']) // ['forest_green' => 'Forest Green', 'sky_blue' => 'Sky Blue'] ->default('forest_green') ->format('value') // array, label, value (default) @@ -209,7 +209,7 @@ Checkbox::make('Color') use Extended\ACF\Fields\RadioButton; RadioButton::make('Color') - ->instructions('Select the text color.') + ->helperText('Select the text color.') ->choices(['Forest Green', 'Sky Blue']) // ['forest_green' => 'Forest Green', 'sky_blue' => 'Sky Blue'] ->default('forest_green') ->format('value') // array, label, value (default) @@ -222,7 +222,7 @@ RadioButton::make('Color') use Extended\ACF\Fields\Select; Select::make('Color') - ->instructions('Select the background color.') + ->helperText('Select the background color.') ->choices(['Forest Green', 'Sky Blue']) // ['forest_green' => 'Forest Green', 'sky_blue' => 'Sky Blue'] ->default('forest_green') ->format('value') // array, label, value (default) @@ -239,7 +239,7 @@ Select::make('Color') use Extended\ACF\Fields\TrueFalse; TrueFalse::make('Social Media', 'display_social_media') - ->instructions('Select whether to display social media links or not.') + ->helperText('Select whether to display social media links or not.') ->default(false) ->stylized(on: 'Yes', off: 'No') // optional on and off text labels ->required() @@ -253,7 +253,7 @@ TrueFalse::make('Social Media', 'display_social_media') use Extended\ACF\Fields\File; File::make('Resturant Menu', 'menu') - ->instructions('Add the menu **pdf** file.') + ->helperText('Add the menu **pdf** file.') ->acceptedFileTypes(['pdf']) ->library('all') // all, uploadedTo ->minSize('400 KB') @@ -268,7 +268,7 @@ File::make('Resturant Menu', 'menu') use Extended\ACF\Fields\Gallery; Gallery::make('Images') - ->instructions('Add the gallery images.') + ->helperText('Add the gallery images.') ->acceptedFileTypes(['jpg', 'jpeg', 'png']) ->minHeight(500) ->maxHeight(1400) @@ -291,7 +291,7 @@ Gallery::make('Images') use Extended\ACF\Fields\Image; Image::make('Background Image') - ->instructions('Add an image in at least 12000x100px and only in the formats **jpg**, **jpeg** or **png**.') + ->helperText('Add an image in at least 12000x100px and only in the formats **jpg**, **jpeg** or **png**.') ->acceptedFileTypes(['jpg', 'jpeg', 'png']) ->minHeight(500) ->maxHeight(1400) @@ -311,7 +311,7 @@ Image::make('Background Image') use Extended\ACF\Fields\Oembed; Oembed::make('Tweet') - ->instructions('Add a tweet from Twitter.') + ->helperText('Add a tweet from Twitter.') ->required() ``` @@ -321,7 +321,7 @@ Oembed::make('Tweet') use Extended\ACF\Fields\WYSIWYGEditor; WYSIWYGEditor::make('Content') - ->instructions('Add the text content.') + ->helperText('Add the text content.') ->tabs('visual') // all, text, visual (default) ->toolbar(['bold', 'italic', 'link']) // aligncenter, alignleft, alignright, blockquote, bold, bullist, charmap, forecolor, formatselect, fullscreen, hr, indent, italic, link, numlist, outdent, pastetext, redo, removeformat, spellchecker, strikethrough, underline, undo, wp_adv, wp_help, wp_more ->disableMediaUpload() @@ -337,7 +337,7 @@ WYSIWYGEditor::make('Content') use Extended\ACF\Fields\ColorPicker; ColorPicker::make('Text Color') - ->instructions('Add the text color.') + ->helperText('Add the text color.') ->default('#4a9cff') ->opacity() ->required() @@ -349,7 +349,7 @@ ColorPicker::make('Text Color') use Extended\ACF\Fields\DatePicker; DatePicker::make('Birthday') - ->instructions('Add the employee\'s birthday.') + ->helperText('Add the employee\'s birthday.') ->displayFormat('d/m/Y') ->format('d/m/Y') ->required() @@ -361,7 +361,7 @@ DatePicker::make('Birthday') use Extended\ACF\Fields\TimePicker; TimePicker::make('Start Time', 'time') - ->instructions('Add the start time.') + ->helperText('Add the start time.') ->displayFormat('H:i') ->format('H:i') ->required() @@ -373,7 +373,7 @@ TimePicker::make('Start Time', 'time') use Extended\ACF\Fields\DateTimePicker; DateTimePicker::make('Event Date', 'date') - ->instructions('Add the event\'s start date and time.') + ->helperText('Add the event\'s start date and time.') ->displayFormat('d-m-Y H:i') ->format('d-m-Y H:i') ->firstDayOfWeek(1) // Sunday is 0, Monday is 1, or use `weekStartsOnMonday` or `weekStartsOnSunday` @@ -386,7 +386,7 @@ DateTimePicker::make('Event Date', 'date') use Extended\ACF\Fields\GoogleMap; GoogleMap::make('Address', 'address') - ->instructions('Add the Google Map address.') + ->helperText('Add the Google Map address.') ->center(57.456286, 18.377716) ->zoom(14) ->required() @@ -438,7 +438,7 @@ use Extended\ACF\Fields\Layout; use Extended\ACF\Fields\Text; FlexibleContent::make('Blocks') - ->instructions('Add the page blocks.') + ->helperText('Add the page blocks.') ->button('Add Component') ->layouts([ Layout::make('Image') @@ -460,7 +460,7 @@ use Extended\ACF\Fields\Image; use Extended\ACF\Fields\Text; Group::make('Hero') - ->instructions('Add a hero block with title, content and image to the page.') + ->helperText('Add a hero block with title, content and image to the page.') ->fields([ Text::make('Title'), Image::make('Background Image'), @@ -487,7 +487,7 @@ use Extended\ACF\Fields\Repeater; use Extended\ACF\Fields\Text; Repeater::make('Employees') - ->instructions('Add the employees.') + ->helperText('Add the employees.') ->fields([ Text::make('Name'), Image::make('Profile Picture'), @@ -546,7 +546,7 @@ PageLink::make('Contact Link') use Extended\ACF\Fields\PostObject; PostObject::make('Animal') - ->instructions('Select an animal') + ->helperText('Select an animal') ->postTypes(['animal']) ->postStatus(['publish']) // draft, future, pending, private, publish ->nullabel() @@ -561,7 +561,7 @@ PostObject::make('Animal') use Extended\ACF\Fields\Relationship; Relationship::make('Contacts') - ->instructions('Add the contacts.') + ->helperText('Add the contacts.') ->postTypes(['contact']) ->postStatus(['publish']) // draft, future, pending, private, publish ->filters([ @@ -582,7 +582,7 @@ Relationship::make('Contacts') use Extended\ACF\Fields\Taxonomy; Taxonomy::make('Cinemas') - ->instructions('Select one or more cinema terms.') + ->helperText('Select one or more cinema terms.') ->taxonomy('cinema') ->appearance('checkbox') // checkbox, multi_select, radio, select ->create(false) // false or true (default) @@ -668,13 +668,13 @@ Text::make('Sub Title') ## Non-standards -### `instructions` +### `helperText` -The `instructions` method supports [Markdown](https://wordpress.com/support/markdown-quick-reference/) for the elements listed below. +The `helperText` method supports [Markdown](https://wordpress.com/support/markdown-quick-reference/) for the elements listed below. ```php Text::make('Title') - ->instructions('__strong__ **strong** _italic_ *italic* `code` [link](https://example.com)') + ->helperText('__strong__ **strong** _italic_ *italic* `code` [link](https://example.com)') ``` ### `column` @@ -756,18 +756,18 @@ class Select extends Field ## Custom Fields -To create custom field classes, you can extend the [base field class](src/Fields/Field.php). Additionally, you can import [available setting traits](src/Fields/Settings) to add common methods like `required` and `instructions`. +To create custom field classes, you can extend the [base field class](src/Fields/Field.php). Additionally, you can import [available setting traits](src/Fields/Settings) to add common methods like `required` and `helperText`. ```php namespace App\Fields; use Extended\ACF\Fields\Field; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; class OpenStreetMap extends Field { - use Instructions; + use HelperText; use Required; protected $type = 'open_street_map'; @@ -845,6 +845,13 @@ The `defaultValue` method has been renamed to `default`. +Text::make('Name')->default('Jeffrey Way') ``` +The `instructions` method has been renamed to `helperText`. + +```diff +-Text::make('Title')->instructions('Add the title text.') ++Text::make('Title')->helperText('Add the title text.') +``` + The `allowMultiple` method has been renamed to `multiple`. ```diff diff --git a/src/Fields/Accordion.php b/src/Fields/Accordion.php index e2205a95..b242d790 100644 --- a/src/Fields/Accordion.php +++ b/src/Fields/Accordion.php @@ -14,12 +14,12 @@ namespace Extended\ACF\Fields; use Extended\ACF\Fields\Settings\Endpoint; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; class Accordion extends Field { use Endpoint; - use Instructions; + use HelperText; protected string|null $type = 'accordion'; diff --git a/src/Fields/ButtonGroup.php b/src/Fields/ButtonGroup.php index 0dbc0e4c..63a3a7d9 100644 --- a/src/Fields/ButtonGroup.php +++ b/src/Fields/ButtonGroup.php @@ -17,7 +17,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\DirectionLayout; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -28,7 +28,7 @@ class ButtonGroup extends Field use ConditionalLogic; use DefaultValue; use DirectionLayout; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/Checkbox.php b/src/Fields/Checkbox.php index aa73dd21..8de005f6 100644 --- a/src/Fields/Checkbox.php +++ b/src/Fields/Checkbox.php @@ -18,7 +18,7 @@ use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\DirectionLayout; use Extended\ACF\Fields\Settings\Disabled; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -30,7 +30,7 @@ class Checkbox extends Field use DefaultValue; use DirectionLayout; use Disabled; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/ColorPicker.php b/src/Fields/ColorPicker.php index 8b174ae7..a9390ee7 100644 --- a/src/Fields/ColorPicker.php +++ b/src/Fields/ColorPicker.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -24,7 +24,7 @@ class ColorPicker extends Field { use ConditionalLogic; use DefaultValue; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/DatePicker.php b/src/Fields/DatePicker.php index f297b675..93ecc844 100644 --- a/src/Fields/DatePicker.php +++ b/src/Fields/DatePicker.php @@ -16,8 +16,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DateTimeFormat; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\WeekDay; use Extended\ACF\Fields\Settings\Wrapper; @@ -27,8 +27,8 @@ class DatePicker extends Field use ConditionalLogic; use DateTimeFormat; use Disabled; + use HelperText; use Immutable; - use Instructions; use Required; use WeekDay; use Wrapper; diff --git a/src/Fields/DateTimePicker.php b/src/Fields/DateTimePicker.php index 7b5e2a40..1e101827 100644 --- a/src/Fields/DateTimePicker.php +++ b/src/Fields/DateTimePicker.php @@ -16,8 +16,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DateTimeFormat; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\WeekDay; use Extended\ACF\Fields\Settings\Wrapper; @@ -27,8 +27,8 @@ class DateTimePicker extends Field use ConditionalLogic; use DateTimeFormat; use Disabled; + use HelperText; use Immutable; - use Instructions; use Required; use WeekDay; use Wrapper; diff --git a/src/Fields/Email.php b/src/Fields/Email.php index 8c75a26b..e55f87f0 100644 --- a/src/Fields/Email.php +++ b/src/Fields/Email.php @@ -17,8 +17,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\Placeholder; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -29,8 +29,8 @@ class Email extends Field use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use Placeholder; use Required; use Wrapper; diff --git a/src/Fields/File.php b/src/Fields/File.php index 0f6cf5c5..948a5113 100644 --- a/src/Fields/File.php +++ b/src/Fields/File.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\FileSize; use Extended\ACF\Fields\Settings\FileTypes; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Library; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -27,7 +27,7 @@ class File extends Field use ConditionalLogic; use FileSize; use FileTypes; - use Instructions; + use HelperText; use Library; use Required; use Wrapper; diff --git a/src/Fields/FlexibleContent.php b/src/Fields/FlexibleContent.php index 938ed481..1ac196ad 100644 --- a/src/Fields/FlexibleContent.php +++ b/src/Fields/FlexibleContent.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ButtonLabel; use Extended\ACF\Fields\Settings\ConditionalLogic; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -23,7 +23,7 @@ class FlexibleContent extends Field { use ButtonLabel; use ConditionalLogic; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/Gallery.php b/src/Fields/Gallery.php index 131747ef..ec3dc5c9 100644 --- a/src/Fields/Gallery.php +++ b/src/Fields/Gallery.php @@ -17,7 +17,7 @@ use Extended\ACF\Fields\Settings\Dimensions; use Extended\ACF\Fields\Settings\FileSize; use Extended\ACF\Fields\Settings\FileTypes; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Library; use Extended\ACF\Fields\Settings\PreviewSize; use Extended\ACF\Fields\Settings\Required; @@ -30,7 +30,7 @@ class Gallery extends Field use Dimensions; use FileSize; use FileTypes; - use Instructions; + use HelperText; use Library; use PreviewSize; use Required; diff --git a/src/Fields/GoogleMap.php b/src/Fields/GoogleMap.php index 46fedc9c..d3f17365 100644 --- a/src/Fields/GoogleMap.php +++ b/src/Fields/GoogleMap.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\Height; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -23,7 +23,7 @@ class GoogleMap extends Field { use ConditionalLogic; use Height; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/Group.php b/src/Fields/Group.php index c17b29c4..bade0c93 100644 --- a/src/Fields/Group.php +++ b/src/Fields/Group.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\Fields; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Layout; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -24,7 +24,7 @@ class Group extends Field { use ConditionalLogic; use Fields; - use Instructions; + use HelperText; use Layout; use Required; use Wrapper; diff --git a/src/Fields/Image.php b/src/Fields/Image.php index 13683be7..aeecfa79 100644 --- a/src/Fields/Image.php +++ b/src/Fields/Image.php @@ -17,7 +17,7 @@ use Extended\ACF\Fields\Settings\Dimensions; use Extended\ACF\Fields\Settings\FileSize; use Extended\ACF\Fields\Settings\FileTypes; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Library; use Extended\ACF\Fields\Settings\PreviewSize; use Extended\ACF\Fields\Settings\Required; @@ -30,7 +30,7 @@ class Image extends Field use Dimensions; use FileSize; use FileTypes; - use Instructions; + use HelperText; use Library; use PreviewSize; use Required; diff --git a/src/Fields/Link.php b/src/Fields/Link.php index 97eea884..c4f6685d 100644 --- a/src/Fields/Link.php +++ b/src/Fields/Link.php @@ -14,7 +14,7 @@ namespace Extended\ACF\Fields; use Extended\ACF\Fields\Settings\ConditionalLogic; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -22,7 +22,7 @@ class Link extends Field { use ConditionalLogic; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/Number.php b/src/Fields/Number.php index 1db04c00..36853f27 100644 --- a/src/Fields/Number.php +++ b/src/Fields/Number.php @@ -17,8 +17,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\MinMax; use Extended\ACF\Fields\Settings\Placeholder; use Extended\ACF\Fields\Settings\Required; @@ -31,8 +31,8 @@ class Number extends Field use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use MinMax; use Placeholder; use Required; diff --git a/src/Fields/Oembed.php b/src/Fields/Oembed.php index 072018be..c1b2f46c 100644 --- a/src/Fields/Oembed.php +++ b/src/Fields/Oembed.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\Height; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -23,7 +23,7 @@ class Oembed extends Field { use ConditionalLogic; use Height; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/PageLink.php b/src/Fields/PageLink.php index f1e4ff5d..52aaa8c8 100644 --- a/src/Fields/PageLink.php +++ b/src/Fields/PageLink.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\FilterBy; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Multiple; use Extended\ACF\Fields\Settings\Nullable; use Extended\ACF\Fields\Settings\Required; @@ -25,7 +25,7 @@ class PageLink extends Field { use ConditionalLogic; use FilterBy; - use Instructions; + use HelperText; use Multiple; use Nullable; use Required; diff --git a/src/Fields/Password.php b/src/Fields/Password.php index edbab594..c45d2bfa 100644 --- a/src/Fields/Password.php +++ b/src/Fields/Password.php @@ -15,8 +15,8 @@ use Extended\ACF\Fields\Settings\Affixable; use Extended\ACF\Fields\Settings\ConditionalLogic; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\Placeholder; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -25,8 +25,8 @@ class Password extends Field { use Affixable; use ConditionalLogic; + use HelperText; use Immutable; - use Instructions; use Placeholder; use Required; use Wrapper; diff --git a/src/Fields/PostObject.php b/src/Fields/PostObject.php index bbd647c6..47257687 100644 --- a/src/Fields/PostObject.php +++ b/src/Fields/PostObject.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\FilterBy; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Multiple; use Extended\ACF\Fields\Settings\Nullable; use Extended\ACF\Fields\Settings\Required; @@ -26,7 +26,7 @@ class PostObject extends Field { use ConditionalLogic; use FilterBy; - use Instructions; + use HelperText; use Multiple; use Nullable; use Required; diff --git a/src/Fields/RadioButton.php b/src/Fields/RadioButton.php index 33a77d5b..8b9c45e2 100644 --- a/src/Fields/RadioButton.php +++ b/src/Fields/RadioButton.php @@ -18,7 +18,7 @@ use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\DirectionLayout; use Extended\ACF\Fields\Settings\Disabled; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Nullable; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -31,7 +31,7 @@ class RadioButton extends Field use DefaultValue; use DirectionLayout; use Disabled; - use Instructions; + use HelperText; use Nullable; use Required; use Wrapper; diff --git a/src/Fields/Range.php b/src/Fields/Range.php index 43d20965..c7837431 100644 --- a/src/Fields/Range.php +++ b/src/Fields/Range.php @@ -17,8 +17,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\MinMax; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Step; @@ -30,8 +30,8 @@ class Range extends Field use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use MinMax; use Required; use Step; diff --git a/src/Fields/Relationship.php b/src/Fields/Relationship.php index 68cee2c8..073d0a72 100644 --- a/src/Fields/Relationship.php +++ b/src/Fields/Relationship.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\FilterBy; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -24,7 +24,7 @@ class Relationship extends Field { use ConditionalLogic; use FilterBy; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/Repeater.php b/src/Fields/Repeater.php index fa8355a1..f399d76b 100644 --- a/src/Fields/Repeater.php +++ b/src/Fields/Repeater.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\Settings\ButtonLabel; use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\Fields; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Layout; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -26,7 +26,7 @@ class Repeater extends Field use ButtonLabel; use ConditionalLogic; use Fields; - use Instructions; + use HelperText; use Layout; use Required; use Wrapper; diff --git a/src/Fields/Select.php b/src/Fields/Select.php index 4465a566..c11a58ee 100644 --- a/src/Fields/Select.php +++ b/src/Fields/Select.php @@ -17,8 +17,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\Multiple; use Extended\ACF\Fields\Settings\Nullable; use Extended\ACF\Fields\Settings\Required; @@ -31,8 +31,8 @@ class Select extends Field use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use Multiple; use Nullable; use Required; diff --git a/src/Fields/Settings/Instructions.php b/src/Fields/Settings/HelperText.php similarity index 94% rename from src/Fields/Settings/Instructions.php rename to src/Fields/Settings/HelperText.php index ef113532..9a8e04fa 100644 --- a/src/Fields/Settings/Instructions.php +++ b/src/Fields/Settings/HelperText.php @@ -13,13 +13,13 @@ namespace Extended\ACF\Fields\Settings; -trait Instructions +trait HelperText { /** * @param string $text The Markdown elements supported include ``, ``, ``, and ``. * @see https://wordpress.com/support/markdown-quick-reference/ */ - public function instructions(string $text): static + public function helperText(string $text): static { // Replace emphasis formatting: *text* or _text_ => text $text = preg_replace('/\*\*(.*?)\*\*|__(.*?)__/', '$1$2', $text); diff --git a/src/Fields/Taxonomy.php b/src/Fields/Taxonomy.php index 316e31b9..63ff2144 100644 --- a/src/Fields/Taxonomy.php +++ b/src/Fields/Taxonomy.php @@ -14,7 +14,7 @@ namespace Extended\ACF\Fields; use Extended\ACF\Fields\Settings\ConditionalLogic; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Nullable; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -23,7 +23,7 @@ class Taxonomy extends Field { use ConditionalLogic; - use Instructions; + use HelperText; use Nullable; use Required; use Wrapper; diff --git a/src/Fields/Text.php b/src/Fields/Text.php index 9be531a1..b8e452a4 100644 --- a/src/Fields/Text.php +++ b/src/Fields/Text.php @@ -17,8 +17,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\MaxLength; use Extended\ACF\Fields\Settings\Placeholder; use Extended\ACF\Fields\Settings\Required; @@ -30,8 +30,8 @@ class Text extends Field use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use MaxLength; use Placeholder; use Required; diff --git a/src/Fields/Textarea.php b/src/Fields/Textarea.php index a3d41e2a..4784acd2 100644 --- a/src/Fields/Textarea.php +++ b/src/Fields/Textarea.php @@ -16,8 +16,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\MaxLength; use Extended\ACF\Fields\Settings\NewLines; use Extended\ACF\Fields\Settings\Placeholder; @@ -29,8 +29,8 @@ class Textarea extends Field use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use MaxLength; use NewLines; use Placeholder; diff --git a/src/Fields/TimePicker.php b/src/Fields/TimePicker.php index 8afe818e..b77e6cc0 100644 --- a/src/Fields/TimePicker.php +++ b/src/Fields/TimePicker.php @@ -16,8 +16,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DateTimeFormat; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -26,8 +26,8 @@ class TimePicker extends Field use ConditionalLogic; use DateTimeFormat; use Disabled; + use HelperText; use Immutable; - use Instructions; use Required; use Wrapper; diff --git a/src/Fields/TrueFalse.php b/src/Fields/TrueFalse.php index 116dbe6c..e0b63d1c 100644 --- a/src/Fields/TrueFalse.php +++ b/src/Fields/TrueFalse.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -23,7 +23,7 @@ class TrueFalse extends Field { use ConditionalLogic; use DefaultValue; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/src/Fields/URL.php b/src/Fields/URL.php index 906c3096..3e5b738f 100644 --- a/src/Fields/URL.php +++ b/src/Fields/URL.php @@ -16,8 +16,8 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; use Extended\ACF\Fields\Settings\Disabled; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Immutable; -use Extended\ACF\Fields\Settings\Instructions; use Extended\ACF\Fields\Settings\Placeholder; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; @@ -27,8 +27,8 @@ class URL extends Field use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use Placeholder; use Required; use Wrapper; diff --git a/src/Fields/User.php b/src/Fields/User.php index 321d2866..d853d8dd 100644 --- a/src/Fields/User.php +++ b/src/Fields/User.php @@ -14,7 +14,7 @@ namespace Extended\ACF\Fields; use Extended\ACF\Fields\Settings\ConditionalLogic; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Multiple; use Extended\ACF\Fields\Settings\Nullable; use Extended\ACF\Fields\Settings\Required; @@ -24,7 +24,7 @@ class User extends Field { use ConditionalLogic; - use Instructions; + use HelperText; use Multiple; use Nullable; use Required; diff --git a/src/Fields/WYSIWYGEditor.php b/src/Fields/WYSIWYGEditor.php index ea77d49d..e3e59f23 100644 --- a/src/Fields/WYSIWYGEditor.php +++ b/src/Fields/WYSIWYGEditor.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Settings\ConditionalLogic; use Extended\ACF\Fields\Settings\DefaultValue; -use Extended\ACF\Fields\Settings\Instructions; +use Extended\ACF\Fields\Settings\HelperText; use Extended\ACF\Fields\Settings\Required; use Extended\ACF\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -24,7 +24,7 @@ class WYSIWYGEditor extends Field { use ConditionalLogic; use DefaultValue; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/AccordionTest.php b/tests/Fields/AccordionTest.php index 510dda62..70d29371 100644 --- a/tests/Fields/AccordionTest.php +++ b/tests/Fields/AccordionTest.php @@ -15,12 +15,12 @@ use Extended\ACF\Fields\Accordion; use Extended\ACF\Tests\Fields\Settings\Endpoint; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; class AccordionTest extends FieldTestCase { use Endpoint; - use Instructions; + use HelperText; public string $field = Accordion::class; public string $type = 'accordion'; diff --git a/tests/Fields/ButtonGroupTest.php b/tests/Fields/ButtonGroupTest.php index 9433a6e6..fbe7c2cf 100644 --- a/tests/Fields/ButtonGroupTest.php +++ b/tests/Fields/ButtonGroupTest.php @@ -18,7 +18,7 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\DirectionLayout; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -29,7 +29,7 @@ class ButtonGroupTest extends FieldTestCase use ConditionalLogic; use DefaultValue; use DirectionLayout; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/CheckboxTest.php b/tests/Fields/CheckboxTest.php index 94f124ba..d22f0dbf 100644 --- a/tests/Fields/CheckboxTest.php +++ b/tests/Fields/CheckboxTest.php @@ -20,7 +20,7 @@ use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\DirectionLayout; use Extended\ACF\Tests\Fields\Settings\Disabled; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -32,7 +32,7 @@ class CheckboxTest extends FieldTestCase use DefaultValue; use DirectionLayout; use Disabled; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/ColorPickerTest.php b/tests/Fields/ColorPickerTest.php index 1b54010c..50e73271 100644 --- a/tests/Fields/ColorPickerTest.php +++ b/tests/Fields/ColorPickerTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\ColorPicker; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -25,7 +25,7 @@ class ColorPickerTest extends FieldTestCase { use ConditionalLogic; use DefaultValue; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/DatePickerTest.php b/tests/Fields/DatePickerTest.php index 0b222be1..4eb6ef06 100644 --- a/tests/Fields/DatePickerTest.php +++ b/tests/Fields/DatePickerTest.php @@ -17,8 +17,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DateTimeFormat; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\WeekDay; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -28,8 +28,8 @@ class DatePickerTest extends FieldTestCase use ConditionalLogic; use DateTimeFormat; use Disabled; + use HelperText; use Immutable; - use Instructions; use Required; use WeekDay; use Wrapper; diff --git a/tests/Fields/DateTimePickerTest.php b/tests/Fields/DateTimePickerTest.php index b60e6622..6a4ab049 100644 --- a/tests/Fields/DateTimePickerTest.php +++ b/tests/Fields/DateTimePickerTest.php @@ -17,8 +17,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DateTimeFormat; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\WeekDay; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -28,8 +28,8 @@ class DateTimePickerTest extends FieldTestCase use ConditionalLogic; use DateTimeFormat; use Disabled; + use HelperText; use Immutable; - use Instructions; use Required; use WeekDay; use Wrapper; diff --git a/tests/Fields/EmailTest.php b/tests/Fields/EmailTest.php index c6ed08d4..cfe10e9a 100644 --- a/tests/Fields/EmailTest.php +++ b/tests/Fields/EmailTest.php @@ -18,8 +18,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\Placeholder; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -30,8 +30,8 @@ class EmailTest extends FieldTestCase use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use Placeholder; use Required; use Wrapper; diff --git a/tests/Fields/FileTest.php b/tests/Fields/FileTest.php index 101b8ecf..5b0d6f84 100644 --- a/tests/Fields/FileTest.php +++ b/tests/Fields/FileTest.php @@ -17,7 +17,7 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\FileSize; use Extended\ACF\Tests\Fields\Settings\FileTypes; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Library; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -28,7 +28,7 @@ class FileTest extends FieldTestCase use ConditionalLogic; use FileSize; use FileTypes; - use Instructions; + use HelperText; use Library; use Required; use Wrapper; diff --git a/tests/Fields/FlexibleContentTest.php b/tests/Fields/FlexibleContentTest.php index 33928125..7313c8cb 100644 --- a/tests/Fields/FlexibleContentTest.php +++ b/tests/Fields/FlexibleContentTest.php @@ -18,7 +18,7 @@ use Extended\ACF\Fields\Text; use Extended\ACF\Tests\Fields\Settings\ButtonLabel; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -26,7 +26,7 @@ class FlexibleContentTest extends FieldTestCase { use ButtonLabel; use ConditionalLogic; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/GalleryTest.php b/tests/Fields/GalleryTest.php index d3bd5465..ea6b9208 100644 --- a/tests/Fields/GalleryTest.php +++ b/tests/Fields/GalleryTest.php @@ -18,7 +18,7 @@ use Extended\ACF\Tests\Fields\Settings\Dimensions; use Extended\ACF\Tests\Fields\Settings\FileSize; use Extended\ACF\Tests\Fields\Settings\FileTypes; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Library; use Extended\ACF\Tests\Fields\Settings\PreviewSize; use Extended\ACF\Tests\Fields\Settings\Required; @@ -31,7 +31,7 @@ class GalleryTest extends FieldTestCase use Dimensions; use FileSize; use FileTypes; - use Instructions; + use HelperText; use Library; use PreviewSize; use Required; diff --git a/tests/Fields/GoogleMapTest.php b/tests/Fields/GoogleMapTest.php index ef92afe7..d4466086 100644 --- a/tests/Fields/GoogleMapTest.php +++ b/tests/Fields/GoogleMapTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\GoogleMap; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\Height; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -24,7 +24,7 @@ class GoogleMapTest extends FieldTestCase { use ConditionalLogic; use Height; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/GroupTest.php b/tests/Fields/GroupTest.php index e65fb014..4777c461 100644 --- a/tests/Fields/GroupTest.php +++ b/tests/Fields/GroupTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\Group; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\Fields; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Layout; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -25,7 +25,7 @@ class GroupTest extends FieldTestCase { use ConditionalLogic; use Fields; - use Instructions; + use HelperText; use Layout; use Required; use Wrapper; diff --git a/tests/Fields/ImageTest.php b/tests/Fields/ImageTest.php index 815aa499..4823f283 100644 --- a/tests/Fields/ImageTest.php +++ b/tests/Fields/ImageTest.php @@ -18,7 +18,7 @@ use Extended\ACF\Tests\Fields\Settings\Dimensions; use Extended\ACF\Tests\Fields\Settings\FileSize; use Extended\ACF\Tests\Fields\Settings\FileTypes; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Library; use Extended\ACF\Tests\Fields\Settings\PreviewSize; use Extended\ACF\Tests\Fields\Settings\Required; @@ -31,7 +31,7 @@ class ImageTest extends FieldTestCase use Dimensions; use FileSize; use FileTypes; - use Instructions; + use HelperText; use Library; use PreviewSize; use Required; diff --git a/tests/Fields/LinkTest.php b/tests/Fields/LinkTest.php index 530818df..f495ce98 100644 --- a/tests/Fields/LinkTest.php +++ b/tests/Fields/LinkTest.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Link; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -23,7 +23,7 @@ class LinkTest extends FieldTestCase { use ConditionalLogic; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/NumberTest.php b/tests/Fields/NumberTest.php index 693e9301..776098fb 100644 --- a/tests/Fields/NumberTest.php +++ b/tests/Fields/NumberTest.php @@ -18,8 +18,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\MinMax; use Extended\ACF\Tests\Fields\Settings\Placeholder; use Extended\ACF\Tests\Fields\Settings\Required; @@ -32,8 +32,8 @@ class NumberTest extends FieldTestCase use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use MinMax; use Placeholder; use Required; diff --git a/tests/Fields/OembedTest.php b/tests/Fields/OembedTest.php index 335dc8df..f7c8a072 100644 --- a/tests/Fields/OembedTest.php +++ b/tests/Fields/OembedTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\Oembed; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\Height; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -24,7 +24,7 @@ class OembedTest extends FieldTestCase { use ConditionalLogic; use Height; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/PageLinkTest.php b/tests/Fields/PageLinkTest.php index d61d15bb..57ce9e53 100644 --- a/tests/Fields/PageLinkTest.php +++ b/tests/Fields/PageLinkTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\PageLink; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\FilterBy; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Multiple; use Extended\ACF\Tests\Fields\Settings\Nullable; use Extended\ACF\Tests\Fields\Settings\Required; @@ -26,7 +26,7 @@ class PageLinkTest extends FieldTestCase { use ConditionalLogic; use FilterBy; - use Instructions; + use HelperText; use Multiple; use Nullable; use Required; diff --git a/tests/Fields/PasswordTest.php b/tests/Fields/PasswordTest.php index 8a5e733b..1667d462 100644 --- a/tests/Fields/PasswordTest.php +++ b/tests/Fields/PasswordTest.php @@ -16,8 +16,8 @@ use Extended\ACF\Fields\Password; use Extended\ACF\Tests\Fields\Settings\Affixable; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\Placeholder; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -26,8 +26,8 @@ class PasswordTest extends FieldTestCase { use Affixable; use ConditionalLogic; + use HelperText; use Immutable; - use Instructions; use Placeholder; use Required; use Wrapper; diff --git a/tests/Fields/PostObjectTest.php b/tests/Fields/PostObjectTest.php index c90d9adf..f4c93349 100644 --- a/tests/Fields/PostObjectTest.php +++ b/tests/Fields/PostObjectTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\PostObject; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\FilterBy; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Multiple; use Extended\ACF\Tests\Fields\Settings\Nullable; use Extended\ACF\Tests\Fields\Settings\Required; @@ -27,7 +27,7 @@ class PostObjectTest extends FieldTestCase { use ConditionalLogic; use FilterBy; - use Instructions; + use HelperText; use Multiple; use Nullable; use Required; diff --git a/tests/Fields/RadioButtonTest.php b/tests/Fields/RadioButtonTest.php index 5a0a033c..65a430fe 100644 --- a/tests/Fields/RadioButtonTest.php +++ b/tests/Fields/RadioButtonTest.php @@ -19,7 +19,7 @@ use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\DirectionLayout; use Extended\ACF\Tests\Fields\Settings\Disabled; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Nullable; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -32,7 +32,7 @@ class RadioButtonTest extends FieldTestCase use DefaultValue; use DirectionLayout; use Disabled; - use Instructions; + use HelperText; use Nullable; use Required; use Wrapper; diff --git a/tests/Fields/RangeTest.php b/tests/Fields/RangeTest.php index 6c6cca83..8397a7cd 100644 --- a/tests/Fields/RangeTest.php +++ b/tests/Fields/RangeTest.php @@ -18,8 +18,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\MinMax; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Step; @@ -31,8 +31,8 @@ class RangeTest extends FieldTestCase use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use MinMax; use Required; use Step; diff --git a/tests/Fields/RelationshipTest.php b/tests/Fields/RelationshipTest.php index 1fbdb9d2..27397220 100644 --- a/tests/Fields/RelationshipTest.php +++ b/tests/Fields/RelationshipTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\Relationship; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\FilterBy; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -25,7 +25,7 @@ class RelationshipTest extends FieldTestCase { use ConditionalLogic; use FilterBy; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/RepeaterTest.php b/tests/Fields/RepeaterTest.php index 66869f2d..46a0b352 100644 --- a/tests/Fields/RepeaterTest.php +++ b/tests/Fields/RepeaterTest.php @@ -18,7 +18,7 @@ use Extended\ACF\Tests\Fields\Settings\ButtonLabel; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\Fields; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Layout; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -28,7 +28,7 @@ class RepeaterTest extends FieldTestCase use ButtonLabel; use ConditionalLogic; use Fields; - use Instructions; + use HelperText; use Layout; use Required; use Wrapper; diff --git a/tests/Fields/SelectTest.php b/tests/Fields/SelectTest.php index d7f082f9..6082af2b 100644 --- a/tests/Fields/SelectTest.php +++ b/tests/Fields/SelectTest.php @@ -18,8 +18,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\Multiple; use Extended\ACF\Tests\Fields\Settings\Nullable; use Extended\ACF\Tests\Fields\Settings\Required; @@ -32,8 +32,8 @@ class SelectTest extends FieldTestCase use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use Multiple; use Nullable; use Required; diff --git a/tests/Fields/Settings/Instructions.php b/tests/Fields/Settings/HelperText.php similarity index 75% rename from tests/Fields/Settings/Instructions.php rename to tests/Fields/Settings/HelperText.php index a80367e2..4f13dcea 100644 --- a/tests/Fields/Settings/Instructions.php +++ b/tests/Fields/Settings/HelperText.php @@ -13,11 +13,11 @@ namespace Extended\ACF\Tests\Fields\Settings; -trait Instructions +trait HelperText { public function testInstructions() { - $field = $this->make('Instructions')->instructions('text **strong** *italic* __strong__ _italic_ `code` [link](https://advancedcustomfields.com/)')->get(); + $field = $this->make('Helper Text')->helperText('text **strong** *italic* __strong__ _italic_ `code` [link](https://advancedcustomfields.com/)')->get(); $this->assertSame('text strong italic strong italic code link', $field['instructions']); } } diff --git a/tests/Fields/TaxonomyTest.php b/tests/Fields/TaxonomyTest.php index 45be493c..cba10c57 100644 --- a/tests/Fields/TaxonomyTest.php +++ b/tests/Fields/TaxonomyTest.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\Taxonomy; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Nullable; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -24,7 +24,7 @@ class TaxonomyTest extends FieldTestCase { use ConditionalLogic; - use Instructions; + use HelperText; use Nullable; use Required; use Wrapper; diff --git a/tests/Fields/TextTest.php b/tests/Fields/TextTest.php index f88f8103..4db3e59b 100644 --- a/tests/Fields/TextTest.php +++ b/tests/Fields/TextTest.php @@ -18,8 +18,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\MaxLength; use Extended\ACF\Tests\Fields\Settings\Placeholder; use Extended\ACF\Tests\Fields\Settings\Required; @@ -31,8 +31,8 @@ class TextTest extends FieldTestCase use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use MaxLength; use Placeholder; use Required; diff --git a/tests/Fields/TextareaTest.php b/tests/Fields/TextareaTest.php index 16cdbd90..c6c16a07 100644 --- a/tests/Fields/TextareaTest.php +++ b/tests/Fields/TextareaTest.php @@ -17,8 +17,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\MaxLength; use Extended\ACF\Tests\Fields\Settings\NewLines; use Extended\ACF\Tests\Fields\Settings\Placeholder; @@ -30,8 +30,8 @@ class TextareaTest extends FieldTestCase use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use MaxLength; use NewLines; use Placeholder; diff --git a/tests/Fields/TimePickerTest.php b/tests/Fields/TimePickerTest.php index 3af1eee4..7752b4b3 100644 --- a/tests/Fields/TimePickerTest.php +++ b/tests/Fields/TimePickerTest.php @@ -17,8 +17,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DateTimeFormat; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -27,8 +27,8 @@ class TimePickerTest extends FieldTestCase use ConditionalLogic; use DateTimeFormat; use Disabled; + use HelperText; use Immutable; - use Instructions; use Required; use Wrapper; diff --git a/tests/Fields/TrueFalseTest.php b/tests/Fields/TrueFalseTest.php index 4e8369a4..9a36959b 100644 --- a/tests/Fields/TrueFalseTest.php +++ b/tests/Fields/TrueFalseTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\TrueFalse; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -24,7 +24,7 @@ class TrueFalseTest extends FieldTestCase { use ConditionalLogic; use DefaultValue; - use Instructions; + use HelperText; use Required; use Wrapper; diff --git a/tests/Fields/URLTest.php b/tests/Fields/URLTest.php index 7ae9fbd9..f7771d90 100644 --- a/tests/Fields/URLTest.php +++ b/tests/Fields/URLTest.php @@ -17,8 +17,8 @@ use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; use Extended\ACF\Tests\Fields\Settings\Disabled; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Immutable; -use Extended\ACF\Tests\Fields\Settings\Instructions; use Extended\ACF\Tests\Fields\Settings\Placeholder; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; @@ -28,8 +28,8 @@ class URLTest extends FieldTestCase use ConditionalLogic; use DefaultValue; use Disabled; + use HelperText; use Immutable; - use Instructions; use Placeholder; use Required; use Wrapper; diff --git a/tests/Fields/UserTest.php b/tests/Fields/UserTest.php index 68306ea1..a233dfc3 100644 --- a/tests/Fields/UserTest.php +++ b/tests/Fields/UserTest.php @@ -15,7 +15,7 @@ use Extended\ACF\Fields\User; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Multiple; use Extended\ACF\Tests\Fields\Settings\Nullable; use Extended\ACF\Tests\Fields\Settings\Required; @@ -25,7 +25,7 @@ class UserTest extends FieldTestCase { use ConditionalLogic; - use Instructions; + use HelperText; use Multiple; use Nullable; use Required; diff --git a/tests/Fields/WYSIWYGEditorTest.php b/tests/Fields/WYSIWYGEditorTest.php index 15b4a3aa..0ddb9722 100644 --- a/tests/Fields/WYSIWYGEditorTest.php +++ b/tests/Fields/WYSIWYGEditorTest.php @@ -16,7 +16,7 @@ use Extended\ACF\Fields\WYSIWYGEditor; use Extended\ACF\Tests\Fields\Settings\ConditionalLogic; use Extended\ACF\Tests\Fields\Settings\DefaultValue; -use Extended\ACF\Tests\Fields\Settings\Instructions; +use Extended\ACF\Tests\Fields\Settings\HelperText; use Extended\ACF\Tests\Fields\Settings\Required; use Extended\ACF\Tests\Fields\Settings\Wrapper; use InvalidArgumentException; @@ -25,7 +25,7 @@ class WYSIWYGEditorTest extends FieldTestCase { use ConditionalLogic; use DefaultValue; - use Instructions; + use HelperText; use Required; use Wrapper;