Skip to content

Commit

Permalink
Update example files
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkla committed Nov 7, 2023
1 parent 410f980 commit 2aa1bd0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
8 changes: 5 additions & 3 deletions examples/custom-post-type.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Extended\ACF\Fields\Email;
use Extended\ACF\Fields\Text;
use Extended\ACF\Location;
Expand All @@ -8,13 +10,13 @@
'title' => 'Employee',
'fields' => [
Text::make('Title')
->instructions('Add the employee title.')
->helperText('Add the employee title.')
->required(),
Email::make('Email address', 'email')
->instructions('Add the employee email address.')
->helperText('Add the employee email address.')
->required(),
Text::make('Phone number', 'phone')
->instructions('Add the employee phone number.'),
->helperText('Add the employee phone number.'),
],
'location' => [
Location::where('post_type', 'employee'),
Expand Down
4 changes: 3 additions & 1 deletion examples/gutenberg-block.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

// This example is registering a Gutenberg block page using ACF. Please see the
// documentation for more information:
// https://www.advancedcustomfields.com/resources/blocks/
Expand All @@ -14,7 +16,7 @@
'fields' => [
PostObject::make('Employee')
->postTypes(['employee'])
->returnFormat('object')
->format('object')
],
'location' => [
Location::where('block', 'acf/employee')
Expand Down
6 changes: 4 additions & 2 deletions examples/options-page.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

// This example is registering a option page using ACF. Please see the
// documentation for more information:
// https://www.advancedcustomfields.com/resources/acf_add_options_page/
Expand All @@ -19,12 +21,12 @@
'title' => 'Cookie',
'fields' => [
WYSIWYGEditor::make('Text', 'cookie_text')
->instructions('Add the cookie disclaimer text.')
->helperText('Add the cookie disclaimer text.')
->disableMediaUpload(false)
->tabs('visual')
->required(),
Text::make('Label', 'cookie_label')
->instructions('Add the button label.')
->helperText('Add the button label.')
->required(),
],
'location' => [
Expand Down
4 changes: 3 additions & 1 deletion examples/with-extended-cpts.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

// This example is using the Extended CPTs package to register custom post types
// and taxanomies. Please see the repository for more information:
// https://github.com/johnbillion/extended-cpts
Expand Down Expand Up @@ -37,7 +39,7 @@
'title' => 'FAQ',
'fields' => [
WYSIWYGEditor::make('Answer')
->instructions('Add the question answer.')
->helperText('Add the question answer.')
->disableMediaUpload()
->tabs('visual')
->required(),
Expand Down

0 comments on commit 2aa1bd0

Please sign in to comment.