Skip to content

Instantly share code, notes, and snippets.

@badabingbreda
Created December 22, 2016 09:34
Show Gist options
  • Save badabingbreda/a620189bce152cb92af6e2b9ccb412b2 to your computer and use it in GitHub Desktop.
Save badabingbreda/a620189bce152cb92af6e2b9ccb412b2 to your computer and use it in GitHub Desktop.
ACF Template Builder - Add a custom shortcode attribute
add_filter( 'bbacf/helpers/sc_attr/type=google_map' , 'add_color_sc_attribute' );
/**
* add the postid attribute to the default sc attr
* @param [type] $array [description]
* @return [type] [description]
*/
function add_color_sc_attribute( $array ) {
return array_merge(
$array,
array(
'color' => null,
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment