acf_idify()
acf_idify
Returns an id attribute friendly string.
No Hooks.
Returns
String.
Usage
acf_idify( $str );
- $str(string)
- The string to convert.
Default:''
Changelog
| Since 5.6.5 | Introduced. |
acf_idify() acf idify code ACF 6.0.4
function acf_idify( $str = '' ) {
return str_replace( array( '][', '[', ']' ), array( '-', '-', '' ), strtolower( $str ) );
}