{"id":256927,"date":"2025-11-10T22:11:27","date_gmt":"2025-11-10T22:11:27","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/countrylock\/"},"modified":"2025-11-17T14:19:29","modified_gmt":"2025-11-17T14:19:29","slug":"countrylock","status":"publish","type":"plugin","link":"https:\/\/es-hn.wordpress.org\/plugins\/countrylock\/","author":23385267,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.8","stable_tag":"1.0.8","tested":"6.8.5","requires":"5.0","requires_php":"","requires_plugins":null,"header_name":"CountryLock","header_author":"topsyde","header_description":"Block\/allow countries with one toggle. Lightweight, no upsells. Includes admin bypass, IP allowlist, and block stats.","assets_banners_color":"0f0f0f","last_updated":"2025-11-17 14:19:29","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/topsyde.com","rating":5,"author_block_rating":0,"active_installs":40,"downloads":323,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0.7":{"tag":"1.0.7","author":"topsyde","date":"2025-11-10 22:12:22"},"1.0.8":{"tag":"1.0.8","author":"topsyde","date":"2025-11-17 14:19:29"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.gif":{"filename":"icon-128x128.gif","revision":3393258,"resolution":"128x128","location":"assets","locale":""},"icon-128x128.png":{"filename":"icon-128x128.png","revision":3393258,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.gif":{"filename":"icon-256x256.gif","revision":3393258,"resolution":"256x256","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3393258,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3393258,"resolution":"1544x500","location":"assets","locale":""},"banner-722x250.png":{"filename":"banner-722x250.png","revision":3393258,"resolution":"722x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.7","1.0.8"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1220,1497,3751,2591,2493],"plugin_category":[49],"plugin_contributors":[250503],"plugin_business_model":[],"class_list":["post-256927","plugin","type-plugin","status-publish","hentry","plugin_tags-block","plugin_tags-block-country","plugin_tags-country","plugin_tags-geo","plugin_tags-geoip","plugin_category-maps-and-location","plugin_contributors-topsyde","plugin_committers-topsyde"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/countrylock\/assets\/icon-128x128.png?rev=3393258","icon_2x":"https:\/\/ps.w.org\/countrylock\/assets\/icon-256x256.png?rev=3393258","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>CountryLock provides a simple, lightweight way to allow or block countries from accessing your WordPress site.<\/p>\n\n<p>It's designed to be <strong>\"set it and forget it\"<\/strong> with no upsells, ads, or complex configurations.<\/p>\n\n<h3>\u2728 Key Features<\/h3>\n\n<ul>\n<li><strong>Master Toggle:<\/strong> Enable or disable the firewall with a single click.<\/li>\n<li><strong>Allowed Countries List:<\/strong> Specify which two-letter country codes (e.g., <code>US<\/code>, <code>CA<\/code>) are allowed. Everyone else is blocked.<\/li>\n<li><strong>Admin Bypass:<\/strong> Logged-in administrators can always bypass the block (toggleable).<\/li>\n<li><strong>IP Allowlist:<\/strong> A simple list of IPs or CIDR ranges (like <code>123.45.67.89<\/code> or <code>10.0.0.0\/8<\/code>) that are always allowed.<\/li>\n<li><strong>Block Logging:<\/strong> See which countries and IPs are being blocked (toggleable).<\/li>\n<li><strong>Zero-Lookup Detection:<\/strong> Automatically uses Cloudflare (<code>HTTP_CF_IPCOUNTRY<\/code>) and other common server-level GEO headers for instant decisions with zero performance impact.<\/li>\n<li><strong>Remote Lookup:<\/strong> As a fallback, it can query an external service (<code>ipapi.co<\/code>) if no headers are found.<\/li>\n<\/ul>\n\n<h3>External Services<\/h3>\n\n<p>This plugin uses one external service as a fallback to determine a visitor's country if no local GEO headers (like those from Cloudflare or a server-level GeoIP module) are present.<\/p>\n\n<ul>\n<li><strong>Service:<\/strong> <code>ipapi.co<\/code><\/li>\n<li><strong>What it's used for:<\/strong> To look up the country of origin for a visitor's IP address.<\/li>\n<li><strong>Data Sent:<\/strong> The visitor's IP address is sent to the service. This happens <em>only<\/em> if the \"Use remote lookup if no geo headers\" setting is enabled AND no local GeoIP headers are detected.<\/li>\n<li><strong>Service Policies:<\/strong>\n\n<ul>\n<li><a href=\"https:\/\/ipapi.co\/terms\/\">Terms of Service<\/a><\/li>\n<li><a href=\"https:\/\/ipapi.co\/privacy\/\">Privacy Policy<\/a><\/li>\n<\/ul><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>countrylock<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Go to the new 'CountryLock' menu in your admin sidebar.<\/li>\n<li>Configure your allowed countries and toggle the plugin to \"Enabled\".<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>Fix: Corrected admin page structure to prevent other plugins' notices from appearing inside the UI.<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Fatal Error fix<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Refactor: Move inline CSS and JS to external files (tscl-admin.css, tscl-admin.js) and enqueue them properly.<\/li>\n<li>Refactor: Rename all internal prefixes from <code>cl_<\/code> to <code>tscl_<\/code> to meet WordPress.org prefixing standards.<\/li>\n<li>Refactor: Remove custom 403 page in favor of the standard <code>wp_die()<\/code> screen for better compatibility.<\/li>\n<li>Fix: Use <code>filemtime()<\/code> for asset versioning to automatically bust cache.<\/li>\n<li>Docs: Add <code>readme.txt<\/code> with external service disclosure.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Initial public release.<\/li>\n<\/ul>","raw_excerpt":"Block\/allow countries with one toggle. Lightweight, no upsells. Includes admin bypass, IP allowlist, and block stats.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/256927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=256927"}],"author":[{"embeddable":true,"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/topsyde"}],"wp:attachment":[{"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=256927"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=256927"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=256927"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=256927"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=256927"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/es-hn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=256927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}