Compatibility with ACF Pro
-
Thanks for a great plugin!
I couldn’t get it working with the new ACF Pro without changing a few things. I was getting an undefined index error on line 713 for $field[‘choices’] so i moved the “choices” from here
$this->defaults = array( 'enqueue_fa' => 0, 'allow_null' => 0, 'save_format' => 'element', 'default_value' => '', 'fa_live_preview' => '', 'choices' => array( .....
to above it like this
$this->choices = array( 'fa-adjust'=> ' fa-adjust', 'fa-adn' => ' fa-adn', ....... );
then around line 713 changed it to this
// loop through values and add them as options $theicons = $this->choices; if( $theicons ) { foreach( $theicons as $key => $value ) { $selected = $this->find_selected( $key, $field['value'], $field['save_format'], $theicons ); echo '<option value="'.$key.'" '.$selected.'>'.$value.'</option>'; } }
and it’s working again. Hope this helps someone!
Cheers
https://wordpress.org/plugins/advanced-custom-fields-font-awesome/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Compatibility with ACF Pro’ is closed to new replies.