Actualizacion 7.1.2
This commit is contained in:
@@ -144,7 +144,7 @@ class Admin {
|
||||
/**
|
||||
* Returns the branded menu icon (anchor badge) as SVG markup.
|
||||
*
|
||||
* @since 202608.2
|
||||
* @since 202607.1
|
||||
*
|
||||
* @return string The SVG markup.
|
||||
*/
|
||||
@@ -193,10 +193,10 @@ class Admin {
|
||||
* @return void
|
||||
*/
|
||||
public function checkCurrentPage() {
|
||||
global $admin_page_hooks;
|
||||
global $admin_page_hooks; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
$currentScreen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
||||
|
||||
if ( empty( $currentScreen->id ) || empty( $admin_page_hooks ) ) {
|
||||
if ( empty( $currentScreen->id ) || empty( $admin_page_hooks ) ) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -222,6 +222,7 @@ class Admin {
|
||||
|
||||
// We don't want other plugins adding notices to our screens. Let's clear them out here.
|
||||
remove_all_actions( 'admin_notices' );
|
||||
remove_all_actions( 'network_admin_notices' );
|
||||
remove_all_actions( 'all_admin_notices' );
|
||||
|
||||
$this->currentPage = $page;
|
||||
@@ -327,12 +328,7 @@ class Admin {
|
||||
'support' => [
|
||||
// Translators: This is an action link users can click to open our support.
|
||||
'label' => __( 'Support', 'table-of-contents-plus' ),
|
||||
'url' => aioseoTableOfContents()->helpers->utmUrl( AIOSEO_TABLE_OF_CONTENTS_MARKETING_URL . 'plugin/table-of-contents-support', 'plugin-action-links', 'Documentation' ),
|
||||
],
|
||||
'docs' => [
|
||||
// Translators: This is an action link users can click to open our documentation page.
|
||||
'label' => __( 'Documentation', 'table-of-contents-plus' ),
|
||||
'url' => aioseoTableOfContents()->helpers->utmUrl( AIOSEO_TABLE_OF_CONTENTS_MARKETING_URL . 'doc-categories/table-of-contents/', 'plugin-action-links', 'Documentation' ),
|
||||
'url' => aioseoTableOfContents()->helpers->utmUrl( AIOSEO_TABLE_OF_CONTENTS_MARKETING_URL . 'contact/', 'plugin-action-links', 'Support' ),
|
||||
]
|
||||
];
|
||||
|
||||
@@ -449,7 +445,7 @@ class Admin {
|
||||
);
|
||||
|
||||
printf(
|
||||
// Translators: 1 - The plugin name ("Table of Contents Plus"), - 2 - This placeholder will be replaced with star icons, - 3 - "WordPress.org" - 4 - The plugin name ("Table of Contents Plus").
|
||||
// Translators: 1 - The plugin name, 2 - Star icons, 3 - "WordPress.org", 4 - The plugin name.
|
||||
esc_html__( 'Please rate %1$s %2$s on %3$s to help us spread the word. Thank you!', 'table-of-contents-plus' ),
|
||||
sprintf( '<strong>%1$s</strong>', esc_html( AIOSEO_TABLE_OF_CONTENTS_PLUGIN_NAME ) ),
|
||||
wp_kses_post( $link1 ),
|
||||
@@ -457,13 +453,13 @@ class Admin {
|
||||
);
|
||||
|
||||
// Stop WP Core from outputting its version number and instead add both theirs & ours.
|
||||
global $wp_version;
|
||||
global $wp_version; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
printf(
|
||||
wp_kses_post( '<p class="alignright">%1$s</p>' ),
|
||||
sprintf(
|
||||
// Translators: 1 - WP Core version number, 2 - version number.
|
||||
esc_html__( 'WordPress %1$s | Table of Contents Plus %2$s', 'table-of-contents-plus' ),
|
||||
esc_html( $wp_version ),
|
||||
esc_html( $wp_version ), // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
esc_html( AIOSEO_TABLE_OF_CONTENTS_VERSION )
|
||||
)
|
||||
);
|
||||
|
||||
@@ -81,7 +81,7 @@ class Updates {
|
||||
* so the update doesn't visibly change their table of contents. Runs once, and only
|
||||
* fills in settings the user never had (never overrides an explicit choice).
|
||||
*
|
||||
* @since 202608.2
|
||||
* @since 202607.1
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user