
The CSS Flags plugin / library for WordPress loads a dynamicaly created CSS with responsive flags.
Note: CSS Flags is not a standalone plugin/library, To display the flags you will have to add code to your theme using your own plugin or theme functions.php
You can view the flags at my site
Sample CSS:
.css-flag.sami { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHZlcnNpb249IjEuMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAyMCIgaGVpZ2h0PSIxNTAwIj48cmVjdCB3aWR0aD0iNjQ1IiBoZWlnaHQ9IjE1MDAiIGZpbGw9IiNkODFlMDUiLz48cmVjdCB4PSI2NDUiIHdpZHRoPSIxNDAiIGhlaWdodD0iMTUwMCIgZmlsbD0iIzAwN2EzZCIvPjxyZWN0IHg9Ijc4NSIgd2lkdGg9IjE0MCIgaGVpZ2h0PSIxNTAwIiBmaWxsPSIjZmNkMTE2Ii8+PHJlY3QgeD0iOTI1IiB3aWR0aD0iMTA5NSIgaGVpZ2h0PSIxNTAwIiBmaWxsPSIjMDAzOGE4Ii8+PHBhdGggZD0iTSA3ODUsMzEwIGEgNDQwIDQ0MCAwIDAgMCAwLDg4MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAzOGE4IiBzdHJva2Utd2lkdGg9IjgwIi8+PHBhdGggZD0iTSA3ODUsMzEwIGEgNDQwIDQ0MCAwIDAgMSAwLDg4MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDgxZTA1IiBzdHJva2Utd2lkdGg9IjgwIi8+PC9zdmc+'); height: 100%; width: 134.666666667%; background-size: 100% 100%; } .css-flag.sami-landscape { height: 100%; width: 134.666666667%; } .css-flag.sami-portrait { height: 74.2574257426%; width: 100%; } The total CSS file size is 4 MB, and you don’t want to send all that data back to the users, so you must use one of the following filters in your plugin or theme.
css_flags_countries: Load flags for one or more countries
add_filter('css_flags_countries', function() { return array('no'); // Array with ISO_3166-1_alpha-2 country codes: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements }); css_flags_regions: Load the flags for one or more regions. You can choose between europe, oceania, africa, asia, northamerica, southamerica and middleeast.
add_filter('css_flags_regions', function() { return array('europe'); //europe, oceania, africa, asia, northamerica, southamerica, middleeast }); css_flags_exclude: Exclude some countries from the list. This filter must be used in combination with the css_flags_countries or css_flags_regions filters
add_filter('css_flags_exclude', function() { return array('eu'); }); css_flags_cachetime: Change the cache time, default it’s 7200 (60x60x2 = 2 hours)
add_filter('css_flags_cachetime', function() { return 172800; // 2 days }); If you must (but you shouldn’t), you can load all the CSS flags using the following:
add_filter('css_flags_countries', function() { return array('all'); // load all country flags (don't it's 4MB) }); More information at GitHub
The original CSS file is from http://www.phoca.cz/cssflags/. If you only need the CSS file, grab it there.
Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
Per Søderlind
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Make it easy for supporters to contribute using PayPal or Stripe by adding a donation button that keeps giving fast, secure, and on site.
Present dishes with restaurant menu flip cards that highlight key details, help visitors explore options easily, and support confident ordering decisions.
Use skill flip cards to showcase your abilities in a clear, interactive format that strengthens your profile and improves your chances of getting hired.
Show Etsy reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.
Create event listings with an events board widget that displays upcoming activities clearly, helps visitors discover events, and supports easy management.
Create business listings with a listings widget that presents companies clearly, supports easy organization, and helps visitors find the right services quickly.
Show verified customer feedback with Google Reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions.
Use the QR Code Generator to create and display QR codes for URLs, contact info, downloads, locations, and more.
Use feature voting so users submit ideas, vote on requests, and help you prioritize product updates by real customer demand.
Show progress with animated progress circles that visualize goals, display achievements, and keep visitors engaged.
Use a pricing slider to show dynamic prices by quantity, help visitors compare options, and support confident purchases.
Create an interactive glossary that displays clear definitions, images, and search options to help visitors learn terms quickly and navigate complex topics with ease.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
