prepare release version 1.3.4

- Bugfix: Settings access permission vor sub-sites
- Bugfix: Setting 'combine identical footnotes' working as it should

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@974795 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-08-28 17:55:30 +00:00
parent b0f99b6569
commit 284c27cc01
4 changed files with 21 additions and 12 deletions

View file

@ -31,12 +31,6 @@ class MCI_Footnotes {
* @since 1.0 * @since 1.0
*/ */
public function __construct() { public function __construct() {
// load settings only if current WordPress user is admin
if (is_admin()) {
// load plugin settings
require_once(dirname( __FILE__ ) . "/admin.php");
$this->a_obj_Admin = new MCI_Footnotes_Admin();
}
// load plugin widget // load plugin widget
require_once(dirname( __FILE__ ) . "/widget.php"); require_once(dirname( __FILE__ ) . "/widget.php");
// register footnotes widget // register footnotes widget
@ -52,6 +46,15 @@ class MCI_Footnotes {
$this->a_obj_Task->Register(); $this->a_obj_Task->Register();
} }
/**
* draw the dashboard setting
*/
public function generateLayout() {
// load plugin settings
require_once(dirname( __FILE__ ) . "/admin.php");
$this->a_obj_Admin = new MCI_Footnotes_Admin();
}
/** /**
* activates the plugin * activates the plugin
* @since 1.0 * @since 1.0

View file

@ -340,9 +340,9 @@ class MCI_Footnotes_Task {
// get all footnotes that I haven't passed yet // get all footnotes that I haven't passed yet
for ($l_str_CheckIndex = $l_str_FirstFootnoteIndex; $l_str_CheckIndex < count(self::$a_arr_Footnotes); $l_str_CheckIndex++) { for ($l_str_CheckIndex = $l_str_FirstFootnoteIndex; $l_str_CheckIndex < count(self::$a_arr_Footnotes); $l_str_CheckIndex++) {
// check if a further footnote is the same as the actual one // check if a further footnote is the same as the actual one
if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_str_CheckIndex] && !empty($g_arr_Footnotes[$l_str_CheckIndex])) { if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_str_CheckIndex]) {
// set the further footnote as empty so it won't be displayed later // set the further footnote as empty so it won't be displayed later
$g_arr_Footnotes[$l_str_CheckIndex] = ""; self::$a_arr_Footnotes[$l_str_CheckIndex] = "";
// add the footnote index to the actual index // add the footnote index to the actual index
$l_str_FootnoteIndex .= ", " . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), $l_str_CounterStyle); $l_str_FootnoteIndex .= ", " . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), $l_str_CounterStyle);
} }
@ -357,10 +357,10 @@ class MCI_Footnotes_Task {
$l_str_ReplaceText = str_replace("[[FOOTNOTE TEXT]]", $l_str_FootnoteText, $l_str_ReplaceText); $l_str_ReplaceText = str_replace("[[FOOTNOTE TEXT]]", $l_str_FootnoteText, $l_str_ReplaceText);
$l_str_ReplaceText = preg_replace('@[\s]{2,}@',' ',$l_str_ReplaceText); $l_str_ReplaceText = preg_replace('@[\s]{2,}@',' ',$l_str_ReplaceText);
// add the footnote container to the output // add the footnote container to the output
$l_str_Output = $l_str_Output . $l_str_ReplaceText; $l_str_Output .= $l_str_ReplaceText;
} }
// add closing tag for the div of the references container // add closing tag for the div of the references container
$l_str_Output = $l_str_Output . '</div>'; $l_str_Output .= '</div>';
// add a javascript to expand the reference container when clicking on a footnote or the reference label // add a javascript to expand the reference container when clicking on a footnote or the reference label
$l_str_Output .= ' $l_str_Output .= '
<script type="text/javascript"> <script type="text/javascript">

View file

@ -4,7 +4,7 @@
Plugin URI: http://wordpress.org/plugins/footnotes/ Plugin URI: http://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: ManFisher Medien ManuFaktur Author: ManFisher Medien ManuFaktur
Version: 1.3.3 Version: 1.3.4
Author URI: http://manfisher.net/plugins/footnotes/ Author URI: http://manfisher.net/plugins/footnotes/
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages
@ -52,6 +52,8 @@ global $g_obj_MCI_Footnotes;
if (empty($g_obj_MCI_Footnotes)) { if (empty($g_obj_MCI_Footnotes)) {
$g_obj_MCI_Footnotes = new MCI_Footnotes(); $g_obj_MCI_Footnotes = new MCI_Footnotes();
} }
// generate the settings page in the dashboard settings
$g_obj_MCI_Footnotes->generateLayout();
// register hook for activating the plugin // register hook for activating the plugin
register_activation_hook(__FILE__, array('MCI_Footnotes', 'activate')); register_activation_hook(__FILE__, array('MCI_Footnotes', 'activate'));

View file

@ -6,7 +6,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tested up to: 3.9.2 Tested up to: 3.9.2
License: GPLv3 or later License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable Tag: 1.3.3 Stable Tag: 1.3.4
== Description == == Description ==
@ -66,6 +66,10 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho
== Changelog == == Changelog ==
= 1.3.4 =
- Bugfix: Settings access permission vor sub-sites
- Bugfix: Setting 'combine identical footnotes' working as it should
= 1.3.3 = = 1.3.3 =
- Update: Changed the Author name from a fictitious entity towards a real registered company - Update: Changed the Author name from a fictitious entity towards a real registered company
- Update: Changed the Author URI - Update: Changed the Author URI