<?php
$gallery_plugins  = array(
    array('option_name' => 'photoblocks', 'dir_slug' => 'photoblocks-grid-gallery/photoblocks.php'),
    array('option_name' => 'everlightbox_options', 'dir_slug' => 'everlightbox/everlightbox.php'),
    array('option_name' => 'Total_Soft_Gallery_Video', 'dir_slug' => 'gallery-videos/index.php'),
    array('option_name' => 'Wpape-gallery-settings', 'dir_slug' => 'gallery-images-ape/index.php'),
    array('option_name' => 'overview', 'dir_slug' => 'robo-gallery/robogallery.php'),
    array('option_name' => 'flag-overview', 'dir_slug' => 'flash-album-gallery/flag.php'),
    array('option_name' => 'GrandMedia', 'dir_slug' => 'grand-media/grand-media.php'),
    array('option_name' => 'emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
    array('option_name' => 'grid-kit', 'dir_slug' => 'portfolio-wp/portfolio-wp.php'),
    array('option_name' => 'Wc-gallery', 'dir_slug' => 'wc-gallery/wc-gallery.php'),
    array('option_name' => 'elementor-getting-started', 'dir_slug' => 'elementor/elementor.php'),
    array('option_name' => 'photospace.php', 'dir_slug' => 'photospace/photospace.php'),
    array('option_name' => 'unitegallery', 'dir_slug' => 'unite-gallery-lite/unitegallery.php'),
    array('option_name' => 'resmushit_options', 'dir_slug' => 'resmushit-image-optimizer/resmushit.php'),
    array('option_name' => 'picture-gallery', 'dir_slug' => 'picture-gallery/picture-gallery.php'),
    array('option_name' => 'imagify', 'dir_slug' => 'imagify/imagify.php'),
    array('option_name' => 'gallery_bank', 'dir_slug' => 'gallery-bank/gallery-bank.php'),
    array('option_name' => 'wp-shortpixel-settings', 'dir_slug' => 'shortpixel-image-optimiser/wp-shortpixel.php'),
    array('option_name' => 'post-gallery-settings', 'dir_slug' => 'simple-post-gallery/plugin.php'),
    array('option_name' => 'image-gallery-settings', 'dir_slug' => 'responsive-photo-gallery/get-responsive-gallery.php'),
    array('option_name' => 'gallery-plugin.php', 'dir_slug' => 'gallery-plugin/gallery-plugin.php'),
    array('option_name' => 'youtube-my-preferences', 'dir_slug' => 'youtube-embed-plus/youtube.php'),
    array('option_name' => 'pfg-update-plugin', 'dir_slug' => 'portfolio-filter-gallery/portfolio-filter-gallery.php'),
    array('option_name' => 'jetpack', 'dir_slug' => 'jetpack/jetpack.php'),
    array('option_name' => 'gallery-options', 'dir_slug' => 'fancy-gallery/plugin.php'),
    array('option_name' => 'gallery-box-options.php', 'dir_slug' => 'gallery-box/gallery-box.php'),
    array('option_name' => 'catch-gallery', 'dir_slug' => 'catch-gallery/catch-gallery.php'),
    array('option_name' => 'galleries_grs', 'dir_slug' => 'limb-gallery/gallery-rs.php'),
    array('option_name' => 'wooswipe-options', 'dir_slug' => 'wooswipe/wooswipe.php'),
    array('option_name' => 'photoswipe-masonry.php', 'dir_slug' => 'photoswipe-masonry/photoswipe-masonry.php'),
    array('option_name' => 'maxgalleria-settings', 'dir_slug' => 'maxgalleria/maxgalleria-admin.php'),
    array('option_name' => 'Emg-whats-new', 'dir_slug' => 'easy-media-gallery/easy-media-gallery.php'),
    array('option_name' => 'wpffag_products', 'dir_slug' => 'flickr-album-gallery/flickr-album-gallery.php'),
    array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
    array('option_name' => 'foogallery-settings', 'dir_slug' => 'foogallery/foogallery.php'),
    array('option_name' => 'modula', 'dir_slug' => 'modula-best-grid-gallery/Modula.php'),
    array('option_name' => 'robo-gallery-settings', 'dir_slug' => 'robo-gallery/robogallery.php'),
    array('option_name' => 'envira', 'dir_slug' => 'envira-gallery-lite/envira-gallery-lite.php'),
    array('option_name' => 'supsystic-gallery', 'dir_slug' => 'gallery-by-supsystic/index.php'),
    array('option_name' => 'ftg-lite-gallery-admin', 'dir_slug' => 'final-tiles-grid-gallery-lite/FinalTilesGalleryLite.php'),
    array('option_name' => 'everest-gallery-lite', 'dir_slug' => 'everest-gallery-lite/everest-gallery-lite.php'),
    array('option_name' => 'photonic-options-manager', 'dir_slug' => 'photonic/photonic.php'),
    array('option_name' => 'meowapps-main-menu', 'dir_slug' => 'meow-gallery/meow-gallery.php'),
    array('option_name' => 'video_galleries_origincode_video_gallery', 'dir_slug' => 'smart-grid-gallery/smart-video-gallery.php'),
    array('option_name' => 'wpape_gallery_type', 'dir_slug' => 'gallery-images-ape/index.php'),
    array('option_name' => 'wc-gallery', 'dir_slug' => 'wc-gallery/wc-gallery.php'),
    array('option_name' => 'elementor', 'dir_slug' => 'elementor/elementor.php'),
    array('option_name' => 'robo_gallery_table', 'dir_slug' => 'robo-gallery/robogallery.php'),
    array('option_name' => 'awl_filter_gallery', 'dir_slug' => 'portfolio-filter-gallery/portfolio-filter-gallery.php'),
    array('option_name' => 'gallery_box', 'dir_slug' => 'gallery-box/gallery-box.php'),
    array('option_name' => 'maxgalleria-settings', 'dir_slug' => 'maxgalleria/maxgalleria.php'),
    array('option_name' => 'fa_gallery', 'dir_slug' => 'flickr-album-gallery/flickr-album-gallery.php'),
    array('option_name' => 'grid_gallery', 'dir_slug' => 'new-grid-gallery/grid-gallery.php'),
);
$sharecount_plugins  = array(
    array("dir_slug" => "optinmonster/optin-monster-wp-api.php", 'option_name' => 'optin-monster-api-welcome'),
    array("dir_slug" => "floating-social-bar/floating-social-bar.php", 'option_name' => 'floating-social-bar'),
    array("dir_slug" => "tweet-old-post/tweet-old-post.php", 'option_name' => 'TweetOldPost'),
    array("dir_slug" => "wp-to-buffer/wp-to-buffer.php", 'option_name' => 'wp-to-buffer-settings'),
    array("dir_slug" => "wordpress-seo/wp-seo.php", 'option_name' => 'wpseo_dashboard'),
    array("dir_slug" => "intelly-related-posts/index.php", 'option_name' => 'intelly-related-posts'),
    array("dir_slug" => "wordpress-popular-posts/wordpress-popular-posts.php", 'option_name' => 'wordpress-popular-posts'),
    array("dir_slug" => "subscribe-to-comments-reloaded/subscribe-to-comments-reloaded.php", 'option_name' => 'stcr_options'),
    array("dir_slug" => "click-to-tweet-by-todaymade/tm-click-to-tweet.php", 'option_name' => 'tmclicktotweet'),
    array("dir_slug" => "fb-instant-articles/facebook-instant-articles.php", 'option_name' => 'instant-articles-wizard'),
    array("dir_slug" => "sharebar/sharebar.php", 'option_name' => 'Sharebar'),
    array("dir_slug" => "wp-to-twitter/wp-to-twitter.php", 'option_name' => 'wp-tweets-pro'),
    array("dir_slug" => "sem-bookmark-me/sem-bookmark-me.php", 'option_name' => ''),
    array("dir_slug" => "onlywire-bookmark-share-button/owbutton_wordpress.php", 'option_name' => 'onlywireoptions'),
    array("dir_slug" => "google-analyticator/google-analyticator.php", 'option_name' => 'google-analyticator'),
    array("dir_slug" => "getsocial/getsocial.php", 'option_name' => 'getsocial/getsocial.php'),
    array("dir_slug" => "visitors-traffic-real-time-statistics/Visitors-Traffic-Real-Time-Statistics.php", 'option_name' => 'ahc_hits_counter_menu_free'),
    array("dir_slug" => "microblog-poster/microblogposter.php", 'option_name' => 'microblogposter.php'),
    array("dir_slug" => "triberr-wordpress-plugin/triberr.php", 'option_name' => 'triberr-options'),
    array("dir_slug" => "social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php", 'option_name' => 'nxssnap-ntadmin'),
    array("dir_slug" => "all-in-one-seo-pack/all_in_one_seo_pack.php", 'option_name' => 'all-in-one-seo-pack/aioseop_class.php'),
    array("dir_slug" => "multi-rating/multi-rating.php", 'option_name' => 'mr_settings'),
    array("dir_slug" => "social-pug/index.php", 'option_name' => 'dpsp-social-pug'),
    array("dir_slug" => "comment-reply-email-notification/cren_plugin.php", 'option_name' => 'comment_reply_email_notification'),
    array("dir_slug" => "share-subscribe-contact-aio-widget/free_profitquery_aio_widgets.php", 'option_name' => 'free_profitquery_aio_widgets'),
    array("dir_slug" => "better-robots-txt/better-robots-txt.php", 'option_name' => 'better-robots-txt'),
    array("dir_slug" => "google-analytics-for-wordpress/googleanalytics.php", 'option_name' => 'monsterinsights_settings'),
    array("dir_slug" => "onesignal-free-web-push-notifications/onesignal-push", 'option_name' => 'onesignal-push'),
    array("dir_slug" => "access-watch/index.php", 'option_name' => 'access-watch-dashboard'),
    array("dir_slug" => "tweet-old-post/tweet-old-post.php", 'option_name' => 'TweetOldPost'),
    array("dir_slug" => "mailoptin/mailoptin.php", 'option_name' => 'mailoptin-settings'),
    array("dir_slug" => "NextScripts_SNAP/NextScripts_SNAP.php", 'option_name' => 'nxssnap-reposter'),
    array("dir_slug" => "social-pug-author-box/index.php", 'option_name' => 'social_pug_author_box'),
    array("dir_slug" => "google-analytics-for-wordpress/googleanalytics.php", 'option_name' => 'monsterinsights-getting-started'),
    array("dir_slug" => "onesignal-free-web-push-notifications/onesignal.php", 'option_name' => 'onesignal-push'),
);
$optimization_plugins  = array(
    array('dir_slug' => 'litespeed-cache/litespeed-cache.php', 'option_name' => 'lscache-settings'),
    array('dir_slug' => 'w3-total-cache/w3-total-cache.php', 'option_name' => 'w3tc_dashboard'),
    array('dir_slug' => 'wp-fastest-cache/wpFastestCache.php', 'option_name' => 'wpfastestcacheoptions'),
    array('dir_slug' => 'wp-optimize/wp-optimize.php', 'option_name' => 'WP-Optimize'),
    array('dir_slug' => 'autoptimize/autoptimize.php', 'option_name' => 'autoptimize'),
    array('dir_slug' => 'cache-enabler/cache-enabler.php', 'option_name' => 'cache-enabler'),
    array('dir_slug' => 'wp-super-cache/wp-cache.php', 'option_name' => 'wpsupercache'),
    array('dir_slug' => 'hummingbird-performance/wp-hummingbird.php', 'option_name' => 'wphb'),
    array('dir_slug' => 'breeze/breeze.php', 'option_name' => 'breeze'),
    array('dir_slug' => 'sg-cachepress/sg-cachepress.php', 'option_name' => 'sg-cachepress'),
    array('dir_slug' => 'wp-rest-cache/wp-rest-cache.php', 'option_name' => 'wp-rest-cache'),
    array('dir_slug' => 'fast-velocity-minify/fvm.php', 'option_name' => 'fastvelocity-min'),
    array('dir_slug' => 'hyper-cache/plugin.php', 'option_name' => 'hyper-cache/options.php'),
    array('dir_slug' => 'redis-cache/redis-cache.php', 'option_name' => 'redis-cache'),
    array('dir_slug' => 'varnish-page', 'option_name' => 'varnish-page'),
    array('dir_slug' => 'sns-count-cache/sns-count-cache.php', 'option_name' => 'scc-dashboard'),
    array('dir_slug' => 'harrys-gravatar-cache/harrys-gravatar-cache.php', 'option_name' => 'harrys-gravatar-cache-options'),
    array('dir_slug' => 'fv-gravatar-cache/fv-gravatar-cache.php', 'option_name' => 'fv-gravatar-cache'),
    array('dir_slug' => 'wpe-advanced-cache-options/wpe-advanced-cache.php', 'option_name' => 'cache-settings'),
    array('dir_slug' => 'simple-cache/simple-cache.php', 'option_name' => 'simple-cache'),
    array('dir_slug' => 'ezcache/ezcache.php', 'option_name' => 'ezcache'),
    array('dir_slug' => 'wp-cloudflare-page-cache/wp-cloudflare-super-page-cache.php', 'option_name' => 'wp-cloudflare-super-page-cache-index'),
    array('dir_slug' => 'optimum-gravatar-cache/optimum-gravatar-cache.php', 'option_name' => 'optimum-gravatar-cache'),
    array('dir_slug' => 'yasakani-cache/yasakani-cache.php', 'option_name' => 'yasakani-cache'),
    array('dir_slug' => 'cachify/cachify.php', 'option_name' => 'cachify'),
    array('dir_slug' => 'gator-cache/gator-cache.php', 'option_name' => 'gtr_cache'),
    array('dir_slug' => 'wp-speed-of-light/wp-speed-of-light.php', 'option_name' => 'wpsol_dashboard'),
    array('dir_slug' => 'wp-super-minify/wp-super-minify.php', 'option_name' => 'wp-super-minify'),
    array('dir_slug' => 'wsa-cachepurge/wsa-cachepurge.php', 'option_name' => 'wsa-cachepurge/lib/wsa-cachepurge_display.php'),
    array('dir_slug' => 'a2-optimized-wp/a2-optimized.php', 'option_name' => 'A2_Optimized_Plugin_admin'),
    array('dir_slug' => 'nitropack/main.php', 'option_name' => 'nitropack'),
    array('dir_slug' => 'swift-performance-lite/performance.php', 'option_name' => 'swift-performance'),
    array('dir_slug' => 'wp-performance/wp-performance.php', 'option_name' => 'wp-performance'),
    array('dir_slug' => 'arvancloud-cache-cleaner/Arvancloud.php', 'option_name' => 'ar_cache'),
    array('dir_slug' => 'clear-cache-for-widgets/clear-cache-for-widgets.php', 'option_name' => 'ccfm-options'),
    array('dir_slug' => 'wp-asset-clean-up/wpacu.php', 'option_name' => 'wpassetcleanup_settings'),
    array('dir_slug' => 'flying-pages/flying-pages.php', 'option_name' => 'flying-pages'),
    array('dir_slug' => 'speed-booster-pack/speed-booster-pack.php', 'option_name' => 'sbp-options'),
    array('dir_slug' => 'baqend/baqend.php', 'option_name' => 'baqend'),
    array('dir_slug' => 'wp-smushit/wp-smush.php', 'option_name' => 'smush'),
    array('dir_slug' => 'varnish-http-purge/varnish-http-purge.php', 'option_name' => 'varnish-page'),
    array('dir_slug' => 'varnish-http-purge/varnish-http-purge.php', 'option_name' => 'varnish-check-caching'),

);
$gdpr_plugins  = array(
    array('dir_slug' => 'cookie-law-info/cookie-law-info.php', 'option_name' => 'cookie-law-info'),
    array('dir_slug' => 'complianz-gdpr/complianz-gpdr.php', 'option_name' => 'complianz'),
    array('dir_slug' => 'shapepress-dsgvo/sp-dsgvo.php', 'option_name' => 'sp-dsgvo'),
    array('dir_slug' => 'cookiebot/cookiebot.php', 'option_name' => 'cookiebot'),
    array('dir_slug' => 'gdpr-banner/gdpr-banner.php', 'option_name' => 'gdpr_banner'),
    array('dir_slug' => 'dsgvo-tools-cookie-hinweis-datenschutz/main.php', 'option_name' => 'fhw_dsgvo_cookies_options'),
    array('dir_slug' => 'ga-germanized/ga-germanized.php', 'option_name' => 'ga-germanized'),
    array('dir_slug' => 'cwis-antivirus-malware-detected/cwis-antivirus-malware-detected.php', 'option_name' => 'cwis-updater'),
    array('dir_slug' => 'luckywp-cookie-notice-gdpr/luckywp-cookie-notice-gdpr.php', 'option_name' => 'lwpcng_settings'),
    array('dir_slug' => 'ninja-gdpr-compliance/njt-gdpr.php', 'option_name' => 'njt-gdpr'),
    array('dir_slug' => 'gdpr-cookie-consent/gdpr-cookie-consent.php', 'option_name' => 'gdpr-cookie-consent'),
    array('dir_slug' => 'uniconsent-cmp/uniconsent-cmp.php', 'option_name' => 'unic-options'),
    array('dir_slug' => 'wplegalpages/wplegalpages.php', 'option_name' => 'legal-pages'),
    array('dir_slug' => 'smart-cookie-kit/plugin.php', 'option_name' => 'nmod_sck_graphics'),
    array('dir_slug' => 'cookie-information-consent-solution/cookie-information.php', 'option_name' => 'cookie-information'),
    array('dir_slug' => 'dsgvo-fur-die-schweiz/dsgvo-fur-die-schweiz.php', 'option_name' => 'dsgvo-admin'),
    array('dir_slug' => 'gdpr-cookies-pro/gdpr-cookies-pro.php', 'option_name' => 'gdpr-cookies-pro'),
    array('dir_slug' => 'seahorse-gdpr-data-manager/seahorse-gdpr-data-manager.php', 'option_name' => 'seahorse_gdpr_data_manager_plugin'),
    array('dir_slug' => 'dsgvo-tools-kommentar-ip-entfernen/main.php', 'option_name' => 'fhw_dsgvo_kommentar_options'),
    array('dir_slug' => 'gdpr-tools/gdpr-tools.php', 'option_name' => 'gdpr-tools-settings'),
    array('dir_slug' => 'gdpr-cookie-compliance/moove-gdpr.php', 'option_name' => 'moove-gdpr'),
    array('dir_slug' => 'cookie-notice/cookie-notice.php', 'option_name' => 'cookie-notice'),
    array('dir_slug' => 'tarteaucitronjs/tarteaucitron.php', 'option_name' => 'tarteaucitronjs'),
    array('dir_slug' => 'wp-gdpr-compliance/wp-gdpr-compliance.php', 'option_name' => 'wp_gdpr_compliance'),
    array('dir_slug' => 'iubenda_cookie_solution/iubenda_cookie_solution.php', 'option_name' => 'iubenda'),
    array('dir_slug' => 'easy-wp-cookie-popup/easy-wp-cookie-popup.php', 'option_name' => 'cookii_settings'),
    array('dir_slug' => 'gdpr-compliance-cookie-consent/gdpr-compliance-cookie-consent.php', 'option_name' => 'gdpr-compliance-cookie-consent'),
    array('dir_slug' => 'yetience-plugin/yetience-plugin.php', 'option_name' => 'yetience-yeloni'),
    array('dir_slug' => 'cwis-antivirus-malware-detected/cwis-antivirus-malware-detected.php', 'option_name' => 'cwis-scanner'),
    array('dir_slug' => 'gdpr-compliance-by-supsystic/grs.php', 'option_name' => 'gdpr-compliance-by-supsystic'),
    array('dir_slug' => 'auto-terms-of-service-privacy-policy/auto-terms-of-service-privacy-policy.php', 'option_name' => 'wpautoterms_page'),
    array('dir_slug' => 'google-analytics-opt-out/google-analytics-opt-out.php', 'option_name' => 'gaoo-options'),
    array('dir_slug' => 'surbma-gdpr-proof-google-analytics/surbma-gdpr-proof-google-analytics.php', 'option_name' => 'surbma-gpga-menu'),
    array('dir_slug' => 'bp-gdpr/buddypress-gdpr.php', 'option_name' => 'buddyboss-bp-gdpr'),
    array('dir_slug' => 'beautiful-and-responsive-cookie-consent/nsc_bar-cookie-consent.php', 'option_name' => 'nsc_bar-cookie-consent'),
    array('dir_slug' => 'simple-gdpr/simple-gdpr.php', 'option_name' => 'SGDPR_settings'),
    array('dir_slug' => 'wonderpush-web-push-notifications/wonderpush.php', 'option_name' => 'wonderpush'),
    array('dir_slug' => 'ns-gdpr/ns-gdpr.php', 'option_name' => 'ns-gdpr'),
);
$google_analytics  = array(
    array('dir_slug' => 'really-simple-ssl/rlrsssl-really-simple-ssl.php', 'option_name' => 'rlrsssl_really_simple_ssl'),
    array('dir_slug' => 'ssl-insecure-content-fixer/ssl-insecure-content-fixer.php', 'option_name' => 'ssl-insecure-content-fixer'),
    array('dir_slug' => 'https-redirection/https-redirection.php', 'option_name' => 'https-redirection'),
    array('dir_slug' => 'wordpress-https/wordpress-https.php', 'option_name' => 'wordpress-https'),
    array('dir_slug' => 'wp-force-ssl/wp-force-ssl.php', 'option_name' => 'wpfs-settings'),
    array('dir_slug' => 'sakura-rs-wp-ssl/sakura-rs-ssl.php', 'option_name' => 'sakura-admin-menu'),
    array('dir_slug' => 'wp-letsencrypt-ssl/wp-letsencrypt.php', 'option_name' => 'wp_encryption'),
    array('dir_slug' => 'ssl-zen/ssl_zen.php', 'option_name' => 'ssl_zen'),
    array('dir_slug' => 'one-click-ssl/ssl.php', 'option_name' => 'one-click-ssl'),
    array('dir_slug' => 'http-https-remover/http-https-remover.php', 'option_name' => 'httphttpsRemoval')
);
$woocommerce_plugins = array(
    array('dir_slug' => 'woocommerce/woocommerce.php', 'option_name' => 'wc-settings'),
    array('dir_slug' => 'woocommerce/woocommerce.php', 'option_name' => 'shop_order'),
    array('dir_slug' => 'woocommerce/woocommerce.php', 'option_name' => 'wc-admin'),
    array('dir_slug' => 'woocommerce/woocommerce.php', 'option_name' => 'shop_coupon'),
    array('dir_slug' => 'woocommerce/woocommerce.php', 'option_name' => 'wc-reports'),
    array('dir_slug' => 'woocommerce/woocommerce.php', 'option_name' => 'wc-status'),
    array('dir_slug' => 'woocommerce/woocommerce.php', 'option_name' => 'wc-addons'),
);
$twitter_plugins = array(
    array('dir_slug' => 'feed-them-social/feed-them.php', 'option_name' => 'feed-them-settings-page'),
    array('dir_slug' => 'miniorange-login-openid/miniorange_openid_sso_settings.php', 'option_name' => 'mo_openid_settings'),
    array('dir_slug' => 'custom-twitter-feeds/custom-twitter-feed.php', 'option_name' => 'custom-twitter-feeds'),
    array('dir_slug' => 'wp-to-twitter/wp-to-twitter.php', 'option_name' => 'wp-tweets-pro'),
    array('dir_slug' => 'rotatingtweets/rotatingtweets.php', 'option_name' => 'rotatingtweets'),
    array('dir_slug' => 'jm-twitter-cards/jm-twitter-cards.php', 'option_name' => 'jm_tc'),
    array('dir_slug' => 'wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php', 'option_name' => 'class-webdados-fb-open-graph-admin.php'),
    array('dir_slug' => 'twitter-tweets/twitter-tweets.php', 'option_name' => 'Twitter'),
    array('dir_slug' => 'ai-twitter-feeds/ai-twitter-feeds.php', 'option_name' => 'ai-plugin'),
    array('dir_slug' => 'facebook-button-plugin/facebook-button-plugin.php', 'option_name' => 'facebook-button-plugin.php'),
    array('dir_slug' => 'inline-tweet-sharer/inline-tweet-sharer.php', 'option_name' => 'inlinetweetshareroptions'),
    array('dir_slug' => 'twitter-auto-publish/twitter-auto-publish.php', 'option_name' => 'twitter-auto-publish-settings'),
    array('dir_slug' => 'arrow-twitter-feed/twitter-feed-by-arrowplugins.php', 'option_name' => 'tfba_twitter_feed'),
    array('dir_slug' => 'twitter/twitter.php', 'option_name' => 'twitter'),
    array('dir_slug' => 'wootweet/wootweet.php', 'option_name' => 'wootweet_options'),
    array('dir_slug' => 'accesspress-twitter-feed/accesspress-twitter-feed.php', 'option_name' => 'ap-twitter-feed'),
    array('dir_slug' => 'feeds-of-twitter/gs-twitter-feeds.php', 'option_name' => 'twitter-feed-settings'),
    array('dir_slug' => 'heateor-open-graph-meta-tags/heateor-open-graph-meta-tags.php', 'option_name' => 'heateor-ogmt-options'),
    array('dir_slug' => 'twitter-cards-meta/twitter-cards-meta.php', 'option_name' => 'twitter-cards-meta'),
    array('dir_slug' => 'better-click-to-tweet/better-click-to-tweet.php', 'option_name' => 'better-click-to-tweet'),
    array('dir_slug' => 'accesspress-twitter-auto-post/accesspress-twitter-auto-post.php', 'option_name' => 'atap'),
    array('dir_slug' => 'autoshare-for-twitter/autoshare-for-twitter.php', 'option_name' => 'autoshare-for-twitter'),
    array('dir_slug' => 'discuss-on-twitter/discuss-on-twitter.php', 'option_name' => 'discuss-on-twitter'),
    array('dir_slug' => 'wordpress-bootstrap-css/hlt-bootstrapcss.php', 'option_name' => 'icwp-wptb-plugin'),
    array('dir_slug' => 'flying-twitter-birds/flying-twitterbirds.php', 'option_name' => 'flying-twitter'),
    array('dir_slug' => 'twitter-widget-by-wpzoom/twitter-widget-by-wpzoom.php', 'option_name' => 'zoom_twitter_widget'),
    array('dir_slug' => 'recent-tweets-widget/recent-tweets.php', 'option_name' => 'recent-tweets'),
    array('dir_slug' => 'dsgnwrks-twitter-importer/dsgnwrks-twitter-importer.php', 'option_name' => 'dw-twitter-importer-settings'),
    array('dir_slug' => 'twitter-tools/twitter-tools.php', 'option_name' => 'tools.php'),
    array('dir_slug' => 'social-media-auto-publish/social-media-auto-publish.php', 'option_name' => 'social-media-auto-publish-settings'),
    array('dir_slug' => 'twitter-feed-afo/twitter_feed.php', 'option_name' => 'tweet_widget_afo_menu'),
    array('dir_slug' => 'twitter-widget-pro/wp-twitter-widget.php', 'option_name' => 'twitterWidgetPro'),
    array('dir_slug' => 'thinktwit/thinktwit.php', 'option_name' => 'thinktwit'),
    array('dir_slug' => 'ecommerce-social-login-social-sharing-by-miniorange/miniorange_wc_openid_sso_settings.php', 'option_name' => 'mo_wc_openid_settings'),
    array('dir_slug' => 'easy-twitter-feed-widget/easy-twitter-feed-widget.php', 'option_name' => 'do-etfw-options'),
    array('dir_slug' => 'multi-account-tweet-feeds-by-webline/multi-account-tweet-feeds-by-webline.php', 'option_name' => 'multi-account-tweet-feeds-menu'),
    array('dir_slug' => 'teg-twitter-api/teg-twitter-api.php', 'option_name' => 'teg-twitter-api'),
    array('dir_slug' => 'widget-twitter/twitter.php', 'option_name' => 'wdti_subscribe'),
    array('dir_slug' => 'juiz-last-tweet-widget/juiz-last-tweet.php', 'option_name' => 'juiz-last-tweet-widget'),
    array('dir_slug' => 'click-to-tweet-by-todaymade/tm-click-to-tweet.php', 'option_name' => 'tmclicktotweet'),
    array('dir_slug' => 'cardoza-twitter-box/cardoza_twitter_profile.php', 'option_name' => 'slug_for_twitter_box'),
    array('dir_slug' => 'mp-tweet-list/mp-tweet-list.php', 'option_name' => 'mp-tweet-list/mp-tweet-list.php'),
    array('dir_slug' => 'twitterify/twitterify.php', 'option_name' => 'twitterify'),
    array('dir_slug' => 'ki-twitter-analytics/ki-twitter-analytics.php', 'option_name' => 'ki_twitter_analytics'),
    array('dir_slug' => 'tweeple/tweeple.php', 'option_name' => 'tweeple'),
    array('dir_slug' => 'ray-social-feeds-for-twitter/my-custom-twitter-feed.php', 'option_name' => 'myctf-page'),
    array('dir_slug' => 'zedna-twitter-quotes/zedna-twitter-quotes.php', 'option_name' => 'zednatq'),
    array('dir_slug' => 'twitter-expander/twitter_expander.php', 'option_name' => 'twitterify'),
    array('dir_slug' => 'podamibe-twitter-feed-widget/podamibe-twitter.php', 'option_name' => 'twitterify'),
    array('dir_slug' => 'fetch-tweets/fetch-tweets.php', 'option_name' => 'fetch_tweets_settings'),
    array('dir_slug' => 'tweet-old-custom-post/tweet-old-cpost.php', 'option_name' => 'TweetOldCustomPost'),
    array('dir_slug' => 'kebo-twitter-feed/kebo-twitter-feed.php', 'option_name' => 'kebo-twitter'),
    array('dir_slug' => 'my-twitter-timelines/my_twitter_timelines.php', 'option_name' => 'my-twitter-timelines'),
    array('dir_slug' => 'evolution-twitter-timeline/evolution-twitter-timeline.php', 'option_name' => 'evolution-twitter-timeline'),
    array('dir_slug' => 'rotatingtweets/rotatingtweets.php', 'option_name' => 'rotatingtweets'),
    array('dir_slug' => 'good-old-twitter-feed-widget/good_old_twitter_widget.php', 'option_name' => 'good-old-twitter-feed-widget'),
    array('dir_slug' => 'qr-twitter-widget/qr-twitter-widget.php', 'option_name' => 'qr-twitter-widget'),
    array('dir_slug' => 'wp-twitter-feeds/wp-latest-twitter-tweets.php', 'option_name' => 'wp-twitter-feeds'),
    array('dir_slug' => 'wordpress-dashboard-twitter/wp-dashboard-twitter.php', 'option_name' => 'wordpress-dashboard-twitter'),
    array('dir_slug' => 'mini-twitter-feed/mini-twitter-feed.php', 'option_name' => 'mini-twitter-feed'),
    array('dir_slug' => 'pearl-twitter/pearl-twitter.php', 'option_name' => 'pearl-twitter'),
    array('dir_slug' => 'dw-twitter/dw-twitter.php', 'option_name' => 'dw-twitter'),
    array('dir_slug' => 'quick-and-easy-tweets/quick-and-easy-tweets.php', 'option_name' => 'quick-and-easy-tweets'),
    array('dir_slug' => 'wp-twitter-feed/wp-twitter-feed.php', 'option_name' => 'wp-twitter-feed'),
);
function sfsi_check_on_plugin_page($dir_slug, $option_name, $site_url = "")
{
    if (isset($_GET["page"])) {
        return is_plugin_active($dir_slug) && isset($_GET) && isset($_GET["page"])  && (false !== strpos($_GET['page'], $option_name));
    } else if (isset($_GET["post_type"])) {
        return is_plugin_active($dir_slug) && isset($_GET) && isset($_GET["post_type"])  && (false !== strpos($_GET['post_type'], $option_name));
    }
}

function sfsi_has_gallery_plugin($gallery_plugins)
{
    foreach ($gallery_plugins as $key => $gallery_plugin) {
        $sfsi_show_gallery_banner = sfsi_check_on_plugin_page($gallery_plugin['dir_slug'], $gallery_plugin['option_name']);
        if ($sfsi_show_gallery_banner) {
            return $sfsi_show_gallery_banner;
        }
    }
}
function sfsi_has_cache_plugin($optimization_plugins)
{
    foreach ($optimization_plugins as $key => $optimization_plugin) {
        $sfsi_show_optimization_plugin = sfsi_check_on_plugin_page($optimization_plugin['dir_slug'], $optimization_plugin['option_name']);
        if ($sfsi_show_optimization_plugin) {
            return $sfsi_show_optimization_plugin;
        }
    }
}

function sfsi_has_share_count_plugin($sharecount_plugins)
{
    foreach ($sharecount_plugins as $key => $sharecount_plugin) {
        $sfsi_show_share_count_plugin = sfsi_check_on_plugin_page($sharecount_plugin['dir_slug'], $sharecount_plugin['option_name']);
        if ($sfsi_show_share_count_plugin) {
            return $sfsi_show_share_count_plugin;
        }
    }
}

function sfsi_has_google_analytics_plugin($google_analytics)
{
    foreach ($google_analytics as $key => $google_analytic) {
        $sfsi_show_analytics_plugin = sfsi_check_on_plugin_page($google_analytic['dir_slug'], $google_analytic['option_name']);
        if ($sfsi_show_analytics_plugin) {
            return $sfsi_show_analytics_plugin;
        }
    }
}

function sfsi_has_gdpr_plugins($gdpr_plugins)
{
    foreach ($gdpr_plugins as $key => $gdpr_plugin) {
        $sfsi_show_gdpr_plugin = sfsi_check_on_plugin_page($gdpr_plugin['dir_slug'], $gdpr_plugin['option_name']);
        if ($sfsi_show_gdpr_plugin) {
            return $sfsi_show_gdpr_plugin;
        }
    }
}
function sfsi_has_woocommerce_plugins($woocommerce_plugins)
{
    foreach ($woocommerce_plugins as $key => $woocommerce_plugin) {
        $sfsi_show_woocommerce_plugin = sfsi_check_on_plugin_page($woocommerce_plugin['dir_slug'], $woocommerce_plugin['option_name']);
        if ($sfsi_show_woocommerce_plugin) {
            return $sfsi_show_woocommerce_plugin;
        }
    }
}
function sfsi_has_twitter_plugins($twitter_plugins)
{
    foreach ($twitter_plugins as $key => $twitter_plugin) {
        $sfsi_show_twitter_plugin = sfsi_check_on_plugin_page($twitter_plugin['dir_slug'], $twitter_plugin['option_name']);
        if ($sfsi_show_twitter_plugin) {
            return $sfsi_show_twitter_plugin;
        }
    }
}

function sfsi_check_not_show_other_plugin_settings_page($gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins,$woocommerce_plugins,$twitter_plugins)
{
    $all_banner = array(
        sfsi_has_gallery_plugin($gallery_plugins),
        sfsi_has_cache_plugin($optimization_plugins),
        sfsi_has_share_count_plugin($sharecount_plugins),
        sfsi_has_google_analytics_plugin($google_analytics),
        sfsi_has_gdpr_plugins($gdpr_plugins),
        sfsi_has_woocommerce_plugins($woocommerce_plugins),
        sfsi_has_twitter_plugins($twitter_plugins)
    );
    $check_any_banner_is_true = in_array(true, $all_banner);
    return $check_any_banner_is_true;
}
function sfsi_social_media_counts_active_onhttp()
{
    // check if user has activated the counts and his homepage has count on fb
    $sfsi_section4 = maybe_unserialize(get_option('sfsi_section4_options', false));
    $sfsi_section1 = maybe_unserialize(get_option('sfsi_section1_options', false));
    if ($sfsi_section1['sfsi_facebook_display'] && $sfsi_section4['sfsi_display_counts'] == "yes" && $sfsi_section4['sfsi_facebook_countsDisplay'] == "yes") {
        return true;
    };
    return false;
}

function sfsi_should_show_loyalty()
{
    // check if domain starts with a;
    if (strtolower(substr($_SERVER['SERVER_NAME'], 0, 1)) == "a") {
        return true;
    }
    return false;
}

function sfsi_check_banner_criteria($banner, $gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins,$woocommerce_plugins,$twitter_plugins,$time)
{
    // var_dump($banner);
    /*echo '<pre>'; print_r($banner);
    echo '</pre>';*/
    if (
        ($banner['is_active'] == "yes") &&
        $time >= ($banner['timestamp']) && (!sfsi_check_not_show_other_plugin_settings_page($gallery_plugins, $optimization_plugins, $sharecount_plugins, $google_analytics, $gdpr_plugins,$woocommerce_plugins,$twitter_plugins))
    ) {
        return true;
    }
    return false;
}

if (!function_exists('sfsi_get_plugin')) {
    function sfsi_get_plugin($dir_slug)
    {
        // if(is_plugin_active($dir_slug)){
        $plugins  = get_plugins();
        if (isset($plugins[$dir_slug])) {
            return $plugins[$dir_slug];
        } else {
            return null;
        }
        // }
    }
}
if(isset($_GET['page']) && $_GET['page'] == 'sfsi-options' && isset($_GET["debugbanner"]) && isset($_GET["bannerinterval"]) && $_GET["debugbanner"] == "yes"){
    if (get_option('sfsi_showNextBannerDate') != $_GET['bannerinterval']) {
       update_option('sfsi_showNextBannerDate', $_GET['bannerinterval']);
    }
    // $sfsi_install_date = (date('Y-m-d h:i:s'));
    // $sfsi_plus_current_date_demo =  date('Y-m-d H:i:s', strtotime(date('Y-m-d h:i:s') . $_GET['currentdate-plus-days']));
    // update_option('sfsi_plus_current_date_demo', $sfsi_plus_current_date_demo);
}

// if(isset($_GET['page']) && $_GET['page'] == 'sfsi-options' && isset($_GET["debuginstalldate"]) && isset($_GET["currentdate-days"]) && $_GET["debuginstalldate"] == "yes"){
//     $sfsi_install_date = (date('Y-m-d h:i:s'));
//     $sfsi_current_date_demo =  date('Y-m-d H:i:s', strtotime(date('Y-m-d h:i:s') . $_GET['currentdate-days']));
//     update_option('sfsi_current_date_demo', $sfsi_current_date_demo);
// } 