Last active
September 1, 2019 15:05
-
-
Save macariojames/50d3b4e354459ed9b0071543aeb35bef to your computer and use it in GitHub Desktop.
Display field_name for ACF field names back-end in development if Administrator
This file contains 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 | |
// Display ACF field names for development for Administrator only | |
function display_acf_field_names( $field ) { | |
echo $field['_name']; | |
} | |
if(is_admin() && !current_user_can('manage_options')) { | |
add_action( 'acf/render_field', 'display_acf_field_names', 10, 1 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment