Maradigma plugin

MARADIGMA_SHORTCODES.html

Complete shortcode reference for the Maradigma plugin, intended for users installing the plugin and for integrators building single-boat pages, listing pages, and booking flows.

This document includes all shortcodes currently registered in ShortcodeRegistry, plus the missing parts refined during implementation review: equipments, included items, not included items, PDF download, corrected base port field usage, and the confirmed boat payload fields for maradigma_boat_field.

Important: maradigma_boat_field does not use an internal whitelist. It reads any top-level key present in the payload returned by Cache::getBoatDetails(). This document lists the confirmed keys referenced by the plugin core and the payload you validated, but the shortcode can also read additional top-level keys returned by your API in your installation.

1. Registered shortcodes

maradigma_boats maradigma_boat_card maradigma_related_boats maradigma_boats_related maradigma_barcos_relacionados maradigma_boat maradigma_boat_specs maradigma_boat_prices maradigma_boat_price maradigma_boat_field maradigma_boat_title maradigma_boat_name maradigma_boat_pax maradigma_boat_length maradigma_boat_beam maradigma_boat_builder maradigma_boat_base_port maradigma_boat_main_image maradigma_boat_gallery maradigma_boat_videos maradigma_boat_description maradigma_boat_equipments maradigma_boat_included maradigma_boat_not_included maradigma_boat_pdf_download maradigma_boat_calendar maradigma_boat_booking maradigma_booking_success

2. Full reference

[maradigma_boats]

Boat archive/listing shortcode with filters, pagination, card template selection, and AJAX-ready archive rendering.

AttributeDefaultTypeDescription
id_groupboatsstringCatalog/group to display. For boats it should normally be boats.
limit_services10intResults per page.
offset_services0intInitial offset.
carddefault cardstringBoat card template ID.
image_tokenimage_mainstringImage token injected into the selected card template.
show_filters00|1Show the filters bar.
autosubmit_filters00|1Auto-submit filters on change.
allow_url_filters00|1Allow URL md_* parameters to hydrate the filters.
filters_ui_fieldsterm,boat_capacity,min_price,max_price,featured,ins_book,date_start,date_endcsvMain filter bar fields.
filters_ui_fields_leftemptycsvFields that must stay in the left/main row. Useful to keep order_by before the apply button without changing the default right-side behavior elsewhere.
filters_ui_fields_rightautocsvRight-side filter bar fields. If omitted, order_by keeps the legacy right-side position automatically. Set it to an empty string to keep all fields in the main row order.
filters_ui_fields_offcanvasboat_type_id,builders,ids_gicsvDrawer fields.
builders_optionsapiapi|search_resultBuilder filter source. Use api for the global builders list. Use search_result to show only builders returned by the current API search response (available_boat_id_builders).
filters_ui_layouthorizontalhorizontal|verticalFilter layout.
filters_ui_submit_modeautoauto|buttonSubmission mode.
filters_ui_show_reset10|1Show reset button.
show_more_filters_button00|1Show the more-filters drawer trigger.
more_filters_button_textMore filtersstringDrawer button label.
more_filters_offcanvas_titleMore filtersstringDrawer title.
date_picker_moderangerange|separateRange picker or separate start/end controls.
qlegacy aliasLegacy alias present in defaults.
portlegacy aliasLegacy alias present in defaults.
peoplelegacy aliasLegacy alias present in defaults.

Standard boat type IDs

Use these values with the boat_type_id attribute or with filters_ui_fields="boat_type_id".

