Created
March 6, 2014 15:36
-
-
Save tomharrigan/9392356 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
| function my_acf_load_field( $field ) { | |
| $tdrfullwidth = get_post_custom_values('_tdrfullwidth'); | |
| if( isset( $tdrfullwidth ) ) { | |
| if( $tdrfullwidth === 'on') { | |
| $field['default_value'] = 'parallax'; | |
| } | |
| delete_post_meta( get_the_id(), '_tdrfullwidth'); | |
| } | |
| return $field; | |
| } | |
| add_filter('acf/load_field/name=full_width_header', 'my_acf_load_field'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment