Standardise codebase to WP Coding Standards
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2483336 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
526cde8830
commit
6a5fcedac3
54 changed files with 8485 additions and 8467 deletions
|
@ -1,83 +1,83 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Yields the reference container start and end including the scroll script.
|
||||
*
|
||||
* @since Unknown
|
||||
* @type object
|
||||
*
|
||||
* @lastmodified 2021-02-18T2046+0100
|
||||
*
|
||||
*
|
||||
*
|
||||
* - Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report.
|
||||
*
|
||||
* @since 2.0.2
|
||||
*
|
||||
* @reporter @ragonesi
|
||||
* @link https://wordpress.org/support/topic/hyperlink-symbol-in-reference-container/#post-13587782
|
||||
*
|
||||
* The expand/collapse button was lost @since 2.0.0 for an unknown reason.
|
||||
* The fix was about restoring the button code (only, while the script remained complete).
|
||||
*/?>
|
||||
-->
|
||||
<div
|
||||
class="speaker-mute footnotes_reference_container"
|
||||
>
|
||||
<div
|
||||
class="footnote_container_prepare"
|
||||
><[[element]]
|
||||
><span
|
||||
class="footnote_reference_container_label pointer"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[[name]]</span
|
||||
><span
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="[[button-style]]"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[<a
|
||||
id="footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]"
|
||||
>+</a
|
||||
>]</span
|
||||
></[[element]]
|
||||
></div
|
||||
>
|
||||
<div
|
||||
id="footnote_references_container_[[post_id]]_[[container_id]]"
|
||||
style="[[style]]"
|
||||
>
|
||||
<table
|
||||
class="footnotes_table footnote-reference-container"
|
||||
>
|
||||
<tbody>
|
||||
[[content]]
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function footnote_expand_reference_container_[[post_id]]_[[container_id]]() {
|
||||
jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').show();
|
||||
jQuery('#footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]').text('−');
|
||||
}
|
||||
function footnote_collapse_reference_container_[[post_id]]_[[container_id]]() {
|
||||
jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').hide();
|
||||
jQuery('#footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]').text('+');
|
||||
}
|
||||
function footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]() {
|
||||
if (jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').is(':hidden')) {
|
||||
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
|
||||
} else {
|
||||
footnote_collapse_reference_container_[[post_id]]_[[container_id]]();
|
||||
}
|
||||
}
|
||||
function footnote_moveToAnchor_[[post_id]]_[[container_id]](p_str_TargetID) {
|
||||
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
|
||||
var l_obj_Target = jQuery('#' + p_str_TargetID);
|
||||
if (l_obj_Target.length) {
|
||||
jQuery('html, body').animate({
|
||||
scrollTop: l_obj_Target.offset().top - window.innerHeight * [[scroll-offset]]
|
||||
},
|
||||
[[scroll-duration]]);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Yields the reference container start and end including the scroll script.
|
||||
*
|
||||
* @since Unknown
|
||||
* @type object
|
||||
*
|
||||
* @lastmodified 2021-02-18T2046+0100
|
||||
*
|
||||
*
|
||||
*
|
||||
* - Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report.
|
||||
*
|
||||
* @since 2.0.2
|
||||
*
|
||||
* @reporter @ragonesi
|
||||
* @link https://wordpress.org/support/topic/hyperlink-symbol-in-reference-container/#post-13587782
|
||||
*
|
||||
* The expand/collapse button was lost @since 2.0.0 for an unknown reason.
|
||||
* The fix was about restoring the button code (only, while the script remained complete).
|
||||
*/?>
|
||||
-->
|
||||
<div
|
||||
class="speaker-mute footnotes_reference_container"
|
||||
>
|
||||
<div
|
||||
class="footnote_container_prepare"
|
||||
><[[element]]
|
||||
><span
|
||||
class="footnote_reference_container_label pointer"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[[name]]</span
|
||||
><span
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="[[button-style]]"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[<a
|
||||
id="footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]"
|
||||
>+</a
|
||||
>]</span
|
||||
></[[element]]
|
||||
></div
|
||||
>
|
||||
<div
|
||||
id="footnote_references_container_[[post_id]]_[[container_id]]"
|
||||
style="[[style]]"
|
||||
>
|
||||
<table
|
||||
class="footnotes_table footnote-reference-container"
|
||||
>
|
||||
<tbody>
|
||||
[[content]]
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function footnote_expand_reference_container_[[post_id]]_[[container_id]]() {
|
||||
jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').show();
|
||||
jQuery('#footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]').text('−');
|
||||
}
|
||||
function footnote_collapse_reference_container_[[post_id]]_[[container_id]]() {
|
||||
jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').hide();
|
||||
jQuery('#footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]').text('+');
|
||||
}
|
||||
function footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]() {
|
||||
if (jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').is(':hidden')) {
|
||||
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
|
||||
} else {
|
||||
footnote_collapse_reference_container_[[post_id]]_[[container_id]]();
|
||||
}
|
||||
}
|
||||
function footnote_moveToAnchor_[[post_id]]_[[container_id]](p_str_TargetID) {
|
||||
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
|
||||
var l_obj_Target = jQuery('#' + p_str_TargetID);
|
||||
if (l_obj_Target.length) {
|
||||
jQuery('html, body').animate({
|
||||
scrollTop: l_obj_Target.offset().top - window.innerHeight * [[scroll-offset]]
|
||||
},
|
||||
[[scroll-duration]]);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Reference in a new issue