IDBoat typeExample
41Catamaran[maradigma_boats boat_type_id="41"]
3Motorboats[maradigma_boats boat_type_id="3"]
5RIBs[maradigma_boats boat_type_id="5"]
4Sailboats[maradigma_boats boat_type_id="4"]
1Super yachts[maradigma_boats boat_type_id="1"]
29Water toys[maradigma_boats boat_type_id="29"]
2Yachts[maradigma_boats boat_type_id="2"]
Example
[maradigma_boats id_group="boats"]
Example
[maradigma_boats limit_services="12" show_filters="1"]
Example
[maradigma_boats show_filters="1" autosubmit_filters="1" filters_ui_fields="term,boat_capacity,min_price,max_price,featured,ins_book,date_start,date_end,order_by"]
Example: move order by before Apply
[maradigma_boats show_filters="1" filters_ui_submit_mode="button" filters_ui_fields="term,builders,min_price,order_by,max_price" filters_ui_fields_left="order_by"]
Example
[maradigma_boats card="clean-grid" image_token="image_main" show_more_filters_button="1" filters_ui_fields_offcanvas="boat_type_id,builders,ids_gi,tags"]
Example
[maradigma_boats show_filters="1" filters_ui_fields="term,date_start,date_end,builders,min_price,max_price" builders_options="search_result"]

[maradigma_boat_card]

Render one boat using the same editable Boat Card templates used by [maradigma_boats].

AttributeDefaultTypeDescription
idstring|intMaradigma boat ID.
slugstringBoat slug. Takes priority when provided.
cardplugin defaultstringBoat Card template ID.
image_tokenimage_mainstringCached image token injected into the selected card template.
classstringExtra wrapper CSS class.
Example
[maradigma_boat_card id="2773"]
Example
[maradigma_boat_card id="2773" card="default"]
Example
[maradigma_boat_card slug="karnic-sl602-valkirie" image_token="image_maradigma_card_471x273"]

[maradigma_boat]

Render a single boat using the overridable PHP template single-boat.php.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
expandcsvSafe External API expand options, for example service_images,service_prices. Unsupported values are ignored.
only_load_cover_image0|1Pass 0 with expand="service_images" when the template needs the full images payload.
images0|1Optional API images flag. Usually expand="service_images" is enough.
url_images_main_domain0|1Optional API image URL flag. Automatically enabled by the client when service_images is requested.
API detail options: [maradigma_boat] can request extra service detail data. Common use for all images: [maradigma_boat id="304" expand="service_images" only_load_cover_image="0"]. Multiple expands are accepted as CSV, for example service_images,service_prices,service_descriptions.

Supported expand values: service_accounting, service_additional_services, service_property_amenities, service_admin_tools, service_payment_methods, service_descriptions, service_destination, service_equipments, service_group_category, service_images, service_ical, service_pdf, service_owner, service_included_items, service_not_included_items, service_prices, service_price_rates, service_price_time_slots, service_public_urls, service_unavailability_dates, service_real_unavailable_dates.

Supported scalar API flags: accounting, additionals, additionals_build_html, amenities, admin_tools, build_method_payment, descriptions, equipments, gc_type, gc_type_cache, images, ical, only_load_cover_image, url_images_main_domain, owner, included, not_included, prices, price_rates, price_time_slots, website_urls.

Example
[maradigma_boat id="304"]
Example
[maradigma_boat slug="sunseeker-predator-108"]
Example
[maradigma_boat id="304" expand="service_images" only_load_cover_image="0"]
Example
[maradigma_boat id="304" expand="service_images,service_prices,service_descriptions" only_load_cover_image="0"]

[maradigma_boat_specs]

Render a boat specs block from defaults, CSV fields, or a custom JSON configuration.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
layouttwo_colstwo_cols|listVisual layout.
show_labels10|1Show field labels.
show_icons10|1Show SVG icons.
iconscsv field:iconOverride icon mapping, for example boat_length:ruler.
fieldscsvSimple field list when no JSON body is provided. Supports custom:my_key.
Example
[maradigma_boat_specs id="304"]
Example
[maradigma_boat_specs slug="sunseeker-52" layout="list" show_labels="0" show_icons="1"]
Example
[maradigma_boat_specs id="304" fields="boat_type,boat_builder,boat_length,boat_beam,custom:boat_color"]
Example
[maradigma_boat_specs id="304" icons="boat_length:ruler,boat_base_port_name:map-marker"]

[maradigma_boat_prices]

