Integrations
Nucleo detects some third-party plugins and adapts its behavior to each one.
On this page
01Overview
Nucleo detects some third-party plugins and adapts its behavior. Each integration checks a constant, a class or a function of the third-party plugin. No integration runs queries for detection.
The WooCommerce and multilingual integrations are only in the Pro package. SEO, forms, consent and cache are in the Free package.
Edition and license are two separate levels. The package decides which files exist. The license decides which Pro functions are active.
The WooCommerce and multilingual classes do not check the license. With the Pro package and an inactive license, the woo/* blocks, the WooCommerce asset rules and language handling stay active. Only the nucleo/doc-translate ability and the Kit admin entry become unavailable. An expired license on a site that was already active keeps these functions: it only stops updates.
02Plugin detection
Plugins detected in the admin area
What it does: returns the status of five plugins. The admin area uses this status to show, hide or explain the options that depend on a plugin.
How to use it: the plugin status feeds the access context of the admin options. Rules with the key plugins pass if at least one plugin in the list is active. If none is active, the result is the value of missing (hidden or explain).
Parameters: none. Detection criteria:
| Key | Check |
|---|---|
woocommerce | class WooCommerce |
polylang | constant POLYLANG_VERSION |
wpml | constant ICL_SITEPRESS_VERSION |
yoast | constant WPSEO_VERSION |
rankmath | class RankMath |
Permissions: none of their own. The admin options add the capability of the menu entry.
Edition: Free
Known limits: two admin options use plugins. They are the language of nucleo-layouts (polylang, wpml, missing: explain) and the ecommerce of nucleo-kits (woocommerce, missing: explain). Rank Math detection here uses the class RankMath. The SEO part uses the constant RANK_MATH_VERSION instead.
Integrations tab in Nucleo AI → Settings
What it does: shows a table with the known integrations, the status "Detected" or "Not detected", and a sentence on what Nucleo does.
How to use it: admin, Nucleo AI → Settings, integrations tab. The data comes from nucleo/settings-get, key integrations. Each entry has id, name, active and does.
Parameters: none. Entries and criteria:
id | Check |
|---|---|
woocommerce, polylang, wpml, yoast, rankmath | same criteria as Plugins detected in the admin area |
contact-form-7 | constant WPCF7_VERSION |
complianz | function cmplz_get_value |
cookiebot | class Cookiebot_WP |
cookieyes | constant CKY_VERSION |
iubenda | constant IUBENDA_VERSION |
Permissions: capability manage_options for the admin entry. Ability nucleo/settings-get: manage_options, scope nucleo:admin.
Edition: Free
Known limits: the table is informative only. The cookie consent criteria here differ from those used for videos: a plugin can show "Not detected" in the table and still act on videos, or the reverse. The description of WooCommerce and of the consent plugins is generic: see the dedicated sections. Gravity Forms, WPForms and Fluent Forms do not appear in the table, even if the nc/form block supports them.
03WooCommerce
The functions in this section are in the Pro package. The cart fragments setting is the exception: it is saved in the Free package too.
Loading and declared compatibility
What it does: attaches two hooks. On before_woocommerce_init it declares compatibility with custom_order_tables (HPOS) and cart_checkout_blocks through FeaturesUtil::declare_compatibility(). On nucleo/register_blocks it registers the woo/* blocks.
How to use it: automatic. Nucleo registers the integration in admin, REST and CLI requests. The hooks check WooCommerce when they fire, because WooCommerce loads after Nucleo. Registration can be repeated without effect.
Parameters: none
Permissions: none
Edition: Pro (Pro package only)
Known limits: without the class Automattic\WooCommerce\Utilities\FeaturesUtil it declares nothing. Without the class WooCommerce it registers no blocks.
WooCommerce template key
What it does: recognizes WooCommerce pages and returns the template key used by the asset rules: product, cart, checkout, account, product-archive (shop and product taxonomies).
How to use it: automatic. Nucleo checks it after 404, search and home, when WooCommerce is active and the integration is loaded.
Parameters: none
Permissions: none
Edition: Pro (Pro package only)
Known limits: without the Pro package a single product has the key product from the post type. Cart, checkout, account and product archives fall back to page or archive.
Default asset rules
What it does: generates dequeue rules for the WooCommerce assets on all templates except product, product-archive, cart, checkout and account. The handles are woocommerce-general, woocommerce-layout, woocommerce-smallscreen, wc-blocks-style, woocommerce, wc-add-to-cart, wc-order-attribution, sourcebuster-js and woocommerce-inline. It adds a rule that removes wc-cart-fragments from all templates, unless the keep option is set.
How to use it: automatic. The default rules come before the user rules. For the same key the last one wins, so a user rule replaces the default one.
Parameters: none
Permissions: none
Edition: Pro (Pro package only)
Known limits: with WooCommerce inactive it generates no rules.
Product page with a Nucleo layout
What it does: on the page of a product served by a Nucleo layout of the product area (or single, if it also applies to products) it removes the classic sheets woocommerce-general, woocommerce-layout and woocommerce-smallscreen, and the classic gallery: scripts wc-zoom, wc-flexslider, wc-photoswipe, wc-photoswipe-ui-default (also with the names without wc-), sheets photoswipe and photoswipe-default-skin, lightbox markup in the footer. It removes wc-single-product: woo/tabs prints the review rating with radio buttons. If the layout uses woo/add-to-cart with the Nucleo form it also removes wc-add-to-cart-variation, wc-add-to-cart and woocommerce: without other plugins that require them, jQuery and jquery-blockui do not load. With the classic variation form (nucleo/woo/classic_variation_form) these three scripts stay. The style of that markup is in the style.css of the blocks: variations and button in woo/add-to-cart, notices in woo/notices, reviews and stars in woo/tabs.
How to use it: automatic, on the product pages of the public site: the asset runtime (wp_enqueue_scripts, priority 9999) runs it before the asset rules and the CSS reduction. The nucleo/woo/lean_product_page filter with false keeps all the WooCommerce files.
Parameters: none
Permissions: none
Edition: Pro (Pro package only)
Known limits: without a Nucleo layout for the product page nothing changes. wc-blocks-style stays: the WooCommerce blocks in the product description need it. Cart, checkout and account keep the classic front end.
Product archive with a Nucleo layout
What it does: on the Shop page and on product category or tag archives served by a Nucleo layout of the product-archive area (or archive) it removes the classic sheets woocommerce-general, woocommerce-layout and woocommerce-smallscreen and the scripts wc-add-to-cart and woocommerce. Without other plugins that require it, jQuery does not load. The product cards are Nucleo's: woo/product-grid (with addToCart it uses nucleo-store) or nc/collection.
How to use it: automatic, like the product page: the asset runtime runs it. The nucleo/woo/lean_product_archive filter with false keeps all the WooCommerce files.
Parameters: none
Permissions: none
Edition: Pro (Pro package only)
Known limits: without a Nucleo layout for the archive the theme prints the loop and nothing changes. Without the woocommerce script the store notice (demo store notice) does not close with a click.
Cart fragments option (wooFragments)
What it does: decides whether wc-cart-fragments stays loaded. With keep the removal rule is not generated. With off (default) the script is removed from all pages.
How to use it: admin, Nucleo AI → Settings, performance tab, field "WooCommerce cart fragments". Or nucleo/settings-set with {"performance": {"wooFragments": "keep"}}. The value keep is saved in the option nucleo_woo_fragments. The value off deletes the option.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
performance.wooFragments | string | keep, off | off | Other values: error "wooFragments" must be "keep" or "off". |
Permissions: manage_options, scope nucleo:admin
Edition: Free (the setting). The effect requires the Pro package.
In the Free package the field is saved but has no effect, because the code that generates the rules is missing.
woo/* blocks: common rules
What it does: twenty-one blocks in the woocommerce category. All support style (typography, color, spacing; woo/tabs also border), responsive and visibility. Only woo/cart and woo/cart-empty accept children. None accepts bindings. woo/product-grid and the six woo/cart-* parts are static; the others are dynamic: the compiler writes a slot and the runtime fills it on every request.
How to use it: insert them into the document like the other blocks. On a Cart or Checkout page with a Nucleo document, the WooCommerce blocks are read and edited in the original copy _nucleo_wp_content. The recipes are in the woocommerce topic of catalog-get.
Parameters: see each block.
Permissions: those of editing the document.
Edition: Pro (Pro package only)
Known limits: the product blocks (price, stock, add-to-cart, gallery, short-description, attributes, tabs, related, upsell) read the product of the page. Outside a product page they return an empty string. Each block returns an empty string if the WooCommerce functions it uses are missing.
woo/price
What it does: prints get_price_html() of the product in a <p>. It includes the sale price and the range of variations, as WooCommerce formats them.
How to use it: woo/price block in the product layout.
Parameters: none
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: product pages only.
woo/stock
What it does: prints wc_get_stock_html() of the product.
How to use it: woo/stock block.
Parameters: none
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: product pages only.
woo/add-to-cart
What it does: for a simple product it prints a POST form with a quantity field (minimum 1) and an add-to-cart button. The button text comes from single_add_to_cart_text(). For a variable product it prints the Nucleo form: one select per attribute (name attribute_<attribute>, product default value), variation price and availability, quantity and a variation_id field. The active and visible variations are in the data-variations attribute. The script picks the variation, shows price and availability and adds to the cart with the Store API through nucleo-store, without reloading the page. The result message appears in an aria-live region and the mini cart counter updates. Without JavaScript the form sends a normal POST: Nucleo finds the variation from the attributes and passes it to WooCommerce.
How to use it: woo/add-to-cart block. The script loads with the idle strategy, so it is already active at the first click and the form does not submit twice. The nucleo/woo/classic_variation_form filter (boolean, product) with true prints the WooCommerce form woocommerce_variable_add_to_cart(), for plugins that hook into that form. The classic form also applies above the woocommerce_ajax_variation_threshold threshold (30 variations), because the Nucleo form prints every variation in the markup.
Parameters: none
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: it prints nothing for products that cannot be purchased and for types other than simple and variable, such as grouped or external products. Choosing a variation does not change the woo/gallery image: the script fires the nucleo:variation event on the form, with the variation in detail.
woo/gallery
What it does: prints the main image (size woocommerce_single) and, with at least two images, a list of thumbnails (woocommerce_gallery_thumbnail). The script changes the main image when a thumbnail is clicked and with the left and right arrows.
How to use it: woo/gallery block. The script loads with the visible strategy.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
priority | boolean | true, false | false | true: main image with fetchpriority="high" and loading="eager". false: loading="lazy". |
lightbox | boolean | true, false | true | true: hover zoom (only with a fine pointer) and lightbox on click of the main image. false: neither. |
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: without images it prints nothing.
woo/short-description
What it does: prints the short description after the filter woocommerce_short_description.
How to use it: woo/short-description block.
Parameters: none
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: if the text is empty it prints nothing.
woo/attributes
What it does: prints a <dl> list with the visible attributes of the product. The label comes from wc_attribute_label(), the value from get_attribute().
How to use it: woo/attributes block.
Parameters: none
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: attributes with get_visible() false do not appear. Without visible attributes it prints nothing.
woo/tabs
What it does: sets global $product and global $post to the product of the page, reads the tabs from the filter woocommerce_product_tabs (Description, Reviews, Additional information and those of plugins), sorts them by priority (default 10) and runs the callback of each one. During the callbacks the Reviews tab uses the WooCommerce reviews template (single-product-reviews.php, with stars and rating), even if the theme does not declare WooCommerce support; a theme woocommerce/single-product-reviews.php wins. The form rating is a group of five rating radio buttons (filter woocommerce_product_review_comment_form_args, only during the block), usable with the keyboard and without wc-single-product. It prints the markup of nc/tabs with the roles tablist, tab and tabpanel. Without JavaScript all panels stay visible.
How to use it: woo/tabs block. The script loads with the idle strategy.
Parameters: none
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: it skips tabs without a callable callback. The HTML of the callbacks, reviews form included, passes without filters.
woo/related
What it does: prints the cards of related products from wc_get_related_products(): image woocommerce_thumbnail, name with link in an h3, and price. With title it first prints a section h2 across the whole row.
How to use it: woo/related block.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
limit | integer | 1–8 | 4 | Out of range, the value is brought back to the limits. A non-integer value becomes 4. |
title | string (content, translatable) | text | empty | Section heading, for example "Related products". Empty: no heading. |
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: without related products it prints nothing. WooCommerce shuffles related products on every request; the block sorts them in a fixed order per product, so the page stays the same between two loads and the CSS reduction check can pass. The block picks the related products among the first 100 returned by WooCommerce.
woo/upsell
What it does: prints the cards of the products linked as upsells (get_upsell_ids()), in the same format as woo/related.
How to use it: woo/upsell block.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
limit | integer | 1–8 | 4 | As woo/related. |
title | string (content, translatable) | text | empty | As woo/related. |
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: without upsells it prints nothing.
woo/product-grid
What it does: prints a grid of published products with image, name with link in an h3, and price. With title it first prints a section h2. Without results it prints "No products". It is one of the static woo/* blocks: the query runs at compile time.
How to use it: woo/product-grid block. The block declares the dependency query:product: editing a product queues the recompilation of the pages that use it.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
limit | integer | 1–24 | 6 | Brought back to the limits. |
category | string | product category slug | "" | Passes through sanitize_title(). Empty: all categories. |
orderby | string | date, title, price | date | date descending; title and price ascending. |
addToCart | boolean | true, false | false | Button in each card. Simple product that can be purchased and is in stock: the woo/add-to-cart form, which adds with nucleo-store without reloading (the script loads with the idle strategy); without JavaScript the POST goes to the current page. Other types: link to the product page with the text of add_to_cart_text(). |
title | string (content, translatable) | text | empty | As woo/related. |
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: no pagination and no visitor-side filters. One category only.
woo/mini-cart
What it does: prints a button with a counter and an empty panel. The counter starts from the cookie woocommerce_items_in_cart (0 without the cookie). When opened, the script reads the cart from the Store API (/wp-json/wc/store/v1/cart) and shows items, total, and links to cart and checkout. The "Remove" button calls /remove-item. With the cookie present the script updates the counter with items_count. The texts arrive translated in the attribute data-i18n. Requests go through the shared module integrations/woocommerce/assets/store.js (window.NucleoStore), which the script loads once per page. The module keeps the Store API nonce and notifies every subscribed block on each cart change. A response sent before one already shown is discarded, for example a read overtaken by a click on +: the panel does not go back to an old quantity. A Store API error appears in the panel in an aria-live region, as text with the HTML entities decoded, without clearing the list. In the classic WooCommerce shop the counter arrives among the fragments of the "Add to cart" AJAX response.
How to use it: woo/mini-cart block, usually in the header. The script loads with the interaction strategy.
Parameters:
| Field | Type | Default | Effect |
|---|---|---|---|
content.title | translatable string | empty | Panel title |
content.emptyText | translatable string | Nucleo's translated text | Empty cart text |
settings.display | dropdown, drawer | dropdown | With drawer the panel is a full-height modal <dialog> on the right side, with a dimmed backdrop, closed with Esc, a click on the backdrop or a button. Items are cards with thumbnail, variation, quantity, price and Remove. At the bottom: threshold, coupon, subtotal, discount (only if any), total and the Checkout and Cart buttons |
settings.thumbnails | boolean | true | Item thumbnails |
settings.quantity | none, stepper | none | With stepper, − and + buttons; − at quantity 1 removes the item |
settings.coupon | boolean | false | Coupon field and list of applied coupons |
settings.buttons | both, cart, checkout | both | Links shown at the bottom of the panel |
settings.freeShippingFrom | number ≥ 0 | 0 | Threshold in the shop currency. Above 0 the panel shows the amount still missing. The count follows WooCommerce free shipping: items minus discounts, with taxes if the cart shows prices with taxes (woocommerce_tax_display_cart). The threshold is not read from the shipping methods |
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: the manifest indicates one mini cart per page.
woo/notices
What it does: prints the WooCommerce session messages with wc_print_notices(true).
How to use it: woo/notices block in the cart, checkout and account layouts.
Parameters: none
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: without messages it prints nothing.
woo/cart
What it does: prints the cart. With mode blocks it runs do_blocks() on the content of the WooCommerce cart page, if it contains the block woocommerce/cart. Otherwise, or with mode classic, it uses the shortcode [woocommerce_cart]. With mode nucleo the cart is Nucleo's and is composed with the woo/cart-* child blocks. The block prints the visitor's cart state, read from the Store API during the request (GET /wc/store/v1/cart), in a JSON script. The block script draws the parts from that state and updates them with nucleo-store. Store API errors appear in an aria-live region. On the cart page it removes the files of the classic cart: woocommerce-general, woocommerce-layout, woocommerce-smallscreen, select2, wc-cart, wc-country-select, wc-address-i18n, selectWoo, wc-add-to-cart, wc-checkout and woocommerce. On every change it updates the woo/mini-cart counter.
How to use it: woo/cart block, the only block of the cart page. With mode nucleo add the parts you need as children, in the order you want. The script loads with the visible strategy.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
mode | string | blocks, classic, nucleo | blocks | Invalid value: blocks. With blocks and classic the children are ignored. |
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: with mode nucleo the cart requires JavaScript, like the WooCommerce Cart block. Plugins that change the classic cart with PHP hooks do not act on the Nucleo cart: classic stays available for them.
woo/cart-items, woo/cart-totals, woo/cart-coupon, woo/cart-shipping, woo/cart-actions, woo/cart-empty
What it does: parts of the Nucleo cart, only inside woo/cart with mode nucleo. Each part prints a container with data-nc-cart-part and its options in data-options; the woo/cart script fills it.
| Block | Content |
|---|---|
woo/cart-items | Rows with thumbnail, name with link, variation attributes, quantity with − and + (− at 1 removes), row total, "Remove" |
woo/cart-totals | Optional title, subtotal, discount (if any), shipping (if calculated), taxes (if any), total |
woo/cart-coupon | Coupon field and applied coupons, with the button to remove them |
woo/cart-shipping | Rates of each package as radio buttons; with calculator country and postcode to calculate them |
woo/cart-actions | Checkout button and, with showContinue, link to the Shop page. HTML printed by the server |
woo/cart-empty | Any children, shown only when the cart is empty. With an empty cart the other parts are hidden |
How to use it: children of woo/cart. Without woo/cart-empty the empty cart shows only the parts without content.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
woo/cart-items settings.thumbnails | boolean | true, false | true | Item thumbnails. |
woo/cart-totals content.title | translatable string | text | empty | h2 title of the totals. |
woo/cart-shipping settings.calculator | boolean | true, false | true | Country and postcode form; the countries come from WC()->countries->get_shipping_countries(). |
woo/cart-actions content.checkoutText, content.continueText | translatable string | text | Nucleo's translated texts | Texts of the button and the link. |
woo/cart-actions settings.showContinue | boolean | true, false | true | "Continue shopping" link. |
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: outside woo/cart with mode nucleo the parts stay empty.
woo/checkout
What it does: as woo/cart, with the checkout page, the block woocommerce/checkout and the shortcode [woocommerce_checkout].
How to use it: woo/checkout block, the only block of the checkout page.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
mode | string | blocks, classic | blocks | Invalid value: blocks. |
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: Nucleo does not rewrite the checkout: payments, taxes and validations stay with WooCommerce and the payment plugins. In the block checkout Nucleo governs the additional fields (nucleo/woo-checkout-fields-set), the visible parts (nucleo/woo-checkout-parts-set) and the look (below).
Look of the block cart and checkout
What it does: on the Cart and Checkout pages that contain the woocommerce/cart or woocommerce/checkout block it loads the sheet integrations/woocommerce/assets/checkout.css, which brings the site tokens to the WooCommerce components: font, text color, primary buttons and "Place order" with primary color and radius, fields and menus with radius and border, focus outline with the accent color, titles with the heading font. On the same pages it removes the classic sheets (woocommerce-general, woocommerce-layout, woocommerce-smallscreen, select2) and the scripts the blocks do not use, including selectWoo, wc-checkout and woocommerce. Without other scripts that need it, jQuery does not load.
How to use it: automatic. The nucleo/woo/checkout_tokens filter with false turns it off.
Parameters: none
Permissions: none
Edition: Pro (Pro package only)
Known limits: the selectors follow the WooCommerce block classes (wc-block-components-*), which can change between versions. Payment gateways that print their own markup keep their own style.
woo/account
What it does: prints the customer area with the shortcode [woocommerce_my_account].
How to use it: woo/account block, the only block of the account page.
Parameters: none
Permissions: see common rules
Edition: Pro (Pro package only)
Known limits: none found.
Other points that depend on WooCommerce
What it does: with WooCommerce active the ecommerce kit becomes available (requirement woocommerce). The asset audit and the CSS optimizer add samples product, product-archive (Shop page before categories), cart, checkout and account.
How to use it: automatic.
Parameters: none
Permissions: those of the functions cited.
Edition: Pro (the kit, the audit and the optimizer require a Pro license)
Known limits: none found.
04Multilingual: Polylang and WPML
The multilingual functions are in the Pro package.
Detection and common API
What it does: exposes the current language, the language of a post, the site languages, the translations of a post, the language setting and the linking of a translation group. If the pll_* functions exist it uses Polylang. Otherwise it uses the WPML filters and actions (wpml_current_language, wpml_post_language_details, wpml_active_languages, wpml_object_id, wpml_element_trid, wpml_set_element_language_details). With WPML the posts of a group share the trid.
How to use it: internal. Layouts, nucleo/doc-list (language field), nucleo/doc-translate, site export and import, the quality scan and the admin area (language list) use it.
Parameters: none. Public filters: nucleo/current_language (replaces the current language), nucleo/languages (languages in admin and in the scan), nucleo/translations (translations in the scan).
Permissions: none
Edition: Pro (Pro package only)
Known limits: without a multilingual plugin all functions return null or [], and writes do nothing. Polylang has precedence if both are present.
Language in layouts (language condition)
What it does: adds the current language to the request context. A layout with language conditions applies only to those languages. The layout map saves the languages next to each entry. Two layouts conflict only if they apply in the same language.
How to use it: condition {"type": "language", "value": "en"} in meta.conditions.include of the layout. In admin, Nucleo AI → Layouts, option language: with Polylang or WPML missing it shows an explanation (missing: explain).
Parameters: value (string), language code.
Permissions: edit_theme_options for the Layouts page.
Edition: Free in the admin panel. The effect requires the Pro package.
Known limits:
- The current language is looked up only if Polylang (
pll_current_language), WPML (ICL_SITEPRESS_VERSION) or the filternucleo/current_languageis present. - Without a language in the context all layouts apply, including those with a
languagecondition. - In the Free package the language is always absent and the condition does not filter, even with the filter
nucleo/current_language. - Outside the request, in the ability
nucleo/layout-explain, the language comes from the post.
Copying the document into Polylang translations
What it does: adds the meta _nucleo_doc to the filter pll_copy_post_metas. When Polylang creates a translation, the translation starts with the document of the source language. The texts are then translated in the copy.
How to use it: automatic, in admin, REST and CLI requests.
Parameters: none
Permissions: those of Polylang to create translations.
Edition: Pro (Pro package only)
Known limits: the filter is attached only once.
WPML configuration (wpml-config.xml)
What it does: declares to WPML the meta _nucleo_doc as to be translated (action="translate"). It declares as translatable texts, under root, the content fields (keys *), label, title, alt and placeholder, and the same fields of the child blocks down to four levels of children.
How to use it: WPML reads the file from the plugin folder.
Parameters: none
Permissions: those of WPML.
Edition: Pro (Pro package only)
Known limits: blocks nested beyond the fourth level of children are not declared.
nucleo/doc-translate
What it does: copies a document into a new post of the same type, applies the translated texts and links the translation to the original in the multilingual plugin.
How to use it: ability nucleo/doc-translate. The texts to translate are read with nucleo/doc-texts.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
postId | integer | ≥ 1 | — | Required. Source document. |
lang | string | regex ^[a-z-]{2,5}$ (case insensitive) | — | Required. Saved in lowercase. |
title | string | not empty | source title | The slug comes from the title. |
texts | array of {id, path, text} | path from nucleo/doc-texts | — | Required. |
publish | boolean | false |
Permissions: edit_post on the source document. With publish: true also publish_post. Scope nucleo:write.
Edition: Pro. Without an active license the ability is not registered.
Known limits: the copy starts as a draft and is published after the texts are applied. If a text does not apply, the copy is deleted, so a new attempt does not find a half-translated one. If a translation in the requested language already exists, it returns its postId with existing: true and does not create a second copy. Errors: same_language (the document is already in that language) and unknown_language (language not configured on the site), with ok: false; invalid_input (WP_Error); not_found, create_failed and the errors of nucleo/doc-texts-set. If the source post has no language, the translation gets the language but is not linked to a group. After a successful copy the action nucleo/translation_created fires with $newId, $sourceId and $lang.
Language in site export and import
What it does: the export writes wp.lang for each document and wp.translations if the group has more than one exported member. The import sets the language and relinks the translation groups.
How to use it: automatic during export and import.
Parameters: none
Permissions: those of export and import.
Edition: Pro (Pro package only). In the Free package the language fields are not written and not applied.
Known limits: the language accepted on import follows the same rule as nucleo/doc-translate.
Check seo.hreflang.missing
What it does: in the site scan it reports published pages without a translation in all the site languages. Severity warning.
How to use it: quality engine scan.
Parameters: none. Filters nucleo/languages and nucleo/translations.
Permissions: those of the scan.
Edition: Free (the check). Without the Pro package the languages come only from the filter nucleo/languages.
Known limits: with fewer than two languages it reports nothing. Nucleo does not print hreflang tags: the check only verifies that translations exist.
05SEO: Yoast SEO and Rank Math
Reading SEO meta
What it does: returns title, description, source, noindex and canonical of a post.
With Yoast (constant WPSEO_VERSION) it reads from YoastSEO()->meta->for_post() if available. Otherwise it uses the meta _yoast_wpseo_title and _yoast_wpseo_metadesc. noindex applies if _yoast_wpseo_meta-robots-noindex is 1. canonical comes from _yoast_wpseo_canonical.
With Rank Math (constant RANK_MATH_VERSION) it reads the meta rank_math_title, rank_math_description and rank_math_canonical_url. noindex applies if rank_math_robots contains noindex.
Without an SEO plugin it uses meta.seo.title of the document or the post title, meta.seo.description, noindex if blog_public is 0, and an empty canonical.
How to use it: internal. The SEO checks of the document (title length between 30 and 60 characters, description between 70 and 160, noindex, canonical) and the scan of duplicate titles use it. The filter nucleo/seo/meta changes the result.
Parameters: none
Permissions: none
Edition: Free
Known limits: Yoast has precedence if both are active. With Rank Math the values are the raw meta values: template variables such as %title% are not resolved. With Yoast without its API the same applies to the raw meta.
Turning off Nucleo's SEO tags
What it does: if Yoast or Rank Math is active, Nucleo does not print title, meta description, Open Graph and robots from meta.seo. It does not print the JSON-LD and does not filter the sitemap to exclude noindex pages.
How to use it: automatic.
Parameters: none
Permissions: none
Edition: Free
Known limits: with an SEO plugin active the meta.seo of the document is ignored. The schema.org registry skips by default the types WebPage, WebSite, Organization and BreadcrumbList. The filter nucleo/schema/skip_types changes the list.
SEO plugin breadcrumbs in nc/breadcrumbs
What it does: the block nc/breadcrumbs uses the HTML of yoast_breadcrumb() or rank_math_get_breadcrumbs(), if the function exists and returns text. Otherwise it builds the breadcrumbs by itself.
How to use it: automatic in the block.
Parameters: none
Permissions: none
Edition: Free
Known limits: the check looks at the presence of the functions, not at the active SEO plugin.
06Form plugins
nc/form block
What it does: embeds a form from Contact Form 7, Gravity Forms, WPForms or Fluent Forms through a shortcode, in a dynamic slot. The shortcode is contact-form-7, gravityform (with ajax="true"), wpforms or fluentform. The output is in a <div class="nc-form">.
How to use it: nc/form block with plugin and id of the form created in the plugin.
Parameters:
| Name | Type | Allowed values | Default | Notes |
|---|---|---|---|---|
plugin | string | cf7, gravity, wpforms, fluent | — | Required |
id | string | form ID | — | Required |
Permissions: those of editing the document.
Edition: Free
Known limits: the block style sets the grid, inherited font, border and visible focus of the fields. With an unknown plugin or an empty id it prints nothing. Nucleo does not check that the form plugin is active: without the plugin the shortcode stays unprocessed.
Form plugin assets only where needed
What it does: generates dequeue rules for the assets of the form plugins on all pages, except those that contain an nc/form block of that plugin. The block declares the dependency form:<plugin>.
| Plugin | Handles |
|---|---|
cf7 | contact-form-7, swv |
gravity | gform_gravityforms, gform_json |
wpforms | wpforms-full |
fluent | fluent-form-styles, fluent-form-submission |
How to use it: automatic, before the user rules.
Parameters: none
Permissions: none
Edition: Free
Known limits: a form inserted with a shortcode outside nc/form does not create the dependency: its assets are removed.
08Cache and optimization
Page cache purge
What it does: after saving a document it clears the cache of its page. After saving a layout (nucleo_layout) it clears the whole cache. It calls each plugin only if its function or class is present: LiteSpeed Cache (actions litespeed_purge_url and litespeed_purge_all), WP Rocket, W3 Total Cache, WP Super Cache, SiteGround, WP Fastest Cache, Breeze, Cloudflare plugins, WP Engine and Kinsta. At the end the action nucleo/purge_url or nucleo/purge_all fires.
How to use it: automatic on save.
Parameters: none
Permissions: none
Edition: Free
Known limits: WP Fastest Cache has no full purge. Breeze has only a full purge, even for a single post.
Excluding Nucleo CSS from WP Rocket
What it does: adds the pattern <uploads>/nucleo/css/(.*).css, with the path of the wp_upload_dir() folder (usually /wp-content/uploads/nucleo/css/(.*).css), to the filters rocket_rucss_safelist (Remove Unused CSS) and rocket_exclude_css.
How to use it: automatic if the constant WP_ROCKET_VERSION is defined, in every context, also on the frontend.
Parameters: none
Permissions: none
Edition: Free
Known limits: none found.
Warning about plugins that combine CSS
What it does: shows in admin a notice "Nucleo: cache conflicts detected" if a plugin combines CSS files. The combination generates different files per page and cancels the CSS variants per Nucleo template. Each row says how to fix it: turn off the combination or exclude wp-content/uploads/nucleo/.
| Plugin | Condition |
|---|---|
| Autoptimize | autoptimize/autoptimize.php active and autoptimize_css_aggregate = on |
| WP Rocket | wp-rocket/wp-rocket.php active and minify_concatenate_css not empty |
| LiteSpeed Cache | litespeed-cache/litespeed-cache.php active and litespeed.conf.optm-css_comb true |
| W3 Total Cache | w3-total-cache/w3-total-cache.php active (always: the setting is in a file) |
| Fast Velocity Minify | fast-velocity-minify/fvm.php active |
How to use it: automatic, in the admin area notices.
Parameters: none
Permissions: manage_options to see the notice.
Edition: Free
Known limits: it reads only the active plugins of the site, not those activated network-wide in multisite. For W3 Total Cache and Fast Velocity Minify the notice appears at every plugin activation, without reading the setting. The title of the notice is in Italian and does not go through translations. The combination of JS files is not checked.
09Custom fields
Binding sources ACF, Meta Box, JetEngine
What it does: block bindings read fields with the sources acf, metabox and jetengine. A change to a meta read by a metabox or acf binding recompiles the page.
How to use it: set the source in the block binding.
Parameters: depend on the binding.
Permissions: those of editing the document.
Edition: Free
Known limits: none found.
Was this page helpful?