Hi,
I have some custom pieces for my site that relied on Enfold loading all the modules including Masonry. Is there a way for my child theme or plugin to register that Enfold should include Masonry? Ideally, I’d like to do this in the theme or plugin rather than manually manage the plugins in WP Admin.
Thanks
Is there a method to determine the list of “Load only used elements” to accurately tick all the boxes in manual mode plus Masonry?
Hi,
Can you please explain a bit more what you want to do into it?
Best regards,
Basilis
I’d like to take advantage of the setting in performance section of the Enfold settings to “load only used elements” and also tell it to load Masonry too.
Hi,
Thank you for the update.
Add this code in the functions.php file.
/**
* Disable button in backend if the user has manually set them to be disabled
*
* @since 4.3
* @added_by Kriesi
*/
function av_disable_button_in_backend( $shortcode )
{
$key = 'av_alb_disable_'.$shortcode['shortcode'];
$disabled = avia_get_option($key);
if($shortcode['shortcode'] == 'av_masonry_entries') {
$shortcode['disabling_allowed'] = null;
}
if($key == $disabled && !empty( $shortcode['disabling_allowed'] ))
{
$shortcode['disabled'] = array(
'condition' => true,
'text' => __( 'This element is disabled in your theme options. You can enable it in Enfold » Performance', 'avia_framework' ));
}
return $shortcode;
}
if( avia_get_option('disable_alb_elements') == "manually" )
{
add_filter( 'avf_shortcode_insert_button_backend', 'av_disable_button_in_backend', 10, 1 );
}
Best regards,
Ismael