restore file
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2328080 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
1cb34d3856
commit
a8cfa83ca3
8 changed files with 72 additions and 30 deletions
|
@ -146,7 +146,7 @@ class MCI_Footnotes_Layout_Init {
|
|||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher");
|
||||
echo $l_obj_Template->getContent();
|
||||
|
||||
printf('<em>visit <a href="http://cheret.de" target="_blank">Mark Cheret</a> or <a href="http://herndler.org" target="_blank">herndler.org</a></em>');
|
||||
printf('<em>visit <a href="http://manfisher.net/" target="_blank">ManFisher Medien ManuFaktur</a> or <a href="http://herndler.org" target="_blank">herndler.org</a></em>');
|
||||
printf("<br/><br/>");
|
||||
printf("<h3>%s</h3>", __('Take a look on other Plugins we have developed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
|
||||
|
||||
|
|
|
@ -32,23 +32,24 @@ class MCI_Footnotes {
|
|||
* @since 1.5.0
|
||||
*/
|
||||
public function run() {
|
||||
// register language
|
||||
// register language
|
||||
MCI_Footnotes_Language::registerHooks();
|
||||
// register Button hooks
|
||||
MCI_Footnotes_WYSIWYG::registerHooks();
|
||||
// register general hooks
|
||||
MCI_Footnotes_Hooks::registerHooks();
|
||||
// register all Widgets of the Plugin.
|
||||
$this->initializeWidgets();
|
||||
|
||||
// initialize the Plugin Dashboard
|
||||
$this->initializeDashboard();
|
||||
// initialize the Plugin Task
|
||||
$this->initializeTask();
|
||||
|
||||
|
||||
// Register all Public Stylesheets and Scripts
|
||||
add_action('init', array($this, 'registerPublic'));
|
||||
// Enqueue all Public Stylesheets and Scripts
|
||||
add_action('wp_enqueue_scripts', array($this, 'registerPublic'));
|
||||
// Register all Widgets of the Plugin.
|
||||
add_action('widgets_init', array($this, 'initializeWidgets'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,8 +58,8 @@ class MCI_Footnotes {
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*/
|
||||
private function initializeWidgets() {
|
||||
add_action('widgets_init', create_function('', 'return register_widget("MCI_Footnotes_Widget_ReferenceContainer");'));
|
||||
public function initializeWidgets() {
|
||||
register_widget("MCI_Footnotes_Widget_ReferenceContainer");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,4 +95,4 @@ class MCI_Footnotes {
|
|||
wp_enqueue_script('jquery');
|
||||
wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,4 +89,4 @@
|
|||
vertical-align: top;
|
||||
width: 99%;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,4 +17,4 @@ the currently used one should be one of those templates and pre-defined styles o
|
|||
== TODO ==
|
||||
- Statistics: How many Footnotes in each post/page
|
||||
- Convert from other Footnote Plugins (e.g. ' ((' from Civil Footnotes)
|
||||
- Anonymous stats to the developers
|
||||
- Anonymous stats to the developers
|
|
@ -1,29 +1,29 @@
|
|||
<?php
|
||||
/*
|
||||
Plugin Name: 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.
|
||||
Plugin Name: 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.
|
||||
Author: Mark Cheret
|
||||
Version: 1.6.5
|
||||
Version: 1.6.4
|
||||
Author URI: http://cheret.de/plugins/footnotes-2/
|
||||
Text Domain: footnotes
|
||||
Domain Path: /languages
|
||||
Text Domain: footnotes
|
||||
Domain Path: /languages
|
||||
*/
|
||||
/*
|
||||
Copyright 2019 Mark Cheret (email : mark@cheret.de)
|
||||
Copyright 2019 Mark Cheret (email : mark@cheret.de)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License, version 3, as
|
||||
published by the Free Software Foundation.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License, version 3, as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/**
|
||||
* @filesource
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Inserts the Footnotes short code.',
|
||||
author : 'Mark Cheret',
|
||||
authorurl : 'http://cheret.de',
|
||||
author : 'ManFisher Medien ManuFaktur',
|
||||
authorurl : 'http://http://manfisher.net/',
|
||||
infourl : 'http://wordpress.org/plugins/footnotes/',
|
||||
version : "1.5.0"
|
||||
};
|
||||
|
|
41
templates/dashboard/editor-button.html
Normal file
41
templates/dashboard/editor-button.html
Normal file
|
@ -0,0 +1,41 @@
|
|||
<script type="text/javascript">
|
||||
/**
|
||||
* adds a tag in at the beginning and at the end of a selected text in the specific text area
|
||||
* @param string elementID
|
||||
* @param string openTag
|
||||
* @param string closeTag
|
||||
*/
|
||||
function MCI_Footnotes_wrapText(elementID, openTag, closeTag) {
|
||||
var textArea = jQuery('#' + elementID);
|
||||
var len = textArea.val().length;
|
||||
var start = textArea[0].selectionStart;
|
||||
var end = textArea[0].selectionEnd;
|
||||
var selectedText = textArea.val().substring(start, end);
|
||||
var replacement = openTag + selectedText + closeTag;
|
||||
textArea.val(textArea.val().substring(0, start) + replacement + textArea.val().substring(end, len));
|
||||
}
|
||||
/**
|
||||
* adds a new button to the plain text editor
|
||||
*/
|
||||
QTags.addButton( 'MCI_Footnotes_QuickTag_button', 'footnotes', MCI_Footnotes_text_editor_callback );
|
||||
/**
|
||||
* callback function when the button is clicked
|
||||
* executes a ajax call to get the start and end tag for the footnotes and
|
||||
* adds them in before and after the selected text
|
||||
*/
|
||||
function MCI_Footnotes_text_editor_callback() {
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: '/wp-admin/admin-ajax.php',
|
||||
data: {
|
||||
action: 'footnotes_getTags'
|
||||
},
|
||||
success: function(data, textStatus, XMLHttpRequest){
|
||||
var l_arr_Tags = JSON.parse(data);
|
||||
MCI_Footnotes_wrapText("content", l_arr_Tags['start'], l_arr_Tags['end']);
|
||||
},
|
||||
error: function(MLHttpRequest, textStatus, errorThrown){
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
|
@ -9,4 +9,4 @@
|
|||
relative: true,
|
||||
offset: [[[offset-y]], [[offset-x]]]
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
Reference in a new issue