From 673ce6b18c17ffb6c594f14e8cdf136bc29c5859 Mon Sep 17 00:00:00 2001 From: Aricura Date: Tue, 27 May 2014 19:22:47 +0000 Subject: [PATCH] - Add: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@921840 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- css/footnote.css | 2 +- includes/replacer.php | 15 ++++++++++++++- readme.txt | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/css/footnote.css b/css/footnote.css index 5926758..0da2aa8 100755 --- a/css/footnote.css +++ b/css/footnote.css @@ -47,7 +47,7 @@ text-align: left !important; } -.footnote_container_prepare > p > span { +.footnote_container_prepare > p > span:first-child { padding-left: 20px !important; text-align: left !important; cursor: pointer; diff --git a/includes/replacer.php b/includes/replacer.php index 82d0240..18a58be 100644 --- a/includes/replacer.php +++ b/includes/replacer.php @@ -317,8 +317,18 @@ function footnotes_OutputReferenceContainer() /*get footnote counter style */ $l_str_CounterStyle = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_COUNTER_STYLE]; + /* + * add expand/collapse buttons to the reference label if collapsed by default + * @since 1.2.2 + */ + $l_str_CollapseButtons = ""; + if ($l_bool_CollapseReference) { + $l_str_CollapseButtons = '   [ + ] ' . + ' [ - ]'; + } + /* output string, prepare it with the reference label as headline */ - $l_str_Output = '

' . $l_str_ReferencesLabel . '

'; + $l_str_Output = '

' . $l_str_ReferencesLabel . '' .$l_str_CollapseButtons . '

'; /* add a box around the footnotes */ $l_str_Output .= '
'; diff --git a/readme.txt b/readme.txt index 778c5fe..9cd3baf 100755 --- a/readme.txt +++ b/readme.txt @@ -64,6 +64,7 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho = 1.2.2 = - Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) - Feature: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer +- Add: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" = 1.2.1 = - Bugfix: HowTo example will be displayed correctly if a user defined short code is set