Created
May 11, 2016 18:25
-
-
Save kellenmace/e88a4f93fd84217f5c720fccab668507 to your computer and use it in GitHub Desktop.
Set Advanced Custom Fields metabox priority
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set Advanced Custom Fields metabox priority. | |
* | |
* @param string $priority The metabox priority. | |
* @param array $field_group The field group data. | |
* @return string $priority The metabox priority, modified. | |
*/ | |
function km_set_acf_metabox_priority( $priority, $field_group ) { | |
if ( 'My Field Group' === $field_group['title'] ) { | |
$priority = 'high'; | |
} | |
return $priority; | |
} | |
add_filter( 'acf/input/meta_box_priority', 'km_set_acf_metabox_priority', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment