I was able to narrow the issue down to this function;
add_action( 'wp_head', 'faq_option_script' );
function faq_option_script()
{
$option = 'faq_option';
$faq_options = get_option( $option, $default );
$data_disabled = $faq_options['faq_disabled'];
$data_collapsible = $faq_options['faq_collapsible'];
$data_animate = $faq_options['faq_animate'];
$data_active = $faq_options['faq_active'];
$data = '';
$data .= 'data-active="'.( $data_disabled == "1" ? 'true' : 'false' ).'" ';
$data .= 'data-animate="'. ( $data_animate == "0" ? 'false' : 'true' ).'" ';
$data .= 'data-collapsible="'. ( $data_collapsible == "1" ? 'true' : 'false' ).'"';
$id = "faq-accordion-1";
$class = 'faq-plugin-accordion';
$rv .= '<div id="'.$id.'" class="'.$class.'" '.$data.'>';
$rv .= $content;
$rv .= '</div>';
$rv .= "\n";
echo $rv;
}
Which I’ve amended as follows,
1. Dropped the $default as I’m unsure what it should be.
*If someone can inform me of what the defaults are that would appreciate.
2. Instantiated an empty string for the $rv variable before use.
$rv = ”;
3. Removed the reference to $content as it doesn’t exist.
* If someone can inform me of what the $content should be set to that’s be great.
So my ‘fixed’ version of the code is below;
add_action( 'wp_head', 'faq_option_script' );
function faq_option_script()
{
$option = 'faq_option';
$faq_options = get_option( $option );
$data_disabled = $faq_options['faq_disabled'];
$data_collapsible = $faq_options['faq_collapsible'];
$data_animate = $faq_options['faq_animate'];
$data_active = $faq_options['faq_active'];
$data = '';
$data .= 'data-active="'.( $data_disabled == "1" ? 'true' : 'false' ).'" ';
$data .= 'data-animate="'. ( $data_animate == "0" ? 'false' : 'true' ).'" ';
$data .= 'data-collapsible="'. ( $data_collapsible == "1" ? 'true' : 'false' ).'"';
$id = "faq-accordion-1";
$class = 'faq-plugin-accordion';
echo '<div id="'.$id.'" class="'.$class.'" '.$data.'></div>';
}
Feedback? Can this be merged with the core or a proper fix be applied for next update please.
Thank you