Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/tangible-loops-and-logic/tangible-loops-and-logic.php
+++ b/tangible-loops-and-logic/tangible-loops-and-logic.php
@@ -3,7 +3,7 @@
* Plugin Name: Tangible: Loops & Logic
* Plugin URI: https://loopsandlogic.com/
* Description: A template system with content type loops and conditions.
- * Version: 4.3.3
+ * Version: 4.3.4
* GitHub URI: TangibleInc/loops-and-logic
* Author: Team Tangible
* Author URI: https://teamtangible.com
@@ -12,7 +12,7 @@
defined( 'ABSPATH' ) or die();
-define( 'TANGIBLE_LOOPS_AND_LOGIC_VERSION', '4.3.3' );
+define( 'TANGIBLE_LOOPS_AND_LOGIC_VERSION', '4.3.4' );
$tangible_loops_and_logic_path = is_dir( __DIR__ . '/../../tangible' )
? __DIR__ . '/../../tangible' // Module
--- a/tangible-loops-and-logic/vendor/tangible/fields/dynamic-values/register.php
+++ b/tangible-loops-and-logic/vendor/tangible/fields/dynamic-values/register.php
@@ -21,6 +21,13 @@
trigger_error("Dynamic value {$name} is already registered, called from <b>{$caller['file']}</b> in <b>{$caller['line']}</b>. Will overwrite.", E_USER_WARNING);
}
+ // Settings are saved inside the dynamic value string, so a password field
+ // here would be echoed back into the page with it — see format_groups()
+ $dynamic_value['fields'] = $fields->drop_unstorable_subfields(
+ $dynamic_value['fields'] ?? [],
+ 'dynamic value'
+ );
+
$dynamic_value['fields'] = array_map(function($args) use($fields) {
return $fields->format_args(
$args['name'] ?? '',
--- a/tangible-loops-and-logic/vendor/tangible/fields/example/register/sections.php
+++ b/tangible-loops-and-logic/vendor/tangible/fields/example/register/sections.php
@@ -205,6 +205,15 @@
'number_max' => []
]
],
+ 'password' => [
+ 'title' => 'Password',
+ 'path' => 'fields/password',
+ 'fields'=> [
+ 'password' => [],
+ 'password-locked' => [],
+ 'password-labels' => [],
+ ]
+ ],
'radio' => [
'title' => 'Radio',
'path' => 'fields/radio',
--- a/tangible-loops-and-logic/vendor/tangible/fields/example/templates/fields/password.php
+++ b/tangible-loops-and-logic/vendor/tangible/fields/example/templates/fields/password.php
@@ -0,0 +1,104 @@
+<h4>Example</h4>
+
+<p>
+ A password field never receives the stored value. The server sends
+ <code>value_is_set</code> — a boolean — and nothing else. While a value is
+ saved and nothing has been typed, the input has no name, so it is left out of
+ <code>$_POST</code> entirely. Typing replaces it.
+</p>
+
+<p>
+ The save handler has to treat a missing key as "keep the saved value" — an
+ empty string means the field was submitted empty. This page's handler only
+ stores keys that are present:
+</p>
+
+<pre><code>if( isset($_POST['password']) ) {
+ $fields->store_value('password', $_POST['password']);
+}</code></pre>
+
+<p>
+ With the Settings API, a missing option is saved as <code>null</code>, so map
+ it back in the <code>sanitize_callback</code>:
+</p>
+
+<pre><code>register_setting('my_group', 'my_api_key', [
+ 'sanitize_callback' => fn($value) => $value === null
+ ? get_option('my_api_key')
+ : sanitize_text_field($value),
+]);</code></pre>
+
+<p>
+ Top-level only. A repeater, a group, tab or accordion that is not
+ <code>uncontrolled</code>, and dynamic value settings save their subfields as
+ one value and cannot leave one out, so a password subfield there is dropped
+ with a warning — at any depth, so an <code>uncontrolled</code> group inside a
+ repeater does not help.
+</p>
+
+<div class="tangible-settings-row">
+ <?= $fields->render_field('password', [
+ 'label' => 'API key',
+ 'type' => 'password',
+ 'value_is_set' => (bool) $fields->fetch_value('password'),
+ 'placeholder' => 'Paste a new key to replace',
+ 'description' => 'Leave empty to keep the saved key.'
+ ]) ?>
+</div>
+
+<div class="tangible-settings-row">
+ <?php submit_button() ?>
+</div>
+
+<h4>Value</h4>
+
+<?php tangiblesee(
+ $fields->fetch_value('password') ? '(a value is saved)' : '(empty)'
+); ?>
+
+<h4>Example with locked</h4>
+
+<p>
+ For a value defined outside this screen — a <code>wp-config.php</code>
+ constant, an environment variable. Read-only rather than disabled, so the
+ field stays in the tab order and screen reader users still learn it exists.
+</p>
+
+<div class="tangible-settings-row">
+ <?= $fields->render_field('password-locked', [
+ 'label' => 'API key',
+ 'type' => 'password',
+ 'value_is_set' => true,
+ 'locked' => true,
+ 'locked_message' => 'Defined in wp-config.php.'
+ ]) ?>
+</div>
+
+<h4>Example with translated labels</h4>
+
+<p>
+ Every string the field renders or exposes to assistive technology can be
+ replaced. The set-state placeholder is one whole string, bullets included, so
+ a translation controls the bullet run and the word order.
+</p>
+
+<div class="tangible-settings-row">
+ <?= $fields->render_field('password-labels', [
+ 'label' => 'Clé API',
+ 'type' => 'password',
+ 'value_is_set' => true,
+ 'labels' => [
+ 'reveal' => 'Afficher la valeur',
+ 'hide' => 'Masquer la valeur',
+ 'shown' => 'Valeur affichée.',
+ 'hidden' => 'Valeur masquée.',
+ 'valueSet' => '•••••••• Enregistrée',
+ 'valueSetDescription' => 'Une valeur est enregistrée et masquée. La saisie la remplace.',
+ 'locked' => 'Cette valeur est gérée en dehors de cet écran.'
+ ]
+ ]) ?>
+</div>
+
+<div class="tangible-settings-row">
+ <?php submit_button() ?>
+</div>
--- a/tangible-loops-and-logic/vendor/tangible/fields/fields/format.php
+++ b/tangible-loops-and-logic/vendor/tangible/fields/fields/format.php
@@ -71,6 +71,32 @@
$args = $fields->format_value($args, 'read_only', 'readOnly');
break;
+ /**
+ * Stored secrets (API keys, tokens). The value never reaches the browser —
+ * the server sends `value_is_set` (a boolean) and nothing else. While a
+ * value is stored and untouched, the input has no name, so the submission
+ * has no key for it — save handlers must treat a missing key as "keep the
+ * stored value". Top-level only: see drop_unstorable_subfields().
+ *
+ * A `value` passed here is stripped rather than honoured: the field type
+ * exists to stop secrets being echoed into the page, and silently rendering
+ * one would reintroduce that leak with nicer styling.
+ */
+ case 'password':
+ if( isset($args['value']) ) {
+ unset($args['value']);
+ trigger_error(
+ "Field {$name} is a password field and was given a value, which has been dropped. "
+ . 'Stored secrets must not reach the browser — pass '
+ . '"value_is_set" => (bool) $stored instead.',
+ E_USER_WARNING
+ );
+ }
+ $args = $fields->format_value($args, 'value_is_set', 'isSet');
+ $args = $fields->format_value($args, 'locked_message', 'lockedMessage');
+ $args = $fields->format_value($args, 'read_only', 'readOnly');
+ break;
+
case 'simple_dimension':
$args['type'] = 'simple-dimension';
break;
@@ -126,11 +152,11 @@
case 'field_group':
$args['type'] = 'field-group';
- $args = $fields->format_groups($type, $args);
+ $args = $fields->format_groups($type, $args, ( $args['uncontrolled'] ?? false ) === true);
break;
case 'accordion':
- $args = $fields->format_groups($type, $args);
+ $args = $fields->format_groups($type, $args, ( $args['uncontrolled'] ?? false ) === true);
$args = $fields->format_value($args, 'use_switch', 'useSwitch');
break;
@@ -150,7 +176,7 @@
case 'tab':
foreach( ($args['tabs'] ?? []) as $name => $tab ) {
- $args['tabs'][ $name ] = $fields->format_groups($type, $tab);
+ $args['tabs'][ $name ] = $fields->format_groups($type, $tab, ( $args['uncontrolled'] ?? false ) === true);
}
break;
@@ -180,8 +206,17 @@
/**
* Common format for fields that implement subfields
+ *
+ * $stores_own_values is true when each subfield is saved under its own name
+ * (an `uncontrolled` group, tab or accordion) rather than inside one JSON value
+ * on the parent (a repeater, or any of those when controlled). Strictly `true`,
+ * to match the React side's check.
*/
-$fields->format_groups = function(string $type, array $args) use($fields) : array {
+$fields->format_groups = function(
+ string $type,
+ array $args,
+ bool $stores_own_values = false
+) use($fields) : array {
// Title can be an alias of label (to be compatible with ACF)
if( ! empty($args['title']) ) $args['label'] = $args['title'];
@@ -189,6 +224,10 @@
// Alias to be compatible with ACF
$args = $fields->format_value($args, 'sub_fields', 'fields');
+ if( ! $stores_own_values ) {
+ $args['fields'] = $fields->drop_unstorable_subfields($args['fields'] ?? [], $type);
+ }
+
$args['fields'] = array_map(function($args) use($fields) {
return $fields->is_element( $args['type'] ?? '' )
? $fields->format_element_args(
@@ -205,6 +244,63 @@
return $args;
};
+/**
+ * Drops subfields that cannot be saved inside a parent's value, at any depth
+ *
+ * A password field relies on being left out of the submission when untouched,
+ * so the stored secret is kept. Inside a parent's JSON value there is no key to
+ * leave out: saving the parent would erase the secret. Below such a parent,
+ * every nested parent's subfields end up in the same value — an `uncontrolled`
+ * group inside a repeater included — so the walk does not stop at them.
+ *
+ * Mirrors ../assets/src/stored-in-parent.ts, which does the same in React for
+ * fields rendered without going through PHP.
+ */
+$fields->drop_unstorable_subfields = function(
+ array $subfields,
+ string $parent
+) use($fields) : array {
+
+ $kept = [];
+
+ foreach( $subfields as $field ) {
+
+ if( ! is_array($field) ) {
+ $kept[] = $field;
+ continue;
+ }
+
+ if( ( $field['type'] ?? '' ) === 'password' ) {
+ $name = $field['name'] ?? '';
+ trigger_error(
+ "Field {$name} is a password field inside a {$parent}, which saves its subfields "
+ . 'as one value, and has been dropped: saving it would erase the stored secret. '
+ . 'Render it as a top-level field, or inside parents that are all "uncontrolled".',
+ E_USER_WARNING
+ );
+ continue;
+ }
+
+ foreach( [ 'fields', 'sub_fields' ] as $key ) {
+ if( is_array($field[ $key ] ?? null) ) {
+ $field[ $key ] = $fields->drop_unstorable_subfields($field[ $key ], $parent);
+ }
+ }
+
+ foreach( ( is_array($field['tabs'] ?? null) ? $field['tabs'] : [] ) as $tab_name => $tab ) {
+ foreach( [ 'fields', 'sub_fields' ] as $key ) {
+ if( is_array($tab[ $key ] ?? null) ) {
+ $field['tabs'][ $tab_name ][ $key ] = $fields->drop_unstorable_subfields($tab[ $key ], $parent);
+ }
+ }
+ }
+
+ $kept[] = $field;
+ }
+
+ return $kept;
+};
+
$fields->format_value = function(
array $args,
string $old_name,
--- a/tangible-loops-and-logic/vendor/tangible/fields/fields/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/fields/fields/index.php
@@ -63,12 +63,27 @@
$field = array_merge( $field, $args );
- if( ! isset($field['value']) && isset($field['fetch_callback']) ) {
+ /**
+ * A password field's stored value must never reach the browser, so it is not
+ * fetched for rendering at all — the client is told only whether a value
+ * exists, via "value_is_set". See the "password" case in ./format.php, which
+ * strips a value passed explicitly as a backstop.
+ */
+ $is_secret = ( $field['type'] ?? '' ) === 'password';
+
+ if( ! $is_secret && ! isset($field['value']) && isset($field['fetch_callback']) ) {
$field['value'] = $fields->fetch_value( $name, $render_args );
}
$args = $fields->format_args( $name, $field );
+ /**
+ * format_args() strips a password field's value from the enqueued payload,
+ * but the render callback below is handed the raw field as well — keep the
+ * secret out of that copy too, or a custom callback can still echo it.
+ */
+ if( $is_secret ) unset( $field['value'] );
+
$fields->enqueue_item( $name, 'fields', $args );
if ( ! empty ( $field['render_callback'] ) ) {
--- a/tangible-loops-and-logic/vendor/tangible/fields/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/fields/index.php
@@ -13,7 +13,7 @@
public $name = 'tangible_fields';
// Remember to update the version - Expected format: YYYYMMDD
- public $version = '20260927';
+ public $version = '20261020';
// Dynamic methods
function __call( $method = '', $args = [] ) {
--- a/tangible-loops-and-logic/vendor/tangible/fields/plugin.php
+++ b/tangible-loops-and-logic/vendor/tangible/fields/plugin.php
@@ -2,7 +2,7 @@
/**
* Plugin Name: Tangible Fields
* Description: React-based custom fields library
- * Version: 2026.09.27
+ * Version: 2026.10.20
*/
use tangibleupdater;
--- a/tangible-loops-and-logic/vendor/tangible/framework/api/rest/routes.php
+++ b/tangible-loops-and-logic/vendor/tangible/framework/api/rest/routes.php
@@ -447,12 +447,14 @@
$key = get_password_reset_key( $user_data );
- $message = __( 'Someone requested that the password be reset for the following account:' ) . "rnrn";
+ // Strings WordPress core still uses take its translations (the 'default'
+ // domain); core has since reworded the other two.
+ $message = __( 'Someone requested that the password be reset for the following account:', 'tangible-framework' ) . "rnrn";
$message .= network_home_url( '/' ) . "rnrn";
// translators: %s is the users login name.
- $message .= sprintf( __( 'Username: %s' ), $user_login ) . "rnrn";
- $message .= __( 'If this was a mistake, just ignore this email and nothing will happen.' ) . "rnrn";
- $message .= __( 'To reset your password, visit the following address:' ) . "rnrn";
+ $message .= sprintf( __( 'Username: %s', 'default' ), $user_login ) . "rnrn";
+ $message .= __( 'If this was a mistake, just ignore this email and nothing will happen.', 'tangible-framework' ) . "rnrn";
+ $message .= __( 'To reset your password, visit the following address:', 'default' ) . "rnrn";
$message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . ">rn";
if ( is_multisite() ) {
@@ -463,7 +465,7 @@
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
}
// translators: %s is the sites name (blogname)
- $title = sprintf( __( '[%s] Password Reset' ), $blogname );
+ $title = sprintf( __( '[%s] Password Reset', 'default' ), $blogname );
$title = apply_filters( 'retrieve_password_title', $title );
$message = apply_filters( 'retrieve_password_message', $message, $key );
--- a/tangible-loops-and-logic/vendor/tangible/framework/background-queue/class-background-queue.php
+++ b/tangible-loops-and-logic/vendor/tangible/framework/background-queue/class-background-queue.php
@@ -618,7 +618,8 @@
$schedules[ $this->cron_interval_identifier ] = [
'interval' => $interval,
- 'display' => sprintf( __( 'Every %d Seconds' ), $interval ),
+ /* translators: %d: number of seconds */
+ 'display' => sprintf( _n( 'Every %d Second', 'Every %d Seconds', $interval, 'tangible-framework' ), $interval ),
];
return $schedules;
--- a/tangible-loops-and-logic/vendor/tangible/framework/env/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/framework/env/index.php
@@ -38,6 +38,14 @@
'localhost',
'local_domain',
'flywheel',
+ 'pantheon',
+ 'cloudways',
+ 'dreampress',
+ 'newspack',
+ 'azure',
+ 'wpserveur',
+ 'liquidweb',
+ 'constant',
] as $key) {
$result = call_user_func("tangible\env\is_{$key}_staging", $given_host);
if (apply_filters( $hook, $result, $key, $given_host )) {
@@ -61,17 +69,78 @@
return false;
}
-function is_jetpack_staging() {
+/**
+ * Jetpack's own answer, without calling its deprecated aggregate.
+ *
+ * jetpack-status 3.3.0 deprecated Status::is_staging_site() and points at in_safe_mode()
+ * instead. That annotation is misleading here: is_staging_site() combined FIVE checks
+ * (environment type, known staging hosts, known staging constants, Jetpack's Identity Crisis,
+ * and its own filters) whereas in_safe_mode() is ONLY the Identity Crisis one. Swapping to it
+ * would have made this function return false on every site without a full Jetpack connection,
+ * silently dropping staging detection for Pantheon, Cloudways, Azure and friends — and for a
+ * caller like a search plugin that pauses indexing on staging, that means a staging site quietly
+ * resuming writes to the production index.
+ *
+ * Picking by version does not help either: from 3.3.0 both methods exist and mean different
+ * things. So the host and constant checks now live in this module as detectors of their own
+ * (is_pantheon_staging(), is_constant_staging(), ...), which also makes them work with no
+ * Jetpack installed at all, and this function is left with what is genuinely Jetpack's:
+ * safe mode, and the two filters sites use to force the answer.
+ *
+ * Calling is_staging_site() below 3.3.0 is deliberate — there it is not deprecated, emits no
+ * notice, and is strictly broader than anything we could ask for instead.
+ */
+function is_jetpack_staging( $host = null ) {
+
+ // The site's OWN declaration, checked first and without requiring Jetpack.
+ //
+ // Neither filter carries a deprecation notice, but on 3.3.0+ Jetpack fires them only from the
+ // deprecated method — so unless we fire them, a site already using one to force staging mode
+ // silently stops being heard. They are not behind the class_exists() guard below because which
+ // plugin happens to ship jetpack-status is not something a site's own declaration should hinge
+ // on: WooCommerce ships it, so gating on it would mean deactivating WooCommerce flips a
+ // declared staging site to production.
+ //
+ // Seeded false rather than with a running result: this is one detector among many and the chain
+ // ORs them, so false here means "not forced", not "not staging". To force the answer in either
+ // direction, use this module's own 'tangible_env_is_staging'.
+ if ( apply_filters( 'jetpack_is_staging_site', false ) === true ) {
+ return true;
+ }
+
+ // Cast at every step: this filter's value comes from whatever a site's own code returns, and a
+ // malformed one must not turn "are we on staging?" into a warning on every page load.
+ $known = (array) apply_filters( 'jetpack_known_staging', [ 'urls' => [], 'constants' => [] ] );
+
+ if ( ! empty( $known['urls'] ) ) {
+ $checked_host = $host ?? (string) wp_parse_url( home_url(), PHP_URL_HOST );
+
+ foreach ( (array) $known['urls'] as $pattern ) {
+ if ( is_string( $pattern ) && $pattern !== '' && preg_match( $pattern, $checked_host ) ) {
+ return true;
+ }
+ }
+ }
+
+ foreach ( (array) ( $known['constants'] ?? [] ) as $constant ) {
+ if ( defined( $constant ) && constant( $constant ) ) {
+ return true;
+ }
+ }
+
if ( ! class_exists( 'AutomatticJetpackStatus' ) ) {
return false;
}
$status = new AutomatticJetpackStatus();
- if ( method_exists( $status, 'is_staging_site' ) && $status->is_staging_site() ) {
- return true;
+
+ // in_safe_mode() was added in 3.3.0, the same release that deprecated is_staging_site(), so its
+ // presence is the reliable marker for which one to ask.
+ if ( method_exists( $status, 'in_safe_mode' ) ) {
+ return (bool) $status->in_safe_mode();
}
- return false;
+ return method_exists( $status, 'is_staging_site' ) && $status->is_staging_site();
}
function is_txp_staging( $host ) {
@@ -87,6 +156,16 @@
return true;
}
+ // Kinsta's older staging hostname, and the constant it sets there. Both were previously
+ // reached through Jetpack's is_staging_site(); see is_jetpack_staging().
+ if ( str_ends_with( $host, '.staging.kinsta.com' ) ) {
+ return true;
+ }
+
+ if ( defined( 'KINSTA_DEV_ENV' ) && constant( 'KINSTA_DEV_ENV' ) ) {
+ return true;
+ }
+
return false;
}
@@ -104,6 +183,12 @@
return true;
}
+ // Set on WP Engine's legacy staging environment. Their current platform has no such constant
+ // and no common hostname, so this cannot be the whole answer there.
+ if ( defined( 'IS_WPE_SNAPSHOT' ) && constant( 'IS_WPE_SNAPSHOT' ) ) {
+ return true;
+ }
+
return false;
}
@@ -162,5 +247,73 @@
}
}
+ // Staging by name, so it needs no corroborating env var. Flywheel's OTHER domain,
+ // .flywheelsites.com, is deliberately left to the check above: it also serves live sites that
+ // have not bound a custom domain yet, which is why this module asks for FLYWHEEL_CONFIG_DIR
+ // there. (Jetpack's is_staging_site() treated both as staging outright.)
+ if ( str_ends_with( $host, '.flywheelstaging.com' ) ) {
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Pantheon. Their live environment is `live-<site>.pantheonsite.io`; every other prefix
+ * (`dev-`, `test-`, multidev) is not. Anchored so a custom domain never matches.
+ */
+function is_pantheon_staging( $host ) {
+ return (bool) preg_match( '#^(?!live-)([a-zA-Z0-9-]+).pantheonsite.io$#i', $host );
+}
+
+function is_cloudways_staging( $host ) {
+ return str_ends_with( $host, '.cloudwaysapps.com' );
+}
+
+/** DreamHost's DreamPress staging hostname. */
+function is_dreampress_staging( $host ) {
+ return str_ends_with( $host, '.stage.site' );
+}
+
+function is_newspack_staging( $host ) {
+ return str_ends_with( $host, '.newspackstaging.com' );
+}
+
+/**
+ * Azure App Service's default hostname, which a site carries until a custom domain is bound.
+ */
+function is_azure_staging( $host ) {
+ return str_ends_with( $host, '.azurewebsites.net' );
+}
+
+function is_wpserveur_staging( $host ) {
+ return str_ends_with( $host, '.wpserveur.net' );
+}
+
+function is_liquidweb_staging( $host ) {
+ return str_ends_with( $host, '-liquidwebsites.com' );
+}
+
+/**
+ * Host-agnostic constants that declare a non-production site.
+ *
+ * WP_LOCAL_DEV and JETPACK_STAGING_MODE are the generic ones people set by hand, and they are
+ * the only way to say "this is staging" on a host with no recognisable domain — which is most
+ * of them once a custom domain is bound. Previously reached only through Jetpack's deprecated
+ * is_staging_site(); see is_jetpack_staging().
+ *
+ * Host-specific constants live with their host's detector (KINSTA_DEV_ENV, IS_WPE_SNAPSHOT).
+ */
+function is_constant_staging( $host = null ) {
+ foreach ( [
+ 'WPSTAGECOACH_STAGING',
+ 'JETPACK_STAGING_MODE',
+ 'WP_LOCAL_DEV',
+ ] as $constant ) {
+ if ( defined( $constant ) && constant( $constant ) ) {
+ return true;
+ }
+ }
+
return false;
}
--- a/tangible-loops-and-logic/vendor/tangible/framework/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/framework/index.php
@@ -43,6 +43,7 @@
require_once __DIR__ . '/plugin/index.php';
require_once __DIR__ . '/preact/index.php';
require_once __DIR__ . '/select/index.php';
+ require_once __DIR__ . '/async-action/index.php';
do_action($this->name . '_ready');
}
--- a/tangible-loops-and-logic/vendor/tangible/framework/plugin/dependencies/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/framework/plugin/dependencies/index.php
@@ -40,8 +40,8 @@
frameworkregister_admin_notice(function() use ($plugin, $missing_deps) {
?>
<div class="notice notice-warning">
- <p><b>Missing plugin dependencies for <?php echo $plugin->title; ?></b></p>
- <p><?php echo $plugin->title; ?> won't work properly until the following plugins have been installed and activated.</p>
+ <p><b><?php esc_html_e( 'Missing plugin dependencies for', 'tangible-framework' ); ?> <?php echo $plugin->title; ?></b></p>
+ <p><?php echo $plugin->title; ?> <?php esc_html_e( 'won't work properly until the following plugins have been installed and activated.', 'tangible-framework' ); ?></p>
<p>
<?php
foreach ($missing_deps as $dep) {
--- a/tangible-loops-and-logic/vendor/tangible/template-system/admin/system.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/admin/system.php
@@ -16,7 +16,7 @@
(include __DIR__.'/../module-loader.php')(new class extends stdClass {
public $name = 'tangible_template_system';
- public $version = '20261006';
+ public $version = '20261126';
public $url;
public $path;
--- a/tangible-loops-and-logic/vendor/tangible/template-system/admin/template-post/render.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/admin/template-post/render.php
@@ -31,7 +31,7 @@
} else {
if (is_numeric( $post )) $post = get_post( $post );
- if ( ! is_a( $post, 'WP_Post' )) {
+ if ( ! $post instanceof WP_Post ) {
ob_end_clean();
return;
}
--- a/tangible-loops-and-logic/vendor/tangible/template-system/content/content-type/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/content/content-type/index.php
@@ -199,7 +199,7 @@
continue;
}
- if (is_integer($default_value)) {
+ if (is_int($default_value)) {
$config[ $key ] = (int) $config[ $key ];
} elseif (is_bool($default_value)) {
$config[ $key ] = $config[ $key ]===true || $config[ $key ]==='true';
--- a/tangible-loops-and-logic/vendor/tangible/template-system/content/taxonomy/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/content/taxonomy/index.php
@@ -153,7 +153,7 @@
continue;
}
- if ( is_integer( $default_value ) ) {
+ if ( is_int( $default_value ) ) {
$config[ $key ] = (int) $config[ $key ];
} elseif ( is_bool( $default_value ) ) {
$config[ $key ] = $config[ $key ] === true || $config[ $key ] === 'true';
--- a/tangible-loops-and-logic/vendor/tangible/template-system/core.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/core.php
@@ -25,7 +25,7 @@
}
template_system::$state = (object) [
- 'version' => '20261006', // Automatically updated with npm run version
+ 'version' => '20261126', // Automatically updated with npm run version
'path' => __DIR__,
'url' => frameworkmodule_url( __FILE__ ),
];
--- a/tangible-loops-and-logic/vendor/tangible/template-system/form/actions/create.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/form/actions/create.php
@@ -49,10 +49,9 @@
*
* @see https://developer.wordpress.org/reference/functions/update_post_meta/#character-escaping
*/
- $post_data['meta_input'][ $key ] = is_string( $value )
- ? wp_slash( wp_strip_all_tags( $value ) )
- : $value
- ;
+ $post_data['meta_input'][ $key ] = wp_slash(
+ map_deep( $value, 'wp_strip_all_tags' )
+ );
}
// TODO: Taxonomy
--- a/tangible-loops-and-logic/vendor/tangible/template-system/integrations/advanced-custom-fields/register/field.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/integrations/advanced-custom-fields/register/field.php
@@ -175,7 +175,7 @@
continue;
}
- if ( is_integer( $default_value ) ) {
+ if ( is_int( $default_value ) ) {
$config[ $key ] = (int) $config[ $key ];
continue;
}
--- a/tangible-loops-and-logic/vendor/tangible/template-system/integrations/wp-fusion/types/user/test/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/integrations/wp-fusion/types/user/test/index.php
@@ -56,7 +56,7 @@
$it( 'returns an array', is_array( $tags ) && $connected );
$tag = array_shift( $tags );
- $it( 'returns an array of tag IDs', is_integer( $tag ) || is_string( $tag ) );
+ $it( 'returns an array of tag IDs', is_int( $tag ) || is_string( $tag ) );
$test_tags_a = [];
foreach ( $test_tags as $t ) {
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/ajax/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/ajax/index.php
@@ -52,7 +52,7 @@
// Allow paginator to set page number
if ( isset( $request['page'] ) && isset( $template['attributes'] ) ) {
- $template['attributes']['page'] = $request['page'];
+ $template['attributes']['page'] = (int) $request['page'];
}
try {
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/compile/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/compile/index.php
@@ -12,7 +12,7 @@
private const POST_CACHE_META_KEY = '_tangible_template_compile_cache_key';
// Bump when the generated code format changes, to invalidate cached files
- private const COMPILER_VERSION = 10;
+ private const COMPILER_VERSION = 11;
/**
* Filters that rewrite attributes at render time. While any of these are
@@ -478,7 +478,7 @@
. self::dataRef($atts, $state) . ', ' . self::dataRef($children, $state)
. ', ['render_attributes' => true]);';
$lines[] = $indent . ' if ($__value !== null) {';
- $lines[] = $indent . ' if (!is_string($__value)) { $__value = json_encode($__value); }';
+ $lines[] = $indent . ' if (!is_string($__value)) { $__value = $__html->json_encode_escape_tags($__value); }';
$lines[] = $indent . ' $__out .= $__value;';
$lines[] = $indent . ' }';
$lines[] = $indent . '}';
@@ -608,7 +608,7 @@
}
// Closed-tag handling in render_tag: non-string values are JSON-encoded
- $lines[] = $indent . 'if (!is_string($__value)) { $__value = json_encode($__value); }';
+ $lines[] = $indent . 'if (!is_string($__value)) { $__value = $__html->json_encode_escape_tags($__value); }';
$lines[] = $indent . '$__out .= $__value;';
return $lines;
@@ -651,7 +651,7 @@
. $attsRef . ', [], ['render_attributes' => true]);';
$lines[] = $indent . '}';
$lines[] = $indent . 'if ($__value !== null) {';
- $lines[] = $indent . ' if (!is_string($__value)) { $__value = json_encode($__value); }';
+ $lines[] = $indent . ' if (!is_string($__value)) { $__value = $__html->json_encode_escape_tags($__value); }';
$lines[] = $indent . ' $__out .= $__value;';
$lines[] = $indent . '}';
@@ -881,7 +881,7 @@
$lines[] = $indent . '}';
$lines[] = $indent . 'if ($__value !== null) {';
$lines[] = $indent . ' if (!is_string($__value)) {';
- $lines[] = $indent . ' $__value = json_encode($__value);';
+ $lines[] = $indent . ' $__value = $__html->json_encode_escape_tags($__value);';
$lines[] = $indent . ' }';
$lines[] = $indent . ' $__out .= $__value;';
$lines[] = $indent . '}';
@@ -896,7 +896,7 @@
. ');';
$lines[] = $indent . 'if ($__value !== null) {';
$lines[] = $indent . ' if (!is_string($__value)) {';
- $lines[] = $indent . ' $__value = json_encode($__value);';
+ $lines[] = $indent . ' $__value = $__html->json_encode_escape_tags($__value);';
$lines[] = $indent . ' }';
$lines[] = $indent . ' $__out .= $__value;';
$lines[] = $indent . '}';
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/format/code.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/format/code.php
@@ -2,7 +2,12 @@
/**
* Escape text for inline <code> or block <pre>
+ *
+ * Flags are explicitly set to the PHP 8.1 default value to have consistent
+ * output in older versions
+ *
+ * @see https://www.php.net/manual/function.htmlspecialchars.php#refsect1-function.htmlspecialchars-changelog
*/
$html->format_code = function( $content, $options = [] ) {
- return htmlspecialchars( $content );
+ return htmlspecialchars( $content, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 );
};
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/html/render/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/html/render/index.php
@@ -93,7 +93,7 @@
if (is_null($value)) continue;
if (!is_string($value)) {
- $value = json_encode($value);
+ $value = $html->json_encode_escape_tags($value);
}
$result .= $value;
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/html/render/tag.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/html/render/tag.php
@@ -82,7 +82,7 @@
// If closed tag - supports local tags of different type (open/closed)
if (isset($tag_config['closed']) && $tag_config['closed']) {
if (is_null($content)) $content = '';
- elseif (!is_string($content)) $content = json_encode($content);
+ elseif (!is_string($content)) $content = $html->json_encode_escape_tags($content);
$content .= htmlrender_nodes( $children );
}
}
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/logic/comparison.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/logic/comparison.php
@@ -178,7 +178,7 @@
|| $current_value === 0
|| $current_value === false
// Empty loop instance
- || ( is_a( $current_value, BaseLoop::class )
+ || ( $current_value instanceof BaseLoop
? ( ! $current_value->has_next() )
// Empty array
: ( is_array( $current_value ) && empty( $current_value ) )
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/data/list.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/data/list.php
@@ -184,7 +184,7 @@
$list = $list_loop->items;
// Support passing to other tags
- return json_encode( (array) $list );
+ return $html->json_encode_escape_tags( (array) $list );
};
$html->add_open_tag('List', $html->list_tag, [
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/data/map.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/data/map.php
@@ -185,7 +185,7 @@
}
// Support passing to other tags
- return json_encode( (object) $map );
+ return $html->json_encode_escape_tags( (object) $map );
};
$html->add_open_tag('Map', $html->map_tag, [
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/field/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/field/index.php
@@ -600,7 +600,7 @@
// Cast arrays and objects to JSON string
- return json_encode( $value );
+ return $html->json_encode_escape_tags( $value );
}
return $value;
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/get-set/get.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/get-set/get.php
@@ -4,7 +4,7 @@
*/
$html->get_variable_tag = function( $atts, $content ) use ( $html ) {
- $name = array_shift( $atts['keys'] ); // First attribute without key
+ $name = array_shift( $atts['keys'] ) ?? ''; // First attribute without key
if ( isset( $atts['name'] ) ) {
@@ -37,6 +37,6 @@
if (empty( $type ) || ! isset( $html->variable_types[ $type ] )) return;
return $html->variable_types[ $type ]['get'](
- $name, $atts, $html->variable_type_memory[ $type ]
+ $name ?? '', $atts, $html->variable_type_memory[ $type ]
);
};
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/if/evaluate.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/tags/if/evaluate.php
@@ -68,7 +68,7 @@
// Unknown operand
if ( isset( $def['operands_by_key'] )
- && ! isset( $def['operands_by_key'][ $token ] )
+ && ! isset( $def['operands_by_key'][ $token ?? '' ] )
) {
// field_2 is operand
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/utils/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/utils/index.php
@@ -1,5 +1,6 @@
<?php
require_once __DIR__ . '/hash.php';
+require_once __DIR__ . '/json.php';
require_once __DIR__ . '/string.php';
require_once __DIR__ . '/views.php';
--- a/tangible-loops-and-logic/vendor/tangible/template-system/language/utils/json.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/language/utils/json.php
@@ -0,0 +1,19 @@
+<?php
+
+/**
+ * Encode the following characters, to prevent rendering of HTML or inline JS:
+ * - < > as u003C u003E
+ * - & as u0026
+ * - ' as u0027
+ * - " as u0022
+ *
+ * Some flags might be redundant, as we already apply esc_attr
+ *
+ * The encoding won't be visible to users as it's reversed when the
+ * value is parsed, unless a template displays non-scalar value directly
+ *
+ * @see wp_json_encode() wp-includes/functions.php
+ */
+$html->json_encode_escape_tags = function( $value ) {
+ return wp_json_encode( $value, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT );
+};
--- a/tangible-loops-and-logic/vendor/tangible/template-system/logic/module.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/logic/module.php
@@ -3,7 +3,7 @@
(include __DIR__ . '/module-loader.php')(new class {
public $name = 'tangible_logic';
- public $version = '20261006';
+ public $version = '20261126';
function load() {
require_once __DIR__ . '/index.php';
--- a/tangible-loops-and-logic/vendor/tangible/template-system/loop/field/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/loop/field/index.php
@@ -30,7 +30,7 @@
if (empty($current_loop->items)
&& isset($current_loop->args['query'])
&& !empty($current_loop->args['query']->posts)
- && is_a($current_loop->args['query']->posts[0], 'WP_Post')
+ && $current_loop->args['query']->posts[0] instanceof WP_Post
) {
$post = $current_loop->args['query']->posts[0];
--- a/tangible-loops-and-logic/vendor/tangible/template-system/loop/type/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/loop/type/index.php
@@ -116,5 +116,5 @@
* Check if value is a loop class instance
*/
$loop->is_instance = function( $value ) {
- return is_a( $value, TangibleLoopBaseLoop::class );
+ return $value instanceof TangibleLoopBaseLoop;
};
--- a/tangible-loops-and-logic/vendor/tangible/template-system/loop/types/base/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/loop/types/base/index.php
@@ -176,8 +176,6 @@
}
$this->items = $this->get_current_page_items();
-
- return $this;
}
function __invoke( $fn ) {
@@ -433,7 +431,8 @@
}
function set_current( $item ) {
- return $this->current = &$item;
+ $this->current = &$item;
+ return $this->current;
}
function next() {
--- a/tangible-loops-and-logic/vendor/tangible/template-system/loop/types/post/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/loop/types/post/index.php
@@ -436,8 +436,6 @@
}
parent::__construct( $args );
-
- return $this;
}
// Loop type name
@@ -665,7 +663,7 @@
// ID
- if (is_integer($slug) || is_numeric($slug)) {
+ if (is_int($slug) || is_numeric($slug)) {
$query_args[ $target_key ] []= $slug;
continue;
}
@@ -867,7 +865,7 @@
];
foreach ($terms as $value) {
- if (is_integer($value) || is_numeric($value)) {
+ if (is_int($value) || is_numeric($value)) {
$value_types['id'] []= $value;
} elseif (is_string($value)) {
--- a/tangible-loops-and-logic/vendor/tangible/template-system/loop/types/taxonomy-term/index.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/loop/types/taxonomy-term/index.php
@@ -225,7 +225,7 @@
foreach ($query_args[ $key ] as $index => $value) {
- if (is_integer( $value ) || is_numeric( $value )) {
+ if (is_int( $value ) || is_numeric( $value )) {
// ID
} else {
--- a/tangible-loops-and-logic/vendor/tangible/template-system/plugin.php
+++ b/tangible-loops-and-logic/vendor/tangible/template-system/plugin.php
@@ -2,7 +2,7 @@
/**
* Plugin Name: Tangible Template System
* Description: Template system shared by Tangible Blocks and Loops & Logic
- * Version: 2026.10.6
+ * Version: 2026.11.26
* GitHub URI: TangibleInc/template-system
* Author: Team Tangible
* Author URI: https://teamtangible.com