Prepare for release version 1.4.0

- Update: Changed e-Mail support address to the WordPress support forum
- Update: Language EN and DE
- Add: Tab for Plugin Diagnostics
- Add: Donate link to the installed Plugin overview page
- Add: Donate button to the "HowTo" tab

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@983360 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-09-07 01:48:33 +00:00
parent 77dc194a51
commit 1f5e0ed500
11 changed files with 290 additions and 33 deletions

View file

@ -63,6 +63,9 @@ class MCI_Footnotes_Admin {
// load tab 'how to'
require_once(dirname( __FILE__ ) . "/tab_howto.php");
new MCI_Footnotes_Tab_HowTo($this->a_arr_SettingsTabs);
// load tab 'diagnostics'
require_once(dirname( __FILE__ ) . "/tab_diagnostics.php");
new MCI_Footnotes_Tab_Diagnostics($this->a_arr_SettingsTabs);
}
/**
@ -116,7 +119,7 @@ class MCI_Footnotes_Admin {
do_settings_sections(self::$a_str_ActiveTab);
do_meta_boxes(self::$a_str_ActiveTab, 'main', NULL);
// adds a submit button to the current page
if (self::$a_str_ActiveTab != FOOTNOTES_SETTINGS_TAB_HOWTO) {
if (self::$a_str_ActiveTab != FOOTNOTES_SETTINGS_TAB_HOWTO && self::$a_str_ActiveTab != FOOTNOTES_SETTINGS_TAB_DIAGNOSTICS) {
submit_button();
}
echo '</form>';

119
classes/tab_diagnostics.php Normal file
View file

@ -0,0 +1,119 @@
<?php
/**
* Created by Stefan Herndler.
* User: Stefan
* Date: 07.09.14 02:53
* Since: 1.4.0
*/
// define class only once
if (!class_exists("MCI_Footnotes_Tab_Diagnostics")) :
/**
* Class MCI_Footnotes_Tab_Diagnostics
* @since 1.4.0
*/
class MCI_Footnotes_Tab_Diagnostics extends MCI_Footnotes_Admin {
/**
* register the meta boxes for the tab
* @constructor
* @since 1.4.0
* @param array $p_arr_Tabs
*/
public function __construct(&$p_arr_Tabs) {
// add tab to the tab array
$p_arr_Tabs[FOOTNOTES_SETTINGS_TAB_DIAGNOSTICS] = __("Diagnostics", FOOTNOTES_PLUGIN_NAME);
// register settings tab
add_settings_section(
"MCI_Footnotes_Settings_Section_Diagnostics",
"&nbsp;",
array($this, 'Description'),
FOOTNOTES_SETTINGS_TAB_DIAGNOSTICS
);
// help
add_meta_box(
'MCI_Footnotes_Tab_Diagnostics_Display',
__("Displays information about the web server, PHP and WordPress.", FOOTNOTES_PLUGIN_NAME),
array($this, 'Display'),
FOOTNOTES_SETTINGS_TAB_DIAGNOSTICS,
'main'
);
}
/**
* output a description for the tab
* @since 1.4.0
*/
public function Description() {
// unused
}
/**
* outputs the diagnostics
* @since 1.4.0
*/
public function Display() {
global $wp_version;
echo '<table style="width: 100%;">';
echo '<tbody>';
// website
echo '<tr>';
echo '<td style="vertical-align:top; width: 20%;">' . $this->Highlight(__('Server name', FOOTNOTES_PLUGIN_NAME)) . '</td>';
echo '<td>' . $_SERVER["SERVER_NAME"] . '</td>';
echo '</tr>';
// PHP version
echo '<tr>';
echo '<td>' . $this->Highlight(__('PHP version', FOOTNOTES_PLUGIN_NAME)) . '</td>';
echo '<td>' . phpversion() . '</td>';
echo '</tr>';
// max. execution time
echo '<tr>';
echo '<td>' . $this->Highlight(__('Max execution time', FOOTNOTES_PLUGIN_NAME)) . '</td>';
echo '<td>' . ini_get('max_execution_time') . ' ' . __('seconds', FOOTNOTES_PLUGIN_NAME) . '</td>';
echo '</tr>';
// memory limit
echo '<tr>';
echo '<td>' . $this->Highlight(__('Memory limit', FOOTNOTES_PLUGIN_NAME)) . '</td>';
echo '<td>' . ini_get('memory_limit') . '</td>';
echo '</tr>';
// PHP extensions
echo '<tr>';
echo '<td>' . $this->Highlight(__('PHP extensions', FOOTNOTES_PLUGIN_NAME)) . '</td>';
echo '<td>';
foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) {
if ($l_int_Index > 0) {
echo ' | ';
}
echo $l_str_Extension . ' ' . phpversion($l_str_Extension);
}
echo '</td>';
echo '</tr>';
// WordPress version
echo '<tr>';
echo '<td>' . $this->Highlight(__('WordPress version', FOOTNOTES_PLUGIN_NAME)) . '</td>';
echo '<td>' . $wp_version . '</td>';
echo '</tr>';
// WordPress Plugins installed
foreach (get_plugins() as $l_arr_Plugin) {
echo '<tr>';
echo '<td>' . $this->Highlight($l_arr_Plugin["Name"]) . '</td>';
echo '<td>' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . '</td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
}
} // class MCI_Footnotes_Tab_Diagnostics
endif;

