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: * Edited:
* @since 2.2.0 5 parts to address increased settings number * @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() { public function MouseOverBox() {
// options for Yes/No select box: // 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.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.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 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/> * @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
* *
* Last modified: 2020-12-18T1632+0100 * 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 * 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/> * @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: // If called directly, abort:

View file

@ -6,7 +6,13 @@
* @author Stefan Herndler * @author Stefan Herndler
* @since 1.5.0 14.09.14 10:58 * @since 1.5.0 14.09.14 10:58
* *
* Last modified: 2020-11-01T0347+0100 * 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
*
* 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_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_FileName Template file name inside the Template directory without the file extension.
* @param string $p_str_Extension Optional Template file extension (default: html) * @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") { public function __construct($p_str_FileType, $p_str_FileName, $p_str_Extension = "html") {
// no template file type and/or file name set // no template file type and/or file name set
if (empty($p_str_FileType) || empty($p_str_FileName)) { if (empty($p_str_FileType) || empty($p_str_FileName)) {
return; return;
} }
// 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)) {
// get absolute path to the specified template file // get absolute path to the specified template file
$l_str_TemplateFile = dirname(__FILE__) . "/../templates/" . $p_str_FileType . "/" . $p_str_FileName . "." . $p_str_Extension; $l_str_TemplateFile = dirname(__FILE__) . "/../templates/" . $p_str_FileType . "/" . $p_str_FileName . "." . $p_str_Extension;
// Template file does not exist // Template file does not exist
if (!file_exists($l_str_TemplateFile)) { if (!file_exists($l_str_TemplateFile)) {
return; return;
} }
}
// get Template file content // get Template file content
$this->a_str_OriginalContent = str_replace("\n", "", file_get_contents($l_str_TemplateFile)); $this->a_str_OriginalContent = str_replace("\n", "", file_get_contents($l_str_TemplateFile));
$this->a_str_OriginalContent = str_replace("\r", "", $this->a_str_OriginalContent); $this->a_str_OriginalContent = str_replace("\r", "", $this->a_str_OriginalContent);

View file

@ -4,12 +4,12 @@
Plugin URI: https://wordpress.org/plugins/footnotes/ 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. 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 Author: Mark Cheret
Version: 2.2.5 Version: 2.3.0d0
Author URI: http://cheret.de/plugins/footnotes-2/ Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages
*/ */
define( 'FOOTNOTES_VERSION', '2.2.5' ); define( 'FOOTNOTES_VERSION', '2.3.0d0' );
/* /*
Copyright 2020 Mark Cheret (email: mark@cheret.de) 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 == == Changelog ==
= 2.3.0d0 =
- Add: Customization: support for custom templates
= 2.2.5 = = 2.2.5 =
- Add: Dashboard: Footnotes numbering: add support for Ibid. notation in suggestions for guidance, thanks to @meglio - 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 - 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