{"id":72126,"date":"2017-07-21T18:01:51","date_gmt":"2017-07-21T18:01:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wp-countries\/"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-30T00:00:00","slug":"wp-countries","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wp-countries\/","author":13788753,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0","stable_tag":"","tested":"","requires":"","requires_php":"","requires_plugins":"","header_name":"WP Countries","header_author":"Martin Chevignard.","header_description":"A Wordpress Plugin providing PHP arrays and HTML select list of all countries and states","assets_banners_color":"","last_updated":"2017-07-21 18:01:51","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/mchev\/wp_countries","header_author_uri":"https:\/\/www.martinchevignard.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1347,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-72126","plugin","type-plugin","status-closed","hentry","plugin_committers-mchev"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-countries.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"\n\n<!--section=description-->\n<p>All countries are in the list. And states are available for US, Canada, Australia, India.<\/p>\n\n<h3>Usage<\/h3>\n\n<pre><code>`php\n<\/code><\/pre>\n\n<p>\/\/ Important!\nglobal $wp_countries;<\/p>\n\n<p>\/\/ Return an array of all countries and states\n$wp_countries-&gt;get_all();<\/p>\n\n<p>\/\/ Return an array with states\n$wp_countries-&gt;get_states( $countryCode );<\/p>\n\n<p>\/\/Get country name by country code\necho $wp_countries-&gt;get_name( $countryCode );<\/p>\n\n<p>\/**\n * Display a HTML select with all countries\n * $wp_countries-&gt;select_countries( $args = array() , $selected );\n *\/\necho $wp_countries-&gt;select_countries( array('name' =&gt; 'myname', 'id' =&gt; 'myid'), \"mySelectedOptionValue\" );<\/p>\n\n<p>\/**\n * Display a HTML select with all states of a country\n * $wp_countries-&gt;select_states( $args = array() , $selected, $countryCode );\n *\/\necho $wp_countries-&gt;select_states( array('name' =&gt; 'myname', 'id' =&gt; 'myid'), \"mySelectedOptionValue\", \"isoCode\" );<\/p>\n\n<pre><code>`\n<\/code><\/pre>","raw_excerpt":"A Wordpress Plugin providing PHP arrays and HTML select list of all countries and states","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/72126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=72126"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mchev"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=72126"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=72126"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=72126"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=72126"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=72126"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=72126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}