View file

@ -41,6 +41,14 @@ class MCI_Footnotes_Tab_HowTo extends MCI_Footnotes_Admin {
FOOTNOTES_SETTINGS_TAB_HOWTO,
'main'
);
// donate
add_meta_box(
'MCI_Footnotes_Tab_HowTo_Donate',
__("Help us to improve our Plugin.", FOOTNOTES_PLUGIN_NAME),
array($this, 'Donate'),
FOOTNOTES_SETTINGS_TAB_HOWTO,
'main'
);
}
/**
@ -91,12 +99,21 @@ class MCI_Footnotes_Tab_HowTo extends MCI_Footnotes_Admin {
</p>
</div>
<p>
<?php echo sprintf(__("If you have any questions, please don't hesitate to %se-mail%s us.", FOOTNOTES_PLUGIN_NAME), '<a href="mailto:mci@cheret.co.uk" class="footnote_plugin">', '</a>'); ?>
<?php echo sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", FOOTNOTES_PLUGIN_NAME), '<a href="http://wordpress.org/support/plugin/footnotes" target="_blank" class="footnote_plugin">', '</a>'); ?>
</p>
</div>
</div>
<?php
}
/**
* outputs the diagnostics
* @since 1.4.0
*/
public function Donate() {
$l_str_Url = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6Z6CZDW8PPBBJ";
echo '<input type="button" class="button button-primary" value="'.__('Donate now',FOOTNOTES_PLUGIN_NAME).'" onclick="window.open(\''.$l_str_Url.'\');" />';
}
} // class MCI_Footnotes_Tab_HowTo
endif;

View file

@ -36,7 +36,7 @@ define("FOOTNOTES_SETTINGS_PAGE_ID", "footnotes"); // plugins setting page inter
define("FOOTNOTES_SETTINGS_TAB_GENERAL", "footnotes_general_settings"); // internal label for the plugins general settings tab
define("FOOTNOTES_SETTINGS_TAB_CUSTOM", "footnotes_custom_settings"); // internal label for the plugins custom settings tab
define("FOOTNOTES_SETTINGS_TAB_HOWTO", "footnotes_howto_settings"); // internal label for the plugins how to tab
define("FOOTNOTES_SETTINGS_TAB_DIAGNOSTICS", "footnotes_diagnostics_settings"); // internal label for the plugins diagnostics tab
// PLUGIN SETTINGS INPUT FIELDS
define("FOOTNOTES_INPUT_COMBINE_IDENTICAL", "footnote_inputfield_combine_identical"); // id of input field for the combine identical setting

View file

