Update to 1.0.1

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@917807 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-05-20 11:33:11 +00:00
parent e702a0dca7
commit af44ed127a
22 changed files with 1071 additions and 796 deletions

View file

@ -4,12 +4,11 @@
Plugin URI: http://www.herndler.org
Description: simple adding footnotes to your pages
Author: Mark Cheret, Stefan Herndler
Version: 1.0.0
Version: 1.1-alpha
Author URI: http://www.cheret.de
Text Domain: footnotes
Domain Path: /languages
*/
/*
Copyright 2014 Mark Cheret, Stefan Herndler (email : mark@cheret.de | admin@herndler.org)
@ -28,50 +27,63 @@
*/
/**
* User: she
* Date: 02.05.14
* Time: 16:22
* Created by Stefan Herndler.
* User: Stefan
* Date: 15.05.14
* Time: 16:21
* Version: 1.0
* Since: 1.0
*/
/* include all defines */
require_once(dirname(__FILE__) . "/constants.php");
/* require plugin global functions */
require_once(dirname(__FILE__) . "/functions.php");
/* include constants */
require_once( dirname( __FILE__ ) . "/includes/defines.php" );
/* include language functions */
require_once( dirname( __FILE__ ) . "/includes/language.php" );
/* include storage functions and global plugin functions */
require_once( dirname( __FILE__ ) . "/includes/plugin-settings.php" );
/* include script and stylesheet functions */
require_once( dirname( __FILE__ ) . "/includes/scripts.php" );
/* include script and stylesheet functions */
require_once( dirname( __FILE__ ) . "/includes/replacer.php" );
/* calls the wordpress filter function to replace content before displayed on public pages */
add_filter('the_content', 'footnotes_replace_public_placeholders');
add_filter('the_excerpt', 'footnotes_replace_public_placeholders');
/* calls the wordpress filter function to replace page content before displayed on public pages */
add_filter( 'the_content', 'footnotes_startReplacing' );
add_filter( 'the_excerpt', 'footnotes_DummyReplacing' );
add_filter('widget_title', 'footnotes_replace_public_placeholders', 11);
add_filter('widget_text', 'footnotes_replace_public_placeholders', 99 );
/* calls the wordpress filter function to replace widget text before displayed on public pages */
add_filter( 'widget_title', 'footnotes_DummyReplacing' );
add_filter( 'widget_text', 'footnotes_DummyReplacing' );
/* calls the wordpress action to display the footer */
add_action( 'get_footer', 'footnotes_StopReplacing' );
/* adds javascript and stylesheets to the public page */
add_action('wp_enqueue_scripts', 'footnotes_public_page_scripts');
add_action( 'wp_enqueue_scripts', 'footnotes_add_public_stylesheet' );
/* only admin is allowed to execute the plugin settings */
if (!function_exists('is_admin')) {
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
if ( !function_exists( 'is_admin' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
/* require plugin class */
require_once(dirname(__FILE__) . "/plugin.class.php");
require_once( dirname( __FILE__ ) . "/classes/footnote.php" );
/* require plugin settings class */
require_once(dirname(__FILE__) . "/settings.class.php");
require_once( dirname( __FILE__ ) . "/classes/footnote_settings.php" );
/* action to locate language and load the wordpress-specific language file */
add_action('plugins_loaded', 'footnotes_load_language');
add_action( 'plugins_loaded', 'footnotes_load_language' );
/* add link to the settings page in plugin main page */
$l_str_plugin_file = FOOTNOTES_PLUGIN_DIR_NAME . '/index.php';
add_filter("plugin_action_links_{$l_str_plugin_file}", 'footnotes_plugin_settings_link', 10, 2);
add_filter( "plugin_action_links_{$l_str_plugin_file}", 'footnotes_plugin_settings_link', 10, 2 );
/* initialize an object of the plugin class */
global $g_obj_FootnotesPlugin;
/* if object isn't initialized yet, initialize it now */
if (empty($g_obj_FootnotesPlugin)) {
$g_obj_FootnotesPlugin = new footnotes_class_plugin();
if ( empty( $g_obj_FootnotesPlugin ) ) {
$g_obj_FootnotesPlugin = new Class_Footnotes();
}