Actualizacion 7.1.2

This commit is contained in:
2026-09-25 12:02:42 -06:00
parent fa60d1f364
commit 32351c9497
221 changed files with 19735 additions and 6951 deletions
@@ -184,11 +184,11 @@ class Frontend {
$this->options['heading_text'] = wp_kses_post( html_entity_decode( $atts['label'] ) );
}
if ( $atts['label_show'] ) {
$this->options['visibility_show'] = wp_kses_post( $atts['label_show'] );
$this->options['visibility_show'] = wp_strip_all_tags( $atts['label_show'] );
$re_enqueue_scripts = true;
}
if ( $atts['label_hide'] ) {
$this->options['visibility_hide'] = wp_kses_post( $atts['label_hide'] );
$this->options['visibility_hide'] = wp_strip_all_tags( $atts['label_hide'] );
$re_enqueue_scripts = true;
}
if ( $atts['class'] ) {
@@ -489,9 +489,12 @@ class Frontend {
}
wp_enqueue_script( 'toc-front' );
if ( $this->options['show_heading_text'] && $this->options['visibility'] ) {
$width = ( 'User defined' !== $this->options['width'] ) ? $this->options['width'] : $this->options['width_custom'] . $this->options['width_custom_units'];
$js_vars['visibility_show'] = esc_js( wp_kses_post( $this->options['visibility_show'] ) );
$js_vars['visibility_hide'] = esc_js( wp_kses_post( $this->options['visibility_hide'] ) );
$width = ( 'User defined' !== $this->options['width'] ) ? $this->options['width'] : $this->options['width_custom'] . $this->options['width_custom_units'];
// Plain-text labels: WP_Scripts::localize() entity-decodes before JSON-encoding,
// so esc_js() here would only hand the frontend back the quotes it neutralised.
$js_vars['visibility_show'] = wp_strip_all_tags( $this->options['visibility_show'] );
$js_vars['visibility_hide'] = wp_strip_all_tags( $this->options['visibility_hide'] );
$js_vars['toggle_style'] = esc_js( $this->options['toggle_style'] );
if ( $this->options['visibility_hide_by_default'] ) {
$js_vars['visibility_hide_by_default'] = true;
@@ -1024,7 +1027,7 @@ class Frontend {
/**
* Formats a per-level counter for the given numbering style.
*
* @since 202608.2
* @since 202607.1
*
* @param int $number The 1-based counter for the current level.
* @param string $style The numbering style.
@@ -1049,7 +1052,7 @@ class Frontend {
/**
* Converts a positive integer to an uppercase Roman numeral.
*
* @since 202608.2
* @since 202607.1
*
* @param int $number The number to convert.
* @return string The Roman numeral, or the number as-is when out of range.
@@ -1075,7 +1078,7 @@ class Frontend {
/**
* Converts a positive integer to an uppercase letter sequence (A, B, …, Z, AA, AB, …).
*
* @since 202608.2
* @since 202607.1
*
* @param int $number The number to convert.
* @return string The letter sequence, or the number as-is when out of range.
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'TOC_VERSION', '202608.2' );
define( 'TOC_VERSION', '202609.1' );
define( 'TOC_POSITION_BEFORE_FIRST_HEADING', 1 );
define( 'TOC_POSITION_TOP', 2 );
define( 'TOC_POSITION_BOTTOM', 3 );