{"id":32919,"date":"2014-11-18T18:29:03","date_gmt":"2014-11-18T18:29:03","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/category-country-aware\/"},"modified":"2021-03-24T10:58:50","modified_gmt":"2021-03-24T10:58:50","slug":"category-country-aware","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/category-country-aware\/","author":7146442,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2.3","stable_tag":"trunk","tested":"4.9.29","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"Category Country Aware Wordpress","header_author":"Andrew Wrigley","header_description":"","assets_banners_color":"","last_updated":"2021-03-24 10:58:50","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/means.us.com\/","header_plugin_uri":"http:\/\/means.us.com","header_author_uri":"http:\/\/means.us.com\/","rating":5,"author_block_rating":0,"active_installs":200,"downloads":8888,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.6.1":{"tag":"0.6.1","author":"wrigs1","date":"2014-11-19 23:24:07"},"0.7.0":{"tag":"0.7.0","author":"wrigs1","date":"2014-12-06 10:29:02"},"0.7.7":{"tag":"0.7.7","author":"wrigs1","date":"2015-01-22 18:54:53"},"0.8.0":{"tag":"0.8.0","author":"wrigs1","date":"2015-01-24 07:56:35"},"0.8.5":{"tag":"0.8.5","author":"wrigs1","date":"2015-03-18 17:59:53"},"0.9.0":{"tag":"0.9.0","author":"wrigs1","date":"2015-05-14 15:51:48"},"0.9.1":{"tag":"0.9.1","author":"wrigs1","date":"2015-08-02 22:23:42"},"0.9.2":{"tag":"0.9.2","author":"wrigs1","date":"2015-08-09 16:48:22"},"1.0.1":{"tag":"1.0.1","author":"wrigs1","date":"2017-07-24 20:39:41"},"1.1.0":{"tag":"1.1.0","author":"wrigs1","date":"2017-09-12 15:44:41"},"1.2.0":{"tag":"1.2.0","author":"wrigs1","date":"2018-05-02 11:34:03"},"1.2.1":{"tag":"1.2.1","author":"wrigs1","date":"2018-05-25 14:47:20"},"1.2.2":{"tag":"1.2.2","author":"wrigs1","date":"2018-05-27 15:38:28"},"1.2.3":{"tag":"1.2.3","author":"wrigs1","date":"2018-07-01 16:19:21"}},"upgrade_notice":{"1.2.3":"<ul>\n<li>Shortcodes can now be used in CCA widgets<\/li>\n<li>Cookie Noitce - improvements &amp; fix to hide CN revoke button for non-EU visitors<\/li>\n<li>Geo Country\/EU API added for AJAX calls by other plugin or your own javascript<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"3"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.6.1","0.7.0","0.7.7","0.8.0","0.8.5","0.9.0","0.9.1","0.9.2","1.0.1","1.1.0","1.2.0","1.2.1","1.2.2","1.2.3"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":1866949,"resolution":"1","location":"assets","locale":""},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":1866949,"resolution":"2","location":"assets","locale":""},"screenshot-3.jpg":{"filename":"screenshot-3.jpg","revision":1866949,"resolution":"3","location":"assets","locale":""},"screenshot-4.jpg":{"filename":"screenshot-4.jpg","revision":1866949,"resolution":"4","location":"assets","locale":""},"screenshot-5.jpg":{"filename":"screenshot-5.jpg","revision":1866949,"resolution":"5","location":"assets","locale":""},"screenshot-6.jpg":{"filename":"screenshot-6.jpg","revision":1866949,"resolution":"6","location":"assets","locale":""}},"screenshots":{"1":"<p>Same 3 sidebar widgets i. on \"Crime Fiction\" category post (US visitor); and ii. on \"Travel Guides post\" (British visitor)<\/p>","2":"<p>Ad in Post for category Junior fiction (smart responsive option set so ad only displays on small devices)<\/p>","3":"<p>Override theme's widget styles (border, padding etc) without writing any HTML or CSS<\/p>","4":"<p>Adding default content for widget:<\/p>","5":"<p>Same widget, show RSS news feed for category \"Travel\" when visitor is from USA<\/p>","6":"<p>Set up of \"Ads in Posts\" for category Junior Fiction:<\/p>"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[89,1412,3751,2493,16373],"plugin_category":[],"plugin_contributors":[88519],"plugin_business_model":[],"class_list":["post-32919","plugin","type-plugin","status-publish","hentry","plugin_tags-category","plugin_tags-category-widget","plugin_tags-country","plugin_tags-geoip","plugin_tags-rss-widget","plugin_contributors-wrigs1","plugin_committers-wrigs1"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/category-country-aware.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/category-country-aware\/assets\/screenshot-1.jpg?rev=1866949","caption":"<p>Same 3 sidebar widgets i. on \"Crime Fiction\" category post (US visitor); and ii. on \"Travel Guides post\" (British visitor)<\/p>"},{"src":"https:\/\/ps.w.org\/category-country-aware\/assets\/screenshot-2.jpg?rev=1866949","caption":"<p>Ad in Post for category Junior fiction (smart responsive option set so ad only displays on small devices)<\/p>"},{"src":"https:\/\/ps.w.org\/category-country-aware\/assets\/screenshot-3.jpg?rev=1866949","caption":"<p>Override theme's widget styles (border, padding etc) without writing any HTML or CSS<\/p>"},{"src":"https:\/\/ps.w.org\/category-country-aware\/assets\/screenshot-4.jpg?rev=1866949","caption":"<p>Adding default content for widget:<\/p>"},{"src":"https:\/\/ps.w.org\/category-country-aware\/assets\/screenshot-5.jpg?rev=1866949","caption":"<p>Same widget, show RSS news feed for category \"Travel\" when visitor is from USA<\/p>"},{"src":"https:\/\/ps.w.org\/category-country-aware\/assets\/screenshot-6.jpg?rev=1866949","caption":"<p>Set up of \"Ads in Posts\" for category Junior Fiction:<\/p>"}],"raw_content":"<!--section=description-->\n<p>DUE TO PERSONAL CIRCUMSTANCES I AM NO LONGER ABLE TO DEVELOP OR SUPPORT THIS PLUGIN. IF YOU ARE INTERESTED IN ADOPTING THIS PLUGIN SEE https:\/\/developer.wordpress.org\/plugins\/wordpress-org\/take-over-an-existing-plugin\/<\/p>\n\n<p>Country Geolocation shortcodes for every need, plus the most flexible Text (and RSS) Widget available. Customize and personalize your posts and widget content for your visitor's locale (country) and\/or the current category.<\/p>\n\n<p>https:\/\/www.youtube.com\/watch?v=EyT-WQh39E8<\/p>\n\n<p>&nbsp;<\/p>\n\n<p>Customize post content to suit the visitor's location (country).<\/p>\n\n<p>Display category relevant and visitor country relevant adverts\/content in posts and widget areas.<\/p>\n\n<p>Make category and country aware CCA widgets (text\/scripts\/news feeds) relevant to the post's category and\/or visitor's location.<\/p>\n\n<p>Make your CCA widgets\/adverts smart responsive (display in post or sidebar depending on screen width).<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>Features ( <a href=\"http:\/\/wptest.means.us.com\/category-country-aware-wordpress\/\">more info in the CCA Plugin Guide<\/a>)<\/strong>:<\/p>\n\n<ul>\n<li><p>location aware <strong>Shortcodes<\/strong> for use in posts and pages (see CCA documentation). You can even auto convert temperatures in your text to the scale used by your visitor.<\/p><\/li>\n<li><p>YOU control <strong>widget<\/strong> content based on category(s) and\/or visitor's locale(s)<\/p><\/li>\n<li><p>add multiple widgets to the sidebar, each configurable to display content based on current Category\/Country aware content<\/p><\/li>\n<li><p>select categories by name (not by unfreindly numeric id)<\/p><\/li>\n<li><p>YOU choose the number of characters to display for RSS News Item excerpts (unlike WP RSS widget)<\/p><\/li>\n<li><p>option to nofollow news feed links and to open RSS links in new tab (unlike WP RSS widget)<\/p><\/li>\n<li><p>the same widget can be used as \"Text\" or RSS widget, depending on category and visitor locale, saving you valuable sidebar space<\/p><\/li>\n<li><p>can be used with Cookie Notice plugin to limit display of notice to EU visitors only<\/p><\/li>\n<li><p>can be used with Menu Item Visibility Control plugin to modify main navigation links to suit visitor's locale<\/p><\/li>\n<li><p>API for client side (browser) Ajax country\/EU geolocation - for use by plugins and coders who need a javascript solution.<\/p><\/li>\n<li><p>extensions (developers see below) providing additional functionality (see plugin documentation)<\/p><\/li>\n<\/ul>\n\n<p>&nbsp;<\/p>\n\n<p><strong>Travel Blog EXAMPLE<\/strong>:<\/p>\n\n<p>In one <strong>CCA sidebar widget<\/strong> (you can use more):<\/p>\n\n<ul>\n<li><p>display a hotel booking advert\/form by default<\/p><\/li>\n<li><p>for posts in category \"Equipment\" display an <em>Amazon.COM<\/em> Travel Gadget advert;\n<br \/>but if the visitor is located in the UK or Ireland display an <em>Amazon.CO.UK<\/em> equivalent;<\/p><\/li>\n<li><p>category \"Transport\": display a flight search advertisement<\/p><\/li>\n<li><p>category \"Information\": display UK Gov Travel Warnings News Feed (<strong>RSS<\/strong>) by default;\n<br \/> but if the visitor is from US or NZ show their Government's equivalent Feed instead<\/p><\/li>\n<\/ul>\n\n<p>Use \"<strong>Ads within posts widget<\/strong>\" to display a gadget advert within posts in category \"equipment\".<\/p>\n\n<ul>\n<li>set widget to only display on small devices i.e. when your sidebar is not visible.<\/li>\n<\/ul>\n\n<p>Use <strong>shortcodes to customize your posts<\/strong> for visitors from different countries e.g.<\/p>\n\n<ul>\n<li><p>[display only=\"US,GB\"]some content[cca_display] will only display the enclosed content, advert etc to visitors from US and UK.<\/p><\/li>\n<li><p>[cca_display not=\"GB,AU\"]some content[cca_display] will NOT display the enclosed content to visitors from the specified countries.<\/p><\/li>\n<\/ul>\n\n<p>&nbsp;<\/p>\n\n<p><strong>CCA Goodies Extension<\/strong>\nCurrently free for a tweet <a href=\"http:\/\/wptest.means.us.com\/cca-goodies-extension\/\">see this post for more info<\/a>.  More flexibility for sidebar widgets . More \"Ads in Posts\" widgets.<\/p>\n\n<p>Enable PHP.<\/p>\n\n<p>Preview mode + view CCA content as if you are a visitor from specified country.  More Geolocation shortcodes. Give pages \"categories\" etc etc.<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>GeoIP Country Data:<\/strong><\/p>\n\n<p>This product includes GeoLite2 data created by MaxMind, available from http:\/\/www.maxmind.com .<\/p>\n\n<p>If you use Cloudflare and have \"switched on\" their GeoLocation option ( see <a href=\"https:\/\/support.cloudflare.com\/hc\/en-us\/articles\/200168236-What-does-CloudFlare-IP-Geolocation-do-\">Cloudflare's instructions<\/a> ) then it will be used to identify visitor country.  If not, then the Maxmind GeoLite2 Country Database, installed by this plugin, will be used.<\/p>\n\n<p>Experts: a \"hook\" is provided to allow you to use other GeoIP systems with this plugin.<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>Developers and coders:<\/strong> edit functions.php or build your own CCA extension plugin using CCA functions, filters and actions.<\/p>\n\n<p>Useful functions &amp; methods are detailed in the CCA website's documentation. Actions, Filters &amp; Hooks have yet to be documented; but view the RSS code within this plugin or download the \"CCA Goodies Extension\" from the CCA website to give you an idea of how to add additional functionality.<\/p>\n\n<p>If you want to build your own extensions then contact me first as there is a chance that hooks will be renamed or removed.<\/p>\n\n<h3>License<\/h3>\n\n<p>This program is free software licensed under the terms of the <a href=\"http:\/\/www.gnu.org\/licenses\/old-licenses\/gpl-2.0.html\">GNU General Public License version 2<\/a> as published by the Free Software Foundation.<\/p>\n\n<p>In particular please note the following:<\/p>\n\n<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<\/p>\n\n<!--section=installation-->\n<p>Requirements: PHP 5.3 or later. Maxmind Geolocation (if used) requires at least PHP 5.4.<\/p>\n\n<p>Install in the usual way:<\/p>\n\n<p>1.Plugins -&gt; Add New -&gt; do a search for \"Category Country Aware\" to find it -&gt; click \"install now\"<\/p>\n\n<p>2.Activate the plugin.<\/p>\n\n<p>3.Use the <em>Dashboard-&gt;'Settings'-&gt;'CCA Goodies'<\/em> and the Dashboard-&gt;'Appearance'-&gt;'Widgets' menus to configure.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='where%20can%20i%20find%20support%2Fadditional%20documentation'><h3>Where can I find support\/additional documentation<\/h3><\/dt>\n<dd><p>Support questions should be posted on Wordpress.Org<br \/>\nAdditional documentation is provided at http:\/\/wptest.means.us.com\/category-country-aware-wordpress\/<\/p><\/dd>\n<dt id='how%20does%20the%20widget%20decide%20which%20of%20my%20category%2Fcountry%20entries%20to%20use%3F'><h3>How does the widget decide which of my category\/country entries to use?<\/h3><\/dt>\n<dd><p>The most specific entry found is used. For less specific entries, categories have higher priority than visitor location. \nSo for a Fench visitor viewing a Books post: content defined for \"visitor anywhere\"|Category \"Books\"  would win over content defined for \"France\"|Category \"Any\".<\/p><\/dd>\n<dt id='can%20the%20widget%20be%20made%20to%20execute%20php%20code%3F'><h3>Can the widget be made to execute PHP code?<\/h3><\/dt>\n<dd><p>Short answer:yes [via the CCA goodies extension] (http:\/\/wptest.means.us.com\/cca-goodies-extension\/ ) where you positively opt to allow PHP.<\/p>\n\n<p>Long answer: any plugin enabling input of arbitrary PHP has increased security risks, however I am aware there is high demand for this feature.\nTo protect normal non-PHP users, you will have to positively opt to enable PHP. For security opt-in is set by a separate plugin to the widget that executes it.<\/p><\/dd>\n<dt id='caching%20plugins%2Fservices%20have%20problems%20with%20dynamic%20content%20such%20as%20geoip.%20will%20the%20country%20location%20part%20of%20the%20cca%20plugin%20work%20with%20these%3F'><h3>Caching plugins\/services have problems with dynamic content such as GeoIP. Will the country location part of the CCA plugin work with these?<\/h3><\/dt>\n<dd><p>Short answer:\n<br \/> &nbsp; Yes for Cloudflare with their standard caching option\n<br \/> &nbsp; \"Perfectly\" for <strong>Comet Cache<\/strong> and <strong>WP Supercache<\/strong> when using the country caching plugin extension <a href=\"https:\/\/wordpress.org\/plugins\/country-caching-extension-for-wp-super-cache\/\">for WPSC<\/a>, or \n<a href=\"https:\/\/wordpress.org\/plugins\/country-caching-extension\/\">for Comet\/ZC\/QC<\/a>. See CCA documentation.\n<br \/> &nbsp; W3 Total Cache: DIY solutions (less than perfect).\n<br \/> &nbsp; Other caching plugins may or may not provide suitable settings.<\/p>\n\n<p>Note: the plugin also includes an API to allow client side geolocation for use with your own javascript - this should work with any type of page caching.<\/p>\n\n<p>You can also simply use the CCA widget to display relevant content by category (ignoring visitor country).<\/p>\n\n<p>full answer:  see CCA documentation<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>Shortcodes can now be used in CCA widgets<\/li>\n<li>Cookie Noitce - improvements &amp; fix to hide CN revoke button for non-EU visitors<\/li>\n<li>Geo Country\/EU API added for AJAX calls by other plugin or your own javascript<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Bug fix to prevent issue with caching and Cookie Notice - infinite reload attempts.<\/li>\n<li>CLEAR CACHE AFTER THIS UPDATE <\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Compatibility with new GDPR version of Cookie Notice to make EU visitor only <\/li>\n<li>[more info] (https:\/\/wptest.means.us.com\/european-cookie-law-bar\/ )<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>On non Cloudflare sites, Maxmind Geolite2 replaces \"Legacy\" for country GeoIP  (Legacy no longer supported by Maxmind)<\/li>\n<li>Added [cca_is_EU] [\/cca_is_EU] and [cca_not_EU] [\/cca_not_EU] shortcodes<\/li>\n<li>View your CCA Settings \"Countries\" tab to confirm that \"GeoLite2-Country.mmdb\" has been succesfully instaled<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>2 new boolean functions \"cca_visitor_from()\" and \"cca_visitor_NOT_from()\" e.g. \"cca_visitor_from('CA,US')\" will return TRUE if visitor from US or Canada otherwise FALSE.<\/li>\n<li>can be used in you own custom code or non-coders with some other plugins e.g. The Menu Items Visibility Control plugin adds a \"Visibility\" field to Dashboard's Menu Settings.<\/li>\n<li>If say, you only want a Nav Menu link to display for visitors from France or USA simply insert \"cca_visitor_from('US,FR)\" in the visibilty field and save.<\/li>\n<\/ul>\n\n<h4>0.9.2<\/h4>\n\n<ul>\n<li>Added option to set the <a href=\"https:\/\/wordpress.org\/plugins\/cookie-notice\/\">Cookie Notice plugin<\/a> to only display its cookie bar to European Union visitors ONLY. <\/li>\n<li>Dashboard-&gt;Settings-&gt;Category Country Goodies-&gt;Countries  and check the \"set Cookie Notice to only display its cookie bar for these countries\" box<\/li>\n<\/ul>","raw_excerpt":"Make both your post content and sidebar category and\/or visitor location relevant.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/32919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=32919"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/wrigs1"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=32919"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=32919"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=32919"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=32919"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=32919"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=32919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}