-
AuthorPosts
-
July 9, 2018 at 8:00 pm #983366
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
July 9, 2018 at 8:04 pm #983367Is there a method to determine the list of “Load only used elements” to accurately tick all the boxes in manual mode plus Masonry?
July 10, 2018 at 8:44 pm #983812Hi,
Can you please explain a bit more what you want to do into it?
Best regards,
BasilisJuly 10, 2018 at 11:26 pm #983901I’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.
July 11, 2018 at 3:42 am #983969Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.