Render seasonal prices from service_prices. If no seasonal ranges exist, it falls back to base, week, and hour prices when available. Alias: [maradigma_boat_price].

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
titlePricesstringSection title.
show_title10|1Show title.
layoutcardscards|tableVisual layout. Legacy blocks maps to cards.
range_modedates_shortdates_short|dates_long|monthSeason label format.
order_bydate_from_ascdate_from_asc|date_from_desc|price_asc|price_descPrice row ordering.
show_headers10|1Table headers for table layout.
row_gap10intGap in px.
vat_modeincludedincluded|excluded|hidden_base|hidden_totalVAT display mode.
vat_positionbelowbelow|inline|tooltipVAT text position.
vat_text_includedVAT includedstringIncluded VAT text.
vat_text_excluded+ VATstringExcluded VAT text.
currency_displaysymbolsymbol|isoCurrency display mode.
decimals_modeautoauto|0|2Decimal display.
thousands_sep.stringThousands separator.
decimal_sep,stringDecimal separator.
Example
[maradigma_boat_prices id="304"]
Example
[maradigma_boat_prices slug="sunseeker-52" layout="table" show_headers="1"]

[maradigma_boat_field]

Generic field shortcode. It reads any top-level key returned by the cached boat payload. This is the most flexible shortcode in the plugin.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
fieldstringExact top-level key to read from the boat payload.
esctruetrue|falseUse esc_html() by default. Set to false only for trusted HTML output.
fallbackstringReturned when the field does not exist or is empty.
formatrawraw|number|priceBasic formatting mode.
decimals0intDecimals for number/price formatting.
Example
[maradigma_boat_field id="304" field="boat_capacity" format="number"]
Example
[maradigma_boat_field slug="sunseeker-52" field="boat_length" format="number" decimals="2"]
Example
[maradigma_boat_field slug="sunseeker-52" field="long_description" esc="false"]
Example
[maradigma_boat_field id="304" field="images" esc="false"]

Sugar shortcodes

Convenience wrappers around maradigma_boat_field.

ShortcodeMain fieldNotes
[maradigma_boat_title]boat_builder + boat_model + "boat_alias"Configurable full boat title.
[maradigma_boat_name]boat_aliasBoat name/alias.
[maradigma_boat_pax]boat_capacityDefaults to numeric formatting.
[maradigma_boat_length]boat_lengthDefaults to numeric formatting with 2 decimals.
[maradigma_boat_beam]boat_beamDefaults to numeric formatting with 2 decimals.
[maradigma_boat_builder]boat_builderBuilder text.
[maradigma_boat_base_port]boat_base_port_nameCorrect base port field used by the plugin.

[maradigma_boat_title]

Builds a complete boat title from configurable parts. By default it outputs boat_builder + boat_model + "boat_alias".

AttributeDefaultDescription
show_builder1Include boat_builder.
show_model1Include boat_model.
show_alias1Include boat_alias.
quote_alias1Wrap alias in double quotes.
fallback_service_name1Use service_name / name / title if selected parts are empty.
separator Separator between visible parts.
fallbackOutput if no title can be built.
Example
[maradigma_boat_title id="304"]
Example
[maradigma_boat_name id="304"]
Example
[maradigma_boat_pax id="304"]
Example
[maradigma_boat_length id="304"]
Example
[maradigma_boat_base_port id="304"]

Media shortcodes

[maradigma_boat_main_image]

Render the main image as an img tag, preferring the local WP cached attachment when configured.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
size1100stringTarget size key or numeric width hint.
attrloading="lazy"stringRaw attributes appended to the img tag.
prefer_wp_cache10|1Prefer local WP cached image when available.
[maradigma_boat_main_image id="304" size="1100" attr='class="img-fluid" loading="lazy"']

[maradigma_boat_gallery]

