|
1 |
phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped |
|
286 |
TODO: Reorg dependencies. |
|
292 |
TODO: Move to `General`. |
|
306 |
Get values from settings. |
|
313 |
PHP_INT_MAX can be set by -1. |
|
320 |
Append custom css to the header. |
|
327 |
Append the love and share me slug to the footer. |
|
342 |
Configurable priority level for reference container relative positioning; default 98. |
|
358 |
docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ |
|
374 |
wordpress.org/support/topic/footnotes-use-in-popup-maker/ |
|
423 |
Reset stored footnotes when displaying the header. |
|
436 |
Insert start tag without switching out of PHP. |
|
464 |
Reference container display on home page. |
|
470 |
Reference container top and bottom margins. |
|
479 |
Reference container label bottom border. |
|
499 |
Adapt left padding to the presence of a border. |
|
504 |
Ref container first column width and max-width. |
|
545 |
Hard links scroll offset. |
|
546 |
TODO: remove cast. |
|
549 |
Correct hard links enabled status depending on AMP-compatible or alternative reference container enabled status. |
|
561 |
Tooltips. |
|
565 |
Tooltip appearance: Tooltip font size. |
|
575 |
Tooltip Text color. |
|
581 |
Tooltip Background color. |
|
587 |
Tooltip Border width. |
|
593 |
Tooltip Border color. |
|
599 |
Tooltip Corner radius. |
|
605 |
Tooltip Shadow color. |
|
613 |
Tooltip position, dimensions and timing. |
|
627 |
AMP-compatible and alternative tooltips. |
|
630 |
Dimensions. |
|
635 |
Set also as max-width wrt short tooltip shrinking. |
|
638 |
Position. |
|
657 |
Timing. |
|
712 |
Insert end tag without switching out of PHP. |
|
746 |
Get setting for love and share this plugin. |
|
748 |
Check if the admin allows to add a link to the footer. |
|
752 |
Set a hyperlink to the word "footnotes" in the Love slug. |
|
753 |
wordpress.org/plugins/footnotes/" target="_blank" style="text-decoration:none;">%s</a>', Config::PLUGIN_PUBLIC_NAME ); |
|
754 |
Get random love me text. |
|
759 |
Options named wrt backcompat, simplest is default. |
|
802 |
Appends the reference container if set to "post_end". |
|
820 |
TODO: Replace with `str_contains()`, but currently breaks Rector downgrade. |
|
821 |
<https://github.com/rectorphp/rector/issues/6315>. |
|
824 |
phpcs:disable WordPress.PHP.YodaConditions.NotYoda |
|
825 |
Appends the reference container if set to "post_end". |
|
827 |
phpcs:enable WordPress.PHP.YodaConditions.NotYoda |
|
839 |
TODO: Replace with `str_contains()`, but currently breaks Rector downgrade. |
|
840 |
<https://github.com/rectorphp/rector/issues/6315>. |
|
883 |
developer.wordpress.org/reference/functions/wp_trim_excerpt/ |
|
884 |
developer.wordpress.org/reference/functions/wp_trim_words/ |
|
893 |
Discard existing excerpt and start on the basis of the post. |
|
896 |
Get footnote delimiter shortcodes and unify them. |
|
899 |
Remove footnotes. |
|
902 |
Apply WordPress excerpt processing. |
|
906 |
Here the footnotes would be processed as part of WordPress content processing. |
|
909 |
According to Advanced Excerpt, this is some kind of precaution against malformed CDATA in RSS feeds. |
|
916 |
Function wp_trim_words() calls wp_strip_all_tags() that wrecks the footnotes. |
|
929 |
wordpress.org/plugins/advanced-excerpt/ |
|
938 |
Discard existing excerpt and start on the basis of the post. |
|
941 |
Get footnote delimiter shortcodes and unify them. |
|
944 |
Apply WordPress excerpt processing. |
|
948 |
But do not process footnotes at this point; do only this. |
|
951 |
Prepare the excerpt length argument. |
|
955 |
Prepare the Read-on string. |
|
958 |
Safeguard the footnotes. |
|
965 |
Prevent the footnotes from altering the excerpt: previously hard-coded '5ED84D6'. |
|
973 |
Replace line breaking markup with a separator. |
|
982 |
To count words like Advanced Excerpt does it. |
|
987 |
Tokenize into tags and words as in Advanced Excerpt. |
|
990 |
Count words following one option of Advanced Excerpt. |
|
996 |
If token is not a tag, increment word count. |
|
1000 |
Append the token to the output. |
|
1004 |
Complete unbalanced markup, used by Advanced Excerpt. |
|
1007 |
Readd footnotes in excerpt. |
|
1019 |
Append the Read-on string as in wp_trim_words(). |
|
1022 |
Process readded footnotes without appending the reference container. |
|
1038 |
Appends the reference container if set to "post_end". |
|
1051 |
phpcs:disable WordPress.PHP.YodaConditions.NotYoda |
|
1052 |
Appends the reference container if set to "post_end". |
|
1054 |
phpcs:enable WordPress.PHP.YodaConditions.NotYoda |
|
1067 |
Process content. |
|
1074 |
Append the reference container or insert at shortcode. |
|
1092 |
Increment the container ID. |
|
1096 |
Delete position shortcode should any remain. |
|
1099 |
Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found. |
|
1104 |
Return the content with replaced footnotes and optional reference container appended. |
|
1122 |
Get footnotes start and end tag short codes. |
|
1130 |
If any footnotes short code is empty, return the content without changes. |
|
1140 |
Harmonize footnotes without escaping any HTML special characters in delimiter shortcodes. |
|
1141 |
The footnote has been added in the Block Editor code editor (doesn’t work in Classic Editor text mode). |
|
1145 |
Harmonize footnotes while escaping HTML special characters in delimiter shortcodes. |
|
1146 |
The footnote has been added in the Classic Editor visual mode. |
|
1150 |
Harmonize footnotes while escaping HTML special characters except greater-than sign in delimiter shortcodes. |
|
1151 |
The footnote has been added in the Block Editor visual mode. |
|
1155 |
Assign the delimiter shortcodes. |
|
1159 |
Assign the regex-conformant shortcodes. |
|
1165 |
Assign the delimiter shortcodes. |
|
1169 |
Make shortcodes conform to regex syntax. |
|
1189 |
Get footnote delimiter shortcodes and unify them. |
|
1199 |
If enabled. |
|
1202 |
Apply different regex depending on whether start shortcode is double/triple opening parenthesis. |
|
1205 |
This prevents from catching a script containing e.g. a double opening parenthesis. |
|
1210 |
Catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts. |
|
1214 |
Check syntax and get error locations. |
|
1220 |
Prevent generating and inserting the warning multiple times. |
|
1223 |
Get plain text string for error location. |
|
1226 |
Limit string length to 300 characters. |
|
1231 |
Compose warning box. |
|
1236 |
Syntax validation setting in the dashboard under the General settings tab. |
|
1246 |
Prepend the warning box to the content. |
|
1249 |
Checked, set flag to false to prevent duplicate warning. |
|
1268 |
Optionally moves footnotes outside at the end of the label element. |
|
1286 |
wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14212318 |
|
1299 |
Post ID to make everything unique wrt infinite scroll and archive view. |
|
1319 |
Resets the footnote number. |
|
1322 |
Contains the starting position for the lookup of a footnote. |
|
1329 |
Set to null in case all templates are unnecessary. |
|
1333 |
On the condition that the footnote text is not hidden. |
|
1336 |
Whether AMP compatibility mode is enabled. |
|
1339 |
Whether first clicking a referrer needs to expand the reference container. |
|
1342 |
Load 'public/partials/amp-footnote-expand.html'. |
|
1347 |
Load 'public/partials/amp-footnote.html'. |
|
1352 |
Load 'public/partials/footnote-alternative.html'. |
|
1355 |
Else jQuery tooltips are enabled. |
|
1358 |
Load 'public/partials/footnote.html'. |
|
1361 |
Load tooltip inline script. |
|
1366 |
Search footnotes short codes in the content. |
|
1368 |
Get first occurrence of the footnote start tag short code. |
|
1374 |
No short code found, stop here. |
|
1378 |
Get first occurrence of the footnote end tag short code. |
|
1380 |
No short code found, stop here. |
|
1384 |
Calculate the length of the footnote. |
|
1387 |
Get footnote text. |
|
1390 |
Get tooltip text if present. |
|
1409 |
webmasters.stackexchange.com/questions/93540/are-spaces-in-href-valid |
|
1418 |
[^\\s<]+)#', |
|
1424 |
Text to be displayed instead of the footnote. |
|
1427 |
Whether hard links are enabled. |
|
1430 |
Get the configurable parts. |
|
1435 |
Streamline ID concatenation. |
|
1444 |
Display the footnote referrers and the tooltips. |
|
1448 |
Display only a truncated footnote text if option enabled. |
|
1452 |
Define excerpt text as footnote text by default. |
|
1472 |
If AMP compatibility mode is enabled. |
|
1475 |
If the reference container is also collapsed by default. |
|
1488 |
Don’t add onclick event in AMP compatibility mode. |
|
1489 |
Reverted wrong linting. |
|
1497 |
If enabled, add the hard link fragment ID. |
|
1509 |
Configurable read-on button label. |
|
1530 |
Whether hard links are enabled. |
|
1535 |
Self::$link_open_tag will be defined as needed. |
|
1537 |
Compose hyperlink address (leading space is in template). |
|
1563 |
The link element is set independently as it may be needed for styling. |
|
1573 |
Determine tooltip content. |
|
1588 |
Determine shrink width if alternative tooltips are enabled. |
|
1599 |
Fill in 'public/partials/footnote.html'. |
|
1618 |
Reset the template. |
|
1621 |
If tooltips are enabled but neither AMP nor alternative are. |
|
1631 |
Fill in 'public/partials/tooltip.html'. |
|
1650 |
Replace the footnote with the template. |
|
1653 |
Add footnote only if not empty. |
|
1655 |
Set footnote to the output box at the end. |
|
1657 |
Increase footnote index. |
|
1683 |
Add offset to the new starting position. |
|
1688 |
Return content. |
|
1700 |
No footnotes have been replaced on this page. |
|
1709 |
If the backlink symbol is enabled. |
|
1713 |
Get html arrow. |
|
1716 |
Get user defined arrow. |
|
1722 |
Wrap the arrow in a @media print { display:hidden } span. |
|
1728 |
If the backlink symbol isn’t enabled, set it to empty. |
|
1744 |
If it is not, check which option is on. |
|
1746 |
TODO: replace with `match` (but currently it breaks the Rector downgrade to PHP 7.4. |
|
1747 |
<https://github.com/rectorphp/rector/issues/6315>. |
|
1777 |
If it is not, check which option is on. |
|
1779 |
TODO: replace with `match` (but currently it breaks the Rector downgrade to PHP 7.4. |
|
1780 |
<https://github.com/rectorphp/rector/issues/6315>. |
|
1825 |
AMP compatibility requires a full set of AMP compatible table row templates. |
|
1827 |
When combining identical footnotes is turned on, another template is needed. |
|
1829 |
The combining template allows for backlink clusters and supports cell clicking for single notes. |
|
1837 |
Default is the standard template. |
|
1842 |
The combining template allows for backlink clusters and supports cell clicking for single notes. |
|
1850 |
Default is the standard template. |
|
1860 |
Loop through all footnotes found in the page. |
|
1864 |
Get footnote text. |
|
1867 |
If footnote is empty, go to the next one;. |
|
1868 |
With combine identicals turned on, identicals will be deleted and are skipped. |
|
1873 |
Generate content of footnote index cell. |
|
1876 |
Get the footnote index string and. |
|
1877 |
Keep supporting legacy index placeholder. |
|
1885 |
Define anyway. |
|
1894 |
wordpress.org/support/topic/making-it-amp-compatible/#post-13837359 |
|
1916 |
Compose optional hard link address. |
|
1925 |
Define as empty, too. |
|
1939 |
Set a flag to check for the combined status of a footnote item. |
|
1942 |
Set otherwise unused variables as empty to avoid screwing up the placeholder array. |
|
1949 |
ID, optional hard link address, and class. |
|
1977 |
The dedicated template enumerating backlinks uses another variable. |
|
1980 |
Append the click event right to the backlink item for enumerations;. |
|
1981 |
Else it goes in the table cell. |
|
1985 |
Append the optional offset anchor for hard links. |
|
1991 |
Continue both single note and notes cluster, depending on switch option status. |
|
2004 |
If that is the only footnote with this text, we’re almost done.. |
|
2006 |
Check if it isn't the last footnote in the array. |
|
2009 |
Get all footnotes that haven't passed yet. |
|
2013 |
Check if a further footnote is the same as the actual one. |
|
2016 |
If so, set the further footnote as empty so it won't be displayed later. |
|
2019 |
Set the flag to true for the combined status. |
|
2022 |
Update the footnote ID. |
|
2025 |
Resume composing the backlinks enumeration. |
|
2035 |
Insert the optional hard link address. |
|
2046 |
Reverted wrong linting. |
|
2056 |
Append the offset anchor for optional hard links. |
|
2073 |
Append terminator and end tag. |
|
2079 |
Line wrapping of URLs already fixed, see above. |
|
2081 |
Get reference container item text if tooltip text goes separate. |
|
2098 |
Replace all placeholders in table row template. |
|
2102 |
Placeholder used in all templates. |
|
2105 |
Used in standard layout W/O COMBINED FOOTNOTES. |
|
2116 |
Used in standard layout WITH COMBINED IDENTICALS TURNED ON. |
|
2121 |
Legacy placeholders for use in legacy layout templates. |
|
2129 |
Extra line breaks for page source readability. |
|
2136 |
Call again for robustness when priority levels don't match any longer. |
|
2137 |
TODO: remove cast. |
|
2140 |
Streamline. |
|
2152 |
Select the reference container template. |
|
2153 |
Whether AMP compatibility mode is enabled. |
|
2156 |
Whether the reference container is collapsed by default. |
|
2159 |
Load 'public/partials/amp-reference-container-collapsed.html'. |
|
2164 |
Load 'public/partials/amp-reference-container.html'. |
|
2169 |
Load 'public/partials/js-reference-container.html'. |
|
2174 |
Load 'public/partials/reference-container.html'. |
|
2222 |
Free all found footnotes if reference container will be displayed. |
| TODO |
277 |
Reorganise dependencies. |
| TODO |
277 |
Move call to `register_hooks()` to {@see}. |
| TODO |
305 |
Move to {@see}. |
| TODO |
434 |
Refactor to enqueue stylesheets properly in {@see}. |
| TODO |
1187 |
Refactor to parse DOM rather than using RegEx. |
| TODO |
1187 |
Decompose. |
| TODO |
174 |
Remove. |
| TODO |
182 |
Remove. |
| TODO |
190 |
Remove. |