2.5.6d7 added 4 missing templates for AMP compat.
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2498893 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
ccb73fd421
commit
41676ea716
14 changed files with 272 additions and 59 deletions
132
class/task.php
132
class/task.php
|
@ -198,7 +198,7 @@ class MCI_Footnotes_Task {
|
|||
* @since 2.3.0
|
||||
* @var bool
|
||||
*/
|
||||
public static $a_bool_hard_links_enable = false;
|
||||
public static $a_bool_hard_links_enabled = false;
|
||||
|
||||
/**
|
||||
* The referrer slug.
|
||||
|
@ -301,7 +301,7 @@ class MCI_Footnotes_Task {
|
|||
* Yet styling these elements with the link color is not universally preferred, so that
|
||||
* the very presence of these link elements may need to be avoided.
|
||||
*
|
||||
* @see self::$a_bool_hard_links_enable
|
||||
* @see self::$a_bool_hard_links_enabled
|
||||
*
|
||||
* Used both in search() and reference_container(), these need to be class variables.
|
||||
*/
|
||||
|
@ -774,15 +774,15 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* @since 2.5.6 hard links are always enabled when the alternative reference container is.
|
||||
*/
|
||||
self::$a_bool_hard_links_enable = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE ) );
|
||||
self::$a_bool_hard_links_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE ) );
|
||||
|
||||
// Correct hard links enabled status depending on alternative reference container enabled status.
|
||||
if ( 'jquery' !== MCI_Footnotes::$a_str_script_mode ) {
|
||||
self::$a_bool_hard_links_enable = true;
|
||||
// Correct hard links enabled status depending on AMP compatible or alternative reference container enabled status.
|
||||
if ( MCI_Footnotes::$a_bool_amp_enabled || 'jquery' !== MCI_Footnotes::$a_str_script_mode ) {
|
||||
self::$a_bool_hard_links_enabled = true;
|
||||
}
|
||||
|
||||
self::$a_int_scroll_offset = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET ) );
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
echo '.footnote_referrer_anchor, .footnote_item_anchor {bottom: ';
|
||||
echo self::$a_int_scroll_offset;
|
||||
echo "vh;}\r\n";
|
||||
|
@ -902,7 +902,7 @@ class MCI_Footnotes_Task {
|
|||
*/
|
||||
$l_int_alternative_tooltip_width = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH ) );
|
||||
echo '.footnote_tooltip.position {';
|
||||
echo ' width: ' . $l_int_alternative_tooltip_width . 'px;';
|
||||
echo ' width: max-content; ';
|
||||
|
||||
// Set also as max-width wrt short tooltip shrinking.
|
||||
echo ' max-width: ' . $l_int_alternative_tooltip_width . 'px;';
|
||||
|
@ -1406,9 +1406,13 @@ class MCI_Footnotes_Task {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Load footnote referrer template file.
|
||||
*/
|
||||
|
||||
// Set to null in case anyone is not needed.
|
||||
$l_obj_template = null;
|
||||
$l_obj_template_tooltip = null;
|
||||
|
||||
// On the condition that the footnote text is not hidden.
|
||||
if ( ! $p_bool_hide_footnotes_text ) {
|
||||
|
@ -1424,32 +1428,25 @@ class MCI_Footnotes_Task {
|
|||
|
||||
} else {
|
||||
|
||||
// Load 'templates/public/amp-footnote-expand.html'.
|
||||
// Load 'templates/public/amp-footnote.html'.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'amp-footnote' );
|
||||
}
|
||||
|
||||
} elseif ( MCI_Footnotes::$a_bool_alternative_tooltips_enabled ) {
|
||||
|
||||
// Load 'templates/public/amp-footnote-expand.html'.
|
||||
// Load 'templates/public/footnote-alternative.html'.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote-alternative' );
|
||||
|
||||
// Else jQuery tooltips are enabled.
|
||||
} else {
|
||||
|
||||
// Load 'templates/public/amp-footnote-expand.html'.
|
||||
// Load 'templates/public/footnote.html'.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote' );
|
||||
|
||||
}
|
||||
|
||||
// Load tooltip inline script if jQuery tooltips are enabled.
|
||||
if ( MCI_Footnotes::$a_bool_tooltips_enabled && ! MCI_Footnotes::$a_bool_alternative_tooltips_enabled ) {
|
||||
|
||||
// Load tooltip inline script.
|
||||
$l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' );
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$l_obj_template = null;
|
||||
$l_obj_template_tooltip = null;
|
||||
}
|
||||
|
||||
// Search footnotes short codes in the content.
|
||||
|
@ -1634,7 +1631,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_footnote_replace_text = '';
|
||||
|
||||
// Whether hard links are enabled.
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
|
||||
// Get the configurable parts.
|
||||
self::$a_str_referrer_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG );
|
||||
|
@ -1683,7 +1680,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_excerpt_text = substr( $l_str_dummy_text, 0, $l_int_max_length );
|
||||
$l_str_excerpt_text = substr( $l_str_excerpt_text, 0, strrpos( $l_str_excerpt_text, ' ' ) );
|
||||
$l_str_excerpt_text .= ' … <';
|
||||
$l_str_excerpt_text .= self::$a_bool_hard_links_enable ? 'a' : 'span';
|
||||
$l_str_excerpt_text .= self::$a_bool_hard_links_enabled ? 'a' : 'span';
|
||||
$l_str_excerpt_text .= ' class="footnote_tooltip_continue" ';
|
||||
$l_str_excerpt_text .= 'onclick="footnote_move_to_anchor_' . self::$a_int_post_id;
|
||||
$l_str_excerpt_text .= '_' . self::$a_int_reference_container_id;
|
||||
|
@ -1692,7 +1689,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_excerpt_text .= "_$l_int_index');\"";
|
||||
|
||||
// If enabled, add the hard link fragment ID.
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
|
||||
$l_str_excerpt_text .= ' href="#';
|
||||
$l_str_excerpt_text .= self::$a_str_footnote_link_slug;
|
||||
|
@ -1716,7 +1713,7 @@ class MCI_Footnotes_Task {
|
|||
*/
|
||||
$l_str_excerpt_text .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL );
|
||||
|
||||
$l_str_excerpt_text .= self::$a_bool_hard_links_enable ? '</a>' : '</span>';
|
||||
$l_str_excerpt_text .= self::$a_bool_hard_links_enabled ? '</a>' : '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1742,7 +1739,7 @@ class MCI_Footnotes_Task {
|
|||
}
|
||||
|
||||
// Whether hard links are enabled.
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
|
||||
self::$a_str_link_span = 'a';
|
||||
self::$a_str_link_close_tag = '</a>';
|
||||
|
@ -1837,8 +1834,8 @@ class MCI_Footnotes_Task {
|
|||
// Reset the template.
|
||||
$l_obj_template->reload();
|
||||
|
||||
// If standard tooltips are enabled but alternative are not.
|
||||
if ( MCI_Footnotes::$a_bool_tooltips_enabled && ! MCI_Footnotes::$a_bool_alternative_tooltips_enabled ) {
|
||||
// If standard tooltips are enabled but neither AMP nor alternative are.
|
||||
if ( MCI_Footnotes::$a_bool_tooltips_enabled && ! MCI_Footnotes::$a_bool_amp_enabled && ! MCI_Footnotes::$a_bool_alternative_tooltips_enabled ) {
|
||||
|
||||
$l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y ) );
|
||||
$l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X ) );
|
||||
|
@ -2086,29 +2083,64 @@ class MCI_Footnotes_Task {
|
|||
* @since 2.1.1
|
||||
* @date 2020-11-16T2024+0100
|
||||
*/
|
||||
|
||||
// When combining identical footnotes is turned on, another template is needed.
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) {
|
||||
// The combining template allows for backlink clusters and supports cell clicking for single notes.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-combi' );
|
||||
|
||||
} else {
|
||||
|
||||
// When 3-column layout is turned on (only available if combining is turned off).
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE ) ) ) {
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-3column' );
|
||||
$l_bool_combine_identical_footnotes = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) );
|
||||
|
||||
// AMP compatibility requires a full set of AMP compatible table row templates.
|
||||
if ( MCI_Footnotes::$a_bool_amp_enabled ) {
|
||||
|
||||
// When combining identical footnotes is turned on, another template is needed.
|
||||
if ( $l_bool_combine_identical_footnotes ) {
|
||||
|
||||
// The combining template allows for backlink clusters and supports cell clicking for single notes.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'amp-reference-container-body-combi' );
|
||||
|
||||
} else {
|
||||
|
||||
// When switch symbol and index is turned on, and combining and 3-columns are off.
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ) ) {
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-switch' );
|
||||
// When 3-column layout is turned on (only available if combining is turned off).
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE ) ) ) {
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'amp-reference-container-body-3column' );
|
||||
|
||||
} else {
|
||||
|
||||
// Default is the standard template.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body' );
|
||||
// When switch symbol and index is turned on, and combining and 3-columns are off.
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ) ) {
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'amp-reference-container-body-switch' );
|
||||
|
||||
} else {
|
||||
|
||||
// Default is the standard template.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'amp-reference-container-body' );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// When combining identical footnotes is turned on, another template is needed.
|
||||
if ( $l_bool_combine_identical_footnotes ) {
|
||||
|
||||
// The combining template allows for backlink clusters and supports cell clicking for single notes.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-combi' );
|
||||
|
||||
} else {
|
||||
|
||||
// When 3-column layout is turned on (only available if combining is turned off).
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE ) ) ) {
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-3column' );
|
||||
|
||||
} else {
|
||||
|
||||
// When switch symbol and index is turned on, and combining and 3-columns are off.
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ) ) {
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-switch' );
|
||||
|
||||
} else {
|
||||
|
||||
// Default is the standard template.
|
||||
$l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body' );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2160,7 +2192,7 @@ class MCI_Footnotes_Task {
|
|||
// Define anyway.
|
||||
$l_str_hard_link_address = '';
|
||||
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
|
||||
/**
|
||||
* Use-Backbutton-Hint tooltip, optional and configurable.
|
||||
|
@ -2233,7 +2265,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_footnote_backlinks = '';
|
||||
$l_str_footnote_reference = '';
|
||||
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) {
|
||||
if ( $l_bool_combine_identical_footnotes ) {
|
||||
|
||||
// ID, optional hard link address, and class.
|
||||
$l_str_footnote_reference = '<' . self::$a_str_link_span;
|
||||
|
@ -2241,7 +2273,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_footnote_reference .= self::$a_int_post_id;
|
||||
$l_str_footnote_reference .= '_' . self::$a_int_reference_container_id;
|
||||
$l_str_footnote_reference .= "_$l_str_footnote_id\"";
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
$l_str_footnote_reference .= ' href="#';
|
||||
$l_str_footnote_reference .= self::$a_str_referrer_link_slug;
|
||||
$l_str_footnote_reference .= self::$a_str_post_container_id_compound;
|
||||
|
@ -2268,7 +2300,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_footnote_reference .= '>';
|
||||
|
||||
// Append the optional offset anchor for hard links.
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
$l_str_footnote_reference .= $l_str_footnote_anchor_element;
|
||||
$l_str_footnote_backlinks .= $l_str_footnote_anchor_element;
|
||||
}
|
||||
|
@ -2318,7 +2350,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_footnote_backlinks .= "_$l_str_footnote_id\"";
|
||||
|
||||
// Insert the optional hard link address.
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
$l_str_footnote_backlinks .= ' href="#';
|
||||
$l_str_footnote_backlinks .= self::$a_str_referrer_link_slug;
|
||||
$l_str_footnote_backlinks .= self::$a_str_post_container_id_compound;
|
||||
|
@ -2336,7 +2368,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_footnote_backlinks .= "_$l_str_footnote_id');\">";
|
||||
|
||||
// Append the offset anchor for optional hard links.
|
||||
if ( self::$a_bool_hard_links_enable ) {
|
||||
if ( self::$a_bool_hard_links_enabled ) {
|
||||
$l_str_footnote_backlinks .= '<span class="footnote_item_base"><span id="';
|
||||
$l_str_footnote_backlinks .= self::$a_str_footnote_link_slug;
|
||||
$l_str_footnote_backlinks .= self::$a_str_post_container_id_compound;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Plugin URI: https://wordpress.org/plugins/footnotes/
|
||||
* Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine.
|
||||
* Author: Mark Cheret
|
||||
* Package V.: 2.6.0d6
|
||||
* Package V.: 2.6.0d7
|
||||
* Version: 2.6.0d
|
||||
* CAUTION: THIS V. FIELD IS PARSED FOR UPDATE CONFIGURATION.
|
||||
* Author URI: https://cheret.org/footnotes/
|
||||
|
@ -24,9 +24,9 @@
|
|||
* @since 2.1.4
|
||||
* @since 2.5.3 (Hungarian)
|
||||
* @var str
|
||||
* @lastmodified 2021-03-18T1137+0100
|
||||
* @lastmodified 2021-03-18T1845+0100
|
||||
*/
|
||||
define( 'C_STR_PACKAGE_VERSION', '2.6.0d6' );
|
||||
define( 'C_STR_PACKAGE_VERSION', '2.6.0d7' );
|
||||
|
||||
/**
|
||||
* Version numbers in WordPress plugin readme.txt and main PHP headers.
|
||||
|
|
|
@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen
|
|||
Requires at least: 3.9
|
||||
Tested up to: 5.7
|
||||
Requires PHP: 5.6
|
||||
Package Version: 2.6.0d6
|
||||
Package Version: 2.6.0d7
|
||||
Version: 2.6.0d
|
||||
Stable Tag: 2.5.10
|
||||
CAUTION: THE S. T. FIELD IS PARSED FOR RELEASE CONFIGURATION.
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
on="tap:footnote_references_container_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=false),footnotes_container_button_plus_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=true),footnotes_container_button_minus_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=false)"
|
||||
[[hard-link]]
|
||||
on="tap:footnote_references_container_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=false),footnotes_container_button_plus_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=true),footnotes_container_button_minus_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=false)"
|
||||
><[[sup-span]]
|
||||
id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_tooltip_text"
|
||||
|
|
46
templates/public/amp-reference-container-body-3column.html
Normal file
46
templates/public/amp-reference-container-body-3column.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* AMP compatible table row template with legacy extra column for backlink symbol, uncombined footnotes.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
class="footnote_plugin_index"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_index"
|
||||
[[hard-link]]
|
||||
>[[index]][[terminator]]</[[link-span]]
|
||||
>[[anchor-element]]</td
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_symbol"
|
||||
><[[link-span]]
|
||||
class="footnote_backlink"
|
||||
[[hard-link]]
|
||||
>[[arrow]]</[[link-span]]
|
||||
></td
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td
|
||||
>
|
||||
</tr>
|
37
templates/public/amp-reference-container-body-combi.html
Normal file
37
templates/public/amp-reference-container-body-combi.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* AMP compatible table row template with the ability to have combined footnotes.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* - Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @happyches
|
||||
* @link https://wordpress.org/support/topic/custom-css-for-jumbled-references/
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
class="footnote_plugin_index_combi[[pointer]]"
|
||||
>[[backlinks]]</td
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td>
|
||||
</tr>
|
44
templates/public/amp-reference-container-body-switch.html
Normal file
44
templates/public/amp-reference-container-body-switch.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* AMP compatible table row template for uncombined footnotes with the backlink symbol appended.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @contributor @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_plugin_link"
|
||||
[[hard-link]]
|
||||
>[[index]][[terminator]][[arrow]]</[[link-span]]
|
||||
>[[anchor-element]]</td
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td>
|
||||
</tr>
|
38
templates/public/amp-reference-container-body.html
Executable file
38
templates/public/amp-reference-container-body.html
Executable file
|
@ -0,0 +1,38 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* AMP compatible table row default template for uncombined footnotes.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_plugin_link"
|
||||
[[hard-link]]
|
||||
>[[arrow]][[index]][[terminator]]</[[link-span]]
|
||||
>[[anchor-element]]</td
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td
|
||||
>
|
||||
</tr>
|
|
@ -3,7 +3,7 @@
|
|||
*/?>
|
||||
-->
|
||||
<span
|
||||
class="footnote_referrer"
|
||||
class="footnote_referrer"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
|
|
|
@ -47,12 +47,16 @@
|
|||
id="footnotes_container_label_expand_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_label pointer"
|
||||
onclick="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[[name]]</span
|
||||
onkeydown="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
|
||||
s >[[name]]</span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_button_plus_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="[[button-style]]"
|
||||
onclick="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[+]</span
|
||||
><span
|
||||
role="button"
|
||||
|
@ -61,12 +65,16 @@
|
|||
class="footnote_reference_container_label pointer"
|
||||
style="display: none;"
|
||||
onclick="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[[name]]</span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_button_minus_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="display: none;"
|
||||
onclick="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[−]</span
|
||||
></[[element]]
|
||||
></div
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
scope="row"
|
||||
class="footnote_plugin_index"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_index"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
class="footnote_plugin_index pointer"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_plugin_link"
|
||||
[[hard-link]]
|
||||
>[[index]][[terminator]][[arrow]]</[[link-span]]
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_plugin_link"
|
||||
[[hard-link]]
|
||||
>[[arrow]][[index]][[terminator]]</[[link-span]]
|
||||
|
|
|
@ -40,11 +40,15 @@
|
|||
tabindex="0"
|
||||
class="footnote_reference_container_label pointer"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[[name]]</span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="[[button-style]]"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[<a
|
||||
id="footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]"
|
||||
>+</a
|
||||
|
|
Reference in a new issue