Render a gallery in grid or slider mode.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
layoutgridgrid|sliderDisplay mode.
columns32|3|4Columns for grid mode.
enable_lightbox10|1Enable Elementor-compatible lightbox markup.
start_index1int1-based starting image index.
end_index0int0 means last image.
max_images12intMaximum images to output.
prefer_size_keylargestringPreferred image size key from the API payload.
gap10intGap in px.
radius10intBorder radius in px.
slider_autoplay00|1Slider autoplay.
slider_delay3500intAutoplay delay in ms.
slider_loop10|1Slider loop.
slider_speed400intTransition speed in ms.
slider_space_between10intSpace between slides.
slider_per_view_desktop1intSlides per view desktop.
slider_per_view_tablet1intSlides per view tablet.
slider_per_view_mobile1intSlides per view mobile.
slider_navigation10|1Show prev/next arrows.
slider_pagination10|1Show pagination dots.
Example
[maradigma_boat_gallery id="304" layout="grid" columns="3"]
Example
[maradigma_boat_gallery slug="sunseeker-52" layout="slider" slider_navigation="1" slider_pagination="1"]

[maradigma_boat_videos]

Render related videos in grid/list and embed/thumbnail modes.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
layoutgridgrid|listLayout mode.
modeembedembed|thumbnailRender iframes or thumbnails linking out.
columns21|2|3|4Columns in grid mode.
max_videos12intMaximum number of videos.
show_title00|1Show video title.
classstringExtra wrapper class.
Example
[maradigma_boat_videos id="732"]
Example
[maradigma_boat_videos slug="sunseeker-predator-108" layout="grid" columns="2"]
Example
[maradigma_boat_videos slug="sunseeker-predator-108" mode="thumbnail" show_title="1"]

[maradigma_boat_pdf_download]

Render a PDF download/open button. This shortcode must request the real API expand service_pdf and read the top-level payload key url_pdf.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
button_textDownload PDFstringButton label.
open_in_new_tab10|1|yes|noOpen the PDF in a new tab.
force_download00|1|yes|noAdd the HTML download attribute.
fallbackstringOptional fallback content when no PDF is available.
Example
[maradigma_boat_pdf_download id="2410" button_text="Download PDF" open_in_new_tab="1"]
Example
[maradigma_boat_pdf_download slug="pardo-yachts-38-test" force_download="1"]

Content and list shortcodes

[maradigma_boat_description]

Render the boat description with automatic language and long/short fallback logic.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
typeautoauto|large|long|shortlarge is normalized internally to long.
escfalsetrue|falseLegacy compatibility. When true, the description is escaped.
allow_html0|1|yes|noIf enabled, output is sanitized with wp_kses_post().
max_words0int0 means unlimited.
fallbackstringFallback text.
Example
[maradigma_boat_description id="2410"]
Example
[maradigma_boat_description slug="pardo-yachts-38-test" type="short"]
Example
[maradigma_boat_description id="2410" allow_html="1" max_words="80"]

[maradigma_boat_equipments]

This shortcode must request service_equipments and read the equipments node.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
titleEquipmentsstringSection title.
show_title10|1|yes|noShow title.
show_icon00|1|yes|noShow leading icon/text.
icon_textstringLeading icon/text content.
sort10|1|yes|noSort labels alphabetically.
fallbackstringFallback text when there are no equipments.
Example
[maradigma_boat_equipments id="2410"]
Example
[maradigma_boat_equipments id="2410" title="Equipments" show_icon="1" icon_text="✓"]

[maradigma_boat_included]

This shortcode must request service_included_items and read included or included_items.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
titleIncludedstringSection title.
show_title10|1|yes|noShow title.
show_tick_icon10|1|yes|noShow leading tick/icon.
tick_textstringTick/icon text.
sort10|1|yes|noSort labels alphabetically.
fallbackstringFallback text when there are no items.
Example
[maradigma_boat_included id="2410"]
Example
[maradigma_boat_included id="2410" title="Included" show_tick_icon="1" tick_text="✓"]

[maradigma_boat_not_included]

This shortcode must request service_not_included_items and read not_included or not_included_items.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
titleNot includedstringSection title.
show_title10|1|yes|noShow title.
show_cross_icon10|1|yes|noShow leading cross/icon.
cross_textstringCross/icon text.
sort10|1|yes|noSort labels alphabetically.
fallbackstringFallback text when there are no items.
Example
[maradigma_boat_not_included id="2410"]
Example
[maradigma_boat_not_included id="2410" title="Not included" show_cross_icon="1" cross_text="✕"]

