development update 2.3.0d0 needed in response to user request on forum

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2442742 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2020-12-19 06:18:56 +00:00
parent 4ff90450d6
commit c8f0c0e350
7 changed files with 65 additions and 19 deletions

View file

@ -557,7 +557,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
*
* Edited:
* @since 2.2.0 5 parts to address increased settings number
* @since 2.2.5 added position settings container for the alternative tooltips
* @since 2.2.5 added position settings for the alternative tooltips
*/
public function MouseOverBox() {
// options for Yes/No select box:

View file

@ -26,7 +26,7 @@
* 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100
* 2.2.4 move backlink symbol selection under previous tab 2020-12-16T1256+0100
* 2.2.5 alternative tooltip position settings 2020-12-17T0907+0100
* 2.2.5 options for reference container label element, thanks to @markhillyer 2020-12-18T1455+0100
* 2.2.5 options for reference container label element and bottom border, thanks to @markhillyer 2020-12-18T1455+0100
* @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
*
* Last modified: 2020-12-18T1632+0100

View file

@ -40,7 +40,7 @@
* 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100
* @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
*
* Last modified: 2020-12-18T1627+0100
* Last modified: 2020-12-18T1751+0100
*/
// If called directly, abort:
@ -168,8 +168,8 @@ class MCI_Footnotes_Task {
* 2.1.1 script for alternative tooltips
* 2.1.3 raise settings priority to override theme style sheets
* 2.1.4 tootip font size and backlink column width settings
* 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100
* @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
* 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100
* @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
*/
public function wp_head() {
@ -179,14 +179,14 @@ class MCI_Footnotes_Task {
// display ref container on home page:
if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE))) {
echo ".home .footnotes_reference_container { display: none; }\r\n";
}
// ref container label bottom border:
}
// ref container label bottom border:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER))) {
echo ".footnote_container_prepare > ";
echo MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT);
echo MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT);
echo " {border-bottom: 1px solid #aaaaaa !important;}\r\n";
}
}
// ref container first column width and max-width:
$l_bool_ColumnWidthEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED));
@ -528,7 +528,7 @@ class MCI_Footnotes_Task {
* Edited:
* @since 2.2.0 insert reference container at shortcode, thanks to @hamshe 2020-12-13T2057+0100
* @see <https://wordpress.org/support/topic/reference-container-in-elementor/>
*
*
* @since 2.2.5 delete unused position shortcode, when position is widget or footer, thanks to @hamshe 2020-12-18T1434+0100
* @see <https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126>
*/
@ -1106,7 +1106,7 @@ class MCI_Footnotes_Task {
// streamline:
$l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE));
// load 'templates/public/reference-container.html':
$l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container");
$l_obj_TemplateContainer->replace(

View file

@ -5,8 +5,14 @@
* @filesource
* @author Stefan Herndler
* @since 1.5.0 14.09.14 10:58
*
* Edited:
* @since 2.0.3 further minify template content
* @since 2.0.4 regex to delete multiple spaces
*
* Last modified: 2020-11-01T0347+0100
* @since 2.3.0 support for custom templates 2020-12-19T0606+0100
*
* Last modified: 2020-12-19T0713+0100
*/
@ -63,18 +69,32 @@ class MCI_Footnotes_Template {
* @param string $p_str_FileType Template file type (take a look on the Class constants).
* @param string $p_str_FileName Template file name inside the Template directory without the file extension.
* @param string $p_str_Extension Optional Template file extension (default: html)
*
* Edited:
* @since 2.0.3 further minify template content
* @since 2.0.4 regex to delete multiple spaces
*
* @since 2.3.0 support for custom templates 2020-12-19T0606+0100
*/
public function __construct($p_str_FileType, $p_str_FileName, $p_str_Extension = "html") {
// no template file type and/or file name set
if (empty($p_str_FileType) || empty($p_str_FileName)) {
return;
}
// get absolute path to the specified template file
$l_str_TemplateFile = dirname(__FILE__) . "/../templates/" . $p_str_FileType . "/" . $p_str_FileName . "." . $p_str_Extension;
// Template file does not exist
// First look for a custom template:
$l_str_TemplateFile = dirname(__FILE__) . "/../../footnotes-custom/templates/" . $p_str_FileType . "/" . $p_str_FileName . "." . $p_str_Extension;
if (!file_exists($l_str_TemplateFile)) {
return;
// get absolute path to the specified template file
$l_str_TemplateFile = dirname(__FILE__) . "/../templates/" . $p_str_FileType . "/" . $p_str_FileName . "." . $p_str_Extension;
// Template file does not exist
if (!file_exists($l_str_TemplateFile)) {
return;
}
}
// get Template file content
$this->a_str_OriginalContent = str_replace("\n", "", file_get_contents($l_str_TemplateFile));
$this->a_str_OriginalContent = str_replace("\r", "", $this->a_str_OriginalContent);

View file

@ -4,12 +4,12 @@
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
Version: 2.2.5
Version: 2.3.0d0
Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes
Domain Path: /languages
*/
define( 'FOOTNOTES_VERSION', '2.2.5' );
define( 'FOOTNOTES_VERSION', '2.3.0d0' );
/*
Copyright 2020 Mark Cheret (email: mark@cheret.de)

View file

@ -80,6 +80,9 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog ==
= 2.3.0d0 =
- Add: Customization: support for custom templates
= 2.2.5 =
- Add: Dashboard: Footnotes numbering: add support for Ibid. notation in suggestions for guidance, thanks to @meglio
- Add: Reference container: support options for label element and label bottom border, thanks to @markhillyer

View file

@ -0,0 +1,23 @@
note-for-developers.txt
2020-12-19T0609+0100
Last modified: 2020-12-19T0706+0100
Footnotes plugin for WordPress, v2.3.0 and later
Support for custom templates
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Since v2.3.0, Footnotes can process custom templates.
To use custom templates, please make a sibling of the "footnotes" folder called "footnotes-custom" containing just the content of templates/public/ with the same structure.
Existing homonymous templates on the path wp-content/plugins/footnotes-custom/templates/public/ are loaded instead of their counterparts in wp-content/plugins/footnotes/templates/public/.
The new location does not need to contain all templates.
E.g. for custom tooltips, you need only one or both of these:
footnotes-custom
└── templates
└── public
├── footnote.html
└── tooltip.html