One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| // Lists of countries with ISO 3166 codes, presented in various formats. | |
| // Last Updated: July 30, 2020 | |
| // If you're using PHP, I suggest checking out: | |
| // https://github.com/thephpleague/iso3166 | |
| // or Laravel: https://github.com/squirephp/squire | |
| // | |
| // JS developers can check out: | |
| // https://www.npmjs.com/package/iso3166-2-db | |
| // |
| // Changes XML to JSON | |
| // Modified version from here: http://davidwalsh.name/convert-xml-json | |
| xmlToJson(xml) { | |
| // Create the return object | |
| let obj = {}; | |
| if (xml.nodeType === 1) { // element | |
| // do attributes | |
| if (xml.attributes.length > 0) { | |
| obj['@attributes'] = {}; |
| /** | |
| * Bootstrap Walker for Wordpress Navigation Menu | |
| * | |
| * Extends WordPress walker class to add support for Twitter Bootstrap navigation menu and JS dropdowns. | |
| * Caveats and features: | |
| * - Only top level elements with children will be turned into dropdowns | |
| * - Can be used in a Bootstrap nav but needs some CSS styling to improve presentation | |
| * - With extra CSS multiple columns can be shown in a dropdown (sort of a simple mega-menu) | |
| * | |
| * Multi column dropdowns (mega-menu) via CSS: |
| // Remove the product rating display on product loops | |
| remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); |