[maradigma_boat_calendar]

Render a lightweight availability calendar fed by the plugin REST proxy.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
months121..24Number of months available in the selector.
start_monthcurrentcurrent|nextInitial month anchor.
show_legend10|1Show legend.
color_available#d4eddaCSS colorAvailable color.
color_booked#ffc0bdCSS colorBooked color.
color_option#ffe8a1CSS colorOption color.
option_statuses4csv intsBooking statuses treated as option.
include_booking_status10|1Whether booking status is requested from the REST proxy.
Example
[maradigma_boat_calendar id="732"]
Example
[maradigma_boat_calendar slug="sunseeker-predator-108" months="12"]
Example
[maradigma_boat_calendar slug="sunseeker-predator-108" color_available="#d4edda" color_booked="#ffc0bd" color_option="#ffe8a1"]

Booking shortcodes

[maradigma_boat_booking]

Render the booking CTA and booking modal.

AttributeDefaultTypeDescription
idstring|intBoat identifier.
slugstringBoat slug.
button_textBook nowstringButton label.
redirect_url_successURLSuccess redirect after booking/payment.
calendar_displayinlinepopup|inlineCalendar display mode.
calendar_months11|2Number of months visible in the modal calendar. Forced to 1 when calendar_display="inline".
calendar_selection_moderangerange|singleRange or single-day selection.
show_schedule_text10|1|bool-likeShow schedule text.
show_promo_code10|1|bool-likeShow promo code field.
show_children_included10|1|bool-likeShow the children-on-board option.
free_additional_labelfreefree|includedLabel used for free additional services.
buttons_positioninlinefooter|inlinePlace actions after the current step inside the scrollable modal body, or keep them persistently visible in the modal footer.
Example
[maradigma_boat_booking id="304"]
Example
[maradigma_boat_booking id="304" calendar_display="inline"]
Example
[maradigma_boat_booking id="304" calendar_selection_mode="single" show_schedule_text="0" show_promo_code="0"]
Example
[maradigma_boat_booking id="304" buttons_position="footer"]

[maradigma_booking_success]

Render a booking confirmation block based on the payment return URL query parameters.

AttributeDefaultTypeDescription
show_if_not_paid00|1If 1, render content even when payment is not confirmed.
empty_messagestringCustom message when bchShopCart is missing.
error_messagestringCustom message when payment lookup fails.
Example
[maradigma_booking_success]
Example
[maradigma_booking_success show_if_not_paid="1"]

3. Confirmed fields for maradigma_boat_field

[maradigma_boat_field field="..."] returns the value of the exact key inside the top-level $boat array. Below is the confirmed set of keys validated through the current core and the payload you shared.

Practical rule: if a top-level key exists in the payload returned by Cache::getBoatDetails(), you can request it directly with maradigma_boat_field. This list documents the keys confirmed by the plugin architecture and your validated payload. It does not limit the shortcode.

Identity and routing

FieldMeaning
idPrimary boat/service ID.
referenceInternal or commercial reference, when present.
slugBoat slug used in cache lookups and public URLs.
service_nameService name from the payload.
boat_aliasCommercial alias/name.
boat_modelModel.
boat_builderBuilder/shipyard.
boat_id_builderBuilder ID.
boat_plate_numberBoat registration/plate number.
id_group_content_typeContent type ID.
id_groupGroup ID.
featuredFeatured flag.
sort_orderSort order value.
statusStatus code.
is_ownerOwner flag.
has_managed_serviceWhether the service is managed.

Location and map

FieldMeaning
boat_base_portBase port ID.
boat_base_port_nameBase port name.
maps_latitudeLatitude.
maps_longitudeLongitude.

Capacity and layout

FieldMeaning
boat_capacityMain passenger capacity.
boat_capacity_crewCrew capacity.
boat_capacity_pernoctaOvernight capacity.
boat_cabinsNumber of cabins.
boat_bedsNumber of beds.
boat_bathroomsNumber of bathrooms.

