Generated product reference
Every SVG Flags control, in one place.
Use this technical reference when you know the block or shortcode you need. It is generated from the same public contracts used by SVG Flags 0.11.1.
Editor controls and saved block attributes.
Established shortcode attributes and aliases.
Released global option contract.
Public extension points verified in the released source.
Block editor
Block settings
The saved attribute name is shown below each human label. Pro rows appear only when the Pro edition provides that control.
Block · 13 settings
SVG Flag
Render a CSS-backed flag symbol as an inline or block-level element.
| Setting | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagflag | Free | stringDefault: {"value":"GB","label":"United Kingdom"} | Choose a code from the bundled 271-entry flag catalogue. Blocks store the selected code and label as JSON; shortcodes accept the code directly.
|
Flag sizesize | Free | stringDefault: 5 | Set the flag width or maximum grid-item width before the selected CSS unit is appended.
|
Size unitsize_unit | Free | stringDefault: em | Choose the CSS unit appended to size.
|
Square aspect ratiosquare | Free | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Country-name captioncaption | Free | booleanDefault: false | Show the catalogue name below a non-inline flag or each grid image.
|
Inline displayinline | Free | booleanDefault: false | Render a single flag inline rather than as a block-level element.
|
Inline vertical alignmentinline_valign | Free | stringDefault: middle | Align an inline flag relative to surrounding text.
|
Random flagrandom | Free | booleanDefault: false | Choose one supported flag for each server-side render instead of using flag.
|
Element IDid | Pro | stringDefault: Empty | Add an HTML id to the rendered single-flag element.
|
Custom CSS classflag_class | Pro | stringDefault: Empty | Append a custom CSS class to the rendered flag element.
|
Country tooltiptooltip | Pro | booleanDefault: false | Add a title tooltip containing the catalogue country name or custom_tooltip.
|
Custom tooltipcustom_tooltip | Pro | stringDefault: Empty | Replace the catalogue name used by an enabled tooltip.
|
Custom captioncustom_caption | Pro | stringDefault: Empty | Replace the catalogue country name shown by an enabled caption.
|
Block · 17 settings
SVG Flag Image
Render an accessible, lazy-loaded SVG image with optional caption and Pro presentation controls.
| Setting | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagflag | Free | stringDefault: {"value":"GB","label":"United Kingdom"} | Choose a code from the bundled 271-entry flag catalogue. Blocks store the selected code and label as JSON; shortcodes accept the code directly.
|
Flag sizesize | Free | stringDefault: 5 | Set the flag width or maximum grid-item width before the selected CSS unit is appended.
|
Size unitsize_unit | Free | stringDefault: em | Choose the CSS unit appended to size.
|
Square aspect ratiosquare | Free | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Country-name captioncaption | Free | booleanDefault: false | Show the catalogue name below a non-inline flag or each grid image.
|
Inline displayinline | Free | booleanDefault: false | Render a single flag inline rather than as a block-level element.
|
Inline vertical alignmentinline_valign | Free | stringDefault: middle | Align an inline flag relative to surrounding text.
|
Random flagrandom | Free | booleanDefault: false | Choose one supported flag for each server-side render instead of using flag.
|
Element IDid | Pro | stringDefault: Empty | Add an HTML id to the rendered single-flag element.
|
Custom CSS classflag_class | Pro | stringDefault: Empty | Append a custom CSS class to the rendered flag element.
|
Country tooltiptooltip | Pro | booleanDefault: false | Add a title tooltip containing the catalogue country name or custom_tooltip.
|
Custom tooltipcustom_tooltip | Pro | stringDefault: Empty | Replace the catalogue name used by an enabled tooltip.
|
Custom captioncustom_caption | Pro | stringDefault: Empty | Replace the catalogue country name shown by an enabled caption.
|
Image borderborder | Pro | stringDefault: Empty | Apply a CSS border to an SVG Flag Image.
|
Image border radiusborder_radius | Pro | stringDefault: Empty | Apply a CSS border radius to an SVG Flag Image.
|
Image paddingpadding | Pro | stringDefault: Empty | Apply CSS padding to an SVG Flag Image.
|
Image marginmargin | Pro | stringDefault: Empty | Apply CSS margin to an SVG Flag Image.
|
Block · 20 settings
SVG Flag Grid
Render up to 100 unique valid flags in a responsive grid, with Pro links, custom captions, search, filtering and card presentation.
| Setting | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagsflags | Free | arrayDefault: ["GB","US","CA","FR","DE","JP"] | Choose the ordered flags rendered by the grid.
|
Grid columnscolumns | Free | numberDefault: 3 | Set the responsive grid column count.
|
Grid gapgap | Free | stringDefault: 1 | Set the distance between grid items before gap_unit is appended.
|
Gap unitgap_unit | Free | stringDefault: rem | Choose the CSS unit appended to gap.
|
Flag sizesize | Free | stringDefault: 8 | Set the flag width or maximum grid-item width before the selected CSS unit is appended.
|
Size unitsize_unit | Free | stringDefault: rem | Choose the CSS unit appended to size.
|
Square aspect ratiosquare | Free | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Country-name captioncaption | Free | booleanDefault: true | Show the catalogue name below a non-inline flag or each grid image.
|
Tablet columnscolumns_tablet | Pro | numberDefault: 3 | Set the Pro column count used at tablet widths.
|
Mobile columnscolumns_mobile | Pro | numberDefault: 2 | Set the Pro column count used at mobile widths.
|
Per-flag contentitem_data | Pro | objectDefault: Empty array | Store optional Pro captions and destination URLs keyed by flag code.
|
Open links in a new tablink_new_tab | Pro | booleanDefault: false | Open configured grid links in a new browser tab with safe relationship attributes.
|
Grid searchenable_search | Pro | booleanDefault: false | Show a live client-side search field above a Pro Flag Grid.
|
Region filterenable_filter | Pro | booleanDefault: false | Show a region selector based on the flags currently in a Pro grid.
|
Search placeholdersearch_placeholder | Pro | stringDefault: Search this flag collection | Set the prompt shown inside a grid or directory search field.
|
Card stylingcard_style | Pro | booleanDefault: false | Present Pro grid items as bordered cards.
|
Card backgroundcard_background | Pro | stringDefault: #ffffff | Set a hexadecimal background colour for Pro grid cards.
|
Card border colourcard_border_color | Pro | stringDefault: #dcdcde | Set a hexadecimal border colour for Pro grid cards.
|
Card corner radiuscard_radius | Pro | stringDefault: 10 | Set the Pro grid card corner radius in pixels.
|
Card paddingcard_padding | Pro | stringDefault: 16 | Set the Pro grid card padding in pixels.
|
Block · 19 settings
SVG Flag Heading
Render a semantic heading containing a decorative flag followed by plain heading text.
| Setting | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagflag | Pro | stringDefault: {"value":"GB","label":"United Kingdom"} | Choose a code from the bundled 271-entry flag catalogue. Blocks store the selected code and label as JSON; shortcodes accept the code directly.
|
Flag sizesize | Pro | stringDefault: 1 | Set the flag width or maximum grid-item width before the selected CSS unit is appended.
|
Size unitsize_unit | Pro | stringDefault: em | Choose the CSS unit appended to size.
|
Square aspect ratiosquare | Pro | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Country-name captioncaption | Pro | booleanDefault: false | Show the catalogue name below a non-inline flag or each grid image. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Inline displayinline | Pro | booleanDefault: true | Render a single flag inline rather than as a block-level element. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Inline vertical alignmentinline_valign | Pro | stringDefault: baseline | Align an inline flag relative to surrounding text.
|
Random flagrandom | Pro | booleanDefault: false | Choose one supported flag for each server-side render instead of using flag.
|
Element IDid | Pro | stringDefault: Empty | Add an HTML id to the rendered single-flag element. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Custom CSS classflag_class | Pro | stringDefault: Empty | Append a custom CSS class to the rendered flag element. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Country tooltiptooltip | Pro | booleanDefault: false | Add a title tooltip containing the catalogue country name or custom_tooltip. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Custom tooltipcustom_tooltip | Pro | stringDefault: Empty | Replace the catalogue name used by an enabled tooltip. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Custom captioncustom_caption | Pro | stringDefault: Empty | Replace the catalogue country name shown by an enabled caption. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Image borderborder | Pro | stringDefault: Empty | Apply a CSS border to an SVG Flag Image. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Image border radiusborder_radius | Pro | stringDefault: Empty | Apply a CSS border radius to an SVG Flag Image. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Image paddingpadding | Pro | stringDefault: Empty | Apply CSS padding to an SVG Flag Image. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Image marginmargin | Pro | stringDefault: Empty | Apply CSS margin to an SVG Flag Image. This saved compatibility attribute is registered by the retained heading block but is not consumed by its current renderer.
|
Heading levelheading_tag | Pro | stringDefault: h2 | Choose the semantic HTML heading element that wraps the Pro flag heading.
|
Heading textheading | Pro | stringDefault: Empty | Set the plain-text content displayed after the decorative flag in a Pro heading.
|
Block · 14 settings
Linked Flag Card
Render a linked or static country card with a flag, title, description and controlled presentation.
| Setting | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagflag | Pro | stringDefault: {"value":"GB","label":"United Kingdom"} | Choose a code from the bundled 271-entry flag catalogue. Blocks store the selected code and label as JSON; shortcodes accept the code directly.
|
Card titletitle | Pro | stringDefault: Empty | Set the Linked Flag Card title, or leave it empty to use the catalogue name.
|
Card descriptiondescription | Pro | stringDefault: Empty | Add optional supporting text to a Linked Flag Card.
|
Destination URLurl | Pro | stringDefault: Empty | Set an optional destination for a Linked Flag Card.
|
Open in a new tabnew_tab | Pro | booleanDefault: false | Open Linked Flag Card or Directory links in a new browser tab with safe relationship attributes.
|
Card layoutlayout | Pro | stringDefault: horizontal | Arrange Linked Flag Card content horizontally or vertically.
|
Card or directory flag sizeflag_size | Pro | stringDefault: 4 | Set the flag width before flag_size_unit is appended.
|
Flag size unitflag_size_unit | Pro | stringDefault: rem | Choose the CSS unit appended to flag_size.
|
Square aspect ratiosquare | Pro | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Background colourbackground_color | Pro | stringDefault: #ffffff | Set a Linked Flag Card hexadecimal background colour.
|
Text colourtext_color | Pro | stringDefault: #1d2327 | Set a Linked Flag Card hexadecimal text colour.
|
Border colourborder_color | Pro | stringDefault: #dcdcde | Set a Linked Flag Card hexadecimal border colour.
|
Image border radiusborder_radius | Pro | stringDefault: Empty | Apply a CSS border radius to an SVG Flag Image.
|
Image paddingpadding | Pro | stringDefault: Empty | Apply CSS padding to an SVG Flag Image.
|
Block · 29 settings
Searchable Flag Directory
Render a curated, searchable and progressively revealed flag directory with responsive branded cards.
| Setting | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Included regionscontinents | Pro | arrayDefault: Empty array | Limit a Flag Directory to one or more catalogue continents or regions.
|
Included flagsinclude_flags | Pro | arrayDefault: Empty array | Limit a Flag Directory to an explicit ordered set of supported flag codes.
|
Excluded flagsexclude_flags | Pro | arrayDefault: Empty array | Remove selected flag codes after region and include rules are applied.
|
Directory ordersort_order | Pro | stringDefault: name_asc | Choose the stable order used for Flag Directory items.
|
Initial regioninitial_continent | Pro | stringDefault: Empty | Select the region filter shown when a Flag Directory first loads.
|
Grid columnscolumns | Pro | numberDefault: 3 | Set the responsive grid column count.
|
Tablet columnscolumns_tablet | Pro | numberDefault: 3 | Set the Pro column count used at tablet widths.
|
Mobile columnscolumns_mobile | Pro | numberDefault: 2 | Set the Pro column count used at mobile widths.
|
Grid gapgap | Pro | stringDefault: 1 | Set the distance between grid items before gap_unit is appended.
|
Gap unitgap_unit | Pro | stringDefault: rem | Choose the CSS unit appended to gap.
|
Card or directory flag sizeflag_size | Pro | stringDefault: 5 | Set the flag width before flag_size_unit is appended.
|
Flag size unitflag_size_unit | Pro | stringDefault: rem | Choose the CSS unit appended to flag_size.
|
Square aspect ratiosquare | Pro | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Directory searchshow_search | Pro | booleanDefault: true | Show live search above a Flag Directory.
|
Directory region filtershow_filter | Pro | booleanDefault: true | Show a region selector above a Flag Directory.
|
Flag codesshow_codes | Pro | booleanDefault: false | Show the catalogue code below each directory flag.
|
A–Z filtershow_alphabet_nav | Pro | booleanDefault: false | Show accessible letter buttons that filter a Flag Directory by country-name initial.
|
Progressive loadingprogressive_load | Pro | booleanDefault: false | Initially reveal one batch of matching directory flags and provide a Load more button.
|
Flags per batchitems_per_page | Pro | numberDefault: 40 | Set the number of matching flags revealed in each progressive-loading batch.
|
Search placeholdersearch_placeholder | Pro | stringDefault: Search countries and territories | Set the prompt shown inside a grid or directory search field.
|
No-results messageempty_message | Pro | stringDefault: No flags match your search. | Set the message announced and displayed when directory filters have no matches.
|
Directory URL patternlink_pattern | Pro | stringDefault: Empty | Create a destination per flag using code and name placeholders.
|
Open in a new tabnew_tab | Pro | booleanDefault: false | Open Linked Flag Card or Directory links in a new browser tab with safe relationship attributes.
|
Card backgroundcard_background | Pro | stringDefault: #ffffff | Set a hexadecimal background colour for Pro grid cards.
|
Directory text colourcard_text_color | Pro | stringDefault: #1d2327 | Set the hexadecimal text colour used by directory cards.
|
Card border colourcard_border_color | Pro | stringDefault: #dcdcde | Set a hexadecimal border colour for Pro grid cards.
|
Directory interaction colourcard_hover_color | Pro | stringDefault: #0f766e | Set the hexadecimal border, button and focus colour used for interactive directory states.
|
Card corner radiuscard_radius | Pro | stringDefault: 10 | Set the Pro grid card corner radius in pixels.
|
Card paddingcard_padding | Pro | stringDefault: 16 | Set the Pro grid card padding in pixels.
|
Established workflows
Shortcode attributes
Shortcodes remain supported for existing content and code-led builds. Add only attributes whose defaults you need to change.
Shortcode · 13 attributes
[svg-flag]
Render one CSS-backed flag. The svg-flags alias remains supported for established content.
Aliases: [svg-flags]
[svg-flag]| Attribute | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagflag | Free | stringDefault: {"value":"GB","label":"United Kingdom"} | Choose a code from the bundled 271-entry flag catalogue. Blocks store the selected code and label as JSON; shortcodes accept the code directly.
|
Flag sizesize | Free | stringDefault: 5 | Set the flag width or maximum grid-item width before the selected CSS unit is appended.
|
Size unitsize_unit | Free | stringDefault: em | Choose the CSS unit appended to size.
|
Square aspect ratiosquare | Free | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Country-name captioncaption | Free | booleanDefault: false | Show the catalogue name below a non-inline flag or each grid image.
|
Inline displayinline | Free | booleanDefault: false | Render a single flag inline rather than as a block-level element.
|
Inline vertical alignmentinline_valign | Free | stringDefault: middle | Align an inline flag relative to surrounding text.
|
Random flagrandom | Free | booleanDefault: false | Choose one supported flag for each server-side render instead of using flag.
|
Element IDid | Pro | stringDefault: Empty | Add an HTML id to the rendered single-flag element.
|
Custom CSS classflag_class | Pro | stringDefault: Empty | Append a custom CSS class to the rendered flag element.
|
Country tooltiptooltip | Pro | booleanDefault: false | Add a title tooltip containing the catalogue country name or custom_tooltip.
|
Custom tooltipcustom_tooltip | Pro | stringDefault: Empty | Replace the catalogue name used by an enabled tooltip.
|
Custom captioncustom_caption | Pro | stringDefault: Empty | Replace the catalogue country name shown by an enabled caption.
|
Shortcode · 17 attributes
[svg-flag-image]
Render one lazy-loaded SVG image with meaningful alternative text.
[svg-flag-image]| Attribute | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagflag | Free | stringDefault: {"value":"GB","label":"United Kingdom"} | Choose a code from the bundled 271-entry flag catalogue. Blocks store the selected code and label as JSON; shortcodes accept the code directly.
|
Flag sizesize | Free | stringDefault: 5 | Set the flag width or maximum grid-item width before the selected CSS unit is appended.
|
Size unitsize_unit | Free | stringDefault: em | Choose the CSS unit appended to size.
|
Square aspect ratiosquare | Free | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Country-name captioncaption | Free | booleanDefault: false | Show the catalogue name below a non-inline flag or each grid image.
|
Random flagrandom | Free | booleanDefault: false | Choose one supported flag for each server-side render instead of using flag.
|
Inline displayinline | Free | booleanDefault: false | Render a single flag inline rather than as a block-level element.
|
Inline vertical alignmentinline_valign | Free | stringDefault: middle | Align an inline flag relative to surrounding text.
|
Element IDid | Pro | stringDefault: Empty | Add an HTML id to the rendered single-flag element.
|
Custom CSS classflag_class | Pro | stringDefault: Empty | Append a custom CSS class to the rendered flag element.
|
Country tooltiptooltip | Pro | booleanDefault: false | Add a title tooltip containing the catalogue country name or custom_tooltip.
|
Custom tooltipcustom_tooltip | Pro | stringDefault: Empty | Replace the catalogue name used by an enabled tooltip.
|
Custom captioncustom_caption | Pro | stringDefault: Empty | Replace the catalogue country name shown by an enabled caption.
|
Image borderborder | Pro | stringDefault: Empty | Apply a CSS border to an SVG Flag Image.
|
Image border radiusborder_radius | Pro | stringDefault: Empty | Apply a CSS border radius to an SVG Flag Image.
|
Image paddingpadding | Pro | stringDefault: Empty | Apply CSS padding to an SVG Flag Image.
|
Image marginmargin | Pro | stringDefault: Empty | Apply CSS margin to an SVG Flag Image.
|
Shortcode · 20 attributes
[svg-flag-grid]
Render a validated, deduplicated grid of up to 100 flags, with optional Pro search, filters, links and card presentation.
[svg-flag-grid]| Attribute | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagsflags | Free | arrayDefault: ["GB","US","CA","FR","DE","JP"] | Choose the ordered flags rendered by the grid.
|
Grid columnscolumns | Free | numberDefault: 3 | Set the responsive grid column count.
|
Grid gapgap | Free | stringDefault: 1 | Set the distance between grid items before gap_unit is appended.
|
Gap unitgap_unit | Free | stringDefault: rem | Choose the CSS unit appended to gap.
|
Flag sizesize | Free | stringDefault: 8 | Set the flag width or maximum grid-item width before the selected CSS unit is appended.
|
Size unitsize_unit | Free | stringDefault: rem | Choose the CSS unit appended to size.
|
Square aspect ratiosquare | Free | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Country-name captioncaption | Free | booleanDefault: true | Show the catalogue name below a non-inline flag or each grid image.
|
Tablet columnscolumns_tablet | Pro | numberDefault: 3 | Set the Pro column count used at tablet widths.
|
Mobile columnscolumns_mobile | Pro | numberDefault: 2 | Set the Pro column count used at mobile widths.
|
Per-flag contentitem_data | Pro | objectDefault: Empty array | Store optional Pro captions and destination URLs keyed by flag code.
|
Open links in a new tablink_new_tab | Pro | booleanDefault: false | Open configured grid links in a new browser tab with safe relationship attributes.
|
Grid searchenable_search | Pro | booleanDefault: false | Show a live client-side search field above a Pro Flag Grid.
|
Region filterenable_filter | Pro | booleanDefault: false | Show a region selector based on the flags currently in a Pro grid.
|
Search placeholdersearch_placeholder | Pro | stringDefault: Search this flag collection | Set the prompt shown inside a grid or directory search field.
|
Card stylingcard_style | Pro | booleanDefault: false | Present Pro grid items as bordered cards.
|
Card backgroundcard_background | Pro | stringDefault: #ffffff | Set a hexadecimal background colour for Pro grid cards.
|
Card border colourcard_border_color | Pro | stringDefault: #dcdcde | Set a hexadecimal border colour for Pro grid cards.
|
Card corner radiuscard_radius | Pro | stringDefault: 10 | Set the Pro grid card corner radius in pixels.
|
Card paddingcard_padding | Pro | stringDefault: 16 | Set the Pro grid card padding in pixels.
|
Shortcode · 8 attributes
[svg-flag-heading]
Render a semantic heading with a decorative flag image.
[svg-flag-heading]| Attribute | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagflag | Pro | stringDefault: {"value":"GB","label":"United Kingdom"} | Choose a code from the bundled 271-entry flag catalogue. Blocks store the selected code and label as JSON; shortcodes accept the code directly.
|
Flag sizesize | Pro | stringDefault: 1 | Set the flag width or maximum grid-item width before the selected CSS unit is appended.
|
Size unitsize_unit | Pro | stringDefault: em | Choose the CSS unit appended to size.
|
Square aspect ratiosquare | Pro | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Inline vertical alignmentinline_valign | Pro | stringDefault: middle | Align an inline flag relative to surrounding text.
|
Random flagrandom | Pro | booleanDefault: false | Choose one supported flag for each server-side render instead of using flag.
|
Heading textheading | Pro | stringDefault: Empty | Set the plain-text content displayed after the decorative flag in a Pro heading.
|
Heading levelheading_tag | Pro | stringDefault: h2 | Choose the semantic HTML heading element that wraps the Pro flag heading.
|
Shortcode · 14 attributes
[svg-flag-card]
Render a linked or static country card.
[svg-flag-card]| Attribute | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Flagflag | Pro | stringDefault: {"value":"GB","label":"United Kingdom"} | Choose a code from the bundled 271-entry flag catalogue. Blocks store the selected code and label as JSON; shortcodes accept the code directly.
|
Card titletitle | Pro | stringDefault: Empty | Set the Linked Flag Card title, or leave it empty to use the catalogue name.
|
Card descriptiondescription | Pro | stringDefault: Empty | Add optional supporting text to a Linked Flag Card.
|
Destination URLurl | Pro | stringDefault: Empty | Set an optional destination for a Linked Flag Card.
|
Open in a new tabnew_tab | Pro | booleanDefault: false | Open Linked Flag Card or Directory links in a new browser tab with safe relationship attributes.
|
Card layoutlayout | Pro | stringDefault: horizontal | Arrange Linked Flag Card content horizontally or vertically.
|
Card or directory flag sizeflag_size | Pro | stringDefault: 4 | Set the flag width before flag_size_unit is appended.
|
Flag size unitflag_size_unit | Pro | stringDefault: rem | Choose the CSS unit appended to flag_size.
|
Square aspect ratiosquare | Pro | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Background colourbackground_color | Pro | stringDefault: #ffffff | Set a Linked Flag Card hexadecimal background colour.
|
Text colourtext_color | Pro | stringDefault: #1d2327 | Set a Linked Flag Card hexadecimal text colour.
|
Border colourborder_color | Pro | stringDefault: #dcdcde | Set a Linked Flag Card hexadecimal border colour.
|
Image border radiusborder_radius | Pro | stringDefault: Empty | Apply a CSS border radius to an SVG Flag Image.
|
Image paddingpadding | Pro | stringDefault: Empty | Apply CSS padding to an SVG Flag Image.
|
Shortcode · 29 attributes
[svg-flag-directory]
Render a curated, searchable and progressively revealed directory from the complete catalogue or selected flags.
[svg-flag-directory]| Attribute | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Included regionscontinents | Pro | arrayDefault: Empty array | Limit a Flag Directory to one or more catalogue continents or regions.
|
Included flagsinclude_flags | Pro | arrayDefault: Empty array | Limit a Flag Directory to an explicit ordered set of supported flag codes.
|
Excluded flagsexclude_flags | Pro | arrayDefault: Empty array | Remove selected flag codes after region and include rules are applied.
|
Directory ordersort_order | Pro | stringDefault: name_asc | Choose the stable order used for Flag Directory items.
|
Initial regioninitial_continent | Pro | stringDefault: Empty | Select the region filter shown when a Flag Directory first loads.
|
Grid columnscolumns | Pro | numberDefault: 3 | Set the responsive grid column count.
|
Tablet columnscolumns_tablet | Pro | numberDefault: 3 | Set the Pro column count used at tablet widths.
|
Mobile columnscolumns_mobile | Pro | numberDefault: 2 | Set the Pro column count used at mobile widths.
|
Grid gapgap | Pro | stringDefault: 1 | Set the distance between grid items before gap_unit is appended.
|
Gap unitgap_unit | Pro | stringDefault: rem | Choose the CSS unit appended to gap.
|
Card or directory flag sizeflag_size | Pro | stringDefault: 5 | Set the flag width before flag_size_unit is appended.
|
Flag size unitflag_size_unit | Pro | stringDefault: rem | Choose the CSS unit appended to flag_size.
|
Square aspect ratiosquare | Pro | booleanDefault: false | Use the bundled 1:1 artwork instead of the default 4:3 artwork.
|
Directory searchshow_search | Pro | booleanDefault: true | Show live search above a Flag Directory.
|
Directory region filtershow_filter | Pro | booleanDefault: true | Show a region selector above a Flag Directory.
|
Flag codesshow_codes | Pro | booleanDefault: false | Show the catalogue code below each directory flag.
|
A–Z filtershow_alphabet_nav | Pro | booleanDefault: false | Show accessible letter buttons that filter a Flag Directory by country-name initial.
|
Progressive loadingprogressive_load | Pro | booleanDefault: false | Initially reveal one batch of matching directory flags and provide a Load more button.
|
Flags per batchitems_per_page | Pro | numberDefault: 40 | Set the number of matching flags revealed in each progressive-loading batch.
|
Search placeholdersearch_placeholder | Pro | stringDefault: Search countries and territories | Set the prompt shown inside a grid or directory search field.
|
No-results messageempty_message | Pro | stringDefault: No flags match your search. | Set the message announced and displayed when directory filters have no matches.
|
Directory URL patternlink_pattern | Pro | stringDefault: Empty | Create a destination per flag using code and name placeholders.
|
Open in a new tabnew_tab | Pro | booleanDefault: false | Open Linked Flag Card or Directory links in a new browser tab with safe relationship attributes.
|
Card backgroundcard_background | Pro | stringDefault: #ffffff | Set a hexadecimal background colour for Pro grid cards.
|
Directory text colourcard_text_color | Pro | stringDefault: #1d2327 | Set the hexadecimal text colour used by directory cards.
|
Card border colourcard_border_color | Pro | stringDefault: #dcdcde | Set a hexadecimal border colour for Pro grid cards.
|
Directory interaction colourcard_hover_color | Pro | stringDefault: #0f766e | Set the hexadecimal border, button and focus colour used for interactive directory states.
|
Card corner radiuscard_radius | Pro | stringDefault: 10 | Set the Pro grid card corner radius in pixels.
|
Card paddingcard_padding | Pro | stringDefault: 16 | Set the Pro grid card padding in pixels.
|
WordPress options
Plugin settings
Global settings apply only where described; each row states its edition, default, and accepted values.
| Setting | Edition | Type and default | Purpose and accepted values |
|---|---|---|---|
Single flag defaultsSingle flag defaults | Free | stringDefault: Empty | Starting flag, size, aspect ratio and caption for new single-flag blocks. |
Flag Grid defaultsFlag Grid defaults | Free | stringDefault: Empty | Starting flags, columns, gap, size, aspect ratio and captions for new grids. |
Pro Grid and Linked Flag Card defaultsPro Grid and Linked Flag Card defaults | Pro | stringDefault: Empty | Responsive columns, search, filters, card presentation and linked-card styling for new Pro blocks. |
Flag Directory defaultsFlag Directory defaults | Pro | stringDefault: Empty | Responsive columns, search, region and A–Z filtering, progressive batches, ordering and branded card presentation for new directories. |
Developer API
Developer filters
These WordPress filters are public extension points. Return the same value type described for each filter.
svg_flag_shortcode_custom_flagFreeFilter the requested CSS-backed flag code before validation.
- Value
string- Parameters
- $flag — requested code; $atts — resolved attributes
- Return
- A supported flag code
svg_flag_shortcode_tagFreeFilter the CSS-backed flag wrapper element.
- Value
string- Parameters
- $tag — div or span; $atts — resolved attributes
- Return
- div or span; other values are replaced with div
svg_flag_shortcode_idFreeFilter the CSS-backed flag id attribute; Pro uses this to apply id.
- Value
string- Parameters
- $id — empty by default; $atts — resolved attributes
- Return
- Sanitised id attribute or empty string
svg_flag_shortcode_flag_classFreeFilter the base CSS classes for a CSS-backed flag.
- Value
string- Parameters
- $classes — generated class string; $flag — normalized code; $atts — resolved attributes
- Return
- CSS class string
svg_flag_caption_textFreeFilter a CSS-backed flag caption; Pro uses this for custom captions.
- Value
string- Parameters
- $text — catalogue name; $atts — resolved attributes
- Return
- Caption text
svg_flag_shortcode_class_attributeFreeFilter the CSS-backed flag class list; Pro appends flag_class here.
- Value
array- Parameters
- $classes — class list; $atts — resolved attributes
- Return
- Class list
svg_flag_shortcode_style_attributeFreeFilter inline CSS declarations for a CSS-backed flag.
- Value
array- Parameters
- $styles — style list; $atts — resolved attributes
- Return
- Style declaration list
svg_flag_shortcode_title_attributeFreeFilter the CSS-backed flag title tooltip; Pro supplies tooltip behaviour here.
- Value
string- Parameters
- $title — empty by default; $atts — resolved attributes; $flag — normalized code
- Return
- Tooltip text or empty string
svg_flag_image_shortcode_custom_flagFreeFilter the requested image flag code before validation.
- Value
string- Parameters
- $flag — requested code; $atts — resolved attributes
- Return
- A supported flag code
svg_flag_image_shortcode_inline_styleFreeFilter the image display declaration.
- Value
string- Parameters
- $style — display declaration; $atts — resolved attributes
- Return
- CSS declaration string
svg_flag_image_shortcode_idFreeFilter the image id attribute; Pro uses this to apply id.
- Value
string- Parameters
- $id — empty by default; $atts — resolved attributes
- Return
- Sanitised id attribute or empty string
svg_flag_image_caption_textFreeFilter an image caption; Pro uses this for custom captions.
- Value
string- Parameters
- $text — catalogue name; $atts — resolved attributes
- Return
- Caption text
svg_flag_image_shortcode_class_attributeFreeFilter image classes; Pro appends flag_class here.
- Value
array- Parameters
- $classes — class list; $atts — resolved attributes
- Return
- Class list
svg_flag_image_shortcode_style_attributeFreeFilter image CSS declarations; Pro appends border and spacing here.
- Value
array- Parameters
- $styles — style list; $atts — resolved attributes
- Return
- Style declaration list
svg_flag_image_shortcode_title_attributeFreeFilter the image title tooltip; Pro supplies tooltip behaviour here.
- Value
string- Parameters
- $title — empty by default; $atts — resolved attributes; $flag — normalized code; $countries — catalogue map
- Return
- Tooltip text or empty string
svg_flag_grid_flagsFreeFilter the normalized grid flag codes before a second validation pass.
- Value
array- Parameters
- $flags — normalized code list; $atts — resolved attributes
- Return
- Flag-code array; invalid values are removed
svg_flag_grid_caption_textFreeFilter each grid caption; Pro supplies per-flag captions here.
- Value
string- Parameters
- $caption — catalogue name; $code — normalized code; $atts — resolved attributes
- Return
- Caption text
svg_flag_grid_item_htmlFreeFilter each complete grid figure element.
- Value
string- Parameters
- $html — figure markup; $code — normalized code; $name — catalogue name; $atts — resolved attributes
- Return
- Grid item HTML
svg_flag_grid_classFreeFilter the Flag Grid class attribute; Pro adds responsive and card classes.
- Value
string- Parameters
- $class — generated class string; $atts — resolved attributes
- Return
- CSS class string
svg_flag_grid_styleFreeFilter inline grid declarations; Pro adds responsive and card variables.
- Value
string- Parameters
- $style — generated CSS declarations; $atts — resolved attributes
- Return
- CSS declaration string
svg_flag_grid_htmlFreeFilter the complete grid; Pro adds optional search and region controls.
- Value
string- Parameters
- $html — complete grid markup; $flags — normalized codes; $atts — resolved attributes
- Return
- Grid HTML
svg_flag_heading_shortcode_custom_flagProFilter the requested Pro heading flag code before validation.
- Value
string- Parameters
- $flag — requested code; $atts — resolved attributes
- Return
- A supported flag code
svg_flag_heading_shortcode_style_attributeProFilter CSS declarations applied to the decorative heading image.
- Value
array- Parameters
- $styles — style list; $atts — resolved attributes
- Return
- Style declaration list
svg_flag_heading_shortcode_title_attributeProFilter the decorative heading image title attribute.
- Value
string- Parameters
- $title — empty by default; $atts — resolved attributes; $flag — normalized code; $countries — catalogue map
- Return
- Tooltip text or empty string
svg_flag_heading_shortcode_idProFilter the Pro heading id attribute.
- Value
string- Parameters
- $id — empty by default; $atts — resolved attributes
- Return
- Sanitised id attribute or empty string