;
$desc .= '' . __( 'Controlling Font Performance with font-display', 'avia_framework' ) . '' . '
';
$desc .= '' . __( 'MDN font-display', 'avia_framework' ) . '' . '
';
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Custom Font Display Behaviour', 'avia_framework' ),
'desc' => $desc,
'id' => 'custom_font_display',
'type' => 'select',
'std' => '',
'no_first' => true,
'required' => array( 'merge_show_advanced', '{contains_array}merge_show_advanced' ),
'subtype' => array(
__( 'auto (= default)', 'avia_framework' ) => '',
__( 'block', 'avia_framework' ) => 'block',
__( 'swap', 'avia_framework' ) => 'swap',
__( 'fallback', 'avia_framework' ) => 'fallback',
__( 'optional', 'avia_framework' ) => 'optional'
)
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_end',
'id' => 'avia_performance_compression_end',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_start',
'id' => 'avia_performance_disable_elements_start',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Disable Template Builder Elements', 'avia_framework' ),
'desc' => __( 'The theme allows you to disable template builder elements that you do not need. This reduces the amount of Javascript and CSS loaded in your frontend', 'avia_framework' ) . '
',
'id' => 'performance_header_disable_alb_elemets',
'type' => 'heading',
'std' => '',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Disabling of template builder elements', 'avia_framework' ),
'desc' => __( 'By default the theme will only load elements that are used on your posts and pages. You can disable the feature or manually manage loaded elements if you run into trouble', 'avia_framework' ),
'id' => 'disable_alb_elements',
'type' => 'select',
'std' => 'auto',
'no_first' => true,
'subtype' => array(
__( 'Always load all elements', 'avia_framework' ) => 'load_all',
__( 'Load only used elements (recommended)', 'avia_framework' ) => 'auto',
__( 'Manually manage loaded elements', 'avia_framework' ) => 'manually',
)
);
$avia_elements[] = array(
'slug' => 'performance',
'id' => 'alb_disabled',
'type' => 'template_builder_element_loader',
'std' => '',
'required' => array( 'disable_alb_elements', 'manually' ),
'nodescription' => true,
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Scan Widgets for Theme Shortcodes', 'avia_framework' ),
'desc' => __( 'Enable scan only when you use Theme Shortcodes in widgets and do not use these in pages/posts. If you run into troubles please use one of the other options. Please reload the widget page when finished editing to force a scan of the widgets.', 'avia_framework' ),
'id' => 'scan_widgets_for_alb_elements',
'type' => 'select',
'std' => '',
'required' => array( 'disable_alb_elements', 'auto' ),
'no_first' => true,
'subtype' => array(
__( 'Do not scan widgets', 'avia_framework' ) => '',
__( 'Scan widgets', 'avia_framework' ) => 'scan_widgets'
)
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_end',
'id' => 'avia_performance_disable_elements_end',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_start',
'id' => 'avia_performance_disable_features_start',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Disable Features', 'avia_framework' ),
'desc' => __( 'Here you can disable theme features that are not used by every website', 'avia_framework' ) . '
',
'id' => 'performance_header_2' ,
'type' => 'heading',
'std' => '',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Self hosted videos and audio features (WP-Mediaelement scripts)', 'avia_framework' ),
'desc' => __( 'By default the theme will load wp-mediaelement scripts only if needed on your posts and pages. You can disable the feature or force loading these elements if you run into troubles - some plugins require these elements and rely on the WP default behaviour loading these scripts.', 'avia_framework' ),
'id' => 'disable_mediaelement',
'type' => 'select',
'std' => '',
'no_first' => true,
'subtype' => array(
__( 'Default - only load when needed (recommended)', 'avia_framework' ) => '',
__( 'Disable self hosted video and audio features', 'avia_framework' ) => 'disable_mediaelement',
__( 'Always load media features (= WP default behaviour)', 'avia_framework' ) => 'force_mediaelement',
)
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Disable external video features', 'avia_framework' ),
'desc' => __( 'Check if you do not use Youtube or Vimeo video features.', 'avia_framework' ),
'id' => 'disable_video',
'type' => 'checkbox',
'std' => '',
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Disable the blog', 'avia_framework' ),
'desc' => __( 'Check if you do not use the blog. This will disable the blog page as well as the blog template builder element, the comments template builder element and category pages that are based on the default categories (if any plugin post types use these overview styles please keep this feature enabled)', 'avia_framework' ),
'id' => 'disable_blog',
'type' => 'checkbox',
'std' => '',
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_end',
'id' => 'avia_performance_disable_features_end',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_start',
'id' => 'avia_performance_disable_wp_defaults_start',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Change WordPress defaults', 'avia_framework' ),
'desc' => __( 'Here you can disable WordPress default scripts and styles that are not necessary for most websites', 'avia_framework' ) . '
',
'id' => 'performance_header_wp_defaults',
'type' => 'heading',
'std' => '',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Disable Emoji/Smiley Support', 'avia_framework' ),
'desc' => __( 'Check to disable Emoji/Smiley Support. (Emojis are used by WordPress by default but most websites do not use them)', 'avia_framework' ),
'id' => 'disable_emoji',
'type' => 'checkbox',
'std' => ''
);
if( avia_count_active_plugins() > 0 )
{
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Disable jQuery Migrate', 'avia_framework' ),
'desc' => __( 'Check to disable "jQuery Migrate". It is an old backward compatibility library for jQuery that is required by some plugins. Make sure that none of your active plugins require it before disabling it!', 'avia_framework' ),
'id' => 'disable_jq_migrate',
'type' => 'checkbox',
'std' => '',
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Load jQuery in your footer', 'avia_framework' ),
'desc' => __( 'Loading jQuery in your footer will speed up site rendering but may cause problems with plugins. Only use if you know what you are doing ;-)', 'avia_framework' ),
'id' => 'jquery_in_footer',
'type' => 'checkbox',
'std' => '',
);
}
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Load Google fonts in footer', 'avia_framework' ),
'desc' => __( 'Loading the fonts in your footer will speed up the site rendering, but also cause a small flicker of text on page load', 'avia_framework' ),
'id' => 'gfonts_in_footer',
'type' => 'checkbox',
'std' => ''
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_end',
'id' => 'avia_performance_disable_wp_defaults_end',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_start',
'id' => 'avia_performance_disable_responsive_img_start',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Responsive Images And Lazy Loading', 'avia_framework' ),
// 'desc' => __( 'Responsive images are supported using the logic provided by WP.', 'avia_framework' ) . '
',
'id' => 'performance_header_4',
'type' => 'heading',
'nodescription' => true
);
$desc = __( 'Select to enable lazy loading using native HTML. Currently WP only supports images, but this might be extended for iframes in future. Please keep in mind that lazy loading might break animations when scrolling to images.', 'avia_framework' ) . ' ';
$desc .= __( 'If you disable lazy loading here this will override any specific element settings of ALB elements. It might not work for 3rd party plugins not using the WP API correctly.', 'avia_framework' );
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Lazy Loading', 'avia_framework' ),
'desc' => $desc,
'id' => 'lazy_loading',
'type' => 'select',
'std' => '',
'no_first' => true,
'subtype' => array(
__( 'Enable lazy loading', 'avia_framework' ) => '',
__( 'Disable lazy loading', 'avia_framework' ) => 'no_lazy_loading_all',
)
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Responsive Images', 'avia_framework' ),
'desc' => __( 'Check to enable theme support for responsive images using the standard WP implementation for this feature.', 'avia_framework' ),
'id' => 'responsive_images',
'type' => 'checkbox',
'std' => 'responsive_images'
);
$desc = __( 'Check to enable theme support for responsive images for theme lightbox. This feature starts with version 4.8.2.', 'avia_framework' ) . ' ';
$desc .= __( 'Most of the ALB elements and posts should be supporting this feature since 4.8.3. Please report in our support forum if you encounter problems.', 'avia_framework' );
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Responsive Images For Lightbox (currently in beta only)', 'avia_framework' ),
'desc' => $desc,
'id' => 'responsive_images_lightbox',
'type' => 'checkbox',
'std' => '',
'required' => array( 'responsive_images', 'responsive_images' ),
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_start',
'id' => 'avia_performance_images_thumbs_start',
'class' => 'visual-set-no-top-border',
'nodescription' => true,
'required' => array( 'responsive_images', '{contains_array}responsive_images' )
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Image Thumbnails Info', 'avia_framework' ),
'desc' => __( 'Select to show a grouped overview of available image thumbnails.', 'avia_framework' ),
'id' => 'responsive_images_thumbs',
'type' => 'checkbox',
'std' => false
);
$desc = __( 'In case you need additional image sizes you can use a plugin like', 'avia_framework' ) . ' ';
$desc .= 'Simple Image Sizes. ';
$desc .= __( 'For advanced users:', 'avia_framework' ) . ' ';
$desc .= 'Enfold Code Snippets Library.';
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Responsive Images Thumbnails Overview:', 'avia_framework' ),
'desc' => $desc,
'id' => 'performance_header_responsive_img',
'type' => 'heading',
'nodescription' => true,
'required' => array( 'responsive_images_thumbs', '{contains_array}responsive_images_thumbs' )
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'responsive_images_overview',
'id' => 'responsive_images_overview',
'nodescription' => true,
'required' => array( 'responsive_images_thumbs', '{contains_array}responsive_images_thumbs' )
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_end',
'id' => 'avia_performance_images_thumbs_end',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'type' => 'visual_group_end',
'id' => 'avia_performance_disable_responsive_img_end',
'nodescription' => true
);
$avia_elements[] = array(
'slug' => 'performance',
'name' => __( 'Image Optimization', 'avia_framework' ),
'desc' => __("Enfold checks if it can detect an image optimization plugin and if it can't find a familiar one recommends a few that are known to work great with the theme", 'avia_framework' ) . '
' .
__( '(If you are running an image optimization plugin that is not detected just ignore this message)', 'avia_framework' ),
'id' => 'image_optimisation_check',
'type' => 'plugin_check',
'nodescription' => true,
'no_found' => __( 'We were not able to detect an active image optimization plugin. It is recommended to use one to speed up your site. Here are a few suggestions:', 'avia_framework' ),
'found' => __( 'We were able to detect an image optimization plugin. Great! Nothing left to do here ;)', 'avia_framework' ),
'too_many' => __( 'We were able to detect multiple active image optimization plugins. It is recommended to use only one!', 'avia_framework' ),
'plugins' => array(
'Optimus - WordPress Image Optimizer' => array(
'download' => 'optimus',
'file' => 'optimus/optimus.php',
'desc' => '