Debug shortcode setting v2.5.15 unreleased with Stable Tag 2.5.10.

Needs to be shared on the Forum as a follow-up ASAP in several threads.
This is another bug introduced while linting the codebase after 2.5.10.
= 2.5.15 =
- Bugfix: Dashboard: General settings: Footnote start and end short codes: debug select box for shortcodes with pointy brackets.
- Update: Dashboard: General settings: Footnote start and end short codes: add information about pointy brackets.

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2503174 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2021-03-25 10:47:35 +00:00
parent 35b2611500
commit 5281825e51
7 changed files with 37 additions and 26 deletions

View file

@ -458,11 +458,11 @@ abstract class MCI_Footnotes_Layout_Engine {
* Returns the html tag for a select box.
*
* @since 1.5.0
*
* - Bugfix: Dashboard: Backlink symbol: debug select box by reverting identity check to equality check, thanks to @lolzim bug report.
*
*
* - Bugfix: Dashboard: Referrers and tooltips: Backlink symbol: debug select box by reverting identity check to equality check, thanks to @lolzim bug report.
*
* @reporter @lolzim
*
*
* @since 2.5.13
* @param string $p_str_setting_name Name of the Settings key to pre select the current value.
* @param array $p_arr_options Possible options to be selected.
@ -478,9 +478,9 @@ abstract class MCI_Footnotes_Layout_Engine {
$l_str_options .= sprintf(
'<option value="%s" %s>%s</option>',
$l_str_value,
// Only check for equality, not identity, WRT arrows.
$l_str_value == $l_arr_data['value'] ? 'selected' : '',
// Now we need to escape the data, WRT shortcodes with pointy brackets.
// Only check for equality, not identity, WRT backlink symbol arrows.
$l_str_value == htmlspecialchars( $l_arr_data['value'] ) ? 'selected' : '',
$l_str_caption
);
}

View file

@ -422,6 +422,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
// Replace all placeholders.
$l_obj_template->replace(
array(
// Translators: The 2 placeholders are the &lt;ref&gt;&lt;/ref&gt; and &lt;fn&gt;&lt;/fn&gt; shortcodes.
'description-escapement' => sprintf( __( 'The problems with shortcodes with pointy brackets have been solved. We apologize for the longlasting bugs making the %s and %s shortcodes close to unusable.', 'footnotes' ), '&lt;ref&gt;&lt;/ref&gt;', '&lt;fn&gt;&lt;/fn&gt;' ),
'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ),
'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ),