diff --git a/blog/wp-content/.DS_Store b/blog/wp-content/.DS_Store new file mode 100644 index 0000000..ac2a5cb Binary files /dev/null and b/blog/wp-content/.DS_Store differ diff --git a/blog/wp-content/plugins/.DS_Store b/blog/wp-content/plugins/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/blog/wp-content/plugins/.DS_Store differ diff --git a/blog/wp-content/plugins/custom-post-template/custom-post-templates.php b/blog/wp-content/plugins/custom-post-template/custom-post-templates.php deleted file mode 100644 index 0c804ac..0000000 --- a/blog/wp-content/plugins/custom-post-template/custom-post-templates.php +++ /dev/null @@ -1,147 +0,0 @@ -tpl_meta_key = 'custom_post_template'; - // Init hooks and all that - $this->register_plugin ( 'post-templates', __FILE__ ); - $this->add_meta_box( 'select_post_template', __('Post Template'), 'select_post_template', 'post', 'side', 'default' ); - $this->add_action( 'save_post' ); - $this->add_filter( 'single_template', 'filter_single_template' ); - } - - /* - * FILTERS & ACTIONS - * ******************* - */ - - public function select_post_template( $post ) - { - $this->post_ID = $post->ID; - - $template_vars = array(); - $template_vars[ 'templates' ] = $this->get_post_templates(); - $template_vars[ 'custom_template' ] = $this->get_custom_post_template(); - - // Render the template - $this->render_admin ( 'select_post_template', $template_vars ); - } - - public function save_post( $post_ID ) - { - $action_needed = (bool) @ $_POST[ 'custom_post_template_present' ]; - if ( ! $action_needed ) return; - - $this->post_ID = $post_ID; - - $template = (string) @ $_POST[ 'custom_post_template' ]; - $this->set_custom_post_template( $template ); - } - - public function filter_single_template( $template ) - { - global $wp_query; - - $this->post_ID = $wp_query->post->ID; - - $template_file = $this->get_custom_post_template(); - $custom_template = TEMPLATEPATH . "/" . $template_file; - // Check both the template file and the full path, otherwise you discover that the theme dir - // exists (which is not surprising) - if ( $template_file && file_exists( $custom_template ) ) return $custom_template; - - return $template; - } - - /* - * UTILITY METHODS - * ***************** - */ - - protected function set_custom_post_template( $template ) - { - delete_post_meta( $this->post_ID, $this->tpl_meta_key ); - if ( ! $template || $template == 'default' ) return; - - add_post_meta( $this->post_ID, $this->tpl_meta_key, $template ); - } - - protected function get_custom_post_template() - { - $custom_template = get_post_meta( $this->post_ID, $this->tpl_meta_key, true ); - return $custom_template; - } - - protected function get_post_templates() - { - $themes = get_themes(); - $theme = get_current_theme(); - $templates = $themes[ $theme ][ 'Template Files' ]; - - $page_templates = array(); - - if ( is_array( $templates ) ) { - foreach ( $templates as $template ) { - // Get the file data and collapse it into a single string - $template_data = implode( '', file( $template ) ); - if ( ! preg_match( '|Template Name Posts:(.*)$|mi', $template_data, $name ) ) - continue; - - $name = _cleanup_header_comment( $name[ 1 ] ); - - $page_templates[ trim( $name ) ] = basename( $template ); - } - } - - return $page_templates; - } -} - -/** - * Instantiate the plugin - * - * @global - **/ - -$CustomPostTemplates = new CustomPostTemplates(); - -?> \ No newline at end of file diff --git a/blog/wp-content/plugins/custom-post-template/plugin.php b/blog/wp-content/plugins/custom-post-template/plugin.php deleted file mode 100644 index 91efaac..0000000 --- a/blog/wp-content/plugins/custom-post-template/plugin.php +++ /dev/null @@ -1,676 +0,0 @@ -Display Rendering - * The class uses a similar technique to Ruby On Rails views, whereby the display HTML is kept - * in a separate directory and file from the main code. A display is 'rendered' (sent to the browser) - * or 'captured' (returned to the calling function). - * - * Template files are separated into two areas: admin and user. Admin templates are only for display in - * the WordPress admin interface, while user templates are typically for display on the site (although neither - * of these are enforced). All templates are PHP code, but are referred to without .php extension. - * - * The reason for this separation is that one golden rule of plugin creation is that someone will always want to change - * the formatting and style of your output. Rather than forcing them to modify the plugin (bad), or modify files within - * the plugin (equally bad), the class allows user templates to be overridden with files contained within the theme. - * - * An additional benefit is that it leads to code re-use, especially with regards to Ajax (i.e. your display code can be called from - * many locations) - * - * Template files are located within the 'view' subdirectory of the plugins base (specified when registering the plugin): - * - *
myplugin/view/admin - * myplugin/view/myplugin- * - * Admin templates are contained within 'admin', and user templates are contained within a directory of the same name as the plugin. - * - * User files can be overridden within the theme by creating a similar directory structure: - * - *
/themes/mytheme/view/myplugin- * - * The class will first look in the theme and then defaults to the plugin. A plugin should always provide default templates. - * - *
<p>You processed <?php echo $items ?> items</p>- * - * When you want to display this in your plugin you use: - * - *
$this->render_admin ('processed', array ('items' => 100));
- *
- * @package WordPress base library
- * @author John Godley
- * @copyright Copyright (C) John Godley
- **/
-
-class CustomPostTemplates_Plugin
-{
- /**
- * Plugin name
- * @var string
- **/
- var $plugin_name;
-
- /**
- * Plugin 'view' directory
- * @var string Directory
- **/
- var $plugin_base;
-
-
- /**
- * Register your plugin with a name and base directory. This must be called once.
- *
- * @param string $name Name of your plugin. Is used to determine the plugin locale domain
- * @param string $base Directory containing the plugin's 'view' files.
- * @return void
- **/
-
- function register_plugin ($name, $base)
- {
- $this->plugin_base = rtrim (dirname ($base), '/');
- $this->plugin_name = $name;
-
- $this->add_action ('init', 'load_locale');
- }
-
- function load_locale ()
- {
- // Here we manually fudge the plugin locale as WP doesnt allow many options
- $locale = get_locale ();
- if ( empty($locale) )
- $locale = 'en_US';
-
- $mofile = dirname (__FILE__)."/locale/$locale.mo";
- load_textdomain ($this->plugin_name, $mofile);
- }
-
-
- /**
- * Register a WordPress action and map it back to the calling object
- *
- * @param string $action Name of the action
- * @param string $function Function name (optional)
- * @param int $priority WordPress priority (optional)
- * @param int $accepted_args Number of arguments the function accepts (optional)
- * @return void
- **/
-
- function add_action ($action, $function = '', $priority = 10, $accepted_args = 1)
- {
- add_action ($action, array (&$this, $function == '' ? $action : $function), $priority, $accepted_args);
- }
-
-
- /**
- * Register a WordPress filter and map it back to the calling object
- *
- * @param string $action Name of the action
- * @param string $function Function name (optional)
- * @param int $priority WordPress priority (optional)
- * @param int $accepted_args Number of arguments the function accepts (optional)
- * @return void
- **/
-
- function add_filter ($filter, $function = '', $priority = 10, $accepted_args = 1)
- {
- add_filter ($filter, array (&$this, $function == '' ? $filter : $function), $priority, $accepted_args);
- }
-
-
- /**
- * Register a WordPress meta box
- *
- * @param string $id ID for the box, also used as a function name if none is given
- * @param string $title Title for the box
- * @param int $page WordPress priority (optional)
- * @param string $function Function name (optional)
- * @param string $context e.g. 'advanced' or 'core' (optional)
- * @param int $priority Priority, rough effect on the ordering (optional)
- * @return void
- **/
-
- function add_meta_box($id, $title, $function = '', $page, $context = 'advanced', $priority = 'default')
- {
- require_once( ABSPATH . 'wp-admin/includes/template.php' );
- add_meta_box( $id, $title, array( &$this, $function == '' ? $id : $function ), $page, $context, $priority );
- }
-
- /**
- * Special activation function that takes into account the plugin directory
- *
- * @param string $pluginfile The plugin file location (i.e. __FILE__)
- * @param string $function Optional function name, or default to 'activate'
- * @return void
- **/
-
- function register_activation ($pluginfile, $function = '')
- {
- add_action ('activate_'.basename (dirname ($pluginfile)).'/'.basename ($pluginfile), array (&$this, $function == '' ? 'activate' : $function));
- }
-
-
- /**
- * Special deactivation function that takes into account the plugin directory
- *
- * @param string $pluginfile The plugin file location (i.e. __FILE__)
- * @param string $function Optional function name, or default to 'deactivate'
- * @return void
- **/
-
- function register_deactivation ($pluginfile, $function = '')
- {
- add_action ('deactivate_'.basename (dirname ($pluginfile)).'/'.basename ($pluginfile), array (&$this, $function == '' ? 'deactivate' : $function));
- }
-
-
- /**
- * Renders an admin section of display code
- *
- * @param string $ug_name Name of the admin file (without extension)
- * @param string $array Array of variable name=>value that is available to the display code (optional)
- * @return void
- **/
-
- function render_admin ($ug_name, $ug_vars = array ())
- {
- global $plugin_base;
- foreach ($ug_vars AS $key => $val)
- $$key = $val;
-
- if (file_exists ("{$this->plugin_base}/view/admin/$ug_name.php"))
- include ("{$this->plugin_base}/view/admin/$ug_name.php");
- else
- echo "Rendering of admin template {$this->plugin_base}/view/admin/$ug_name.php failed
";
- }
-
-
- /**
- * Renders a section of user display code. The code is first checked for in the current theme display directory
- * before defaulting to the plugin
- *
- * @param string $ug_name Name of the admin file (without extension)
- * @param string $array Array of variable name=>value that is available to the display code (optional)
- * @return void
- **/
-
- function render ($ug_name, $ug_vars = array ())
- {
- foreach ($ug_vars AS $key => $val)
- $$key = $val;
-
- if (file_exists (TEMPLATEPATH."/view/{$this->plugin_name}/$ug_name.php"))
- include (TEMPLATEPATH."/view/{$this->plugin_name}/$ug_name.php");
- else if (file_exists ("{$this->plugin_base}/view/{$this->plugin_name}/$ug_name.php"))
- include ("{$this->plugin_base}/view/{$this->plugin_name}/$ug_name.php");
- else
- echo "Rendering of template $ug_name.php failed
";
- }
-
-
- /**
- * Renders a section of user display code. The code is first checked for in the current theme display directory
- * before defaulting to the plugin
- *
- * @param string $ug_name Name of the admin file (without extension)
- * @param string $array Array of variable name=>value that is available to the display code (optional)
- * @return void
- **/
-
- function capture ($ug_name, $ug_vars = array ())
- {
- ob_start ();
- $this->render ($ug_name, $ug_vars);
- $output = ob_get_contents ();
- ob_end_clean ();
- return $output;
- }
-
-
- /**
- * Captures an admin section of display code
- *
- * @param string $ug_name Name of the admin file (without extension)
- * @param string $array Array of variable name=>value that is available to the display code (optional)
- * @return string Captured code
- **/
-
- function capture_admin ($ug_name, $ug_vars = array ())
- {
- ob_start ();
- $this->render_admin ($ug_name, $ug_vars);
- $output = ob_get_contents ();
- ob_end_clean ();
- return $output;
- }
-
-
- /**
- * Display a standard error message (using CSS ID 'message' and classes 'fade' and 'error)
- *
- * @param string $message Message to display
- * @return void
- **/
-
- function render_error ($message)
- {
- ?>
-
-
-
-
-
-
-
- plugin_base;
- }
-
-
- /**
- * Get a URL to the plugin. Useful for specifying JS and CSS files
- *
- * For example,
- *
- * @return string URL
- **/
-
- function url ($url = '')
- {
- if ($url)
- return str_replace ('\\', urlencode ('\\'), str_replace ('&', '&', str_replace ('&', '&', $url)));
- else
- {
- $root = ABSPATH;
- if (defined ('WP_PLUGIN_DIR'))
- $root = WP_PLUGIN_DIR;
-
- $url = substr ($this->plugin_base, strlen ($this->realpath ($root)));
- if (DIRECTORY_SEPARATOR != '/')
- $url = str_replace (DIRECTORY_SEPARATOR, '/', $url);
-
- if (defined ('WP_PLUGIN_URL'))
- $url = WP_PLUGIN_URL.'/'.ltrim ($url, '/');
- else
- $url = get_bloginfo ('wpurl').'/'.ltrim ($url, '/');
-
- // Do an SSL check - only works on Apache
- global $is_IIS;
- if (isset ($_SERVER['HTTPS']) && !$is_IIS)
- $url = str_replace ('http://', 'https://', $url);
- }
- return $url;
- }
-
- /**
- * Performs a version update check using an RSS feed. The function ensures that the feed is only
- * hit once every given number of days, and the data is cached using the WordPress Magpie library
- *
- * @param string $url URL of the RSS feed
- * @param int $days Number of days before next check
- * @return string Text to display
- **/
-
- function version_update ($url, $days = 7)
- {
- if (!function_exists ('fetch_rss'))
- {
- if (!file_exists (ABSPATH.'wp-includes/rss.php'))
- return '';
- include (ABSPATH.'wp-includes/rss.php');
- }
-
- $now = time ();
-
- $checked = get_option ('plugin_urbangiraffe_rss');
-
- // Use built-in Magpie caching
- if (function_exists ('fetch_rss') && (!isset ($checked[$this->plugin_name]) || $now > $checked[$this->plugin_name] + ($days * 24 * 60 * 60)))
- {
- $rss = fetch_rss ($url);
- if (count ($rss->items) > 0)
- {
- foreach ($rss->items AS $pos => $item)
- {
- if (isset ($checked[$this->plugin_name]) && strtotime ($item['pubdate']) < $checked[$this->plugin_name])
- unset ($rss->items[$pos]);
- }
- }
-
- $checked[$this->plugin_name] = $now;
- update_option ('plugin_urbangiraffe_rss', $checked);
- return $rss;
- }
- }
-
-
- /**
- * Version of realpath that will work on systems without realpath
- *
- * @param string $path The path to canonicalize
- * @return string Canonicalized path
- **/
-
- function realpath ($path)
- {
- if (function_exists ('realpath'))
- return realpath ($path);
- else if (DIRECTORY_SEPARATOR == '/')
- {
- $path = preg_replace ('/^~/', $_SERVER['DOCUMENT_ROOT'], $path);
-
- // canonicalize
- $path = explode (DIRECTORY_SEPARATOR, $path);
- $newpath = array ();
- for ($i = 0; $i < sizeof ($path); $i++)
- {
- if ($path[$i] === '' || $path[$i] === '.')
- continue;
-
- if ($path[$i] === '..')
- {
- array_pop ($newpath);
- continue;
- }
-
- array_push ($newpath, $path[$i]);
- }
-
- $finalpath = DIRECTORY_SEPARATOR.implode (DIRECTORY_SEPARATOR, $newpath);
- return $finalpath;
- }
-
- return $path;
- }
-
-
- function checked ($item, $field = '')
- {
- if ($field && is_array ($item))
- {
- if (isset ($item[$field]) && $item[$field])
- echo ' checked="checked"';
- }
- else if (!empty ($item))
- echo ' checked="checked"';
- }
-
- function select ($items, $default = '')
- {
- if (count ($items) > 0)
- {
- foreach ($items AS $key => $value)
- {
- if (is_array ($value))
- {
- echo '';
- }
- else
- echo '';
- }
- }
- }
-}
-
-if (!function_exists ('pr'))
-{
- function pr ($thing)
- {
- echo '';
- print_r ($thing);
- echo '
';
- }
-}
-
-if (!class_exists ('Widget_SU'))
-{
- class Widget_SU
- {
- function Widget_SU ($name, $max = 1, $id = '', $args = '')
- {
- $this->name = $name;
- $this->id = $id;
- $this->widget_max = $max;
- $this->args = $args;
-
- if ($this->id == '')
- $this->id = strtolower (preg_replace ('/[^A-Za-z]/', '-', $this->name));
-
- $this->widget_available = 1;
- if ($this->widget_max > 1)
- {
- $this->widget_available = get_option ('widget_available_'.$this->id ());
- if ($this->widget_available === false)
- $this->widget_available = 1;
- }
-
- add_action ('init', array (&$this, 'initialize'));
- }
-
- function initialize ()
- {
- // Compatability functions for WP 2.1
- if (!function_exists ('wp_register_sidebar_widget'))
- {
- function wp_register_sidebar_widget ($id, $name, $output_callback, $classname = '')
- {
- register_sidebar_widget($name, $output_callback, $classname);
- }
- }
-
- if (!function_exists ('wp_register_widget_control'))
- {
- function wp_register_widget_control($name, $control_callback, $width = 300, $height = 200)
- {
- register_widget_control($name, $control_callback, $width, $height);
- }
- }
-
- if (function_exists ('wp_register_sidebar_widget'))
- {
- if ($this->widget_max > 1)
- {
- add_action ('sidebar_admin_setup', array (&$this, 'setup_save'));
- add_action ('sidebar_admin_page', array (&$this, 'setup_display'));
- }
-
- $this->load_widgets ();
- }
- }
-
- function load_widgets ()
- {
- for ($pos = 1; $pos <= $this->widget_max; $pos++)
- {
- wp_register_sidebar_widget ($this->id ($pos), $this->name ($pos), $pos <= $this->widget_available ? array (&$this, 'show_display') : '', $this->args (), $pos);
-
- if ($this->has_config ())
- wp_register_widget_control ($this->id ($pos), $this->name ($pos), $pos <= $this->widget_available ? array (&$this, 'show_config') : '', $this->args (), $pos);
- }
- }
-
- function args ()
- {
- if ($this->args)
- return $args;
- return array ('classname' => '');
- }
-
- function name ($pos)
- {
- if ($this->widget_available > 1)
- return $this->name.' ('.$pos.')';
- return $this->name;
- }
-
- function id ($pos = 0)
- {
- if ($pos == 0)
- return $this->id;
- return $this->id.'-'.$pos;
- }
-
- function show_display ($args, $number = 1)
- {
- $config = get_option ('widget_config_'.$this->id ($number));
- if ($config === false)
- $config = array ();
-
- $this->load ($config);
- $this->display ($args);
- }
-
- function show_config ($position)
- {
- if (isset ($_POST['widget_config_save_'.$this->id ($position)]))
- {
- $data = $_POST[$this->id ()];
- if (count ($data) > 0)
- {
- $newdata = array ();
- foreach ($data AS $item => $values)
- $newdata[$item] = $values[$position];
- $data = $newdata;
- }
-
- update_option ('widget_config_'.$this->id ($position), $this->save ($data));
- }
-
- $options = get_option ('widget_config_'.$this->id ($position));
- if ($options === false)
- $options = array ();
-
- $this->config ($options, $position);
- echo '';
- }
-
- function has_config () { return false; }
- function save ($data)
- {
- return array ();
- }
-
- function setup_save ()
- {
- if (isset ($_POST['widget_setup_save_'.$this->id ()]))
- {
- $this->widget_available = intval ($_POST['widget_setup_count_'.$this->id ()]);
- if ($this->widget_available < 1)
- $this->widget_available = 1;
- else if ($this->widget_available > $this->widget_max)
- $this->widget_available = $this->widget_max;
-
- update_option ('widget_available_'.$this->id (), $this->widget_available);
-
- $this->load_widgets ();
- }
- }
-
- function config_name ($field, $pos)
- {
- return $this->id ().'['.$field.']['.$pos.']';
- }
-
- function setup_display ()
- {
- ?>
-
-
-
-
\ No newline at end of file
diff --git a/blog/wp-content/plugins/custom-post-template/readme.txt b/blog/wp-content/plugins/custom-post-template/readme.txt
deleted file mode 100644
index 8a43d54..0000000
--- a/blog/wp-content/plugins/custom-post-template/readme.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-=== Custom Post Template ===
-Contributors: simonwheatley
-Donate link: http://www.simonwheatley.co.uk/wordpress/
-Tags: post, template, theme
-Requires at least: 2.9
-Tested up to: 2.9.1
-Stable tag: 1.1
-
-Provides a drop-down to select different templates for posts from the post edit screen. The templates replace single.php for the specified post.
-
-== Description ==
-
-**This plugin requires PHP5 (see Other Notes > PHP4 for more).**
-
-Provides a drop-down to select different templates for posts from the post edit screen. The templates are defined similarly to page templates, and will replace single.php for the specified post.
-
-Post templates, as far as this plugin is concerned, are configured similarly to [page templates](http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates) in that they have a particular style of PHP comment at the top of them. Each post template must contain the following, or similar, at the top:
-
-
-
-
-Note that *page* templates use "_Template Name:_", whereas *post* templates use "_Template Name Posts:_".
-
-Plugin initially produced on behalf of [Words & Pictures](http://www.wordsandpics.co.uk/).
-
-Is this plugin lacking a feature you want? I'm happy to discuss ideas, or to accept offers of feature sponsorship: [contact me](http://www.simonwheatley.co.uk/contact-me/) and we can have a chat.
-
-Any issues: [contact me](http://www.simonwheatley.co.uk/contact-me/).
-
-== Installation ==
-
-The plugin is simple to install:
-
-1. Download the plugin, it will arrive as a zip file
-1. Unzip it
-1. Upload `custom-post-template` directory to your WordPress Plugin directory
-1. Go to the plugin management page and enable the plugin
-1. Upload your post template files (see the Description for details on configuring these), and choose them through the new menu
-1. Give yourself a pat on the back
-
-== PHP4 ==
-
-Many of my plugin now require at least PHP5. I know that WordPress officially supports PHP4, but I don't. PHP4 is a mess and makes coding a lot less efficient, and when you're releasing stuff for free these things matter. PHP5 has been out for several years now and is fully production ready, as well as being naturally more secure and performant.
-
-If you're still running PHP4, I strongly suggest you talk to your hosting company about upgrading your servers. All reputable hosting companies should offer PHP5 as well as PHP4.
-
-Right, that's it. Grump over. ;)
-
-== Change Log ==
-
-= v1.1 2010/01/27 =
-
-* IDIOTFIX: Managed to revert to an old version somehow, this version should fix that.
-
-= v1 2010/01/15 (released 2010/01/26) =
-
-* BUGFIX: Theme templates now come with a complete filepath, so no need to add WP_CONTENT_DIR constant to the beginning.
-* ENHANCEMENT: Metabox now shows up on the side, under the publish box... where you'd expect.
-
-= v0.9b 2008/11/26 =
-
-* Plugin first released
-
-= v0.91b 2008/11/28 =
-
-* BUGFIX: The plugin was breaking posts using the "default" template, this is now fixed. Apologies for the inconvenience.
-* Tested up to WordPress 2.7-beta3-9922
-
-= v0.91b 2008/11/28 =
-
-* BUGFIX: The plugin was breaking posts using the "default" template, this is now fixed. Apologies for the inconvenience.
-* Tested up to WordPress 2.7-beta3-9922* Tested up to WordPress 2.7-beta3-9922
-
-= v0.92b 2008/12/04 =
-
-* Minor code tweaks
-* Blocked direct access to templates
-
-== Frequently Asked Questions ==
-
-= I get an error like this: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /web/wp-content/plugins/custom-post-template/custom-post-templates.php =
-
-This is because your server is running PHP4. Please see "Other Notes > PHP4" for more information.
\ No newline at end of file
diff --git a/blog/wp-content/plugins/custom-post-template/view/admin/select_post_template.php b/blog/wp-content/plugins/custom-post-template/view/admin/select_post_template.php
deleted file mode 100644
index 729f331..0000000
--- a/blog/wp-content/plugins/custom-post-template/view/admin/select_post_template.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
diff --git a/blog/wp-content/plugins/disqus-comment-system/comments-legacy.php b/blog/wp-content/plugins/disqus-comment-system/comments-legacy.php
deleted file mode 100644
index 51b46ef..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/comments-legacy.php
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
diff --git a/blog/wp-content/plugins/disqus-comment-system/comments.php b/blog/wp-content/plugins/disqus-comment-system/comments.php
deleted file mode 100644
index 6fa1f5c..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/comments.php
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-Disqus
-
-
-
-
-
-
diff --git a/blog/wp-content/plugins/disqus-comment-system/disqus.php b/blog/wp-content/plugins/disqus-comment-system/disqus.php
deleted file mode 100644
index 5560618..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/disqus.php
+++ /dev/null
@@ -1,977 +0,0 @@
-
-Version: 2.33.8752
-Author URI: http://disqus.com/
-*/
-
-require_once('lib/api.php');
-
-define('DISQUS_URL', 'http://disqus.com');
-define('DISQUS_API_URL', DISQUS_URL);
-define('DISQUS_DOMAIN', 'disqus.com');
-define('DISQUS_IMPORTER_URL', 'http://import.disqus.net');
-define('DISQUS_MEDIA_URL', 'http://media.disqus.com');
-define('DISQUS_RSS_PATH', '/latest.rss');
-
-function dsq_plugin_basename($file) {
- $file = dirname($file);
-
- // From WP2.5 wp-includes/plugin.php:plugin_basename()
- $file = str_replace('\\','/',$file); // sanitize for Win32 installs
- $file = preg_replace('|/+|','/', $file); // remove any duplicate slash
- $file = preg_replace('|^.*/' . PLUGINDIR . '/|','',$file); // get relative path from plugins dir
-
- if ( strstr($file, '/') === false ) {
- return $file;
- }
-
- $pieces = explode('/', $file);
- return !empty($pieces[count($pieces)-1]) ? $pieces[count($pieces)-1] : $pieces[count($pieces)-2];
-}
-
-if ( !defined('WP_CONTENT_URL') ) {
- define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
-}
-if ( !defined('PLUGINDIR') ) {
- define('PLUGINDIR', 'wp-content/plugins'); // Relative to ABSPATH. For back compat.
-}
-
-define('DSQ_PLUGIN_URL', WP_CONTENT_URL . '/plugins/' . dsq_plugin_basename(__FILE__));
-
-/**
- * Disqus WordPress plugin version.
- *
- * @global string $dsq_version
- * @since 1.0
- */
-$dsq_version = '2.33';
-$mt_dsq_version = '2.01';
-/**
- * Response from Disqus get_thread API call for comments template.
- *
- * @global string $dsq_response
- * @since 1.0
- */
-$dsq_response = '';
-/**
- * Comment sort option.
- *
- * @global string $dsq_sort
- * @since 1.0
- */
-$dsq_sort = 1;
-/**
- * Flag to determine whether or not the comment count script has been embedded.
- *
- * @global string $dsq_cc_script_embedded
- * @since 1.0
- */
-$dsq_cc_script_embedded = false;
-/**
- * Disqus API instance.
- *
- * @global string $dsq_api
- * @since 1.0
- */
-$dsq_api = new DisqusAPI(get_option('disqus_forum_url'), get_option('disqus_api_key'));
-/**
- * DISQUS is_feed check.
- *
- * @global bool $dsq_is_feed
- * @since 2.2
- */
-$dsq_is_feed = false;
-
-/**
- * DISQUS currently unsupported dev toggle to output comments for this query.
- *
- * @global bool $dsq_comments_for_query
- * @since ?
- */
-$DSQ_QUERY_COMMENTS = false;
-
-/**
- * DISQUS array to store post_ids from WP_Query for comment JS output.
- *
- * @global array $DSQ_QUERY_POST_IDS
- * @since 2.2
- */
-$DSQ_QUERY_POST_IDS = array();
-
-/**
- * Helper functions.
- */
-
-function dsq_legacy_mode() {
- return get_option('disqus_forum_url') && !get_option('disqus_api_key');
-}
-
-function dsq_is_installed() {
- return get_option('disqus_forum_url') && get_option('disqus_api_key');
-}
-
-function dsq_can_replace() {
- global $id, $post;
- $replace = get_option('disqus_replace');
-
- if ( 'draft' == $post->post_status ) { return false; }
- if ( !get_option('disqus_forum_url') ) { return false; }
- else if ( 'all' == $replace ) { return true; }
-
- if ( !isset($post->comment_count) ) {
- $num_comments = 0;
- } else {
- if ( 'empty' == $replace ) {
- // Only get count of comments, not including pings.
-
- // If there are comments, make sure there are comments (that are not track/pingbacks)
- if ( $post->comment_count > 0 ) {
- // Yuck, this causes a DB query for each post. This can be
- // replaced with a lighter query, but this is still not optimal.
- $comments = get_approved_comments($post->ID);
- foreach ( $comments as $comment ) {
- if ( $comment->comment_type != 'trackback' && $comment->comment_type != 'pingback' ) {
- $num_comments++;
- }
- }
- } else {
- $num_comments = 0;
- }
- }
- else {
- $num_comments = $post->comment_count;
- }
- }
-
- return ( ('empty' == $replace && 0 == $num_comments)
- || ('closed' == $replace && 'closed' == $post->comment_status) );
-}
-
-function dsq_manage_dialog($message, $error = false) {
- global $wp_version;
-
- echo ''
- . $message
- . '
';
-}
-
-function dsq_sync_comments($post, $comments) {
- global $wpdb;
-
- // Get last_comment_date id for $post with Disqus metadata
- // (This is the date that is stored in the Disqus DB.)
- $last_comment_date = $wpdb->get_var('SELECT max(comment_date) FROM ' . $wpdb->prefix . 'comments WHERE comment_post_ID=' . intval($post->ID) . " AND comment_agent LIKE 'Disqus/%';");
- if ( $last_comment_date ) {
- $last_comment_date = strtotime($last_comment_date);
- }
-
- if ( !$last_comment_date ) {
- $last_comment_date = 0;
- }
-
- foreach ( $comments as $comment ) {
- if ( $comment['imported'] ) {
- continue;
- } else if ( $comment['date'] <= $last_comment_date ) {
- // If comment date of comment is <= last_comment_date, skip comment.
- continue;
- } else {
- // Else, insert_comment
- $commentdata = array(
- 'comment_post_ID' => $post->ID,
- 'comment_author' => $comment['user']['display_name'],
- 'comment_author_email' => $comment['user']['email'],
- 'comment_author_url' => $comment['user']['url'],
- 'comment_author_IP' => $comment['user']['ip_address'],
- 'comment_date' => date('Y-m-d H:i:s', $comment['date']),
- 'comment_date_gmt' => date('Y-m-d H:i:s', $comment['date_gmt']),
- 'comment_content' => $comment['message'],
- 'comment_approved' => 1,
- 'comment_agent' => 'Disqus/1.0:' . intval($comment['id']),
- 'comment_type' => '',
- );
- wp_insert_comment($commentdata);
- }
- }
-
- if( isset($_POST['dsq_api_key']) && $_POST['dsq_api_key'] == get_option('disqus_api_key') ) {
- if( isset($_GET['dsq_sync_action']) && isset($_GET['dsq_sync_comment_id']) ) {
- $comment_parts = explode('=', $_GET['dsq_sync_comment_id']);
- if( 'wp_id' == $comment_parts[0] ) {
- $comment_id = intval($comment_parts[1]);
- } else {
- $comment_id = $wpdb->get_var('SELECT comment_ID FROM ' . $wpdb->prefix . 'comments WHERE comment_post_ID=' . intval($post->ID) . " AND comment_agent LIKE 'Disqus/1.0:" . intval($comment_parts[1]) . "'");
- }
-
- switch( $_GET['dsq_sync_action'] ) {
- case 'mark_spam':
- wp_set_comment_status($comment_id, 'spam');
- echo "";
- break;
- case 'mark_approved':
- wp_set_comment_status($comment_id, 'approve');
- echo "";
- break;
- case 'mark_killed':
- wp_set_comment_status($comment_id, 'hold');
- echo "";
- break;
- }
- }
- }
-}
-
-function dsq_request_handler() {
- if (!empty($_GET['cf_action'])) {
- switch ($_GET['cf_action']) {
- case 'export_comments':
- if (current_user_can('manage_options')) {
-// handle vars
- $post_id = intval($_GET['post_id']);
- $limit = 2;
- global $wpdb, $dsq_api;
- $posts = $wpdb->get_results("
- SELECT *
- FROM $wpdb->posts
- WHERE post_type != 'revision'
- AND post_status = 'publish'
- AND comment_count > 0
- AND ID > $post_id
- ORDER BY ID ASC
- LIMIT $limit
- ");
- $first_post_id = $posts[0]->ID;
- $last_post_id = $posts[(count($posts) - 1)]->ID;
- $max_post_id = $wpdb->get_var("
- SELECT MAX(ID)
- FROM $wpdb->posts
- WHERE post_type != 'revision'
- AND post_status = 'publish'
- AND comment_count > 0
- AND ID > $post_id
- ");
- if ($last_post_id == $max_post_id) {
- $status = 'complete';
- $msg = 'All comments sent to Disqus!';
- }
- else {
- $status = 'partial';
- if (count($posts) == 1) {
- $msg = 'Processed comments on post #'.$first_post_id.'…';
- }
- else {
- $msg = 'Processed comments on posts #'.$first_post_id.'-'.$last_post_id.'…';
- }
- }
- $result = 'fail';
- if (count($posts)) {
- include_once(dirname(__FILE__) . '/export.php');
- $wxr = dsq_export_wp($posts);
- $import_id = $dsq_api->import_wordpress_comments($wxr);
- if ($import_id < 0) {
- $result = 'fail';
- $msg = 'Sorry, something unexpected happened with the export. Please try again
If your API key has changed, you may need to reinstall Disqus (deactivate the plugin and then reactivate it). If you are still having issues, refer to the WordPress help page.
';
- }
- else {
- $result = 'success';
- }
- }
-// send AJAX response
- $response = compact('result', 'status', 'last_post_id', 'msg');
- header('Content-type: text/javascript');
- echo cf_json_encode($response);
- die();
- }
- break;
- }
- }
-}
-add_action('init', 'dsq_request_handler');
-
-/**
- * Compatibility
- */
-
-if (!function_exists ( '_wp_specialchars' ) ) {
-function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
- $string = (string) $string;
-
- if ( 0 === strlen( $string ) ) {
- return '';
- }
-
- // Don't bother if there are no specialchars - saves some processing
- if ( !preg_match( '/[&<>"\']/', $string ) ) {
- return $string;
- }
-
- // Account for the previous behaviour of the function when the $quote_style is not an accepted value
- if ( empty( $quote_style ) ) {
- $quote_style = ENT_NOQUOTES;
- } elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {
- $quote_style = ENT_QUOTES;
- }
-
- // Store the site charset as a static to avoid multiple calls to wp_load_alloptions()
- if ( !$charset ) {
- static $_charset;
- if ( !isset( $_charset ) ) {
- $alloptions = wp_load_alloptions();
- $_charset = isset( $alloptions['blog_charset'] ) ? $alloptions['blog_charset'] : '';
- }
- $charset = $_charset;
- }
- if ( in_array( $charset, array( 'utf8', 'utf-8', 'UTF8' ) ) ) {
- $charset = 'UTF-8';
- }
-
- $_quote_style = $quote_style;
-
- if ( $quote_style === 'double' ) {
- $quote_style = ENT_COMPAT;
- $_quote_style = ENT_COMPAT;
- } elseif ( $quote_style === 'single' ) {
- $quote_style = ENT_NOQUOTES;
- }
-
- // Handle double encoding ourselves
- if ( !$double_encode ) {
- $string = wp_specialchars_decode( $string, $_quote_style );
- $string = preg_replace( '/&(#?x?[0-9a-z]+);/i', '|wp_entity|$1|/wp_entity|', $string );
- }
-
- $string = @htmlspecialchars( $string, $quote_style, $charset );
-
- // Handle double encoding ourselves
- if ( !$double_encode ) {
- $string = str_replace( array( '|wp_entity|', '|/wp_entity|' ), array( '&', ';' ), $string );
- }
-
- // Backwards compatibility
- if ( 'single' === $_quote_style ) {
- $string = str_replace( "'", ''', $string );
- }
-
- return $string;
-}
-}
-
-if (!function_exists ( 'wp_check_invalid_utf8' ) ) {
-function wp_check_invalid_utf8( $string, $strip = false ) {
- $string = (string) $string;
-
- if ( 0 === strlen( $string ) ) {
- return '';
- }
-
- // Store the site charset as a static to avoid multiple calls to get_option()
- static $is_utf8;
- if ( !isset( $is_utf8 ) ) {
- $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );
- }
- if ( !$is_utf8 ) {
- return $string;
- }
-
- // Check for support for utf8 in the installed PCRE library once and store the result in a static
- static $utf8_pcre;
- if ( !isset( $utf8_pcre ) ) {
- $utf8_pcre = @preg_match( '/^./u', 'a' );
- }
- // We can't demand utf8 in the PCRE installation, so just return the string in those cases
- if ( !$utf8_pcre ) {
- return $string;
- }
-
- // preg_match fails when it encounters invalid UTF8 in $string
- if ( 1 === @preg_match( '/^./us', $string ) ) {
- return $string;
- }
-
- // Attempt to strip the bad chars if requested (not recommended)
- if ( $strip && function_exists( 'iconv' ) ) {
- return iconv( 'utf-8', 'utf-8', $string );
- }
-
- return '';
-}
-}
-
-if (!function_exists ( 'esc_html' ) ) {
-function esc_html( $text ) {
- $safe_text = wp_check_invalid_utf8( $text );
- $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
- return apply_filters( 'esc_html', $safe_text, $text );
-}
-}
-
-if (!function_exists ( 'esc_attr' ) ) {
-function esc_attr( $text ) {
- $safe_text = wp_check_invalid_utf8( $text );
- $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
- return apply_filters( 'attribute_escape', $safe_text, $text );
-}
-}
-
-/**
- * Filters/Actions
- */
-
-function dsq_get_style() {
- echo "";
-}
-
-add_action('wp_head','dsq_get_style');
-
-function dsq_comments_template($value) {
- global $dsq_response;
- global $dsq_sort;
- global $dsq_api;
- global $post;
-
- if ( !( is_singular() && ( have_comments() || 'open' == $post->comment_status ) ) ) {
- return;
- }
-
- if ( !dsq_can_replace() ) {
- return $value;
- }
-
- if ( dsq_legacy_mode() ) {
- return dirname(__FILE__) . '/comments-legacy.php';
- }
-
- $permalink = get_permalink();
- $title = get_the_title();
- $excerpt = get_the_excerpt();
-
- $dsq_sort = get_option('disqus_sort');
- if ( is_numeric($_COOKIE['disqus_sort']) ) {
- $dsq_sort = $_COOKIE['disqus_sort'];
- }
-
- if ( is_numeric($_GET['dsq_sort']) ) {
- setcookie('disqus_sort', $_GET['dsq_sort']);
- $dsq_sort = $_GET['dsq_sort'];
- }
-
- // Call "get_thread" API method.
- $dsq_response = $dsq_api->get_thread($post, $permalink, $title, $excerpt);
- if( $dsq_response < 0 ) {
- return false;
- }
- // Sync comments with database.
- dsq_sync_comments($post, $dsq_response['posts']);
-
- // TODO: If a disqus-comments.php is found in the current template's
- // path, use that instead of the default bundled comments.php
- //return TEMPLATEPATH . '/disqus-comments.php';
-
- return dirname(__FILE__) . '/comments.php';
-}
-
-// Mark entries in index to replace comments link.
-function dsq_comments_number($comment_text) {
- global $post;
-
- if ( dsq_can_replace() ) {
- return 'View Comments';
- } else {
- return $comment_text;
- }
-}
-
-function dsq_bloginfo_url($url) {
- if ( get_feed_link('comments_rss2') == $url ) {
- return 'http://' . strtolower(get_option('disqus_forum_url')) . '.' . DISQUS_DOMAIN . DISQUS_RSS_PATH;
- } else {
- return $url;
- }
-}
-
-function dsq_plugin_action_links($links, $file) {
- $plugin_file = basename(__FILE__);
- if (basename($file) == $plugin_file) {
- $settings_link = ''.__('Settings', 'disqus-comment-system').'';
- array_unshift($links, $settings_link);
- }
- return $links;
-}
-add_filter('plugin_action_links', 'dsq_plugin_action_links', 10, 2);
-
-// Always add Disqus management page to the admin menu
-function dsq_add_pages() {
- add_submenu_page(
- 'edit-comments.php',
- 'Disqus',
- 'Disqus',
- 'moderate_comments',
- 'disqus',
- 'dsq_manage'
- );
-}
-add_action('admin_menu', 'dsq_add_pages', 10);
-
-// a little jQuery goodness to get comments menu working as desired
-function sdq_menu_admin_head() {
-?>
-
-get_results("
- SELECT comment_approved, COUNT( * ) AS num_comments
- FROM {$wpdb->comments}
- WHERE comment_type != 'trackback'
- AND comment_type != 'pingback'
- GROUP BY comment_approved
- ", ARRAY_A );
- $total = 0;
- $approved = array('0' => 'moderated', '1' => 'approved', 'spam' => 'spam');
- $known_types = array_keys( $approved );
- foreach( (array) $count as $row_num => $row ) {
- $total += $row['num_comments'];
- if ( in_array( $row['comment_approved'], $known_types ) )
- $stats[$approved[$row['comment_approved']]] = $row['num_comments'];
- }
-
- $stats['total_comments'] = $total;
- foreach ( $approved as $key ) {
- if ( empty($stats[$key]) )
- $stats[$key] = 0;
- }
- $stats = (object) $stats;
-?>
-
-
-
-
-
-
-";
- }
- }
-}
-add_action('admin_head', 'dsq_admin_head');
-
-function dsq_warning() {
- if ( !get_option('disqus_forum_url') && !isset($_POST['forum_url']) && $_GET['page'] != 'disqus' ) {
- dsq_manage_dialog('You must configure the plugin to enable Disqus Comments.', true);
- }
-
- if ( dsq_legacy_mode() && $_GET['page'] == 'disqus' ) {
- dsq_manage_dialog('Disqus Comments has not yet been configured. (Click here to configure)');
- }
-}
-
-// catch original query
-function dsq_parse_query($query) {
- add_action('the_posts', 'dsq_add_request_post_ids', 999);
-}
-add_action('parse_request', 'dsq_parse_query');
-
-// track the original request post_ids, only run once
-function dsq_add_request_post_ids($posts) {
- dsq_add_query_posts($posts);
- remove_action('the_posts', 'dsq_log_request_post_ids', 999);
- return $posts;
-}
-
-function dsq_maybe_add_post_ids($posts) {
- global $DSQ_QUERY_COMMENTS;
- if ($DSQ_QUERY_COMMENTS) {
- dsq_add_query_posts($posts);
- }
- return $posts;
-}
-add_action('the_posts', 'dsq_maybe_add_post_ids');
-
-function dsq_add_query_posts($posts) {
- global $DSQ_QUERY_POST_IDS;
- if (count($posts)) {
- foreach ($posts as $post) {
- $post_ids[] = intval($post->ID);
- }
- $DSQ_QUERY_POST_IDS[md5(serialize($post_ids))] = $post_ids;
- }
-}
-
-// check to see if the posts in the loop match the original request or an explicit request, if so output the JS
-function dsq_loop_end($query) {
- if ( get_option('disqus_cc_fix') == '1' || !count($query->posts) || is_single() || is_page() || is_feed() ) {
- return;
- }
- global $DSQ_QUERY_POST_IDS;
- foreach ($query->posts as $post) {
- $loop_ids[] = intval($post->ID);
- }
- $posts_key = md5(serialize($loop_ids));
- if (isset($DSQ_QUERY_POST_IDS[$posts_key])) {
- dsq_output_loop_comment_js($DSQ_QUERY_POST_IDS[$posts_key]);
- }
-}
-add_action('loop_end', 'dsq_loop_end');
-
-function dsq_js_comment_count_url() {
- return 'http://'.strtolower(get_option('disqus_forum_url')).'.'.DISQUS_DOMAIN.'/get_num_replies_from_wpid.js?v=2.2&t=span';
-}
-
-function dsq_output_loop_comment_js($post_ids = null) {
- if (count($post_ids)) {
- $post_id_str = '';
- $i = 0;
- foreach ($post_ids as $post_id) {
- $post_id_str .= '&wpid'.$i.'='.$post_id;
- $i++;
- }
-?>
-
-
-
-post_status != 'publish') {
- return;
- }
- global $dsq_prev_permalinks;
- $dsq_prev_permalinks['post_'.$post_id] = get_permalink($post_id);
-}
-add_action('pre_post_update', 'dsq_prev_permalink');
-
-function dsq_check_permalink($post_id) {
- global $dsq_prev_permalinks;
- if (!empty($dsq_prev_permalinks['post_'.$post_id]) && $dsq_prev_permalinks['post_'.$post_id] != get_permalink($post_id)) {
-// API request to get old DSQ ID - get_thread_by_url
- $post = get_post($post_id);
- global $dsq_api;
- $thread = $dsq_api->get_thread(
- $post,
- $dsq_prev_permalinks['post_'.$post_id],
- get_the_title($post_id),
- get_the_excerpt($post_id)
- );
-// API request to update DSQ ID to new permalink - update_thread
- if (is_array($thread) && !empty($thread['thread_id'])) {
- $http = new WP_Http;
- $response = $http->request(
- DISQUS_API_URL . '/api/update_thread/',
- array(
- 'method' => 'POST',
- 'body' => array(
- 'thread_id' => $thread['thread_id'],
- 'url' => get_permalink($post_id),
- 'forum_api_key' => $dsq_api->forum_api_key,
- )
- )
- );
- }
- }
-}
-add_action('edit_post', 'dsq_check_permalink');
-
-add_action('admin_notices', 'dsq_warning');
-
-// Only replace comments if the disqus_forum_url option is set.
-add_filter('comments_template', 'dsq_comments_template');
-add_filter('comments_number', 'dsq_comments_number');
-add_filter('bloginfo_url', 'dsq_bloginfo_url');
-
-/**
- * JSON ENCODE for PHP < 5.2.0
- * Checks if json_encode is not available and defines json_encode
- * to use php_json_encode in its stead
- * Works on iteratable objects as well - stdClass is iteratable, so all WP objects are gonna be iteratable
- */
-if(!function_exists('cf_json_encode')) {
- function cf_json_encode($data) {
-// json_encode is sending an application/x-javascript header on Joyent servers
-// for some unknown reason.
-// if(function_exists('json_encode')) { return json_encode($data); }
-// else { return cfjson_encode($data); }
- return cfjson_encode($data);
- }
-
- function cfjson_encode_string($str) {
- if(is_bool($str)) {
- return $str ? 'true' : 'false';
- }
-
- return str_replace(
- array(
- '"'
- , '/'
- , "\n"
- , "\r"
- )
- , array(
- '\"'
- , '\/'
- , '\n'
- , '\r'
- )
- , $str
- );
- }
-
- function cfjson_encode($arr) {
- $json_str = '';
- if (is_array($arr)) {
- $pure_array = true;
- $array_length = count($arr);
- for ( $i = 0; $i < $array_length ; $i++) {
- if (!isset($arr[$i])) {
- $pure_array = false;
- break;
- }
- }
- if ($pure_array) {
- $json_str = '[';
- $temp = array();
- for ($i=0; $i < $array_length; $i++) {
- $temp[] = sprintf("%s", cfjson_encode($arr[$i]));
- }
- $json_str .= implode(',', $temp);
- $json_str .="]";
- }
- else {
- $json_str = '{';
- $temp = array();
- foreach ($arr as $key => $value) {
- $temp[] = sprintf("\"%s\":%s", $key, cfjson_encode($value));
- }
- $json_str .= implode(',', $temp);
- $json_str .= '}';
- }
- }
- else if (is_object($arr)) {
- $json_str = '{';
- $temp = array();
- foreach ($arr as $k => $v) {
- $temp[] = '"'.$k.'":'.cfjson_encode($v);
- }
- $json_str .= implode(',', $temp);
- $json_str .= '}';
- }
- else if (is_string($arr)) {
- $json_str = '"'. cfjson_encode_string($arr) . '"';
- }
- else if (is_numeric($arr)) {
- $json_str = $arr;
- }
- else if (is_bool($arr)) {
- $json_str = $arr ? 'true' : 'false';
- }
- else {
- $json_str = '"'. cfjson_encode_string($arr) . '"';
- }
- return $json_str;
- }
-}
-
-// Single Sign-on Integration
-
-function dsq_sso() {
- if (!$partner_key = get_option('disqus_partner_key')) {
- return;
- }
- global $current_user, $dsq_api;
- get_currentuserinfo();
- if ($current_user->ID) {
- $avatar_tag = get_avatar($current_user->ID);
- $avatar_data = array();
- preg_match('/(src)=((\'|")[^(\'|")]*(\'|"))/i', $avatar_tag, $avatar_data);
- $avatar = str_replace(array('"', "'"), '', $avatar_data[2]);
- $user_data = array(
- 'username' => $current_user->display_name,
- 'id' => $current_user->ID,
- 'avatar' => $avatar,
- 'email' => $current_user->user_email,
- );
- }
- else {
- $user_data = array();
- }
- $user_data = base64_encode(cf_json_encode($user_data));
- $time = time();
- $hmac = dsq_hmacsha1($user_data.' '.$time, $partner_key);
-
- $payload = $user_data.' '.$hmac.' '.$time;
- echo '';
-}
-add_action('wp_head', 'dsq_sso');
-
-// from: http://www.php.net/manual/en/function.sha1.php#39492
-//Calculate HMAC-SHA1 according to RFC2104
-// http://www.ietf.org/rfc/rfc2104.txt
-function dsq_hmacsha1($data, $key) {
- $blocksize=64;
- $hashfunc='sha1';
- if (strlen($key)>$blocksize)
- $key=pack('H*', $hashfunc($key));
- $key=str_pad($key,$blocksize,chr(0x00));
- $ipad=str_repeat(chr(0x36),$blocksize);
- $opad=str_repeat(chr(0x5c),$blocksize);
- $hmac = pack(
- 'H*',$hashfunc(
- ($key^$opad).pack(
- 'H*',$hashfunc(
- ($key^$ipad).$data
- )
- )
- )
- );
- return bin2hex($hmac);
-}
-
-
-?>
diff --git a/blog/wp-content/plugins/disqus-comment-system/export.php b/blog/wp-content/plugins/disqus-comment-system/export.php
deleted file mode 100644
index 99b67ec..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/export.php
+++ /dev/null
@@ -1,289 +0,0 @@
-term_id] = $category->parent;
-
- $parents = array_unique(array_diff($parents, array_keys($parents)));
-
- if ( $zero = array_search('0', $parents) )
- unset($parents[$zero]);
-
- return $parents;
-}
-
-while ( $parents = wxr_missing_parents($categories) ) {
- $found_parents = get_categories("include=" . join(', ', $parents));
- if ( is_array($found_parents) && count($found_parents) )
- $categories = array_merge($categories, $found_parents);
- else
- break;
-}
-
-// Put them in order to be inserted with no child going before its parent
-$pass = 0;
-$passes = 1000 + count($categories);
-while ( ( $cat = array_shift($categories) ) && ++$pass < $passes ) {
- if ( $cat->parent == 0 || isset($cats[$cat->parent]) ) {
- $cats[$cat->term_id] = $cat;
- } else {
- $categories[] = $cat;
- }
-}
-unset($categories);
-
-/**
- * Place string in CDATA tag.
- *
- * @since unknown
- *
- * @param string $str String to place in XML CDATA tag.
- */
-function wxr_cdata($str) {
- if ( seems_utf8($str) == false )
- $str = utf8_encode($str);
-
- // $str = ent2ncr(esc_html($str));
-
- $str = "";
-
- return $str;
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
- * @return string Site URL.
- */
-function wxr_site_url() {
- global $current_site;
-
- // mu: the base url
- if ( isset($current_site->domain) ) {
- return 'http://'.$current_site->domain.$current_site->path;
- }
- // wp: the blog url
- else {
- return get_bloginfo_rss('url');
- }
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
- * @param object $c Category Object
- */
-function wxr_cat_name($c) {
- if ( empty($c->name) )
- return;
-
- echo '' . wxr_cdata($c->name) . ' ';
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
- * @param object $c Category Object
- */
-function wxr_category_description($c) {
- if ( empty($c->description) )
- return;
-
- echo '' . wxr_cdata($c->description) . ' ';
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
- * @param object $t Tag Object
- */
-function wxr_tag_name($t) {
- if ( empty($t->name) )
- return;
-
- echo '' . wxr_cdata($t->name) . ' ';
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
- * @param object $t Tag Object
- */
-function wxr_tag_description($t) {
- if ( empty($t->description) )
- return;
-
- echo '' . wxr_cdata($t->description) . ' ';
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- */
-function wxr_post_taxonomy() {
- $categories = get_the_category();
- $tags = get_the_tags();
- $the_list = '';
- $filter = 'rss';
-
- if ( !empty($categories) ) foreach ( (array) $categories as $category ) {
- $cat_name = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter);
- // for backwards compatibility
- $the_list .= "\n\t\t \n";
- // forwards compatibility: use a unique identifier for each cat to avoid clashes
- // http://trac.wordpress.org/ticket/5447
- $the_list .= "\n\t\tslug}\"> \n";
- }
-
- if ( !empty($tags) ) foreach ( (array) $tags as $tag ) {
- $tag_name = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter);
- $the_list .= "\n\t\t \n";
- // forwards compatibility as above
- $the_list .= "\n\t\tslug}\"> \n";
- }
-
- echo $the_list;
-}
-
-// start catching output
- ob_start();
-
-
-echo '\n";
-
-?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- http://wordpress.org/?v=
-
-
-
-
-
- slug; ?> parent ? $cats[$c->parent]->name : ''; ?>
-
-
- slug; ?>
-
-in_the_loop = true; // Fake being in the loop.
- foreach ($posts as $post) {
- setup_postdata($post); ?>
--
-
post_title); ?>
-
-
-
-
-
-
-
-post_content) ); ?>
-post_excerpt) ); ?>
-ID; ?>
-post_date; ?>
-post_date_gmt; ?>
-comment_status; ?>
-ping_status; ?>
-post_name; ?>
-post_status; ?>
-post_parent; ?>
-menu_order; ?>
-post_type; ?>
-get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_agent NOT LIKE 'Disqus/%%'", $post->ID) );
-if ( $comments ) { foreach ( $comments as $c ) { ?>
-
-comment_ID; ?>
-comment_author); ?>
-comment_author_email; ?>
-comment_author_url; ?>
-comment_author_IP; ?>
-comment_date; ?>
-comment_date_gmt; ?>
-comment_content) ?>
-comment_approved; ?>
-comment_type; ?>
-comment_parent; ?>
-user_id; ?>
-
-
-
-
-
-
-
diff --git a/blog/wp-content/plugins/disqus-comment-system/images/logo.png b/blog/wp-content/plugins/disqus-comment-system/images/logo.png
deleted file mode 100644
index 2f361f3..0000000
Binary files a/blog/wp-content/plugins/disqus-comment-system/images/logo.png and /dev/null differ
diff --git a/blog/wp-content/plugins/disqus-comment-system/lib/api.php b/blog/wp-content/plugins/disqus-comment-system/lib/api.php
deleted file mode 100644
index a97f8da..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/lib/api.php
+++ /dev/null
@@ -1,149 +0,0 @@
-
- * @copyright 2007-2008 Big Head Labs
- * @link http://disqus.com/
- * @package Disqus
- * @subpackage lib
- * @version 2.0
- */
-
-require_once('url.php');
-require_once(ABSPATH.WPINC.'/http.php');
-
-/** @#+
- * Constants
- */
-/**
- * Base URL for Disqus.
- */
-define('ALLOWED_HTML', '
');
-
-/**
- * Helper methods for all of the Disqus v2 API methods.
- *
- * @package Disqus
- * @author DISQUS.com
- * @copyright 2007-2008 Big Head Labs
- * @version 2.0
- */
-class DisqusAPI {
- var $short_name;
- var $forum_api_key;
-
- function DisqusAPI($short_name=NULL, $forum_api_key=NULL) {
- $this->short_name = $short_name;
- $this->forum_api_key = $forum_api_key;
- }
-
- function get_forum_list($username, $password) {
- $credentials = base64_encode($username . ':' . $password);
- $response = dsq_urlopen(DISQUS_API_URL . '/api/v2/get_forum_list/', array(
- 'credentials' => $credentials,
- 'response_type' => 'php'
- ));
- $data = unserialize($response['data']);
- if(!$data || $data['stat'] == 'fail') {
- if($data['err']['code'] == 'bad-credentials') {
- return -2;
- } else {
- return -1;
- }
- }
- return $data['forums'];
- }
-
- function get_forum_api_key($username, $password, $short_name) {
- $credentials = base64_encode($username . ':' . $password);
- $response = dsq_urlopen(DISQUS_API_URL . '/api/v2/get_forum_api_key/', array(
- 'credentials' => $credentials,
- 'short_name' => $short_name,
- 'response_type' => 'php'
- ));
- $data = unserialize($response['data']);
- if(!$data || $data['stat'] == 'fail') {
- if($data['err']['code'] == 'bad-credentials') {
- return -2;
- } else {
- return -1;
- }
- }
-
- return $data['forum_api_key'];
- }
-
- function get_thread($post, $permalink, $title, $excerpt) {
- $title = strip_tags($title, ALLOWED_HTML);
- $title = urlencode($title);
-
- $excerpt = strip_tags($excerpt, ALLOWED_HTML);
- $excerpt = urlencode($excerpt);
- $excerpt = substr($excerpt, 0, 300);
-
- $thread_meta = $post->ID . ' ' . $post->guid;
-
- $response = @dsq_urlopen(DISQUS_API_URL . '/api/v2/get_thread/', array(
- 'short_name' => $this->short_name,
- 'thread_url' => $permalink,
- 'thread_meta' => $thread_meta,
- 'response_type' => 'php',
- 'title' => $title,
- 'message' => $excerpt,
- 'api_key' => $this->forum_api_key,
- 'source' => 'DsqWordPress20',
- 'state_closed' => ($post->comment_status == 'closed') ? '1' : '0'
- ));
-
- $data = unserialize($response['data']);
- if(!$data || $data['stat'] == 'fail') {
- if($data['err']['code'] == 'bad-key') {
- return -2;
- } else {
- return -1;
- }
- }
-
- return $data;
- }
-
- function import_wordpress_comments($wxr) {
- $http = new WP_Http();
- $response = $http->request(
- DISQUS_IMPORTER_URL . '/api/import-wordpress-comments/',
- array(
- 'method' => 'POST',
- 'body' => array(
- 'forum_url' => $this->short_name,
- 'forum_api_key' => $this->forum_api_key,
- 'response_type' => 'php',
- 'wxr' => $wxr,
- )
- )
- );
- $data = unserialize($response['body']);
- if (!$data || $data['stat'] == 'fail') {
- return -1;
- }
- return $data['import_id'];
- }
-
- function get_import_status($import_id) {
- $response = @dsq_urlopen(DISQUS_IMPORTER_URL . '/api/get-import-status/', array(
- 'forum_url' => $this->short_name,
- 'forum_api_key' => $this->forum_api_key,
- 'import_id' => $import_id,
- 'response_type' => 'php'
- ));
-
- $data = unserialize($response['data']);
- if(!$data || $data['stat'] == 'fail') {
- return -1;
- }
- return $data;
- }
-
-}
-
-?>
diff --git a/blog/wp-content/plugins/disqus-comment-system/lib/url.php b/blog/wp-content/plugins/disqus-comment-system/lib/url.php
deleted file mode 100644
index 63f3f1e..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/lib/url.php
+++ /dev/null
@@ -1,265 +0,0 @@
-$value) {
- $postdata_str .= urlencode($key) . '=' . urlencode($value) . '&';
- }
- }
-
- return $postdata_str;
-}
-
-
-function dsq_get_post_content($boundary, $postdata, $file_name, $file_field) {
- if(!$file_name || !$file_field) {
- return dsq_get_query_string($postdata);
- }
-
- $content = array();
- $content[] = '--' . $boundary;
- foreach($postdata as $key=>$value) {
- $content[] = 'Content-Disposition: form-data; name="' . $key . '"' . "\r\n\r\n" . $value;
- $content[] = '--' . $boundary;
- }
- $content[] = 'Content-Disposition: form-data; name="' . $file_field . '"; filename="' . $file_name . '"';
- // HACK: We only need to handle text/plain files right now.
- $content[] = "Content-Type: text/plain\r\n";
- $content[] = file_get_contents($file_name);
- $content[] = '--' . $boundary . '--';
- $content = implode("\r\n", $content);
- return $content;
-}
-
-
-function dsq_get_http_headers_for_request($boundary, $content, $file_name, $file_field) {
- $headers = array();
- $headers[] = 'User-Agent: ' . USER_AGENT;
- $headers[] = 'Connection: close';
- if($content) {
- $headers[] = 'Content-Length: ' . strlen($content);
- if($file_name && $file_field) {
- $headers[] = 'Content-Type: multipart/form-data; boundary=' . $boundary;
- } else {
- $headers[] = 'Content-Type: application/x-www-form-urlencoded';
- }
- }
- return implode("\r\n", $headers);
-}
-
-
-function _dsq_curl_urlopen($url, $postdata, &$response, $file_name, $file_field) {
- $c = curl_init($url);
- $postdata_str = dsq_get_query_string($postdata);
-
- $c_options = array(
- CURLOPT_USERAGENT => USER_AGENT,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_POST => ($postdata_str ? 1 : 0),
- CURLOPT_HTTPHEADER => array('Expect:')
- );
- if($postdata) {
- $c_options[CURLOPT_POSTFIELDS] = $postdata_str;
- }
- if($file_name && $file_field) {
- $postdata[$file_field] = '@' . $file_name;
- $c_options[CURLOPT_POSTFIELDS] = $postdata;
- $c_options[CURLOPT_RETURNTRANSFER] = 1;
- }
- curl_setopt_array($c, $c_options);
-
- $response['data'] = curl_exec($c);
- $response['code'] = curl_getinfo($c, CURLINFO_HTTP_CODE);
-}
-
-
-function _dsq_fsockopen_urlopen($url, $postdata, &$response, $file_name, $file_field) {
- $buf = '';
- $req = '';
- $length = 0;
- $boundary = '----------' . md5(time());
- $postdata_str = dsq_get_post_content($boundary, $postdata, $file_name, $file_field);
- $url_pieces = parse_url($url);
-
- // Set default port for supported schemes if none is provided.
- if(!isset($url_pieces['port'])) {
- switch($url_pieces['scheme']) {
- case 'http':
- $url_pieces['port'] = 80;
- break;
- case 'https':
- $url_pieces['port'] = 443;
- $url_pieces['host'] = 'ssl://' . $url_pieces['host'];
- break;
- }
- }
-
- // Set default path if trailing slash is not provided.
- if(!isset($url_pieces['path'])) { $url_pieces['path'] = '/'; }
-
- // Determine if we need to include the port in the Host header or not.
- if(($url_pieces['port'] == 80 && $url_pieces['scheme'] == 'http') ||
- ($url_pieces['port'] == 443 && $url_pieces['scheme'] == 'https')) {
- $host = $url_pieces['host'];
- } else {
- $host = $url_pieces['host'] . ':' . $url_pieces['port'];
- }
-
- $fp = @fsockopen($url_pieces['host'], $url_pieces['port']);
- if(!$fp) { return false; }
- $req .= ($postdata_str ? 'POST' : 'GET') . ' ' . $url_pieces['path'] . " HTTP/1.1\r\n";
- $req .= 'Host: ' . $host . "\r\n";
- $req .= dsq_get_http_headers_for_request($boundary, $postdata_str, $file_name, $file_field);
- if($postdata_str) {
- $req .= "\r\n\r\n" . $postdata_str;
- }
- $req .= "\r\n\r\n";
-
- fwrite($fp, $req);
- while(!feof($fp)) {
- $buf .= fgets($fp, 4096);
- }
-
- // Parse headers from the response buffers.
- list($headers, $response['data']) = explode("\r\n\r\n", $buf, 2);
-
- // Get status code from headers.
- $headers = explode("\r\n", $headers);
- list($unused, $response['code'], $unused) = explode(' ', $headers[0], 3);
- $headers = array_slice($headers, 1);
-
- // Convert headers into associative array.
- foreach($headers as $unused=>$header) {
- $header = explode(':', $header);
- $header[0] = trim($header[0]);
- $header[1] = trim($header[1]);
- $headers[strtolower($header[0])] = strtolower($header[1]);
- }
-
- // If transfer-coding is set to chunked, we need to join the message body
- // together.
- if(isset($headers['transfer-encoding']) && 'chunked' == $headers['transfer-encoding']) {
- $chunk_data = $response['data'];
- $joined_data = '';
- while(true) {
- // Strip length from body.
- list($chunk_length, $chunk_data) = explode("\r\n", $chunk_data, 2);
- $chunk_length = hexdec($chunk_length);
- if(!$chunk_length || !strlen($chunk_data)) { break; }
-
- $joined_data .= substr($chunk_data, 0, $chunk_length);
- $chunk_data = substr($chunk_data, $chunk_length + 1);
- $length += $chunk_length;
- }
- $response['data'] = $joined_data;
- } else {
- $length = $headers['content-length'];
- }
-}
-
-
-function _dsq_fopen_urlopen($url, $postdata, &$response, $file_name, $file_field) {
- $params = array();
- if($file_name && $file_field) {
- $boundary = '----------' . md5(time());
- $content = dsq_get_post_content($boundary, $postdata, $file_name, $file_field);
- $header = dsq_get_http_headers_for_request($boundary, $content, $file_name, $file_field);
-
- $params = array('http' => array(
- 'method' => 'POST',
- 'header' => $header,
- 'content' => $content,
- ));
- } else {
- if($postdata) {
- $params = array('http' => array(
- 'method' => 'POST',
- 'header' => 'Content-Type: application/x-www-form-urlencoded',
- 'content' => dsq_get_query_string($postdata)
- ));
- }
- }
-
- ini_set('user_agent', USER_AGENT);
- $ctx = stream_context_create($params);
- $fp = fopen($url, 'rb', false, $ctx);
- if(!$fp) {
- return false;
- }
-
- // Get status code from headers.
- list($unused, $response['code'], $unused) = explode(' ', $http_response_header[0], 3);
- $headers = array_slice($http_response_header, 1);
-
- // Convert headers into associative array.
- foreach($headers as $unused=>$header) {
- $header = explode(':', $header);
- $header[0] = trim($header[0]);
- $header[1] = trim($header[1]);
- $headers[strtolower($header[0])] = strtolower($header[1]);
- }
-
- $response['data'] = stream_get_contents($fp);
-}
-
-
-/**
- * Wrapper to provide a single interface for making an HTTP request.
- *
- * Attempts to use cURL, fopen(), or fsockopen(), whichever is available
- * first.
- *
- * @param string $url URL to make request to.
- * @param array $postdata (optional) If postdata is provided, the request
- * method is POST with the key/value pairs as
- * the data.
- * @param array $file (optional) Should provide associative array
- * with two keys: name and field. Name should
- * be the name of the file and field is the name
- * of the field to POST.
- */
-function dsq_urlopen($url, $postdata=false, $file=false) {
- $response = array(
- 'data' => '',
- 'code' => 0
- );
-
- if($file) {
- extract($file, EXTR_PREFIX_ALL, 'file');
- }
- if(!$file_name || !$file_field) {
- $file_name = false;
- $file_field = false;
- }
-
-//
-
- // Try curl, fsockopen, fopen + stream (PHP5 only), exec wget
- if(function_exists('curl_init')) {
- if (!function_exists('curl_setopt_array')) {
- function curl_setopt_array(&$ch, $curl_options)
- {
- foreach ($curl_options as $option => $value) {
- if (!curl_setopt($ch, $option, $value)) {
- return false;
- }
- }
- return true;
- }
- }
- _dsq_curl_urlopen($url, $postdata, $response, $file_name, $file_field);
- } else if(ini_get('allow_url_fopen') && function_exists('stream_get_contents')) {
- _dsq_fopen_urlopen($url, $postdata, $response, $file_name, $file_field);
- } else {
- // TODO: Find the failure condition for fsockopen() (sockets?)
- _dsq_fsockopen_urlopen($url, $postdata, $response, $file_name, $file_field);
- }
-
-// returns array with keys data and code (from headers)
-
- return $response;
-}
-?>
diff --git a/blog/wp-content/plugins/disqus-comment-system/manage.php b/blog/wp-content/plugins/disqus-comment-system/manage.php
deleted file mode 100644
index 017bc3e..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/manage.php
+++ /dev/null
@@ -1,272 +0,0 @@
-get_forum_api_key($_POST['dsq_username'], $_POST['dsq_password'], $_POST['dsq_forum_url']);
- update_option('disqus_forum_url', $_POST['dsq_forum_url']);
-
- if ( is_numeric($api_key) && $api_key < 0 ) {
- update_option('disqus_replace', 'replace');
- dsq_manage_dialog('There was an error completing the installation of Disqus. If you are still having issues, refer to the WordPress help page.', true);
- } else {
- update_option('disqus_api_key', $api_key);
- update_option('disqus_replace', 'all');
- }
-
- if (!empty($_POST['disqus_partner_key'])) {
- $partner_key = trim(stripslashes($_POST['disqus_partner_key']));
- if (!empty($partner_key)) {
- update_option('disqus_partner_key', $partner_key);
- }
- }
-}
-
-// Handle advanced options.
-if ( isset($_POST['disqus_forum_url']) && isset($_POST['disqus_replace']) ) {
- $disqus_forum_url = $_POST['disqus_forum_url'];
- if ( $dot_pos = strpos($disqus_forum_url, '.') ) {
- $disqus_forum_url = substr($disqus_forum_url, 0, $dot_pos);
- }
- update_option('disqus_forum_url', $disqus_forum_url);
- update_option('disqus_partner_key', trim(stripslashes($_POST['disqus_partner_key'])));
- update_option('disqus_replace', $_POST['disqus_replace']);
- update_option('disqus_cc_fix', isset($_POST['disqus_cc_fix']));
- dsq_manage_dialog('Your settings have been changed.');
-}
-
-// Get installation step process (or 0 if we're already installed).
-$step = @intval($_GET['step']);
-$step = ($step > 0 && isset($_POST['dsq_username'])) ? $step : 1;
-$step = (dsq_is_installed()) ? 0 : $step;
-
-if ( 2 == $step && isset($_POST['dsq_username']) && isset($_POST['dsq_password']) ) {
- $dsq_sites = $dsq_api->get_forum_list($_POST['dsq_username'], $_POST['dsq_password']);
- if ( $dsq_sites < 0 ) {
- $step = 1;
- if ( -2 == $dsq_sites ) {
- dsq_manage_dialog('Invalid password.', true);
- } else {
- dsq_manage_dialog('Unexpected error.', true);
- }
- }
-}
-
-?>
-
-
-
- - Advanced Options
-
-
-
-
-
- Install Disqus Comments
-
-
-
-
-
- Install Disqus Comments
-
-
-
-
-
- Comments
-
-
-
-
-
-
-
-
-
diff --git a/blog/wp-content/plugins/disqus-comment-system/readme.txt b/blog/wp-content/plugins/disqus-comment-system/readme.txt
deleted file mode 100644
index 9ba5efa..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/readme.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-=== Disqus Comment System ===
-Contributors: disqus, alexkingorg, crowdfavorite
-Tags: comments, threaded, email, notification, spam, avatars, community, profile, widget
-Requires at least: 2.8
-Tested up to: 2.9.2
-Stable tag: 2.33.8752
-
-The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus.
-
-== Description ==
-
-Disqus, pronounced "discuss", is a service and tool for web comments and
-discussions. Disqus makes commenting easier and more interactive,
-while connecting websites and commenters across a thriving discussion
-community.
-
-The Disqus for WordPress plugin seamlessly integrates using the Disqus API and by syncing with WordPress comments.
-
-= Disqus for WordPress =
-
-* Uses the Disqus API
-* Comments indexable by search engines (SEO-friendly)
-* Support for importing existing comments
-* Auto-sync (backup) of comments with Disqus and WordPress database
-
-= Disqus Features =
-
-* Threaded comments and replies
-* Notifications and reply by email
-* Subscribe and RSS options
-* Aggregated comments and social mentions
-* Powerful moderation and admin tools
-* Full spam filtering, blacklists and whitelists
-* Support for Disqus community widgets
-* Connected with a large discussion community
-* Increased exposure and readership
-
-== Installation ==
-
-**NOTE: It is recommended that you backup your database before installing the plugin.**
-
-1. Unpack archive to this archive to the 'wp-content/plugins/' directory inside
- of WordPress
-
- * Maintain the directory structure of the archive (all extracted files
- should exist in 'wp-content/plugins/disqus-comment-system/'
-
-2. From your blog administration, click on Comments to change settings
- (WordPress 2.0 users can find the settings under Options > Disqus.)
-
-= More documentation =
-
-Go to [http://disqus.com/help/wordpress](http://disqus.com/help/wordpress)
-
-== Upgrading ==
-
-1. Replace the old plugin with the new plugin (the plugin must stay in
- the disqus directory).
-
-2. Your blog will be in legacy mode until you complete the configuration.
- This just means that it is using JavaScript to pull the comments instead
- of the API.
-
-== Support ==
-
-* Visit http://disqus.com/help/wordpress for help documentation.
-
-* Visit http://help.disqus.com for help from our support team.
-
-* Disqus also recommends the [WordPress HelpCenter](http://wphelpcenter.com/) for extended help. Disqus is not associated with the WordPress HelpCenter in any way.
diff --git a/blog/wp-content/plugins/disqus-comment-system/scripts/manage.js b/blog/wp-content/plugins/disqus-comment-system/scripts/manage.js
deleted file mode 100644
index 4a64943..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/scripts/manage.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var dsq_old_onload = window.onload;
-
-function dsq_tab_func(clicked_tab) {
- function _dsq_tab_func(e) {
- var tabs = document.getElementById('dsq-tabs').getElementsByTagName('li');
- var contents = document.getElementById('dsq-wrap').getElementsByTagName('div');
-
- for(var i = 0; i < tabs.length; i++) {
- tabs[i].className = '';
- }
-
- for(var i = 0; i < contents.length; i++) {
- if(contents[i].className == 'dsq-content') {
- contents[i].style.display = 'none';
- }
- }
-
- document.getElementById('dsq-tab-' + clicked_tab).className = 'selected';
- document.getElementById('dsq-' + clicked_tab).style.display = 'block';
-
- }
-
- return _dsq_tab_func;
-}
-
-window.onload = function(e) {
- // Tabs have an ID prefixed with "dsq-tab-".
- // Content containers have an ID prefixed with "dsq-" and a class name of "dsq-content".
- var tabs = document.getElementById('dsq-tabs').getElementsByTagName('li');
-
- for(var i = 0; i < tabs.length; i++) {
- tabs[i].onclick = dsq_tab_func(tabs[i].id.substr(tabs[i].id.lastIndexOf('-') + 1));
- }
-
- if(dsq_old_onload) {
- dsq_old_onload(e);
- }
-}
diff --git a/blog/wp-content/plugins/disqus-comment-system/styles/manage-pre25.css b/blog/wp-content/plugins/disqus-comment-system/styles/manage-pre25.css
deleted file mode 100644
index 47950c1..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/styles/manage-pre25.css
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Selectors required for pre-WordPress 2.5 */
-
-.form-table {
- border-collapse: collapse;
- margin-top: 1em;
- width: 100%;
- color: #333;
-}
-
-.form-table tr {
- background-color: #eaf3fa;
-}
-
-.form-table td {
- margin-bottom: 9px;
- padding: 10px;
- line-height: 20px;
- font-size: 11px;
- border-bottom-width: 8px;
- border-bottom-style: solid;
- border-color: #fff;
-}
-
-.form-table th {
- vertical-align: top;
- text-align: left;
- padding: 10px;
- width: 150px;
- border-bottom-width: 8px;
- border-bottom-style: solid;
- border-color: #fff;
-}
-
-.form-table th.th-full {
- width: auto;
-}
-
-.form-table input, .form-table textarea {
- border-width: 1px;
- border-style: solid;
-}
-
-.form-table div.color-option {
- display: block;
- clear: both;
-}
-
-.form-table input.tog {
- margin-top: 2px;
- margin-right: 2px;
- float: left;
-}
-
-.form-table table.color-palette {
- vertical-align: bottom;
- float: left;
- margin: -3px 3px 8px;
-}
-
-.form-table .color-palette td {
- border-bottom: none;
- border: 1px solid #fff;
- font-size: 1px;
- line-height: 1px;
-}
-
-#disqus_warning{ background-color:#ff0000; }
diff --git a/blog/wp-content/plugins/disqus-comment-system/styles/manage.css b/blog/wp-content/plugins/disqus-comment-system/styles/manage.css
deleted file mode 100644
index 7cf762a..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/styles/manage.css
+++ /dev/null
@@ -1,35 +0,0 @@
-ul#dsq-tabs li {
-}
-ul#dsq-tabs li.selected {
- border-bottom: 3px solid #ffa100;
-}
-ul#dsq-tabs li {
- float: left;
- color: #333;
- padding: 0.25em;
- height: 16px;
- cursor: pointer;
- margin-right: 8px;
-}
-
-ul#dsq-tabs {
- display: block;
- height: 20px;
- list-style: none;
- margin: 15px 0;
- padding: 0;
- border: 0;
- position: absolute;
- right: 10px;
-}
-
-select.disqus-replace {
- border-color: #C6D9E9;
-}
-
-.dsq-content h2 {
- background: url(../images/logo.png) no-repeat;
- line-height: 41px;
- margin: 15px 0 10px;
- padding: 0 0 0 150px;
-}
\ No newline at end of file
diff --git a/blog/wp-content/plugins/disqus-comment-system/xd_receiver.htm b/blog/wp-content/plugins/disqus-comment-system/xd_receiver.htm
deleted file mode 100644
index 72edcbc..0000000
--- a/blog/wp-content/plugins/disqus-comment-system/xd_receiver.htm
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/blog/wp-content/plugins/extra-feed-links/admin.php b/blog/wp-content/plugins/extra-feed-links/admin.php
deleted file mode 100755
index 25aee43..0000000
--- a/blog/wp-content/plugins/extra-feed-links/admin.php
+++ /dev/null
@@ -1,120 +0,0 @@
-options = $GLOBALS['EFL_options'];
-
- $this->defaults = array(
- 'home' => array(FALSE, '%site_title% Comments'),
- 'comments' => array(TRUE, 'Comments: %title%'),
- 'category' => array(TRUE, 'Category: %title%'),
- 'tag' => array(TRUE, 'Tag: %title%'),
- 'author' => array(TRUE, 'Author: %title%'),
- 'search' => array(TRUE, 'Search: %title%')
- );
-
- $this->args = array(
- 'page_title' => 'Extra Feed Links',
- 'short_title' => 'Extra Feed Links',
- 'page_slug' => 'extra-feed-links'
- );
-
- $this->nonce = 'efl-settings';
- }
-
- protected function form_handler() {
- if ( empty($_POST['action']) )
- return false;
-
- check_admin_referer($this->nonce);
-
- // Update options
- if ( 'Save Changes' == $_POST['action'] ) {
- foreach (array_keys($this->options->get()) as $name) {
- $new_format[$name][0] = $_POST['show-' . $name];
- $new_format[$name][1] = $_POST['format-' . $name];
- }
-
- $this->options->update($new_format);
- $this->admin_msg('Settings saved.');
- }
-
- // Reset options
- if ( 'Reset' == $_POST['action'] ) {
- $this->options->reset();
- $this->admin_msg('Settings reset.');
- }
- }
-
- public function page_head() {
-?>
-
-page_header();
-?>
-The table below allows you to select which page types get an extra header link and the format of the link text.
-
-
-
-
-
-
- Available substitution tags:
-
- - %title% - displays the corresponding title for each page type
- - %site_title% - displays the title of the site
-
-
-page_footer();
- }
-}
-
diff --git a/blog/wp-content/plugins/extra-feed-links/inc/scbForms.php b/blog/wp-content/plugins/extra-feed-links/inc/scbForms.php
deleted file mode 100644
index 97fe41c..0000000
--- a/blog/wp-content/plugins/extra-feed-links/inc/scbForms.php
+++ /dev/null
@@ -1,189 +0,0 @@
- any valid type
- 'names' => string | array
- 'values' => string | array (default: 1 or $options['name'])
- 'check' => true | false (default: true)
- 'extra' => string (default: class="widefat")
- 'desc' => string (default: name)
- 'desc_pos' => 'before' | 'after' | 'none' (default: after)
- );
- $options = array('name' => 'value'...)
- */
-
- public function input($args, $options = array()) {
- $token = '%input%';
-
- extract(wp_parse_args($args, array(
- 'desc_pos' => 'after',
- 'check' => true,
- 'extra' => 'class="widefat"'
- )));
-
- // Check required fields
- if ( empty($type) )
- trigger_error('No type specified', E_USER_WARNING);
-
- if ( empty($names) ) {
- trigger_error('No name specified', E_USER_WARNING);
- return;
- }
-
- // Check for defined options
- if ( $check && 'submit' != $type && !empty($options) )
- self::check_names($names, $options);
-
- $f1 = is_array($names);
- $f2 = is_array($values);
-
- // Set default values
- if ( !isset($values) )
- if ( 'text' == $type && !$f1 )
- $values = stripslashes(wp_specialchars($options[$names], ENT_QUOTES));
- elseif ( in_array($type, array('checkbox', 'radio')) )
- $values = true;
-
- // Expand names or values
- if ( !$f1 && !$f2 )
- $a = array($names => $values);
- elseif ( $f1 && !$f2 )
- $a = array_fill_keys($names, $values);
- elseif ( !$f1 && $f2 )
- $a = array_fill_keys($values, $names);
- else
- $a = array_combine($names, $values);
-
- // Determine what goes where
- if ( !$f1 && $f2 ) {
- $i1 = 'val';
- $i2 = 'name';
- } else {
- $i1 = 'name';
- $i2 = 'val';
- }
-
- if ( $f1 || $f2 )
- $l1 = 'name';
- else
- $l1 = 'desc';
-
- // Generate output
- foreach ( $a as $name => $val ) {
- // Build extra string
- $extra_s = $extra;
-
- if ( in_array($type, array('checkbox', 'radio')) && $options[$$i1] == $$i2)
- $extra_s .= " checked='checked'";
-
- // Build the item
- $input = " ";
-
- // Add description
- $desc = $$l1;
- $desc = str_replace('[]', '', $desc);
- if ( FALSE == stripos($desc, $token) )
- if ( 'before' == $desc_pos )
- $desc .= ' ' . $token;
- elseif ( 'after' == $desc_pos )
- $desc = $token . ' ' . $desc;
- $desc = str_replace($token, $input, $desc);
- $desc = trim($desc);
-
- // Add label
- if ( 'none' == $desc_pos || empty($desc) )
- $output[] = $input . "\n";
- else
- $output[] = "\n";
- }
-
- return implode("\n", $output);
- }
-
- public static function select($args, $options) {
- extract(wp_parse_args($args, array(
- 'name' => '',
- 'selected' => NULL,
- 'extra' => ''
- )));
-
- if ( empty($name) )
- trigger_error('No name specified', E_USER_NOTICE);
-
- if ( !is_array($options) ) {
- trigger_error("Second argument is expected to be an associative array", E_USER_WARNING);
- return;
- }
-
- foreach ( $options as $key => $value ) {
- $extra_s = $extra;
- if ( $name === $selected )
- $extra_s = " selected='selected'";
- else
- $extra_s = "";
-
- $opts .= "\t\n";
- }
-
- return "\n";
- }
-
- // Creates a textarea
- public static function textarea($args, $content) {
- extract(wp_parse_args($args, array(
- 'name' => '',
- 'extra' => 'class="widefat"',
- 'escaped' => 'false'
- )));
-
- if ( !$escaped )
- $content = stripslashes(wp_specialchars($content, ENT_QUOTES));
-
- if ( empty($name) )
- trigger_error('No name specified', E_USER_NOTICE);
-
- return "\n";
- }
-
- // Adds a form around the $content, including a hidden nonce field
- public function form_wrap($content, $nonce = 'update_options') {
- $output .= "\n\n";
-
- return $output;
- }
-
-
-//_____HELPER METHODS (SHOULD NOT BE CALLED DIRECTLY)_____
-
-
- // Checks if selected $names have equivalent in $options. Used by form_row()
- protected static function check_names($names, $options) {
- $names = (array) $names;
-
- foreach ( $names as $i => $name )
- $names[$i] = str_replace('[]', '', $name);
-
- foreach ( array_diff($names, array_keys($options)) as $key )
- trigger_error("Option not defined: {$key}", E_USER_WARNING);
- }
-}
-
-// < PHP 5.2
-if ( !function_exists('array_fill_keys') ) :
-function array_fill_keys($keys, $value) {
- $r = array();
-
- foreach($keys as $key)
- $r[$key] = $value;
-
- return $r;
-}
-endif;
-
diff --git a/blog/wp-content/plugins/extra-feed-links/inc/scbOptions.php b/blog/wp-content/plugins/extra-feed-links/inc/scbOptions.php
deleted file mode 100755
index bc285ed..0000000
--- a/blog/wp-content/plugins/extra-feed-links/inc/scbOptions.php
+++ /dev/null
@@ -1,67 +0,0 @@
-key = $key;
- $this->data = get_option($this->key);
- }
-
- public function setup($file, $defaults) {
- $this->defaults = $defaults;
- register_activation_hook($file, array($this, 'reset'), false);
- register_uninstall_hook($file, array($this, 'delete'));
- }
-
- // Get all data or a certain field
- public function get($field = '') {
- if ( empty($field) === true )
- return $this->data;
-
- return @$this->data[$field];
- }
-
- // Update a portion of the data
- public function update_part($newdata) {
- if ( !is_array($this->data) || !is_array($newdata) )
- return false;
-
- $this->update(array_merge($this->data, $newdata));
- }
-
- // Update option
- public function update($newdata) {
- if ( $this->data === $newdata )
- return;
-
- $this->data = $newdata;
-
- add_option($this->key, $this->data) or
- update_option($this->key, $this->data);
- }
-
- // Reset option to defaults
- public function reset($override = true) {
- if ( !$override && is_array($this->defaults) && is_array($this->data) )
- $newdata = array_merge($this->defaults, $this->data);
- else
- $newdata = $this->defaults;
-
- $this->update($newdata);
- }
-
- // Delete option
- public function delete() {
- delete_option($this->key);
- }
-}
-
-// < WP 2.7
-if ( !function_exists('register_uninstall_hook') ) :
-function register_uninstall_hook() {}
-endif;
diff --git a/blog/wp-content/plugins/extra-feed-links/inc/scbOptionsPage.php b/blog/wp-content/plugins/extra-feed-links/inc/scbOptionsPage.php
deleted file mode 100644
index 155260b..0000000
--- a/blog/wp-content/plugins/extra-feed-links/inc/scbOptionsPage.php
+++ /dev/null
@@ -1,195 +0,0 @@
- '',
- 'short_title' => '',
- 'page_slug' => '',
- 'type' => 'settings'
- );
-
- // Hook string created at page init
- protected $pagehook;
-
- // Nonce string
- protected $nonce;
-
- // Plugin dir url
- protected $plugin_url;
-
- // scbOptions object holder
- protected $options;
-
- // Form actions
- protected $actions = array();
-
-
-//_____MAIN METHODS_____
-
-
- // Main constructor
- public function __construct($file = '') {
- $this->set_url($file);
-
- $this->setup();
- $this->check_args();
-
- if ( isset($this->options) )
- $this->options->setup($file, $this->defaults);
-
- add_action('admin_menu', array($this, 'page_init'));
- }
-
- // This is where all the page args goes
- abstract protected function setup();
-
- // This is where the css and js go
- public function page_head() {}
-
- // This is where the page content goes
- abstract public function page_content();
-
- // To be used in ::page_head()
- protected function admin_msg($msg, $class = "updated") {
- echo "$msg
\n";
- }
-
- // Wraps a string in a \n";
- }
-
- // Wraps a string in a \n";
- }
-
- // Generates a standard page head
- protected function page_header() {
- $this->form_handler();
-
- echo "\n";
- echo "".$this->args['page_title']."
\n";
- }
-
- // Generates a standard page footer
- protected function page_footer() {
- echo "\n";
- }
-
- public function form_wrap($content) {
- return parent::form_wrap($content, $this->nonce);
- }
-
- // Wrap a field in a table row
- public function form_row($args, $options) {
- return "\n\n\t{$args['title']} \n\t\n\t\t". parent::input($args, $options) ."\n\t \n\n ";
- }
-
- // Generates multiple rows and wraps them in a form table
- protected function form_table($rows, $action = 'Save Changes') {
- $output .= "\n";
-
- $options = $this->options->get();
- foreach ( $rows as $row )
- $output .= $this->form_row($row, $options);
-
- $output .= "\n
\n";
- $output .= $this->submit_button($action);
-
- return parent::form_wrap($output, $this->nonce);
- }
-
- // Generates a submit form button
- protected function submit_button($action = 'Save Changes', $class = "button") {
- if ( in_array($action, $this->actions) )
- trigger_error("Duplicate action for submit button: {$action}", E_USER_WARNING);
-
- $args = array(
- 'type' => 'submit',
- 'names' => 'action',
- 'values' => $action,
- 'extra' => '',
- 'desc_pos' => 'none'
- );
-
- if ( ! empty($class) )
- $args['extra'] = "class='{$class}'";
-
- $this->actions[] = $action;
- $output .= "\n";
- $output .= parent::input($args);
- $output .= "
\n";
-
- return $output;
- }
-
-
-//_____HELPER METHODS (SHOULD NOT BE CALLED DIRECTLY)_____
-
-
- // Checks and sets default args
- protected function check_args() {
- if ( empty($this->args['page_title']) )
- trigger_error('Page title cannot be empty', E_USER_ERROR);
-
- if ( empty($this->args['type']) )
- $this->args['type'] = 'settings';
-
- if ( empty($this->args['short_title']) )
- $this->args['short_title'] = $this->args['page_title'];
-
- if ( empty($this->args['page_slug']) )
- $this->args['page_slug'] = sanitize_title_with_dashes($this->args['short_title']);
-
- if ( empty($this->nonce) )
- $this->nonce = $this->args['page_slug'];
- }
-
- // Registers a page
- public function page_init() {
- if ( !current_user_can('manage_options') )
- return false;
-
- extract($this->args);
-
- if ( 'settings' == $type )
- $this->pagehook = add_options_page($short_title, $short_title, 8, $page_slug, array($this, 'page_content'));
- elseif ( 'tools' == $type )
- $this->pagehook = add_management_page($short_title, $short_title, 8, $page_slug, array($this, 'page_content'));
- else
- trigger_error("Unknown page type: $page", E_USER_WARNING);
-
- add_action('admin_print_styles-' . $this->pagehook, array($this, 'page_head'));
- }
-
- // Update options
- protected function form_handler() {
- if ( 'Save Changes' != $_POST['action'] )
- return false;
-
- check_admin_referer($this->nonce);
-
- foreach ( $this->options->get() as $name => $value )
- $new_options[$name] = $_POST[$name];
-
- $this->options->update($new_options);
-
- $this->admin_msg('Settings saved.');
- }
-
- // Set plugin_dir
- protected function set_url($file) {
- if ( function_exists('plugins_url') )
- $this->plugin_url = plugins_url(plugin_basename(dirname($file)));
- else
- // < WP 2.6
- $this->plugin_url = get_option('siteurl') . '/wp-content/plugins/' . plugin_basename(dirname($file));
- }
-}
diff --git a/blog/wp-content/plugins/extra-feed-links/main.php b/blog/wp-content/plugins/extra-feed-links/main.php
deleted file mode 100755
index d4e456a..0000000
--- a/blog/wp-content/plugins/extra-feed-links/main.php
+++ /dev/null
@@ -1,142 +0,0 @@
-.
-*/
-
-class extraFeedLink {
- var $format;
- var $format_name;
- var $url;
- var $title;
- var $text;
-
- function __construct() {
- $this->format = $GLOBALS['EFL_options']->get();
- add_action('wp_head', array($this, 'head_link'));
- }
-
- function head_link() {
- $this->generate();
-
- if( !$this->url || !$this->text )
- return;
-
- echo "\n" . '' . "\n";
- }
-
- function theme_link($input) {
- $this->generate(TRUE);
-
- if( !$this->url )
- return;
-
- if ( substr($input, 0, 4) == 'http' )
- echo '
';
- elseif ( $input == '' )
- echo '' . $this->text . '';
- elseif ( $input == 'raw' )
- echo $this->url;
- else
- echo '' . $input . '';
- }
-
- function generate($for_theme = FALSE) {
- $this->title = $this->url = NULL;
-
- if ( is_home() && ($this->format['home'][0] || $for_theme) ) {
- $this->url = get_bloginfo('comments_rss2_url');
- $this->format_name = 'home';
- }
- elseif ( (is_single() || is_page()) && ($this->format['comments'][0] || $for_theme) ) {
- global $post;
- if ( $post->comment_status == 'open' ) {
- $this->url = get_post_comments_feed_link($post->ID);
- $this->title = $post->post_title;
- $this->format_name = 'comments';
- }
- }
- elseif ( is_category() && ($this->format['category'][0] || $for_theme) ) {
- global $wp_query;
- $cat_obj = $wp_query->get_queried_object();
-
- $this->url = get_category_feed_link($cat_obj->term_id);
- $this->title = $cat_obj->name;
- $this->format_name = 'category';
- }
- elseif ( is_tag() && ($this->format['tag'][0] || $for_theme) ) {
- global $wp_query;
- $tag_obj = $wp_query->get_queried_object();
-
- $this->url = get_tag_feed_link($tag_obj->term_id);
- $this->title = $tag_obj->name;
- $this->format_name = 'tag';
- }
- elseif ( is_author() && ($this->format['author'][0] || $for_theme) ) {
- global $wp_query;
- $author_obj = $wp_query->get_queried_object();
-
- $this->url = get_author_feed_link($author_obj->ID);
- $this->title = $author_obj->user_nicename;
- $this->format_name = 'author';
- }
- elseif ( is_search() && ($this->format['search'][0] || $for_theme) ) {
- $search = attribute_escape(get_search_query());
-
- $this->url = get_search_feed_link($search);
- $this->title = $search;
- $this->format_name = 'search';
- }
-
- // Set the appropriate format
- $this->text = $this->format[$this->format_name][1];
-
- // Convert substitution tags
- $this->text = str_replace('%title%', $this->title, $this->text);
- $this->text = str_replace('%site_title%', get_option('blogname'), $this->text);
- }
-}
-
-// Init
-function efl_init() {
- if ( !class_exists('scbOptions_06') )
- require_once(dirname(__FILE__) . '/inc/scbOptions.php');
-
- $GLOBALS['EFL_options'] = new scbOptions_06('efl-format');
- $GLOBALS['extraFeedLink'] = new extraFeedLink();
-
- if ( is_admin() ) {
- require_once (dirname(__FILE__) . '/admin.php');
- new extraFeedLinkAdmin(__FILE__);
- }
-}
-
-efl_init();
-
-remove_action('wp_head', 'feed_links_extra', 3);
-
-// Template tag
-function extra_feed_link($input = '') {
- global $extraFeedLink;
-
- $extraFeedLink->theme_link($input);
-}
diff --git a/blog/wp-content/plugins/extra-feed-links/readme.txt b/blog/wp-content/plugins/extra-feed-links/readme.txt
deleted file mode 100644
index e58e8ed..0000000
--- a/blog/wp-content/plugins/extra-feed-links/readme.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-=== Extra Feed Links ===
-Contributors: scribu
-Donate link: http://scribu.net/wordpress
-Tags: archive, comments, feed, rss, aton
-Requires at least: 2.5
-Tested up to: 2.8
-Stable tag: 1.1.5.1
-
-Adds extra feed auto-discovery links to various page types (categories, tags, search results etc.)
-
-== Description ==
-
-This plugin adds feed auto-discovery links to any page type:
-
-* Category page
-* Tag page
-* Search page
-* Author page
-* Comments feed for single articles and pages
-
-It also has a template tag that you can use in your theme.
-
-== Installation ==
-
-1. Unzip the archive and put the folder into your plugins folder (/wp-content/plugins/).
-1. Activate the plugin from the Plugins admin menu.
-1. Customize the links in the settings page.
-
-**Usage**
-
-You can use `extra_feed_link()` inside your theme to display a link to the feed corresponding to the type of page:
-
-* `` (creates a link with the default text)
-* `` (creates a link with the text you choose)
-* `` (creates an image tag linked to the feed URL)
-* `` (just displays the feed URL)
-
-== Frequently Asked Questions ==
-
-= "Parse error: syntax error, unexpected T_CLASS..." Help! =
-
-Make sure your new host is running PHP 5. Add this line to wp-config.php:
-
-`var_dump(PHP_VERSION);`
-
-== Changelog ==
-
-= 1.1.5 =
-* WP 2.8 compatibility
-
-= 1.1.1 =
-* italian translation
-
-= 1.1 =
-* more flexible link text format
-* [more info](http://scribu.net/wordpress/extra-feed-links/efl-1-1.html)
-
-= 1.0 =
-* added options page
-
-= 0.6 =
-* extra_feed_link() template tag
-
-= 0.5 =
-* initial release
-
diff --git a/blog/wp-content/plugins/front-end-editor/admin.php b/blog/wp-content/plugins/front-end-editor/admin.php
deleted file mode 100755
index 7009bcd..0000000
--- a/blog/wp-content/plugins/front-end-editor/admin.php
+++ /dev/null
@@ -1,147 +0,0 @@
-textdomain = 'front-end-editor';
-
- $this->args = array('page_title' => __('Front-end Editor', $this->textdomain));
-
- $this->boxes = array(
- array('fields', __('Fields', $this->textdomain), 'normal'),
- array('settings', __('Settings', $this->textdomain), 'side'),
- );
- }
-
- function page_head() {
-?>
-
-options->disabled = $disabled;
-
- $this->admin_msg();
- }
-
- function fields_box() {
- // Separate fields
- $post_fields = $other_fields = array();
- foreach ( FEE_Core::get_fields() as $field => $args )
- if ( 'post' == call_user_func(array($args['class'], 'get_object_type') ) )
- $post_fields[$field] = $args;
- else
- $other_fields[$field] = $args;
-
- echo html('p', __('Enable or disable editable fields', $this->textdomain));
-
- $tables = self::fields_table(__('Post fields', $this->textdomain), $post_fields);
- $tables .= self::fields_table(__('Other fields', $this->textdomain), $other_fields);
-
- echo $this->form_wrap($tables, '', 'manage_fields');
- }
-
- private function fields_table($title, $fields) {
- $thead =
- html('thead',
- html('tr',
- html('th scope="col" class="check-column"', '')
- .html('th scope="col"', $title)
- )
- );
-
- $tbody = '';
- foreach ( $fields as $field => $args )
- $tbody .=
- html('tr',
- html('th scope="row" class="check-column"',
- $this->input(array(
- 'type' => 'checkbox',
- 'name' => $field,
- 'checked' => ! @in_array($field, $this->options->disabled)
- ))
- )
- .html('td', $args['title'])
- );
-
- return html('table class="widefat"', $thead . $tbody);
- }
-
- function settings_handler() {
- if ( !isset($_POST['save_settings']) )
- return;
-
- foreach ( array('rich', 'chunks', 'reset_date', 'highlight', 'tooltip') as $key )
- $this->options->$key = (bool) @$_POST[$key];
-
- $this->admin_msg();
- }
-
- function settings_box() {
- $rows = array(
- array(
- 'desc' => __('Enable the WYSIWYG editor', $this->textdomain),
- 'type' => 'checkbox',
- 'name' => 'rich',
- ),
-
- array(
- 'desc' => __('Edit one paragraph at a time, instead of an entire post', $this->textdomain),
- 'type' => 'checkbox',
- 'name' => 'chunks',
- ),
-
- array(
- 'desc' => __('Reset the post date on each edit', $this->textdomain),
- 'type' => 'checkbox',
- 'name' => 'reset_date',
- ),
-
- array(
- 'desc' => __('Highlight editable elements', $this->textdomain),
- 'type' => 'checkbox',
- 'name' => 'highlight',
- ),
- array(
- 'desc' => __('Display a tooltip above editable elements', $this->textdomain),
- 'type' => 'checkbox',
- 'name' => 'tooltip',
- ),
- );
-
- $out = '';
- foreach ( $rows as $row )
- $out .= html('p', $this->input($row));
-
- echo $this->form_wrap($out, '', 'save_settings');
- }
-}
-
diff --git a/blog/wp-content/plugins/front-end-editor/core.php b/blog/wp-content/plugins/front-end-editor/core.php
deleted file mode 100644
index 3cd0fe8..0000000
--- a/blog/wp-content/plugins/front-end-editor/core.php
+++ /dev/null
@@ -1,240 +0,0 @@
-highlight )
- add_action('wp_head', array(__CLASS__, 'highlight'));
- }
-
- static function highlight() {
-?>
-
- $args )
- $field_types[$name] = $args['type'];
-
- $data = array(
- 'save_text' => __('Save', 'front-end-editor'),
- 'cancel_text' => __('Cancel', 'front-end-editor'),
- 'fields' => $field_types,
- 'ajax_url' => admin_url('admin-ajax.php'),
- 'spinner' => admin_url('images/loading.gif'),
- 'nonce' => wp_create_nonce(self::$nonce),
- );
-
- $css_dependencies = array();
- $js_dependencies = array('jquery');
-
- // qTip
- if ( self::$options->tooltip ) {
- $data['tooltip'] = array(
- 'icon' => $url . 'editor.png',
- 'text' => __('Double-click to edit', 'front-end-editor')
- );
-
- wp_register_script('jquery-qtip', $url . "jquery.qtip$js_dev.js", array(), '1.0-rc3', true);
- $js_dependencies[] = 'jquery-qtip';
- }
-
- // Autosuggest
- if ( array_key_exists('terminput', $wrapped) ) {
- $js_dependencies[] = 'suggest';
- }
-
- // Rich Editor
- if ( array_key_exists('rich', $wrapped) ) {
- $data['nicedit'] = apply_filters('front_end_editor_nicedit', array(
- 'iconsPath' => $url . 'nicedit/nicEditorIcons.gif',
- 'buttonList' => array(
- 'bold', 'italic', 'strikethrough',
- 'left','center', 'right',
- 'fontFormat', 'fontFamily', 'forecolor',
- 'removeformat',
- 'ul', 'ol',
- 'link', 'image',
- 'xhtml'
- )
- ));
-
- wp_register_script('nicedit', $url . "nicedit/nicEdit$js_dev.js", array(), '0.9r23', true);
- $js_dependencies[] = 'nicedit';
- }
-
- // Thickbox
- if ( array_key_exists('image', $wrapped) || array_key_exists('thumbnail', $wrapped) ) {
- $data['admin_url'] = admin_url();
-
- $data['image'] = array(
- 'change' => __('Change Image', 'front-end-editor'),
- 'revert' => '(' . __('Clear', 'front-end-editor') . ')',
- 'tb_close' => get_bloginfo('wpurl') . '/wp-includes/js/thickbox/tb-close.png',
- );
-
- $css_dependencies[] = 'thickbox';
- $js_dependencies[] = 'thickbox';
-
- wp_register_script('livequery', $url . 'livequery.js', array('jquery'), '1.1.0-pre', true);
- $js_dependencies[] = 'livequery';
- }
-
- // Core script
- wp_register_style('front-end-editor', $url . "editor$css_dev.css", $css_dependencies, self::$version);
- wp_register_script('front-end-editor', $url . "editor$js_dev.js", $js_dependencies, self::$version, true);
-
-?>
-
- ucfirst(str_replace('_', ' ', $filter)),
- 'type' => 'input',
- 'priority' => 11,
- 'argc' => 1
- ));
-
- self::$fields[$filter] = $args;
-
- return true;
- }
-
- static function make_instances() {
- self::$active_fields = self::get_fields();
- foreach ( (array) self::$options->disabled as $name )
- unset(self::$active_fields[$name]);
-
- foreach ( self::$active_fields as $name => $args ) {
- extract($args);
-
- self::$instances[$name] = new $class($name, $type);
- }
- }
-
- static function add_filters() {
- foreach ( self::$active_fields as $name => $args ) {
- extract($args);
-
- $instance = self::$instances[$name];
-
- add_filter($name, array($instance, 'wrap'), $priority, $argc);
- }
- }
-
- static function get_fields() {
- return self::$fields;
- }
-
- static function get_args($filter) {
- return self::$fields[$filter];
- }
-
- static function ajax_response() {
- // Is user trusted?
- check_ajax_referer(self::$nonce, 'nonce');
-
- $id = $_POST['item_id'];
- $name = $_POST['name'];
- $type = $_POST['type'];
- $action = $_POST['callback'];
-
- // Is the current field defined?
- if ( ! $instance = self::$instances[$name] )
- die(-1);
-
- // Does the user have the right to do this?
- if ( ! $instance->check($id) || ! $instance->allow($id) )
- die(-1);
-
- $args = self::get_args($name);
-
- if ( $action == 'save' ) {
- $content = stripslashes_deep($_POST['content']);
- $result = $instance->save($id, $content);
- $result = @apply_filters($name, $result);
- }
- elseif ( $action == 'get' ) {
- $result = $instance->get($id);
-
- if ( $type == 'rich' )
- $result = wpautop($result);
- }
-
- die($result);
- }
-}
-
-/*
-Registers a new editable field
-
-@param string $filter
-@param array $args(
- 'class' => string The name of the field handler class (mandatory)
- 'title' => string The user-friendly title (optional)
- 'type' => string: 'input' | 'textarea' | 'rich' | 'image' (default: input)
- 'priority' => integer (default: 11)
- 'argc' => integer (default: 1)
-)
-*/
-function register_fronted_field() {
- return FEE_Core::register(func_get_args());
-}
-
diff --git a/blog/wp-content/plugins/front-end-editor/editor/editor.css b/blog/wp-content/plugins/front-end-editor/editor/editor.css
deleted file mode 100644
index 780d3de..0000000
--- a/blog/wp-content/plugins/front-end-editor/editor/editor.css
+++ /dev/null
@@ -1 +0,0 @@
-.fee-field,.fee-form{margin:0!important;padding:0!important;border-width:0!important;}div.fee-form,textarea.fee-form-content{clear:both!important;width:100%!important;}.fee-form-spinner{border:0!important;width:16px!important;height:16px!important;}div.fee-form button{margin-top:5px;}span.fee-form input{margin-right:5px;}.fee-form button+button{margin-left:5px;}.fee-form button{text-decoration:none!important;line-height:14px!important;font-size:11px!important;vertical-align:middle!important;padding:2px 8px!important;cursor:pointer!important;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;-khtml-box-sizing:content-box;box-sizing:content-box;}button.fee-form-save{background-color:#23779f;color:#fff;border:1px solid #1c5e7f;font-weight:bold;}.fee-form-save:hover{border:1px solid #000!important;}button.fee-form-cancel{background-color:#fcfcfc;color:#808080;border:1px solid #ddd;}.fee-form-cancel:hover{border:1px solid #666!important;}.nicEdit-selected:focus{outline:none;}.fee-suggest-results{padding:0;margin:0;list-style:none;position:absolute;display:none;z-index:10000;border-width:1px;border-style:solid;}.fee-suggest-results li{padding:2px 5px;white-space:nowrap;text-align:left;}.fee-suggest-match{text-decoration:underline;}.fee-suggest-over{cursor:pointer;}.fee-suggest-results{background-color:#fff;border-color:#808080;}.fee-suggest-results li{color:#101010;}.fee-suggest-match{color:#000;}.fee-suggest-over{background-color:#f0f0b8;}#TB_window #TB_title{background-color:#222;color:#CFCFCF;height:27px;}#fee-img-revert{display:block;float:left;padding:6px 10px 0;}#fee-img-revert:link,#fee-img-revert:active,#fee-img-revert:visited{color:#21759B!important;}#fee-img-revert:hover{color:#D54E21!important;}
\ No newline at end of file
diff --git a/blog/wp-content/plugins/front-end-editor/editor/editor.dev.css b/blog/wp-content/plugins/front-end-editor/editor/editor.dev.css
deleted file mode 100644
index 1cc9024..0000000
--- a/blog/wp-content/plugins/front-end-editor/editor/editor.dev.css
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Main */
-.fee-field, .fee-form {
- margin: 0 !important;
- padding: 0 !important;
- border-width: 0 !important;
-}
-div.fee-form, textarea.fee-form-content {
- clear: both !important;
- width: 100% !important;
-}
-.fee-form-spinner {
- border: 0 !important;
- width: 16px !important;
- height: 16px !important;
-}
-
-/* Buttons */
-div.fee-form button {margin-top: 5px}
-span.fee-form input {margin-right: 5px}
-.fee-form button + button {margin-left: 5px}
-
-.fee-form button {
- text-decoration: none !important;
- line-height: 14px !important;
- font-size: 11px !important;
- vertical-align: middle !important;
- padding: 2px 8px !important;
- cursor: pointer !important;
- -moz-border-radius: 11px;
- -khtml-border-radius: 11px;
- -webkit-border-radius: 11px;
- border-radius: 11px;
- -moz-box-sizing: content-box;
- -webkit-box-sizing: content-box;
- -khtml-box-sizing: content-box;
- box-sizing: content-box;
-}
-
-button.fee-form-save {
- background-color: #23779f;
- color: #fff;
- border: 1px solid #1c5e7f;
- font-weight: bold;
-}
-
-.fee-form-save:hover {
- border: 1px solid #000 !important;
-}
-
-button.fee-form-cancel {
- background-color: #fcfcfc;
- color: #808080;
- border: 1px solid #ddd;
-}
-
-.fee-form-cancel:hover {
- border: 1px solid #666 !important;
-}
-
-/* Rich Editor */
-.nicEdit-selected:focus {
- outline: none;
-}
-
-/* Suggest */
-.fee-suggest-results {
- padding: 0;
- margin: 0;
- list-style: none;
- position: absolute;
- display: none;
- z-index: 10000;
- border-width: 1px;
- border-style: solid;
-}
-.fee-suggest-results li {padding: 2px 5px; white-space: nowrap; text-align: left}
-.fee-suggest-match {text-decoration: underline}
-.fee-suggest-over {cursor: pointer}
-
-/* Suggest colors */
-.fee-suggest-results {background-color: #fff; border-color: #808080}
-.fee-suggest-results li {color: #101010}
-.fee-suggest-match {color: #000}
-.fee-suggest-over {background-color: #f0f0b8}
-
-/* Image */
-#TB_window #TB_title {
- background-color: #222;
- color: #CFCFCF;
- height: 27px;
-}
-
-#fee-img-revert {
- display: block;
- float: left;
- padding: 6px 10px 0;
-}
-#fee-img-revert:link, #fee-img-revert:active, #fee-img-revert:visited {
- color: #21759B !important;
-}
-#fee-img-revert:hover {
- color: #D54E21 !important;
-}
-
diff --git a/blog/wp-content/plugins/front-end-editor/editor/editor.dev.js b/blog/wp-content/plugins/front-end-editor/editor/editor.dev.js
deleted file mode 100644
index 8778e32..0000000
--- a/blog/wp-content/plugins/front-end-editor/editor/editor.dev.js
+++ /dev/null
@@ -1,669 +0,0 @@
-(function($){
-
- if ( FrontEndEditor._loaded )
- return;
- FrontEndEditor._loaded = true;
-
- // http://ejohn.org/blog/simple-javascript-inheritance/
- // Inspired by base2 and Prototype
- (function(){
- var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
-
- // The base Class implementation (does nothing)
- this.Class = function(){};
-
- // Create a new Class that inherits from this class
- Class.extend = function(prop) {
- var _super = this.prototype;
-
- // Instantiate a base class (but only create the instance,
- // don't run the init constructor)
- initializing = true;
- var prototype = new this();
- initializing = false;
-
- // Copy the properties over onto the new prototype
- for (var name in prop) {
- // Check if we're overwriting an existing function
- prototype[name] = ( typeof prop[name] == "function" &&
- typeof _super[name] == "function" && fnTest.test(prop[name]) ) ?
- (function(name, fn){
- return function() {
- var tmp = this._super;
-
- // Add a new ._super() method that is the same method
- // but on the super-class
- this._super = _super[name];
-
- // The method only need to be bound temporarily, so we
- // remove it when we're done executing
- var ret = fn.apply(this, arguments);
- this._super = tmp;
-
- return ret;
- };
- })(name, prop[name]) :
- prop[name];
- }
-
- // The dummy class constructor
- function Class() {
- // All construction is actually done in the init method
- if ( !initializing && this.init )
- this.init.apply(this, arguments);
- }
-
- // Populate our constructed prototype object
- Class.prototype = prototype;
-
- // Enforce the constructor to be what we expect
- Class.constructor = Class;
-
- // And make this class extendable
- Class.extend = arguments.callee;
-
- return Class;
- };
- })();
-
-
-// _____Actual code starts here_____
-
-
- var spinner = $('
').attr({
- 'src': FrontEndEditor.data.spinner,
- 'class': 'front-editor-spinner'
- });
-
- var is_overlay = function($el) {
- var attr = [$el.attr('id'), $el.attr("class"), $el.attr("rel")];
-
- var tokens = ['lightbox', 'thickbox', 'shutter', 'awppost_link'];
-
- for ( var i in tokens )
- for ( var j in attr )
- if ( attr[j].indexOf(tokens[i]) != -1 )
- return true;
-
- return false;
- };
-
- var resume = function() {
- if ( FrontEndEditor._trap )
- return;
-
- var $link = FrontEndEditor._to_click;
-
- if ( typeof $link == 'undefined' )
- return;
-
-/*
- var ev_reference;
- var ev_capture = function(ev) { ev_reference = ev; }
-
- var onClick = $link.attr('onclick');
-
- $link.bind('click', ev_capture);
-
- if ( typeof onClick == 'function' )
- $link.bind('click', onClick);
-
- $link.click();
-
- $link.unbind('click', ev_capture);
-
- if ( typeof onClick == 'function' )
- $link.unbind('click', onClick);
-
- if ( ev_reference.isDefaultPrevented() )
- return;
-*/
-
- if ( typeof $link.attr('href') != 'undefined' && $link.attr('href') != '#' ) {
- if ( $link.attr('target') == '_blank' )
- window.open($link.attr('href'));
- else
- window.location.href = $link.attr('href');
- }
-
- delete FrontEndEditor._to_click;
- };
-
- var fieldTypes = {};
-
- fieldTypes['base'] = Class.extend({
-
- init: function($el, type, name, id) {
- var self = this;
-
- self.set_el($el);
- self.type = type;
- self.name = name;
- self.id = id;
-
- self.bind(self.el, 'click', self.click);
- self.bind(self.el, 'dblclick', self.dblclick);
- },
-
- set_el: function($el) {
- var self = this;
-
- self.el = $el;
-
- // From a > .front-ed > content
- // To .front-ed > a > content
- var $parent = self.el.parents('a');
-
- if ( ! $parent.length )
- return;
-
- var $link = $parent.clone(true)
- .html(self.el.html());
-
- var $wrap = self.el.clone(true)
- .html($link);
-
- $parent.replaceWith($wrap);
-
- self.el = $wrap;
- self.switched = true;
- },
-
- click: function(ev) {
-// if ( typeof FrontEndEditor._to_click != 'undefined' )
-// return;
-
- var $el = $(ev.target).closest('a');
-
- if ( ! $el.length )
- return;
-
- if ( is_overlay($el) )
- return;
-
- ev.stopImmediatePropagation();
- ev.preventDefault();
-
- FrontEndEditor._to_click = $el;
-
- setTimeout(resume, 300);
- },
-
- dblclick: function(ev) {
- var self = this;
-
- ev.stopPropagation();
- ev.preventDefault();
-
- FrontEndEditor._trap = true;
- },
-
- get_content: null /* function() */,
- set_content: null /* function(content) */,
-
- ajax_get_handler: null /* function(content) */,
- ajax_set_handler: null /* function(content) */,
-
- ajax_get: function() {
- var self = this;
-
- var data = {
- 'nonce': FrontEndEditor.data.nonce,
- 'action': 'front-editor',
- 'callback': 'get',
- 'name': self.name,
- 'type': self.type,
- 'item_id': self.id
- };
-
- $.post(FrontEndEditor.data.ajax_url, data, function(response){
- self.ajax_get_handler(response);
- });
- },
-
- ajax_set: function(content) {
- var self = this;
-
- content = content || self.get_content();
-
- var data = {
- 'nonce': FrontEndEditor.data.nonce,
- 'action': 'front-editor',
- 'callback': 'save',
- 'name': self.name,
- 'type': self.type,
- 'item_id': self.id,
- 'content': content
- };
-
- $.post(FrontEndEditor.data.ajax_url, data, function(response){
- self.ajax_set_handler(response);
- });
- },
-
- // Event utility: this = self
- bind: function(element, event, callback) {
- var self = this;
-
- element.bind(event, function(ev) {
- callback.call(self, ev);
- });
- }
- });
-
- fieldTypes['image'] = fieldTypes['base'].extend({
-
- dblclick: function(ev) {
- var self = this;
-
- self._super(ev);
-
- self.open_box();
- },
-
- open_box: function() {
- var self = this;
-
- tb_show(FrontEndEditor.data.image.change, FrontEndEditor.data.admin_url +
- '/media-upload.php?post_id=0&type=image&TB_iframe=true&width=640&editable_image=1');
-
- var $revert = $('').text(FrontEndEditor.data.image.revert);
-
- $revert.click(function(ev){
- self.ajax_set(-1);
- });
-
- $('#TB_ajaxWindowTitle').after($revert);
- $('#TB_closeWindowButton img').attr('src', FrontEndEditor.data.image.tb_close);
-
- self.bind($('#TB_iframeContent'), 'load', self.replace_button);
- },
-
- replace_button: function(ev) {
- var self = this;
-
- var $frame = $(ev.target).contents();
-
- $('.media-item', $frame).livequery(function(){
- var $item = $(this);
- var $button = $('').text(FrontEndEditor.data.image.change);
-
- $button.click(function(ev){
- self.ajax_set(self.get_content($item));
- });
-
- $(this).find(':submit, #go_button').replaceWith($button);
- });
- },
-
- get_content: function($item) {
- var $field;
-
- // Media library
- $field = $item.find('.urlfile');
- if ( $field.length )
- return $field.attr('title');
-
- // From URL (embed)
- $field = $item.find('#embed-src');
- if ( $field.length )
- return $field.val();
-
- // From URL
- $field = $item.find('#src');
- if ( $field.length )
- return $field.val();
-
- return false;
- },
-
- ajax_set_handler: function(url) {
- var self = this;
-
- if ( url == -1 ) {
- window.location.reload(true);
- } else {
- self.el.find('img').attr('src', url);
- tb_remove();
- }
- }
- });
-
- fieldTypes['thumbnail'] = fieldTypes['image'].extend({
-
- replace_button: function(ev) {
- var self = this;
-
- var $frame = $(ev.target).contents();
-
- $frame.find('#tab-type_url').remove();
-
- self._super(ev);
- },
-
- get_content: function($item) {
- return $item.attr('id').replace('media-item-', '');
- }
- });
-
- fieldTypes['input'] = fieldTypes['base'].extend({
-
- init: function($el, type, name, id) {
- var self = this;
-
- self.spinner = spinner.clone();
-
- self._super($el, type, name, id);
- },
-
- input_tag: '',
-
- create_input: function() {
- var self = this;
-
- self.input = $(self.input_tag);
-
- self.input.attr({
- 'id': 'edit_' + self.el.attr('id'),
- 'class': 'fee-form-content'
- }).prependTo(self.form);
- },
-
- set_input: function(content) {
- var self = this;
-
- self.input.val(content);
- },
-
- get_content: function() {
- var self = this;
- return self.input.val();
- },
-
- set_content: function(content) {
- var self = this;
-
- if ( self.switched )
- self.el.find('a').html(content);
- else
- self.el.html(content);
- },
-
- ajax_get: function() {
- var self = this;
-
- self.el.hide().after(self.spinner.show());
-
- self.create_input();
-
- self._super();
- },
-
- ajax_set: function() {
- var self = this;
-
- self.el.before(self.spinner.show());
-
- self._super();
- },
-
- ajax_get_handler: function(content) {
- var self = this;
-
- self.spinner.hide().replaceWith(self.form);
-
- self.set_input(content);
-
- self.input.focus();
- },
-
- ajax_set_handler: function(content) {
- var self = this;
-
- self.set_content(content);
-
- self.spinner.hide();
- self.el.show();
- },
-
- dblclick: function(ev) {
- var self = this;
-
- self._super(ev);
-
- self.form_handler();
- },
-
- form_handler: function() {
- var self = this;
-
- // Button actions
- var form_remove = function(with_spinner) {
- FrontEndEditor._trap = false;
-
- self.form.remove();
-
- if ( with_spinner === true )
- self.el.before(self.spinner.show());
- else
- self.el.show();
-
- self.el.trigger('fee_remove_form');
- };
-
- var form_submit = function() {
- self.ajax_set();
- form_remove(true);
- };
-
- // Button markup
- self.save_button = $('
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-