@ -21,13 +21,16 @@ add_filter("plugin_action_links_{$l_str_plugin_file}", 'MCI_Footnotes_PluginLink
*/
function MCI_Footnotes_PluginLinks($p_arr_Links, $p_str_File) {
// add link to the footnotes plugin settings page
$l_str_SettingsLink = '<a href="' . admin_url('options-general.php?page=' . FOOTNOTES_SETTINGS_PAGE_ID) . '">' . __('Settings', FOOTNOTES_PLUGIN_NAME) . '</a>';
$l_str_Settings = '<a href="' . admin_url('options-general.php?page=' . FOOTNOTES_SETTINGS_PAGE_ID) . '">' . __('Settings', FOOTNOTES_PLUGIN_NAME) . '</a>';
// add link to the footnotes plugin support page on wordpress.org
$l_str_SupportLink = '<a href="http://wordpress.org/support/plugin/footnotes" target="_blank">' . __('Support', FOOTNOTES_PLUGIN_NAME) . '</a>';
$l_str_Support = '<a href="http://wordpress.org/support/plugin/footnotes" target="_blank">' . __('Support', FOOTNOTES_PLUGIN_NAME) . '</a>';
// add link to Donate
$l_str_Donate = '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6Z6CZDW8PPBBJ" target="_blank">' . __('Donate', FOOTNOTES_PLUGIN_NAME) . '</a>';
// add defined links to the plugin main page
$p_arr_Links[] = $l_str_SupportLink;
$p_arr_Links[] = $l_str_SettingsLink;
$p_arr_Links[] = $l_str_Support;
$p_arr_Links[] = $l_str_Settings;
$p_arr_Links[] = $l_str_Donate;
// return new links
return $p_arr_Links;

View file

@ -4,7 +4,7 @@
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.
Author: ManFisher Medien ManuFaktur
Version: 1.3.4
Version: 1.4.0
Author URI: http://manfisher.net/plugins/footnotes/
Text Domain: footnotes
Domain Path: /languages

Binary file not shown.

View file

@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: footnotes\n"
"POT-Creation-Date: 2014-08-21 10:29+0100\n"
"PO-Revision-Date: 2014-08-21 10:35+0100\n"
"POT-Creation-Date: 2014-09-07 03:43+0100\n"
"PO-Revision-Date: 2014-09-07 03:46+0100\n"
"Last-Translator: Stefan Herndler <s.herndler@methis.at>\n"
"Language-Team: SHE <s.herndler@methis.at>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.6\n"
"X-Generator: Poedit 1.6.5\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
@ -18,11 +18,11 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SearchPath-0: .\n"
#: classes/footnotes.php:79
#: classes/footnotes.php:82
msgid "You must be logged in to run this script."
msgstr "Sie müssen angemeldet sein um diese Funktion ausführen zu können."
#: classes/footnotes.php:84
#: classes/footnotes.php:87
msgid "You do not have permission to run this script."
msgstr "Sie haben nicht die Berechtigung diese Funktion auszuführen."
@ -93,6 +93,42 @@ msgstr "Einzelnachweiß - Symbol für den Link"
msgid "reference container footnotes text"
msgstr "Einzelnachweis - Fußnote"
#: classes/tab_diagnostics.php:27
msgid "Diagnostics"
msgstr "Diagnose"
#: classes/tab_diagnostics.php:38
msgid "Displays information about the web server, PHP and WordPress."
msgstr "Ausgabe von Informationen bezgl. des Webservers, PHP und WordPress."
#: classes/tab_diagnostics.php:65
msgid "Server name"
msgstr "Servername"
#: classes/tab_diagnostics.php:71
msgid "PHP version"
msgstr "PHP Version"
#: classes/tab_diagnostics.php:77
msgid "Max execution time"
msgstr "max. Ausführungsdauer"
#: classes/tab_diagnostics.php:78
msgid "seconds"
msgstr "Sekunden"
#: classes/tab_diagnostics.php:83
msgid "Memory limit"
msgstr "Speicherlimitierung"
#: classes/tab_diagnostics.php:89
msgid "PHP extensions"
msgstr "PHP Erweiterungen"
#: classes/tab_diagnostics.php:102
msgid "WordPress version"
msgstr "WordPress Version"
#: classes/tab_general.php:28
msgid "General"
msgstr "Allgemein"
@ -237,26 +273,38 @@ msgstr "Hilfe"
msgid "Brief introduction in how to use the plugin"
msgstr "Kurze Anleitung für die Verwendung des Plugins."
#: classes/tab_howto.php:69
#: classes/tab_howto.php:47
msgid "Help us to improve our Plugin."
msgstr "Helfen Sie bei der weiteren Entwicklung des Plugins."
#: classes/tab_howto.php:77
msgid "example string"
msgstr "Beispieltext"
#: classes/tab_howto.php:74
#: classes/tab_howto.php:82
msgid "Start your footnote with the following shortcode:"
msgstr "Starten Sie eine Fußnote mit:"
#: classes/tab_howto.php:80
#: classes/tab_howto.php:88
msgid "...and end your footnote with this shortcode:"
msgstr "...und beenden Sie diese mit:"
#: classes/tab_howto.php:88
#: classes/tab_howto.php:96
msgid "will be displayed as:"
msgstr "wird dargestellt als:"
#: classes/tab_howto.php:94
#: classes/tab_howto.php:102
#, php-format
msgid "If you have any questions, please don't hesitate to %se-mail%s us."
msgstr "Bei Fragen können Sie uns gerne eine %se-Mail%s senden."
msgid ""
"For further information please check out our %ssupport forum%s on WordPress."
"org."
msgstr ""
"Für mehr Informationen besuchen Sie unser %sSupport Forum%s auf WordPress."
"org."
#: classes/tab_howto.php:115
msgid "Donate now"
msgstr "Jetzt spenden"
#: classes/widget.php:25 classes/widget.php:43
msgid ""
@ -274,6 +322,13 @@ msgstr "Einstellungen"
msgid "Support"
msgstr "Support"
#: includes/plugin-settings.php:28
msgid "Donate"
msgstr "Spenden"
#~ msgid "If you have any questions, please don't hesitate to %se-mail%s us."
#~ msgstr "Bei Fragen können Sie uns gerne eine %se-Mail%s senden."
#~ msgid "HowTo"
#~ msgstr "Hilfe"

Binary file not shown.

View file

@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: footnotes\n"
"POT-Creation-Date: 2014-08-21 10:24+0100\n"
"PO-Revision-Date: 2014-08-21 10:29+0100\n"
"POT-Creation-Date: 2014-09-07 03:43+0100\n"
"PO-Revision-Date: 2014-09-07 03:43+0100\n"
"Last-Translator: Stefan Herndler <s.herndler@methis.at>\n"
"Language-Team: SHE <s.herndler@methis.at>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.6\n"
"X-Generator: Poedit 1.6.5\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
@ -18,11 +18,11 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SearchPath-0: .\n"
#: classes/footnotes.php:79
#: classes/footnotes.php:82
msgid "You must be logged in to run this script."
msgstr "You must be logged in to run this script."
#: classes/footnotes.php:84
#: classes/footnotes.php:87
msgid "You do not have permission to run this script."
msgstr "You do not have permission to run this script."
@ -92,6 +92,42 @@ msgstr "reference container footnotes linked arrow"
msgid "reference container footnotes text"
msgstr "reference container footnotes text"
#: classes/tab_diagnostics.php:27
msgid "Diagnostics"
msgstr "Diagnostics"
#: classes/tab_diagnostics.php:38
msgid "Displays information about the web server, PHP and WordPress."
msgstr "Displays information about the web server, PHP and WordPress."
#: classes/tab_diagnostics.php:65
msgid "Server name"
msgstr "Server name"
#: classes/tab_diagnostics.php:71
msgid "PHP version"
msgstr "PHP version"
#: classes/tab_diagnostics.php:77
msgid "Max execution time"
msgstr "Max execution time"
#: classes/tab_diagnostics.php:78
msgid "seconds"
msgstr "seconds"
#: classes/tab_diagnostics.php:83
msgid "Memory limit"
msgstr "Memory limit"
#: classes/tab_diagnostics.php:89
msgid "PHP extensions"
msgstr "PHP extensions"
#: classes/tab_diagnostics.php:102
msgid "WordPress version"
msgstr "WordPress version"
#: classes/tab_general.php:28
msgid "General"
msgstr "General"
@ -236,26 +272,38 @@ msgstr "How to"
msgid "Brief introduction in how to use the plugin"
msgstr "Brief introduction in how to use the plugin"
#: classes/tab_howto.php:69
#: classes/tab_howto.php:47
msgid "Help us to improve our Plugin."
msgstr "Help us to improve our Plugin."
#: classes/tab_howto.php:77
msgid "example string"
msgstr "example string"
#: classes/tab_howto.php:74
#: classes/tab_howto.php:82
msgid "Start your footnote with the following shortcode:"
msgstr "Start your footnote with the following shortcode:"
#: classes/tab_howto.php:80
#: classes/tab_howto.php:88
msgid "...and end your footnote with this shortcode:"
msgstr "...and end your footnote with this shortcode:"
#: classes/tab_howto.php:88
#: classes/tab_howto.php:96
msgid "will be displayed as:"
msgstr "will be displayed as:"
#: classes/tab_howto.php:94
#: classes/tab_howto.php:102
#, php-format
msgid "If you have any questions, please don't hesitate to %se-mail%s us."
msgstr "If you have any questions, please don't hesitate to %se-mail%s us."
msgid ""
"For further information please check out our %ssupport forum%s on WordPress."
"org."
msgstr ""
"For further information please check out our %ssupport forum%s on WordPress."
"org."
#: classes/tab_howto.php:115
msgid "Donate now"
msgstr "Donate now"
#: classes/widget.php:25 classes/widget.php:43
msgid ""
@ -273,6 +321,13 @@ msgstr "Settings"
msgid "Support"
msgstr "Support"
#: includes/plugin-settings.php:28
msgid "Donate"
msgstr "Donate"
#~ msgid "If you have any questions, please don't hesitate to %se-mail%s us."
#~ msgstr "If you have any questions, please don't hesitate to %se-mail%s us."
#~ msgid "HowTo"
#~ msgstr "HowTo"

View file

@ -6,7 +6,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tested up to: 4.0
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable Tag: 1.3.4
Stable Tag: 1.4.0
== Description ==
@ -74,6 +74,11 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
= 1.4.0 =
- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File)
- Update: Changed e-Mail support address to the WordPress support forum
- Update: Language EN and DE
- Add: Tab for Plugin Diagnostics
- Add: Donate link to the installed Plugin overview page
- Add: Donate button to the "HowTo" tab
= 1.3.4 =
- Bugfix: Settings access permission vor sub-sites