$listOfOptions = array("2" => "2 Buttons", "3" => "3 Buttons", "4" => "4 Buttons", "5" => "5 Buttons", "6" => "6 Buttons");
ESSBOptionsStructureHelper::field_select('display', 'mobile-1', 'mobile_sharebuttonsbar_count', __('Number of buttons in share buttons bar', ESSB3_TEXT_DOMAIN), __('Provide number of buttons you wish to see in buttons bar. If the number of activated buttons is greater than selected here the last button will be more button which will open pop up with all active buttons.', ESSB3_TEXT_DOMAIN), $listOfOptions);
ESSBOptionsStructureHelper::field_switch('display', 'mobile-1', 'mobile_sharebuttonsbar_names', __('Display network names', ESSB3_TEXT_DOMAIN), __('Activate this option to display network names (default display is icons only).', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('display', 'mobile-1', 'mobile_sharebuttonsbar_fix', __('Fix problem with buttons not displayed in full width', ESSB3_TEXT_DOMAIN), __('Some themes may overwrite the default buttons style and in this case buttons do not take the full width of screen. Activate this option to fix the overwritten styles.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_end('display', 'mobile-1');
ESSBOptionsStructureHelper::field_section_start('display', 'mobile-1', __('Client side mobile detection', ESSB3_TEXT_DOMAIN), __('Client side mobile settings should be used only when you have a cache plugin that cannot be configured to work with both mobile and desktop version of site (see instructions on how to configure most popular cache plugins on the activate mobile settings switch). <br/><br/>All settings in this section use screen size of screen to detect a mobile device. If you use this mode of detection all desktop display methods cannot have different mobile settings on mobile device - they will display same buttons just like on desktop. Personalized settings will work for mobile optimized display methods only.<br/><br/>Quick note: After activating the client side detection if you see your mobile display methods twice you do not need a client side detection and you can turn it off.<br/><br/><b>Important! After you make change in that section after updating settings you need to clear cache of plugin you use to allow new css code that controls display to be added.</b>', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('display', 'mobile-1', 'mobile_css_activate', __('Activate client side detection of mobile device', ESSB3_TEXT_DOMAIN), __('Activate this option to make settings below work', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_textbox('display', 'mobile-1', 'mobile_css_screensize', __('Width of screen', ESSB3_TEXT_DOMAIN), __('Leave blank to use the default width of 750. In case you wish to customize it fill value in numbers (without px) and all devices that have screen width below will be marked as mobile.', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('display', 'mobile-1', 'mobile_css_readblock', __('Hide read blocking methods', ESSB3_TEXT_DOMAIN), __('Activate this option to remove all read blocking methods on mobile devices. Read blocking display methods are Sidebar and Post Vertical Float', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('display', 'mobile-1', 'mobile_css_all', __('Hide all share buttons on mobile', ESSB3_TEXT_DOMAIN), __('Activate this option to hide all share buttons on mobile devices including those made with shortcodes.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('display', 'mobile-1', 'mobile_css_optimized', __('Control mobile optimized display methods', ESSB3_TEXT_DOMAIN), __('Activate this option to display mobile optimized display methods when resolution meets the mobile size that is defined. Methods that are controlled with this option include: Share Buttons Bar, Share Bar and Share Point. At least one of those methods should be selected in the settings above for additional display methods.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_end('display', 'mobile-1');
essb_prepare_location_advanced_customization('display', 'mobile-2', 'mobile');
essb_prepare_location_advanced_customization_mobile('display', 'mobile-3', 'sharebar');
essb_prepare_location_advanced_customization_mobile('display', 'mobile-4', 'sharepoint');
essb_prepare_location_advanced_customization_mobile('display', 'mobile-5', 'sharebottom');
// message above/before buttons
ESSBOptionsStructureHelper::field_heading('display', 'message-1', 'heading1', __('Custom message before share buttons', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_editor('display', 'message-1', 'message_share_before_buttons', __('Message before share buttons', ESSB3_TEXT_DOMAIN), __('You can use following variables to create personalized message: %%title%% - displays current post title, %%permalink%% - displays current post address.', ESSB3_TEXT_DOMAIN), 'htmlmixed');
ESSBOptionsStructureHelper::field_heading('display', 'message-2', 'heading1', __('Custom message above share buttons', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_editor('display', 'message-2', 'message_above_share_buttons', __('Message above share buttons', ESSB3_TEXT_DOMAIN), __('You can use following variables to create personalized message: %%title%% - displays current post title, %%permalink%% - displays current post address.', ESSB3_TEXT_DOMAIN), 'htmlmixed');
ESSBOptionsStructureHelper::field_heading('display', 'message-3', 'heading1', __('Custom message above like buttons', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_editor('display', 'message-3', 'message_like_buttons', __('Message above like buttons', ESSB3_TEXT_DOMAIN), __('You can use following variables to create personalized message: %%title%% - displays current post title, %%permalink%% - displays current post address.', ESSB3_TEXT_DOMAIN), 'htmlmixed');
//'advanced', 'optimization'
ESSBOptionsStructureHelper::field_heading('advanced', 'optimization', 'heading1', __('Optimization Options', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_start('advanced', 'optimization', __('Resource load optimization', ESSB3_TEXT_DOMAIN), __('Activate option that will optimize load of static resources - css and javascript', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('advanced', 'optimization', 'use_minified_css', __('Use minified CSS files', ESSB3_TEXT_DOMAIN), __('Minified CSS files will improve speed of load. Activate this option to use them.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('advanced', 'optimization', 'use_minified_js', __('Use minified javascript files', ESSB3_TEXT_DOMAIN), __('Minified javascript files will improve speed of load. Activate this option to use them.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('advanced', 'optimization', 'scripts_in_head', __('Load scripts in head element', ESSB3_TEXT_DOMAIN), __('If you are using caching plugin like W3 Total Cache you may need to activate this option if counters, send mail form or float do not work.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('advanced', 'optimization', 'load_js_async', __('Load plugin javascript files asynchronous', ESSB3_TEXT_DOMAIN), __('This will load scripts during page load in non render blocking way', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('advanced', 'optimization', 'load_js_defer', __('Load plugin javascript files deferred', ESSB3_TEXT_DOMAIN), __('This will load scripts after page load in non render blocking way', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('social', 'mobile-1', 'mobile_sharebuttonsbar_fix', __('Fix problem with buttons not displayed in full width', ESSB3_TEXT_DOMAIN), __('Some themes may overwrite the default buttons style and in this case buttons do not take the full width of screen. Activate this option to fix the overwritten styles.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('social', 'mobile-1', 'mobile_sharebuttonsbar_hideend', __('Hide buttons bar before end of page', ESSB3_TEXT_DOMAIN), __('This option is made to hide buttons bar once you reach 90% of page content to allow the entire footer to be visible.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_textbox_panel('social', 'mobile-1', 'mobile_sharebuttonsbar_hideend_percent', __('% of content is viewed to hide buttons bar before end of page', ESSB3_TEXT_DOMAIN), __('Customize the default percent 90 when buttons bar will hide. Enter value in percents without the % mark.', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_end_full_panels('social', 'mobile-1');
ESSBOptionsStructureHelper::field_heading('social', 'mobile-1', 'heading4', __('Client side mobile detection', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_start('social', 'mobile-1', __('Client side mobile detection', ESSB3_TEXT_DOMAIN), __('Client side mobile settings should be used only when you have a cache plugin that cannot be configured to work with both mobile and desktop version of site (see instructions on how to configure most popular cache plugins on the activate mobile settings switch). <br/><br/>All settings in this section use screen size of screen to detect a mobile device. If you use this mode of detection all desktop display methods cannot have different mobile settings on mobile device - they will display same buttons just like on desktop. Personalized settings will work for mobile optimized display methods only.<br/><br/>Quick note: After activating the client side detection if you see your mobile display methods twice you do not need a client side detection and you can turn it off.<br/><br/><b>Important! After you make change in that section after updating settings you need to clear cache of plugin you use to allow new css code that controls display to be added.</b>', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('social', 'mobile-1', 'mobile_css_activate', __('Activate client side detection of mobile device', ESSB3_TEXT_DOMAIN), __('Activate this option to make settings below work', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_textbox('social', 'mobile-1', 'mobile_css_screensize', __('Width of screen', ESSB3_TEXT_DOMAIN), __('Leave blank to use the default width of 750. In case you wish to customize it fill value in numbers (without px) and all devices that have screen width below will be marked as mobile.', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('social', 'mobile-1', 'mobile_css_readblock', __('Hide read blocking methods', ESSB3_TEXT_DOMAIN), __('Activate this option to remove all read blocking methods on mobile devices. Read blocking display methods are Sidebar and Post Vertical Float', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('social', 'mobile-1', 'mobile_css_all', __('Hide all share buttons on mobile', ESSB3_TEXT_DOMAIN), __('Activate this option to hide all share buttons on mobile devices including those made with shortcodes.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch('social', 'mobile-1', 'mobile_css_optimized', __('Control mobile optimized display methods', ESSB3_TEXT_DOMAIN), __('Activate this option to display mobile optimized display methods when resolution meets the mobile size that is defined. Methods that are controlled with this option include: Share Buttons Bar, Share Bar and Share Point. At least one of those methods should be selected in the settings above for additional display methods.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_end('social', 'mobile-1');
essb_prepare_location_advanced_customization('social', 'mobile-2', 'mobile');
essb_prepare_location_advanced_customization_mobile('social', 'mobile-3', 'sharebar');
essb_prepare_location_advanced_customization_mobile('social', 'mobile-4', 'sharepoint');
essb_prepare_location_advanced_customization_mobile('social', 'mobile-5', 'sharebottom');
//'advanced', 'optimization'
ESSBOptionsStructureHelper::field_heading('advanced', 'optimization', 'heading1', __('Optimization Options', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_heading('advanced', 'optimization', 'heading4', __('Static resource optimizations', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_start_panels('advanced', 'optimization', __('CSS Styles Optimizations', ESSB3_TEXT_DOMAIN), __('Activate option that will optimize load of static css resources', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('advanced', 'optimization', 'use_minified_css', __('Use minified CSS files', ESSB3_TEXT_DOMAIN), __('Minified CSS files will improve speed of load. Activate this option to use them.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('advanced', 'optimization', 'load_css_footer', __('Load plugin inline styles into footer', ESSB3_TEXT_DOMAIN), __('Activating this option will load dynamic plugin inline styles into footer.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_end_panels('advanced', 'optimization');
ESSBOptionsStructureHelper::field_section_start_panels('advanced', 'optimization', __('Scripts load optimization', ESSB3_TEXT_DOMAIN), __('Activate option that will optimize load of static resources - css and javascript', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('advanced', 'optimization', 'use_minified_js', __('Use minified javascript files', ESSB3_TEXT_DOMAIN), __('Minified javascript files will improve speed of load. Activate this option to use them.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('advanced', 'optimization', 'scripts_in_head', __('Load scripts in head element', ESSB3_TEXT_DOMAIN), __('If you are using caching plugin like W3 Total Cache you may need to activate this option if counters, send mail form or float do not work.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('advanced', 'optimization', 'load_js_async', __('Load plugin javascript files asynchronous', ESSB3_TEXT_DOMAIN), __('This will load scripts during page load in non render blocking way', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_section_end_panels('advanced', 'optimization');
ESSBOptionsStructureHelper::field_section_start_panels('advanced', 'optimization', __('Global resource load optimizations', ESSB3_TEXT_DOMAIN), __('Activate option that will optimize load of static javascript resources', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('advanced', 'optimization', 'remove_ver_resource', __('Remove version number from static resource files', ESSB3_TEXT_DOMAIN), __('Activating this option will remove added to resources version number ?ver= which will allow these files to be cached.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));
ESSBOptionsStructureHelper::field_switch_panel('advanced', 'optimization', 'precompiled_resources', __('Use plugin precompiled resources', ESSB3_TEXT_DOMAIN), __('Activating this option will precompile and cache plugin dynamic resources to save load time. Precompiled resources can be used only when you use same configuration on your entire site.', ESSB3_TEXT_DOMAIN), '', __('Yes', ESSB3_TEXT_DOMAIN), __('No', ESSB3_TEXT_DOMAIN));