We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using the position attribute to move a group to the sidebar of the edit page, I've encountered an error with the migrations script.
position
It appears that the option is added always as position => normal, even when position => side is declared, as shown below.
position => normal
position => side
The expected outcome as created in Custom Fields plugin:
acf_add_local_field_group(array ( ... 'menu_order' => 0, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '', ));
The actual outcome in export.php:
export.php
... "options" => [ "position" => "normal", "hide_on_screen" => "" ], "menu_order" => 0, "position" => "side", "style" => "default", "label_placement" => "top", "instruction_placement" => "label", "hide_on_screen" => "", "active" => 1, "description" => ""
The problem persists even when explicitly defining the options array in migrations:
options
'position' => 'side', 'options' => [ 'position' => 'side', ],
The text was updated successfully, but these errors were encountered:
The same is also true for the menu_order flag:
menu_order
The following code:
$migrations->addFieldGroup( 'Dynamic Content', [ 'page_template', '==', 'templates/homepage.php', ], [ 'menu_order' => 1, 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', ] );
Results in this output:
function acf_migrations_add_local_field_groups() { acf_add_local_field_group( [ "key" => "group_3c4e0a6", "title" => "Dynamic Content", "location" => [ [ [ "param" => "page_template", "operator" => "==", "value" => "templates/homepage.php" ] ] ], "options" => [ "position" => "normal", "hide_on_screen" => "" ], "menu_order" => 0, // Here's the offending value "style" => "default", "label_placement" => "top", "instruction_placement" => "label"
Sorry, something went wrong.
This will be picked up in #12 from now on.
olivertappin
No branches or pull requests
When using the
position
attribute to move a group to the sidebar of the edit page, I've encountered an error with the migrations script.It appears that the option is added always as
position => normal
, even whenposition => side
is declared, as shown below.The expected outcome as created in Custom Fields plugin:
The actual outcome in
export.php
:The problem persists even when explicitly defining the
options
array in migrations:The text was updated successfully, but these errors were encountered: