Skip to content

Instantly share code, notes, and snippets.

@hawkidoki
Last active February 28, 2019 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hawkidoki/6870a3cd6bc9e879bd0cb9f3eb40ea6a to your computer and use it in GitHub Desktop.
Save hawkidoki/6870a3cd6bc9e879bd0cb9f3eb40ea6a to your computer and use it in GitHub Desktop.
<?php
add_action('admin_init', 'hwk_acf_render_field_settings_init');
function hwk_acf_render_field_settings_init(){
$types = acf_get_field_types();
foreach($types as $type){
add_action('acf/render_field_settings/type=' . $type->name, 'hwk_acf_render_field_settings', 0);
}
}
function hwk_acf_render_field_settings($field){
acf_render_field_setting($field, array(
'type' => 'text',
'label' => __('My setting'),
'instructions' => '',
'name' => 'my_setting',
'required' => 0,
'default_value' => ''
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment