isLicenseValid()) $this->enableVersion(); $this->define_fields(); $this->prepopulate_defaults(); // Call defaults setup after defining fields } public function prepopulate_defaults() { $existing_data = carbon_get_theme_option('ad_block_guard_usergroup_settings'); if (empty($existing_data)) { $roles = wp_roles()->get_names(); $default_groups = []; foreach ($roles as $role_key => $role_name) { $default_groups[] = [ 'usergroup' => $role_key, 'overlay_enabled' => true, // Add other default fields as needed ]; } // Save the default groups carbon_set_theme_option('ad_block_guard_usergroup_settings', $default_groups); } } public function define_fields() { // Hook to invalidate cache when Carbon Fields options are saved add_action('carbon_fields_theme_options_container_saved', [$this, 'invalidate_cache']); // Get dynamic options for categories, tags, and pages $categories = get_categories(array('hide_empty' => false)); $tags = get_tags(array('hide_empty' => false)); $pages = get_pages(array('sort_column' => 'post_title', 'sort_order' => 'asc')); $category_options = []; $tag_options = []; $page_options = []; // Populate categories foreach ($categories as $category) { $category_options[$category->term_id] = $category->name; } // Populate tags foreach ($tags as $tag) { $tag_options[$tag->term_id] = $tag->name; } // Populate pages foreach ($pages as $page) { $page_options[$page->ID] = $page->post_title; } // create nonce $nonce = wp_create_nonce('ad_block_guard_demo_action'); // Retrieve available WordPress user roles and prepend "Guest" $roles = wp_roles()->get_names(); $roles_options = ['guest' => 'Guest'] + $roles; // Ensure "Guest" is the first choice /* General Settings Tab */ Container::make('theme_options', __('AdBlock Guard', 'ad-block-guard')) ->set_page_file('ad_block_guard_settings') ->set_icon('dashicons-shield') ->set_layout('tabbed-horizontal') ->add_tab(__('General Options', 'ad-block-guard'), [ // General settings fields Field::make('html', 'ad_block_guard_enable_text') ->set_html(AD_BLOCK_GUARD_LOGO_THUMB . '
' . __('The AdBlock Guard system must be enabled below.', 'ad-block-guard') . '
' . __('You also must choose at least one detection method.', 'ad-block-guard') . '
') , Field::make('checkbox', 'ad_block_guard_enable', __('Enable AdBlock Guard System', 'ad-block-guard')) ->set_default_value(false) ->set_attribute('data-step', '3') ->set_attribute('data-title', 'Launch AdBlock Guard') //->set_attribute('data-hint', 'This must be enabled to launch detection on the front-end') ->set_attribute('data-intro', 'This enables AdBlock Guard globally on the front-end for your enabled roles.'), Field::make('checkbox', 'ad_block_guard_fast_detection', __('Fast Detection - Effective against the majority of AdBlock browser extensions', 'ad-block-guard')) ->set_default_value(true) ->set_attribute('data-step', '1') ->set_attribute('data-title', 'Fast Detection') ->set_attribute('data-intro', 'This is the default detection method and must be enabled in the free version') ->set_help_text(__('At least one detection method must be selected. This detection method is required in the free version.
Effectively, efficiently, and safely detects the majority of AdBlock extensions that are installed as browser extensions. This method alone is the safest choice because users detected should be aware, and have the means, to quickly disable their AdBlock extension.
', 'ad-block-guard')), Field::make('checkbox', 'ad_block_guard_remote_detection', __('Remote Loading Detection', 'ad-block-guard')) ->set_help_text('' . __('Required for detection of certain types of DNS level AdBlockers.
WARNING: Some visitors may not realize they have DNS level AdBlocking enabled, but none the less, they are AdBlocking.
This method effectively uses script loading behavior as an adblock detection mechanism, capitalizing on the fact that many ad blockers block scripts from ad-serving domains like googlesyndication.com. It\'s a straightforward method but might miss certain types of ad blocking that don\'t trigger script errors.
', 'ad-block-guard') . '' . __('Many iOS Safari AdBlock extensions require this option be selected to be detected.', 'ad-block-guard') . '
' . __('All DNS-level AdBlock systems require this option be checked.', 'ad-block-guard') . '
'), Field::make('checkbox', 'ad_block_guard_network_detection', __('Network Loading Detection', 'ad-block-guard')) ->set_help_text('' . __('WARNING: Some visitors may not realize they have DNS level AdBlocking enabled, but none the less, they are AdBlocking.
This method directly monitors the success or failure of a network request and examines the content of the response. This method can catch more nuanced ad blocking techniques, such as those that block or alter network requests without affecting script execution in the DOM.
', 'ad-block-guard') . '' . __('An example of a VPN with DNS level ABlocking:', 'ad-block-guard') . ' ' . __('Private Internet Access: MACE', 'ad-block-guard') . '.
'), ]) ->add_tab(__('Overlay Settings Per Role', 'ad-block-guard'), [ Field::make('html', 'ad_block_guard_general_text') ->set_html( AD_BLOCK_GUARD_LOGO_THUMB . '' . __('Modify overlays per user role below. Don\'t forget to Save your changes.', 'ad-block-guard') . '
' . '' . __('Review your Overlay customizations in a simulated environment using the buttons provided.', 'ad-block-guard') . '
' ), Field::make('complex', 'ad_block_guard_usergroup_settings', __('User Role Overlay', 'ad-block-guard')) ->set_attribute('data-step', '2') ->set_attribute('data-title', 'Enable Overlays') ->set_attribute('data-intro', 'Enable at least one overlay for a user role.') ->set_attribute('data-id', 'user-roles') ->set_datastore(new Serialized_Theme_Options_Datastore()) // Use the custom datastore ->set_min(count($roles)+1) ->set_max(count($roles)+1) ->set_layout('tabbed-horizontal') ->set_duplicate_groups_allowed(false) ->add_fields([ // Start User Group Panel // Row #1 Field::make('text', 'usergroup', __('Current user role', 'ad-block-guard')) ->set_width(50) ->set_attribute('readOnly', true), // Demo buttons Field::make('html', 'overlay_demo_button', 'ad-block-guard') ->set_html('' . sprintf( /* translators: %s is the URL for the Mobile Demo link. */ __('Mobile Demo', 'ad-block-guard'), esc_url(add_query_arg( array( 'page' => 'ad_block_guard_demo_page', 'ad_block_guard_demo_nonce' => $nonce, 'overlay' => '1', 'TB_iframe' => 'true', 'width' => '800', 'height' => '600', ), admin_url('admin.php') ))) . ' Overlay Demo Page
') ->set_width(50), Field::make('checkbox', 'overlay_enabled', __('Enable this overlay for this role', 'ad-block-guard')) ->set_default_value(false) ->set_help_text(__('Enabling this overlay will guard your content against AdBlockers with this user role.', 'ad-block-guard')) ->set_width(50), Field::make('checkbox', 'allow_close', __('Allow the user to close the overlay', 'ad-block-guard')) ->set_attribute('data-hint', 'Disable to force users to disable their AdBlock') ->set_width(25), Field::make('number', 'overlay_delay', __('Overlay delay in seconds after page load', 'ad-block-guard')) ->set_min(0) ->set_max(120) ->set_step(1) ->set_default_value(0) ->set_width(25), Field::make('radio', 'theme', __('Overlay Theme', 'ad-block-guard')) ->set_options([ 'Compact' => __('Compact', 'ad-block-guard'), 'Medium' => __('Medium', 'ad-block-guard'), 'Large' => __('Large', 'ad-block-guard'), ]) ->set_width(20), // Overlay Coloring Field::make('color', 'background_color', __('Page Opacity', 'ad-block-guard')) ->set_default_value('#000000D9') ->set_alpha_enabled(true) ->set_help_text(__('Color of the page opacity', 'ad-block-guard')) ->set_width(20), Field::make('color', 'foreground_color', __('Overlay Color', 'ad-block-guard')) ->set_default_value('#AC0000D9') ->set_alpha_enabled(true) ->set_help_text(__('Primary popup color', 'ad-block-guard')) ->set_width(20), Field::make('color', 'window_color', __('Overlay Background', 'ad-block-guard')) ->set_default_value('#FFFFFFFF') ->set_alpha_enabled(true) ->set_help_text(__('Popup text background color', 'ad-block-guard')) ->set_width(20), // Overlay Title Field::make('text', 'overlay_title', __('Overlay Title', 'ad-block-guard')) ->set_attribute('type', 'string') ->set_attribute('max', 75) ->set_attribute('min', 5) ->set_width(50) ->set_default_value(__('AdBlock Detected', 'ad-block-guard')) ->set_help_text(__('Minimum 5 and maximum 75 characters.', 'ad-block-guard')), Field::make('color', 'title_text_color', __('Overlay Title Color', 'ad-block-guard')) ->set_default_value('#FFFFFF') ->set_alpha_enabled(false) ->set_help_text(__('Overlay title text color', 'ad-block-guard')) ->set_width(25), Field::make('color', 'message_text_color', __('Message Text Color', 'ad-block-guard')) ->set_default_value('#111111') ->set_alpha_enabled(false) ->set_help_text(__('Overlay message text color', 'ad-block-guard')) ->set_width(25), // Overlay Message Field::make('rich_text', 'overlay_message', __('Overlay Message', 'ad-block-guard')) ->set_attribute('maxLength', 2000) ->set_width(100) ->set_classes('ad-block-guard-rich-text') ->set_settings(array( 'media_buttons' => false, // Disable the "Add Media" button 'tinymce' => array( //'toolbar1' => 'bold italic underline | fontsizeselect forecolor backcolor | bullist numlist | link unlink | alignleft aligncenter alignright alignjustify', 'toolbar1' => 'bold italic underline | fontsizeselect | bullist numlist | link unlink | alignleft aligncenter alignright alignjustify', 'toolbar2' => '', // Remove second toolbar if not needed 'plugins' => 'link lists textcolor', // Add the necessary plugins, including 'textcolor' for color options if needed 'fontsize_formats' => '14px 16px 18px 20px 24px', // Define font size options 'height'=>200, 'autoresize_min_height' => 200, 'autoresize_max_height' => 500, 'paste_as_text' => true, 'paste_remove_spans' => true, // Removes span tags during paste 'paste_remove_styles' => true, // Removes style attributes during paste 'paste_strip_class_attributes' => 'all', // Removes all classes during paste 'content_css' => AD_BLOCK_GUARD_PLUGIN_URL . 'assets/css/editor-style.css', ), )) ->set_help_text(__('Careful adding too much content. This needs to render nicely for mobile.', 'ad-block-guard')), // Buttons logic Field::make('complex', 'buttons', __('Buttons', 'ad-block-guard')) ->set_datastore(new Serialized_Theme_Options_Datastore()) // Use the custom datastore ->set_attribute('data-id', 'buttons') ->set_layout('tabbed-vertical') ->set_max(8) ->add_fields([ Field::make('urlpicker', 'link', __('Link', 'ad-block-guard')), Field::make('color', 'background_color', __('Button Color', 'ad-block-guard')) ->set_default_value('#007cba'), Field::make('color', 'foreground_color', __('Text Color', 'ad-block-guard')) ->set_default_value('#ffffff'), ]) ->set_default_value([ [ 'link' => [ 'url' => wp_registration_url(), 'anchor' => __('Register Now', 'ad-block-guard'), 'blank' => false, ], 'background_color' => '#007cba', 'foreground_color' => '#ffffff', ], [ 'link' => [ 'url' => wp_registration_url(), 'anchor' => __('Register Now', 'ad-block-guard'), 'blank' => false, ], 'background_color' => '#007cba', 'foreground_color' => '#ffffff', ], ]) ->set_header_template('<%- link.anchor ? link.anchor : "Unlinked Button" %>'), ]) ->set_header_template('<%- usergroup.charAt(0).toUpperCase() + usergroup.slice(1).toLowerCase() %>') ->set_attribute('data-tab-general', 'general'), ]) // Exclusions ->add_tab(__('AdBlock Exclusions', 'ad-block-guard'), [ Field::make('html', 'ad_block_guard_exclude_text') ->set_html(AD_BLOCK_GUARD_LOGO_THUMB . '' . __('You can choose to exclude certain areas of your website from rendering AdBlock to any visitor.
You must enable the exclusion category in order for your exclusions to be recognize and implemented.', 'ad-block-guard') . '
'), // Special Pages section Field::make('checkbox', 'ad_block_guard_exclude_special_pages_check', __('Exclude AdBlock on Special Pages', 'ad-block-guard')) ->set_default_value(defined('AD_BLOCK_GUARD_IS_PRO')), Field::make('multiselect', 'ad_block_guard_exclude_special_pages', __('Exclude on Specific Special Pages:', 'ad-block-guard')) ->add_options([ 'is_front_page' => __('Front Page', 'ad-block-guard'), 'is_home' => __('Blog Posts Index', 'ad-block-guard'), 'is_singular' => __('Singular Post/Page/Custom Post Type', 'ad-block-guard'), 'is_single' => __('Single Posts', 'ad-block-guard'), 'is_archive' => __('Archive Pages', 'ad-block-guard'), 'is_category' => __('Category Archive', 'ad-block-guard'), 'is_tag' => __('Tag Archive', 'ad-block-guard'), 'is_tax' => __('Custom Taxonomy Archive', 'ad-block-guard'), 'is_search' => __('Search Results Page', 'ad-block-guard'), 'is_404' => __('404 Not Found Page', 'ad-block-guard'), 'login_page' => __('Login Page', 'ad-block-guard'), 'registration_page' => __('Registration Page', 'ad-block-guard'), ]) ->set_default_value(['login_page']) ->set_conditional_logic(defined('AD_BLOCK_GUARD_IS_PRO') ? [ [ 'field' => 'ad_block_guard_exclude_special_pages_check', 'value' => true, 'compare' => '=', ], ] : []) ->set_datastore(new Serialized_Theme_Options_Datastore()), // Pages section Field::make('checkbox', 'ad_block_guard_exclude_pages_check', __('Exclude AdBlock on Pages', 'ad-block-guard')) ->set_default_value(false), Field::make('multiselect', 'ad_block_guard_exclude_pages', __('Exclude on Specific Pages:', 'ad-block-guard')) ->add_options($page_options) ->set_conditional_logic(defined('AD_BLOCK_GUARD_IS_PRO') ? [ [ 'field' => 'ad_block_guard_exclude_pages_check', 'value' => true, 'compare' => '=', ], ] : []) ->set_datastore(new Serialized_Theme_Options_Datastore()), // Posts section Field::make('checkbox', 'ad_block_guard_exclude_posts', __('Exclude AdBlock on Posts', 'ad-block-guard')) ->set_default_value(false), Field::make('multiselect', 'ad_block_guard_exclude_categories', __('Exclude on Specific Categories:', 'ad-block-guard')) ->add_options($category_options) ->set_conditional_logic(defined('AD_BLOCK_GUARD_IS_PRO') ? [ [ 'field' => 'ad_block_guard_exclude_posts', 'value' => true, 'compare' => '=', ], ] : []) ->set_datastore(new Serialized_Theme_Options_Datastore()), Field::make('multiselect', 'ad_block_guard_exclude_tags', __('Exclude on Specific Tags:', 'ad-block-guard')) ->add_options($tag_options) ->set_conditional_logic(defined('AD_BLOCK_GUARD_IS_PRO') ? [ [ 'field' => 'ad_block_guard_exclude_posts', 'value' => true, 'compare' => '=', ], ] : []) ->set_datastore(new Serialized_Theme_Options_Datastore()), // Other Types section Field::make('checkbox', 'ad_block_guard_exclude_other_types_check', __('Exclude AdBlock on Other Types', 'ad-block-guard')) ->set_default_value(false), Field::make('multiselect', 'ad_block_guard_exclude_other_types', __('Exclude on Specific Types:', 'ad-block-guard')) ->add_options([ 'is_search' => __('Search Results', 'ad-block-guard'), 'login_page' => __('Login Page', 'ad-block-guard'), 'registration_page' => __('Registration Page', 'ad-block-guard'), ]) ->set_default_value([ 'login_page', ]) ->set_conditional_logic(defined('AD_BLOCK_GUARD_IS_PRO') ? [ [ 'field' => 'ad_block_guard_exclude_other_types_check', 'value' => true, 'compare' => '=', ], ] : []) ->set_datastore(new Serialized_Theme_Options_Datastore()), // WooCommerce Pages section Field::make('checkbox', 'ad_block_guard_exclude_woocommerce', __('Exclude AdBlock on WooCommerce Pages', 'ad-block-guard')) ->set_default_value(false), Field::make('multiselect', 'ad_block_guard_exclude_woocommerce_pages', __('Exclude on Specific WooCommerce Pages:', 'ad-block-guard')) ->add_options([ 'is_shop' => __('[WooCommerce] Shop Page', 'ad-block-guard'), 'is_product_category' => __('[WooCommerce] Product Category Archive', 'ad-block-guard'), 'is_product_tag' => __('[WooCommerce] Product Tag Archive', 'ad-block-guard'), 'is_product' => __('[WooCommerce] Single Product Page', 'ad-block-guard'), 'is_cart' => __('[WooCommerce] Cart Page', 'ad-block-guard'), 'is_checkout' => __('[WooCommerce] Checkout Page', 'ad-block-guard'), 'is_account_page' => __('[WooCommerce] My Account Page', 'ad-block-guard'), 'is_order_received_page' => __('[WooCommerce] Order Received Page', 'ad-block-guard'), ]) ->set_default_value([ 'is_shop', 'is_cart', 'is_checkout', ]) ->set_conditional_logic(defined('AD_BLOCK_GUARD_IS_PRO') ? [ [ 'field' => 'ad_block_guard_exclude_woocommerce', 'value' => true, 'compare' => '=', ], ] : []) ->set_datastore(new Serialized_Theme_Options_Datastore()), ]) /* Advanced Settings Tab */ ->add_tab(__('Advanced Settings', 'ad-block-guard'), [ Field::make('html', 'ad_block_guard_advanced_text') ->set_html(AD_BLOCK_GUARD_LOGO_THUMB . '' . __('Caution should be used when adjusting advanced settings.', 'ad-block-guard') . '
'), Field::make('checkbox', 'ad_block_guard_hide_from_crawlers', __('Hide from robots and crawlers', 'ad-block-guard')) ->set_default_value(true), Field::make('checkbox', 'ad_block_guard_prevent_masquerading', __('Prevent users from masquerading as crawlers', 'ad-block-guard')) ->set_help_text(''), Field::make('textarea', 'ad_block_guard_ignore_urls', __('Do not guard the following URLs', 'ad-block-guard')) ->set_default_value('/wp-login.php') ->set_attribute('placeholder', "/my-custom-wordpress-url /matching-*") ->set_help_text(__('Enter page paths separated by newline, or comma. Example: /some-page/here, /another-page/', 'ad-block-guard')), Field::make('checkbox', 'ad_block_guard_live_easylist', __('Process from live Easy List', 'ad-block-guard')) ->set_help_text(''), Field::make('text', 'ad_block_guard_easylist_url', __('EasyList URL', 'ad-block-guard')) ->set_attribute('type', 'url') ->set_attribute('maxLength', 256) ->set_attribute('placeholder', 'https://easylist.to/easylist/easylist.txt') ->set_default_value('https://easylist.to/easylist/easylist.txt') ->set_help_text(__('Default: https://easylist.to/easylist/easylist.txt', 'ad-block-guard') . 'We understand that ads can be a bit disruptive, but they play a vital role in keeping our website up and running. By disabling your ad blocker, you’ll be helping us continue to provide you with the great content you love.
Thank you for your support!
', 'ad-block-guard'), 'buttons' => $role_key === 'guest' ? $guest_buttons : [$common_button], ]; } public static function ad_block_guard_generate_default_usergroup_overlays() { $roles = wp_roles()->get_names(); // Extract 'administrator' and 'guest' $administrator = ['administrator' => $roles['administrator']]; unset($roles['administrator']); $guest = ['guest' => 'Guest']; // Reverse the remaining roles $reversed_roles = array_reverse($roles); // Combine 'guest', 'administrator', and the reversed roles $roles = $guest + $administrator + $reversed_roles; $defaults = []; $common_button = [ 'link' => [ 'url' => '#', 'anchor' => __('I\'ve Disabled my AdBlocker', 'ad-block-guard'), 'blank' => false, ], 'background_color' => '#007cba', 'foreground_color' => '#ffffff', ]; $guest_buttons = [ [ 'link' => [ 'url' => wp_registration_url(), 'anchor' => __('Register Now', 'ad-block-guard'), 'blank' => false, ], 'background_color' => '#007cba', 'foreground_color' => '#ffffff', ], $common_button, ]; $defaults = []; foreach ($roles as $role_key => $role_name) { $defaults[] = [ 'usergroup' => $role_key, 'overlay_enabled' => $role_key === 'guest', 'ad_block_guard_theme' => 'Compact', 'background_color' => '#000000D9', 'window_color' => '#FFFFFFFF', 'foreground_color' => '#AC0000D9', 'allow_close' => true, 'overlay_delay' => 0, 'overlay_title' => __('AdBlock Detected', 'ad-block-guard'), 'overlay_message' => __('We know, advertisements are annoying, but they also support our website. Please close your adblocker to access the amazing content on our website.', 'ad-block-guard'), 'buttons' => $role_key === 'guest' ? $guest_buttons : [$common_button], ]; } return $defaults; } private function getEasyListUrls() { $urls = [ 'https://easylist-downloads.adblockplus.org/easylist.txt', 'https://easylist-downloads.adblockplus.org/abpindo+easylist.txt', 'https://easylist-downloads.adblockplus.org/abpvn+easylist.txt', 'https://easylist-downloads.adblockplus.org/bulgarian_list+easylist.txt', 'https://easylist-downloads.adblockplus.org/dandelion_sprouts_nordic_filters+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistchina.txt', 'https://easylist-downloads.adblockplus.org/easylistczechslovak+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistdutch.txt', 'https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistgermany.txt', 'https://easylist-downloads.adblockplus.org/israellist+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistitaly+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistitaly.txt', 'https://easylist-downloads.adblockplus.org/easylistlithuania+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistpolish+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistpolish.txt', 'https://easylist-downloads.adblockplus.org/easylistportuguese+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistportuguese.txt', 'https://easylist-downloads.adblockplus.org/easylistspanish+easylist.txt', 'https://easylist-downloads.adblockplus.org/easylistspanish.txt', 'https://easylist-downloads.adblockplus.org/global-filters+easylist.txt', 'https://easylist-downloads.adblockplus.org/global-filters.txt', 'https://easylist-downloads.adblockplus.org/hufilter+easylist.txt', 'https://easylist-downloads.adblockplus.org/indianlist+easylist.txt', 'https://easylist-downloads.adblockplus.org/indianlist.txt', 'https://easylist-downloads.adblockplus.org/japanese-filters+easylist.txt', 'https://easylist-downloads.adblockplus.org/japanese-filters.txt', 'https://easylist-downloads.adblockplus.org/koreanlist+easylist.txt', 'https://easylist-downloads.adblockplus.org/koreanlist.txt', 'https://easylist-downloads.adblockplus.org/latvianlist+easylist.txt', 'https://easylist-downloads.adblockplus.org/liste_fr+easylist.txt', 'https://easylist-downloads.adblockplus.org/liste_fr.txt', 'https://easylist-downloads.adblockplus.org/liste_ar+liste_fr+easylist.txt', 'https://easylist-downloads.adblockplus.org/Liste_AR.txt', 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt', 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt', 'https://easylist-downloads.adblockplus.org/advblock.txt', 'https://easylist-downloads.adblockplus.org/turkish-filters+easylist.txt', 'https://easylist-downloads.adblockplus.org/turkish-filters.txt', 'https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt', 'https://easylist-downloads.adblockplus.org/fanboy-notifications.txt', 'https://easylist-downloads.adblockplus.org/easyprivacy.txt', 'https://easylist-downloads.adblockplus.org/easyprivacy+easylist.txt', 'https://easylist-downloads.adblockplus.org/fanboy-social.txt' ]; return implode("\n", $urls); } private function enableVersion() { if (defined('AD_BLOCK_GUARD_IS_PRO')) exit; else define( 'AD_BLOCK_GUARD_IS_PRO', true); } }