{"id":26933,"date":"2013-12-28T02:38:40","date_gmt":"2013-12-28T02:38:40","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-country\/"},"modified":"2016-04-16T00:27:21","modified_gmt":"2016-04-16T00:27:21","slug":"wp-country","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/wp-country\/","author":5467014,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.2","stable_tag":"trunk","tested":"4.5.33","requires":"3.6","requires_php":"","requires_plugins":"","header_name":"WP Country","header_author":"Andrey K.","header_description":"","assets_banners_color":"","last_updated":"2016-04-16 00:27:21","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/andrey.eto-ya.com\/wp-country-plugin","header_author_uri":"http:\/\/andrey.eto-ya.com\/","rating":0,"author_block_rating":0,"active_installs":100,"downloads":3596,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[65818,3751,1863,1864],"plugin_category":[],"plugin_contributors":[81594],"plugin_business_model":[],"class_list":["post-26933","plugin","type-plugin","status-publish","hentry","plugin_tags-countries-list","plugin_tags-country","plugin_tags-dropdown","plugin_tags-select","plugin_contributors-andreyk","plugin_committers-andreyk"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-country.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>To use the WP Country plugin in your theme or plugin add <code>global $wp_country;<\/code> into your theme or plugin PHP file,\nthen:<\/p>\n\n<ul>\n<li><p><code>$wp_country-&gt;countries_list()<\/code> is an array of country names<\/p><\/li>\n<li><p><code>$wp_country-&gt;dropdown()<\/code> prints or returns countries as dropdown HTML  tag.<\/p><\/li>\n<li><p><code>$wp_country-&gt;name($alpha2)<\/code> returns the name of a country by it's 2-character code.<\/p><\/li>\n<\/ul>\n\n<p>Russian translation is available now.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>wp-country<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>Advanced usage: <code>dropdown($blank, $echo, $args)<\/code><\/p>\n<dl>\n<dt>Parameters Description<\/dt>\n<dd><ul>\n<li><p><em>blank<\/em>: if not empty then <code>&lt;option value=''&gt;<\/code> will be added into dropdown list. Default: ''.<\/p><\/li>\n<li><p><em>echo<\/em>: prints the list if true else returns. Default: true.<\/p><\/li>\n<li><p><em>args<\/em>: an array of extra parameters. Default: <code>array('include' =&gt; array(), 'exclude' =&gt; array(), 'name' =&gt; 'country', 'id' =&gt; '', 'selected' =&gt; array(), 'multiple' =&gt; false)<\/code>.<\/p><\/li>\n<\/ul><\/dd>\n<dt>Description of `args` components<\/dt>\n<dd><ul>\n<li><p><em>include<\/em>, <em>exclude<\/em>: an array of country codes (alpha2) should be included into dropdown list or excluded from it.<\/p><\/li>\n<li><p><em>name<\/em>: <code>name<\/code> attribute of the SELECT tag.<\/p><\/li>\n<li><p><em>id<\/em>: <code>id<\/code> attribute (not displayed by default).<\/p><\/li>\n<li><p><em>class<\/em>: <code>class<\/code> attribute of the SELECT tag (empty by default).<\/p><\/li>\n<li><p><em>multiple<\/em>: enables multiple select.<\/p><\/li>\n<li><p><em>selected<\/em>: adds the <code>selected<\/code> attribute.<\/p><\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<ul>\n<li>0.2 Add <code>class<\/code> parameter for dropdown list.<\/li>\n<li>0.1 Initial version.<\/li>\n<\/ul>","raw_excerpt":"Provides WP_Country PHP class to get countries list as an array and dropdown country select for use in other plugins and themes.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/26933","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=26933"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/andreyk"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=26933"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=26933"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=26933"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=26933"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=26933"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=26933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}