Last active
February 28, 2019 10:14
-
-
Save hwkdev/6870a3cd6bc9e879bd0cb9f3eb40ea6a to your computer and use it in GitHub Desktop.
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 | |
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