- Add: List with Features
- Add: Hyperlink to manfisher.eu in the "other plugins" page - Bugfix: Load text domain - Bugfix: Display the Footnotes button in the plain text editor of posts/pages git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@997524 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
5a6cf06525
commit
14cda8a316
7 changed files with 70 additions and 17 deletions
|
@ -141,6 +141,23 @@ class MCI_Footnotes_Layout_Init {
|
|||
* @since 1.5.0
|
||||
*/
|
||||
public function displayOtherPlugins() {
|
||||
printf("<br/>");
|
||||
printf("<h3>%s</h3>", __('Take a look on other Plugins we have developed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
|
||||
printf('<em><a href="http://manfisher.net/" target="_blank">visit ManFisher Medien ManuFaktur</a></em>');
|
||||
printf("<br/><br/>");
|
||||
/*
|
||||
// collect plugin list as JSON
|
||||
$l_arr_Response = wp_remote_get("http://herndler.org/wordpress/plugins/get.json");
|
||||
// check if response is valid
|
||||
if (is_wp_error($l_arr_Response)) {
|
||||
printf(__("Error loading other WordPress Plugins from Manfisher. Sorry!", MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
|
||||
return;
|
||||
}
|
||||
// get the body of the response
|
||||
$l_str_Response = $l_arr_Response["body"];
|
||||
// convert the body to a json string
|
||||
$l_arr_Plugins = json_decode($l_str_Response, true);
|
||||
*/
|
||||
$l_arr_Plugins = array(
|
||||
array("name" => "identity", "title" => "Identity"),
|
||||
array("name" => "google-keyword-suggest", "title" => "Google Keyword Suggest"),
|
||||
|
@ -151,9 +168,7 @@ class MCI_Footnotes_Layout_Init {
|
|||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "other-plugins");
|
||||
|
||||
echo sprintf("<br/><h3>%s</h3><br/>", __('Take a look on other Plugins we have developed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
|
||||
|
||||
echo '<div id="the-list">';
|
||||
printf('<div id="the-list">');
|
||||
// iterate through each Plugin
|
||||
foreach($l_arr_Plugins as $l_arr_PluginInfo) {
|
||||
// replace Plugin information
|
||||
|
@ -168,7 +183,7 @@ class MCI_Footnotes_Layout_Init {
|
|||
// reload template
|
||||
$l_obj_Template->reload();
|
||||
}
|
||||
echo '</div>';
|
||||
printf('</div>');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,19 +30,29 @@ class MCI_Footnotes_Language {
|
|||
* @since 1.5.0
|
||||
*/
|
||||
public static function loadTextDomain() {
|
||||
$l_str_LanguagePath = dirname(__FILE__) . "/../languages/" . MCI_Footnotes_Config::C_STR_PLUGIN_NAME - "-";
|
||||
// language file with localization exists
|
||||
$l_bool_DomainLoaded = load_textdomain(MCI_Footnotes_Config::C_STR_PLUGIN_NAME, $l_str_LanguagePath . apply_filters('plugin_locale', get_locale(), MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . '.mo');
|
||||
if (!empty($l_bool_DomainLoaded)) {
|
||||
if (self::load(apply_filters('plugin_locale', get_locale()))) {
|
||||
return;
|
||||
}
|
||||
// language file without localization exists
|
||||
$l_bool_DomainLoaded = load_textdomain(MCI_Footnotes_Config::C_STR_PLUGIN_NAME, $l_str_LanguagePath . self::getLanguageCode() . '.mo');
|
||||
if (!empty($l_bool_DomainLoaded)) {
|
||||
if (self::load(self::getLanguageCode())) {
|
||||
return;
|
||||
}
|
||||
// fallback to english
|
||||
load_textdomain(MCI_Footnotes_Config::C_STR_PLUGIN_NAME, $l_str_LanguagePath . '-en.mo');
|
||||
self::load("en");
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a specific text domain.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.1
|
||||
* @param string $p_str_LanguageCode Language Code to load a specific text domain.
|
||||
* @return bool
|
||||
*/
|
||||
private static function load($p_str_LanguageCode) {
|
||||
return load_textdomain(MCI_Footnotes_Config::C_STR_PLUGIN_NAME,
|
||||
dirname(__FILE__) . "/../languages/" . MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_LanguageCode . '.mo');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,7 +64,7 @@ class MCI_Footnotes_Language {
|
|||
*/
|
||||
private static function getLanguageCode() {
|
||||
// read current WordPress language
|
||||
$l_str_locale = apply_filters('plugin_locale', get_locale(), MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
$l_str_locale = apply_filters('plugin_locale', get_locale());
|
||||
// check if WordPress language has a localization (e.g. "en_US" or "de_AT")
|
||||
if (strpos($l_str_locale, "_") !== false) {
|
||||
// remove localization code
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
* @since 1.5.0 14.09.14 17:30
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class MCI_Footnotes_WYSIWYG {
|
||||
|
||||
public static function registerHooks() {
|
||||
|
@ -41,7 +46,7 @@ class MCI_Footnotes_WYSIWYG {
|
|||
*/
|
||||
public static function newPlainTextEditorButton() {
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "editor-button");
|
||||
$l_obj_Template->getContent();
|
||||
echo $l_obj_Template->getContent();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
22
features.txt
Normal file
22
features.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
|
||||
== List of other Plugins ==
|
||||
- Add downloads (real time from WordPress API)
|
||||
- Add image (from JSON string)
|
||||
- Add rating (display the stars)
|
||||
- Add "Compatible up to" WordPress Version
|
||||
- Add last updated timestamp
|
||||
|
||||
|
||||
== Diagnostics ==
|
||||
- Add current WordPress Theme (Name, Version, Author, Url)
|
||||
|
||||
|
||||
== Footnotes ==
|
||||
- Add public css file to the "How to" tab
|
||||
- Add setting to customize the mouse-over box
|
||||
- Add setting to disable the mouse-over box
|
||||
- Display the mouse-over box to the left if near the right margin
|
||||
- Abbreviate the mouse-over text if more than XXX characters (ending with "...")
|
||||
- Performance of the task so PHP won't throw an error when there are more than 120? Footnotes
|
||||
- Maybe increase PHP max execution time while processing the Footnotes task
|
|
@ -29,7 +29,6 @@
|
|||
success: function(data, textStatus, XMLHttpRequest){
|
||||
var l_arr_Tags = JSON.parse(data);
|
||||
var return_text = l_arr_Tags['start'] + ed.selection.getContent() + l_arr_Tags['end'];
|
||||
console.log(return_text);
|
||||
ed.execCommand('insertHTML', true, return_text);
|
||||
},
|
||||
error: function(MLHttpRequest, textStatus, errorThrown){
|
||||
|
|
|
@ -73,11 +73,14 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
== Changelog ==
|
||||
|
||||
= 1.5.0 =
|
||||
- Update: Refactored the whole source code
|
||||
- Add: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins"
|
||||
- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics"
|
||||
- Add: Sub Page to list all other Plugins of the Contributors
|
||||
- Add: Hyperlink to manfisher.eu in the "other plugins" page
|
||||
- Update: Refactored the whole source code
|
||||
- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics"
|
||||
- Bugfix: Line up Footnotes with multiple lines in the Reference container
|
||||
- Bugfix: Load text domain
|
||||
- Bugfix: Display the Footnotes button in the plain text editor of posts/pages
|
||||
|
||||
= 1.4.0 =
|
||||
- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File)
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
type: 'POST',
|
||||
url: '/wp-admin/admin-ajax.php',
|
||||
data: {
|
||||
action: 'footnotes_getTags',
|
||||
data: ''
|
||||
action: 'footnotes_getTags'
|
||||
},
|
||||
success: function(data, textStatus, XMLHttpRequest){
|
||||
var l_arr_Tags = JSON.parse(data);
|
||||
|
|
Reference in a new issue