Skip to content

Commit

Permalink
alpha sort for layout array
Browse files Browse the repository at this point in the history
  • Loading branch information
gwelser committed Mar 15, 2017
1 parent 7b405f0 commit c459b97
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ directory take precedence. For example, `/assets/screenshot-1.png` would win ove

== Changelog ==

= 1.1.3 =
* Alpha sort for layout array

= 1.0 =
* A change since the previous version.
* Another change.
Expand Down Expand Up @@ -111,4 +114,4 @@ Titles are optional, naturally.
Markdown uses email style notation for blockquotes and I've been told:
> Asterisks for *emphasis*. Double it up for **strong**.

`<?php code(); // goes in backticks ?>`
`<?php code(); // goes in backticks ?>`
2 changes: 1 addition & 1 deletion acf-flex-layouts.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: ACF Flex Layouts
* Plugin URI: http://example.com/acf-flex-layouts-uri/
* Description: A library of pre-built flexible content layouts for ACF.
* Version: 1.1.2
* Version: 1.1.3
* Author: Clark/Nikdel/Powell
* Author URI: http://example.com/
* License: GPL-2.0+
Expand Down
4 changes: 4 additions & 0 deletions admin/partials/registered-field-groups/flex-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -3400,6 +3400,8 @@
];
$layouts_arr = apply_filters( 'afl/group/layout_args', $layouts_arr, $extra_fields_args );

asort($layouts_arr);


/*——————————————————————————————————————————————————————————————————————————————
/ Add Another Field Group with the "Section" Layout (Inception-style stuff here)
Expand Down Expand Up @@ -3459,6 +3461,8 @@
array_unshift( $layouts_arr, $section_layout_args );
$layouts_with_section_arr = $layouts_arr;

asort($layouts_with_section_arr);

#endregion


Expand Down

0 comments on commit c459b97

Please sign in to comment.