Prepare for release version 1.5.4
- Update: disable install button for other Plugins if Plugin is already installed git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@1003409 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
e054849b1e
commit
fdb748c86f
4 changed files with 21 additions and 7 deletions
|
@ -162,20 +162,34 @@ class MCI_Footnotes_Layout_Init {
|
|||
// convert the body to a json string
|
||||
$l_arr_Plugins = json_decode($l_str_Response, true);
|
||||
|
||||
$l_str_Server = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://" . $_SERVER["SERVER_NAME"];
|
||||
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "other-plugins");
|
||||
|
||||
printf('<div id="the-list">');
|
||||
// iterate through each Plugin
|
||||
foreach($l_arr_Plugins as $l_arr_PluginInfo) {
|
||||
// replace Plugin information
|
||||
$l_str_InstallButton = '<a class="install-now button" href="'.$l_str_Server.'/wp-admin/update.php?action=install-plugin&plugin='.$l_arr_PluginInfo["name"].'&_wpnonce=e7a5c90faf" aria-label="Install '.$l_arr_PluginInfo["title"].' now">'.__("Install now", MCI_Footnotes_Config::C_STR_PLUGIN_NAME).'</a>';
|
||||
$l_str_AlreadyInstalled = '<span class="button button-disabled" title="'.__("This Plugin is already installed and up to date.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME).'">'.__("Installed", MCI_Footnotes_Config::C_STR_PLUGIN_NAME).'</span>';
|
||||
$l_bool_isPluginInstalled = false;
|
||||
// iterate through each installed WordPress Plugin
|
||||
foreach (get_plugins() as $l_arr_Plugin) {
|
||||
if (strtolower($l_arr_PluginInfo["title"]) == strtolower($l_arr_Plugin["Name"])) {
|
||||
$l_bool_isPluginInstalled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// replace Plugin information
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
"server" => ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://" . $_SERVER["SERVER_NAME"],
|
||||
"server" => $l_str_Server,
|
||||
"plugin-name" => $l_arr_PluginInfo["name"],
|
||||
"plugin-title" => $l_arr_PluginInfo["title"],
|
||||
"plugin-icon" => "http://plugins.svn.wordpress.org/" . $l_arr_PluginInfo["name"] ."/assets/icon-256x256.png",
|
||||
"install-label" => __("Install now", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"plugin-icon" => strlen($l_arr_PluginInfo["img"]) > 0 ? "http://plugins.svn.wordpress.org/" . $l_arr_PluginInfo["name"] ."/assets/" . $l_arr_PluginInfo["img"] : "",
|
||||
|
||||
"install-link" => !$l_bool_isPluginInstalled ? $l_str_InstallButton : $l_str_AlreadyInstalled,
|
||||
"more-details-label" => __("More Details", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"last-updated-label" => __("Last Updated", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
)
|
||||
|
|
|
@ -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.5.3
|
||||
Version: 1.5.4
|
||||
Author URI: http://manfisher.net/plugins/footnotes/
|
||||
Text Domain: footnotes
|
||||
Domain Path: /languages
|
||||
|
|
|
@ -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.5.3
|
||||
Stable Tag: 1.5.4
|
||||
|
||||
== Description ==
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="action-links">
|
||||
<ul class="plugin-action-buttons">
|
||||
<li>
|
||||
<a class="install-now button" href="[[server]]/wp-admin/update.php?action=install-plugin&plugin=[[plugin-name]]&_wpnonce=e7a5c90faf" aria-label="Install [[plugin-title]] now">[[install-label]]</a>
|
||||
[[install-link]]
|
||||
</li>
|
||||
<li>
|
||||
<a href="[[server]]/wp-admin/plugin-install.php?tab=plugin-information&plugin=[[plugin-name]]&TB_iframe=true&width=600&height=550" class="thickbox" aria-label="More information about [[plugin-title]]" data-title="[[plugin-title]]">[[more-details-label]]</a>
|
||||
|
|
Reference in a new issue