MCI_Footnotes_Task
Searches and replaces the footnotes.
Generates the reference container.
Tags
Table of Contents
- $a_arr_Footnotes : array<string|int, mixed>
- Contains all footnotes found on current public page.
- $a_bool_AllowLoveMe : bool
- Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.
- $a_bool_AlternativeTooltipsEnabled : mixed
- $a_bool_HardLinksEnable : bool|str|int
- Hard links for AMP compatibility
- $a_bool_MirrorTooltipText : mixed
- Dedicated tooltip text
- $a_bool_SyntaxErrorFlag : bool
- Footnote delimiter syntax validation
- $a_bool_TooltipsEnabled : bool
- Template process optimization
- $a_int_PostId : int
- Infinite scroll / autoload or archive view
- $a_int_ReferenceContainerId : int
- Multiple reference containers in content and widgets
- $a_int_ScrollOffset : int
- Scroll offset
- $a_int_TooltipShortcodeLength : mixed
- $a_str_FootnoteLinkSlug : mixed
- $a_str_LinkCloseTag : mixed
- $a_str_LinkIdsSeparator : mixed
- $a_str_LinkOpenTag : mixed
- $a_str_LinkSpan : mixed
- Optional link element for footnote referrers and backlinks
- $a_str_PostContainerIdCompound : mixed
- $a_str_Prefix : string
- Prefix for the Footnote html element ID.
- $a_str_ReferrerLinkSlug : mixed
- $a_str_TooltipShortcode : mixed
- exec() : string
- Replaces all footnotes that occur in the given content.
- ReferenceContainer() : string
- Generates the reference container.
- registerHooks() : mixed
- Register WordPress Hooks to replace Footnotes in the content of a public page.
- search() : string
- Replaces all footnotes in the given content and appends them to the static property.
- the_content() : string
- Replaces footnotes in the content of the current page/post.
- the_excerpt() : string
- Replaces footnotes in the excerpt of the current page/post.
- the_post() : mixed
- Replaces footnotes in each Content var of the current Post object.
- the_title() : string
- Replaces footnotes in the post/page title.
- widget_text() : string
- Replaces footnotes in the content of the current widget.
- widget_title() : string
- Replaces footnotes in the widget title.
- wp_footer() : mixed
- Displays the 'LOVE FOOTNOTES' slug if enabled.
- wp_head() : mixed
- Outputs the custom css to the header of the public page.
- replacePostObject() : WP_Post
- Replace all Footnotes in a WP_Post object.
Properties
$a_arr_Footnotes
Contains all footnotes found on current public page.
public
static array<string|int, mixed>
$a_arr_Footnotes
= array()
Tags
$a_bool_AllowLoveMe
Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.
public
static bool
$a_bool_AllowLoveMe
= rue
Tags
$a_bool_AlternativeTooltipsEnabled
public
static mixed
$a_bool_AlternativeTooltipsEnabled
= alse
$a_bool_HardLinksEnable
Hard links for AMP compatibility
public
static bool|str|int
$a_bool_HardLinksEnable
= alse
Tags
$a_bool_MirrorTooltipText
Dedicated tooltip text
public
static mixed
$a_bool_MirrorTooltipText
= alse
- Update: Tooltips: ability to display dedicated content before
[[/tooltip]]
, thanks to @jbj2199 issue report.
Tags
$a_bool_SyntaxErrorFlag
Footnote delimiter syntax validation
public
static bool
$a_bool_SyntaxErrorFlag
= rue
- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.
Tags
$a_bool_TooltipsEnabled
Template process optimization
public
static bool
$a_bool_TooltipsEnabled
= alse
- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
Tags
$a_int_PostId
Infinite scroll / autoload or archive view
public
static int
$a_int_PostId
= 0
- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution
Tags
$a_int_ReferenceContainerId
Multiple reference containers in content and widgets
public
static int
$a_int_ReferenceContainerId
= 1
- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report.
Tags
$a_int_ScrollOffset
Scroll offset
public
static int
$a_int_ScrollOffset
= 34
- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
Tags
$a_int_TooltipShortcodeLength
public
static mixed
$a_int_TooltipShortcodeLength
= 12
$a_str_FootnoteLinkSlug
public
static mixed
$a_str_FootnoteLinkSlug
= 'f'
$a_str_LinkCloseTag
public
static mixed
$a_str_LinkCloseTag
= ''
$a_str_LinkIdsSeparator
public
static mixed
$a_str_LinkIdsSeparator
= '+'
$a_str_LinkOpenTag
public
static mixed
$a_str_LinkOpenTag
= ''
$a_str_LinkSpan
Optional link element for footnote referrers and backlinks
public
static mixed
$a_str_LinkSpan
= 'span'
Tags
$a_str_PostContainerIdCompound
public
static mixed
$a_str_PostContainerIdCompound
= ''
$a_str_Prefix
Prefix for the Footnote html element ID.
public
static string
$a_str_Prefix
= ""
Tags
$a_str_ReferrerLinkSlug
public
static mixed
$a_str_ReferrerLinkSlug
= 'r'
$a_str_TooltipShortcode
public
static mixed
$a_str_TooltipShortcode
= '[[/tooltip]]'
Methods
exec()
Replaces all footnotes that occur in the given content.
public
exec(string $p_str_Content[, bool $p_bool_OutputReferences = false ][, bool $p_bool_HideFootnotesText = false ]) : string
Parameters
- $p_str_Content : string
-
Any string that may contain footnotes to be replaced.
- $p_bool_OutputReferences : bool = false
-
Appends the Reference Container to the output if set to true, default true.
- $p_bool_HideFootnotesText : bool = false
-
Hide footnotes found in the string.
Tags
Return values
string —ReferenceContainer()
Generates the reference container.
public
ReferenceContainer() : string
Tags
Return values
string —registerHooks()
Register WordPress Hooks to replace Footnotes in the content of a public page.
public
registerHooks() : mixed
Tags
Return values
mixed —search()
Replaces all footnotes in the given content and appends them to the static property.
public
search(string $p_str_Content, bool $p_bool_ConvertHtmlChars, bool $p_bool_HideFootnotesText) : string
Parameters
- $p_str_Content : string
-
Content to be searched for footnotes.
- $p_bool_ConvertHtmlChars : bool
-
html encode settings, default true.
- $p_bool_HideFootnotesText : bool
-
Hide footnotes found in the string.
Tags
Return values
string —the_content()
Replaces footnotes in the content of the current page/post.
public
the_content(string $p_str_Content) : string
Parameters
- $p_str_Content : string
-
Page/Post content.
Tags
Return values
string —Content with replaced footnotes.
the_excerpt()
Replaces footnotes in the excerpt of the current page/post.
public
the_excerpt(string $p_str_Content) : string
Parameters
- $p_str_Content : string
-
Page/Post content.
Tags
Return values
string —Content with replaced footnotes.
the_post()
Replaces footnotes in each Content var of the current Post object.
public
the_post(array<string|int, mixed>|WP_Post &$p_mixed_Posts) : mixed
Parameters
- $p_mixed_Posts : array<string|int, mixed>|WP_Post
Tags
Return values
mixed —the_title()
Replaces footnotes in the post/page title.
public
the_title(string $p_str_Content) : string
Parameters
- $p_str_Content : string
-
Widget content.
Tags
Return values
string —Content with replaced footnotes.
widget_text()
Replaces footnotes in the content of the current widget.
public
widget_text(string $p_str_Content) : string
Parameters
- $p_str_Content : string
-
Widget content.
Tags
Return values
string —Content with replaced footnotes.
widget_title()
Replaces footnotes in the widget title.
public
widget_title(string $p_str_Content) : string
Parameters
- $p_str_Content : string
-
Widget content.
Tags
Return values
string —Content with replaced footnotes.
wp_footer()
Displays the 'LOVE FOOTNOTES' slug if enabled.
public
wp_footer() : mixed
Tags
Return values
mixed —wp_head()
Outputs the custom css to the header of the public page.
public
wp_head() : mixed
Tags
Return values
mixed —replacePostObject()
Replace all Footnotes in a WP_Post object.
private
replacePostObject(WP_Post $p_obj_Post) : WP_Post
Parameters
- $p_obj_Post : WP_Post