Dimensions and years

FieldMeaning
boat_lengthRaw boat length.
boat_beamRaw beam.
boat_year_constructionConstruction year.
boat_year_refitRefit year.

Crew, skipper, and operation

FieldMeaning
boat_crew_skippersSkipper crew count.
boat_crew_aircrewAircrew count.
boat_crew_hostessesHostess count.
boat_skipper_optionSkipper option code.
mandatory_skipperWhether skipper is mandatory.
is_bareboatBareboat flag.
text_skipperSkipper label text.
boat_licenseLicence/license text.
boat_licence_requiredWhether a licence is required.
id_default_skipperDefault skipper ID.
id_default_agentDefault agent ID.
id_default_boat_harbour_managerDefault harbour manager ID.
id_ownerOwner ID.

Deposits, engines, and technical data

FieldMeaning
boat_security_depositSecurity deposit.
boat_deposit_without_captainDeposit without skipper/captain.
boat_deposit_with_captainDeposit with skipper/captain.
has_deposit_without_skipperWhether a deposit without skipper exists.
has_deposit_with_skipperWhether a deposit with skipper exists.
boat_enginesEngines text/value.
boat_fuel_included_optionFuel included option code.
boat_consumptionFuel consumption.
boat_consumption_euro_hourFuel cost per hour.
boat_min_speedMinimum speed.
boat_max_speedMaximum speed.

Booking and commerce

FieldMeaning
checkin_scheduleCheck-in schedule string.
checkout_scheduleCheck-out schedule string.
ins_bookInstant booking flag.
prepaid_percentPrepayment percentage.
payment_methodsAvailable payment methods.
collab_commissionCollaborator commission value.
base_priceBase daily price before display formatting.
base_price_totalBase daily total.
base_week_priceBase weekly price.
base_week_price_totalBase weekly total.
base_hour_priceBase hourly price.
base_hour_price_totalBase hourly total.
base_price_pformatFormatted base daily price.
base_price_week_pformatFormatted base weekly price.
base_price_centsBase daily price in cents.
base_week_price_centsBase weekly price in cents.

Descriptions, documents, and complex media nodes

FieldMeaning
descriptionsManaged service multilingual descriptions array.
descriptions_tenantTenant descriptions array.
url_pdfPDF URL. This may require the service_pdf expand.
ical_urlLegacy/alternative iCal field.
url_icalPublic iCal URL.
equipmentsEquipments array. Requires service_equipments when not already present.
imagesImages array.

4. Practical examples with maradigma_boat_field

[maradigma_boat_field id="304" field="boat_alias"]
[maradigma_boat_field id="304" field="boat_capacity" format="number"]
[maradigma_boat_field id="304" field="boat_length" format="number" decimals="2"]
[maradigma_boat_field id="304" field="base_price_total" format="price" decimals="2"]
[maradigma_boat_field slug="sunseeker-52" field="long_description" esc="false"]
[maradigma_boat_field slug="sunseeker-52" field="descriptions" esc="false"]
[maradigma_boat_field id="304" field="images" esc="false"]
[maradigma_boat_field id="304" field="payment_methods"]

5. Notes for the public README and plugin docs

  • Document clearly that id and slug are alternative identifiers in most shortcodes. Usually only one is needed.
  • In maradigma_boat_booking, calendar_months is forced to 1 when calendar_display="inline".
  • In maradigma_boat_description, the value large is normalized internally to long.
  • In maradigma_boat_field, esc="false" should only be used with trusted HTML fields.
  • In maradigma_boat_gallery, lightbox behavior depends on Elementor Lightbox being available on the frontend.
  • In maradigma_booking_success, the page normally expects the query parameter bchShopCart and optionally payment=success|error.
  • maradigma_boat_equipments depends on service_equipments.
  • maradigma_boat_included depends on service_included_items.
  • maradigma_boat_not_included depends on service_not_included_items.
  • maradigma_boat_pdf_download depends on service_pdf and reads url_pdf.
  • maradigma_boat_base_port should be documented against boat_base_port_name.