PluginProbe
Easy Footnotes / 1.0.5
Easy Footnotes v1.0.5
trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.2 All 32 releases
← All changes | easy-footnotes.php +4 -31 1.0.71.0.5 View file →
@@ -2,15 +2,15 @@
2 2 /**
3 3 * Plugin Name: Easy Footnotes
4 4 * Plugin URI: http://jasonyingling.me/easy-footnotes-wordpress/
5 5 * Description: Easily add footnotes to your posts with a simple shortcode.
6 - * Version: 1.0.7
6 + * Version: 1.0.5
7 7 * Author: Jason Yingling
8 8 * Author URI: http://jasonyingling.me
9 9 * License: GPL2
10 10 */
11 11
12 - /* Copyright 2015 Jason Yingling (email : yingling017@gmail.com)
12 + /* Copyright 2014 Jason Yingling (email : yingling017@gmail.com)
13 13
14 14 This program is free software; you can redistribute it and/or modify
15 15 it under the terms of the GNU General Public License, version 2, as
16 16 published by the Free Software Foundation.
@@ -32,18 +32,11 @@
32 32 public $footnoteCount = 0;
33 33 public $prevPost;
34 34
35 35 public function __construct() {
36 - $footnoteSettings = array(
37 - 'footnoteLabel' => 'Footnotes',
38 - 'useLabel' => false,
39 - );
40 -
41 - add_option('easy_footnotes_options', $footnoteSettings);
42 36 add_shortcode( 'note', array($this, 'easy_footnote_shortcode') );
43 - add_filter('the_content', array($this, 'easy_footnote_after_content'), 20);
37 + add_filter('the_content', array($this, 'easy_footnote_after_content'), 999);
44 38 add_action('wp_enqueue_scripts', array($this, 'register_qtip_scripts'));
45 - add_action('admin_menu', array($this, 'easy_footnotes_admin_actions'));
46 39 }
47 40
48 41 public function register_qtip_scripts() {
49 42 wp_register_script( 'imagesloaded', plugins_url( '/assets/qtip/imagesloaded.pkgd.min.js' , __FILE__ ), null, false, true );
@@ -103,35 +96,15 @@
103 96 if (is_singular() && is_main_query()) {
104 97 $footnotesInsert = $this->footnotes;
105 98 global $footnoteCopy;
106 99
107 - $footnoteOptions = get_option('easy_footnotes_options');
108 - $useLabel = $footnoteOptions['useLabel'];
109 - $efLabel = $footnoteOptions['footnoteLabel'];
110 -
111 100 foreach ($footnotesInsert as $count => $footnote) {
112 101 $footnoteCopy .= '<li class="easy-footnote-single"><span id="easy-footnote-bottom-'.$count.'" class="easy-footnote-margin-adjust"></span>'.$footnote.'<a class="easy-footnote-to-top" href="#easy-footnote-'.$count.'"></a></li>';
113 102 }
114 - if (!empty($footnotesInsert)) {
115 - if ($useLabel === true) {
116 - $content .= '<div class="easy-footnote-title"><h4>'.$efLabel.'</h4></div><ol class="easy-footnotes-wrapper">'.$footnoteCopy.'</ol>';
117 - } else {
118 - $content .= '<ol class="easy-footnotes-wrapper">'.$footnoteCopy.'</ol>';
119 - }
120 - }
121 103
122 -
104 + $content .= '<ol class="easy-footnotes-wrapper">'.$footnoteCopy.'</ol>';
123 105 }
124 106 return $content;
125 - }
126 -
127 - // Functions to create Reading Time admin pages
128 - public function easy_footnotes_admin() {
129 - include('easy-footnotes-admin.php');
130 - }
131 -
132 - public function easy_footnotes_admin_actions() {
133 - add_options_page("Easy Footnotes Settings", "Easy Footnotes", "manage_options", "easy-footnotes-settings", array($this, "easy_footnotes_admin"));
134 107 }
135 108
136 109 }
137 110