diff --git a/Readme.mkd b/Readme.mkd
index 29a20b9..64fb479 100644
--- a/Readme.mkd
+++ b/Readme.mkd
@@ -1 +1,57 @@
-# Rinse and Repeat.
\ No newline at end of file
+# WordPress Skeleton
+
+
+**Wordpress Version**: 2.9.3 (WordPress 3.0 Beta version available in [`3.0`]() branch)
+
+## Installation
+
+> git clone
+> git submodule init
+> git submodule update
+
+This will pull the latest of all git-powered plugins/themes
+
+## Enhanced Configurations
+
+* WordPress installed in `/blog/`, but will serve site from `/`
+* Robust `wp-config.php`
+ - built to support dev + production environments w/ debugging
+ - Default FTP connection info for installing/updating/deleting components
+ -
+* Ready to go `.htaccess`
+* Ready to go `robots.txt`
+
+## Available Themes
+
+* [KennethReitz's Wordpress Theme Skeleton](http://github.com/kennethreitz/wordpress-theme-skeleton)
+* [Jumpchart's Content Wireframing Theme](http://www.jumpchart.com/tour/wordpress/)
+
+## Available Plugins
+
+* After the Deadline (Spelling and grammar checking)
+* Akismet (Comment spam destroyer)
+* Collabpress (Project tracking within backend)
+* CoreyLib (Universal API parser + cache)
+* Disable Updates (I got sick of client sites breaking on updates)
+* Disqus Commenting System (Socialize your site)
+* Front End Editor (Beautiful plugin for editing a page/post's content on the spot)
+* Google Sitemap Generator (Google wants the latest)
+* Markdown 1.3 (I don't like typing HTML all the time)
+* More Fields (No more ugly custom fields + custom post/page types)
+* PageMash (Content-heavy sites can be cumbersome)
+* PushPress (Support for PubSubHubbub)
+* Redirection (They are called permalinks for a reason)
+* Role Manager (Turns WordPress into a real CMS)
+* Shopp (The total ecommerce package)
+* Tantan S3 (Amazon S3 for WordPress uploads)
+* Twitter Tools (AutoPost to Twitter when a post goes live. Soon to be replaced with Salsa )
+* Clippy Syntax Highlighter (GeSHi + Clippy from GitHub for one-click copying of code)
+* WP-Dummy Content (Fills your WordPress installation w/ dummy content)
+* WP-Minify (Fantastic Auto minification plugin w/ cacheing)
+* WP-Super Cache (Very robust plugin for cacheing Posts and/or Pages)
+* WP-Touch (One click iPhone support)
+
+
+
+
+# Rinse and Repeat :)
\ No newline at end of file
diff --git a/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/README.mkd b/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/README.mkd
deleted file mode 100644
index babe724..0000000
--- a/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/README.mkd
+++ /dev/null
@@ -1,17 +0,0 @@
-# Asynchronous Google Analytics Plugin for WordPress
-
-## What is this?
-As you know, Google Analytics is the web's premier analytics tracking and analysis tool.
-Until recently, it has been a (very small) bear to load to page, since it would block content downloads until it was finished loading. To fix this, Google recently announced it's new Asynchronous JavaScript loading capabilities. This will heavily increase your site's loading speed.
-
-## When happend?
-As soon as they did this, the world freaked out, and everyone started talking about it. However, no one decided to make a WordPress plugin to do all the 'hard work' for you.
-
-## I wanna' play!
-So, Kenneth Reitz (http://kennethreitz.com) decided to capitalize on this by, naturally, building a plugin for the masses to utilize this amazing new offering and giving it away for free.
-
-**Enjoy.**
-
-Oh, To install, copy *this folder* to:
-
- wp-content/plugins/ .
\ No newline at end of file
diff --git a/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/plugin.php b/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/plugin.php
deleted file mode 100644
index d613fc3..0000000
--- a/blog/wp-content/plugins/async-google-analytics-wordpress-plugin/plugin.php
+++ /dev/null
@@ -1,78 +0,0 @@
-Kenneth Reitz.
- Author: Kenneth Reitz
- Author URI: http://kennethreitz.com
- Version: 0.3
- */
-
-add_action('admin_menu', 'asyncga_admin_menu');
-
-function asyncga_snippet() { ?>
-
-
-
-
-
\ No newline at end of file
diff --git a/blog/wp-content/plugins/clippy-wordpress-plugin/lib/clippy.swf b/blog/wp-content/plugins/clippy-wordpress-plugin/lib/clippy.swf
deleted file mode 100644
index e46886c..0000000
Binary files a/blog/wp-content/plugins/clippy-wordpress-plugin/lib/clippy.swf and /dev/null differ
diff --git a/blog/wp-content/plugins/clippy-wordpress-plugin/plugin.php b/blog/wp-content/plugins/clippy-wordpress-plugin/plugin.php
deleted file mode 100644
index 3838493..0000000
--- a/blog/wp-content/plugins/clippy-wordpress-plugin/plugin.php
+++ /dev/null
@@ -1,35 +0,0 @@
-Kenneth Reitz.
- Author: Kenneth Reitz
- Author URI: http://kennethreitz.com
- Version: 0.3
- */
-
-
-
-function clippy($text='copy-me') { ?>
-
-
-
\ No newline at end of file
diff --git a/blog/wp-content/plugins/coreylib-wordpress-plugin b/blog/wp-content/plugins/coreylib-wordpress-plugin
new file mode 160000
index 0000000..3a486c7
--- /dev/null
+++ b/blog/wp-content/plugins/coreylib-wordpress-plugin
@@ -0,0 +1 @@
+Subproject commit 3a486c738a9c9480e55210fc3da4290a1efbd006
diff --git a/blog/wp-content/plugins/custom-class-selector/custom-class-selector.php b/blog/wp-content/plugins/custom-class-selector/custom-class-selector.php
deleted file mode 100755
index 6868306..0000000
--- a/blog/wp-content/plugins/custom-class-selector/custom-class-selector.php
+++ /dev/null
@@ -1,89 +0,0 @@
- $className) {
- $themeAdvancedStylesString[] = $displayName.'='.$className;
- }
-
- $themeAdvancedStylesString = implode(';', $themeAdvancedStylesString);
- }
-
- // Update the editor init configuration with our custom styles
- $initArray['theme_advanced_styles'] = $themeAdvancedStylesString;
-
- return $initArray;
-}
-
-/**
- * Imports any custom stylesheets into the editor
- *
- * @param string $css
- * @return string
- */
-function ccs_custom_style($css) {
- // Hook!
- $configuration = apply_filters('customclassselector_configuration', array('stylesheet_url' => $css));
-
- return $configuration['stylesheet_url'];
-}
-
-/**
- * Adds the 'styleselect' control to the top row of editor buttons.
- *
- * @param array $buttons
- * @return array
- */
-function ccs_styleselect_button($buttons){
- array_push($buttons, 'separator', 'styleselect');
- return $buttons;
-}
-
-?>
diff --git a/blog/wp-content/plugins/custom-class-selector/functions-sample.php b/blog/wp-content/plugins/custom-class-selector/functions-sample.php
deleted file mode 100755
index 95ef940..0000000
--- a/blog/wp-content/plugins/custom-class-selector/functions-sample.php
+++ /dev/null
@@ -1,19 +0,0 @@
- 'classname'
- $configuration['custom_styles'] = array(
- 'Bold and Blue' => 'boldblue',
- 'Italic and Red' => 'italicred'
- );
-
- return $configuration;
-}
-add_filter('customclassselector_configuration', 'CCSConfiguration');
-
-?>
\ No newline at end of file
diff --git a/blog/wp-content/plugins/custom-class-selector/readme.txt b/blog/wp-content/plugins/custom-class-selector/readme.txt
deleted file mode 100755
index 4fa22f4..0000000
--- a/blog/wp-content/plugins/custom-class-selector/readme.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-=== Custom Class Selector ===
-Contributors: forgueam, tammyhart
-Tags: css, custom, editor, formatting, html, style, theme, tinymce
-Requires at least: 2.8
-Tested up to: 2.8.5
-Stable tag: 0.1
-
-Allows users to style their post content using custom classes made available by the active theme.
-
-== Description ==
-
-The Custom Class Selector plugin allows users to style their post content using
-custom classes made available by the active theme. Theme developers can make
-custom style classes available within the visual editor by adding a simple
-function to the functions.php file included with their theme.
-
-== Installation ==
-
-This plugin follows the [standard WordPress installation method][]:
-
-1. Upload the `custom-class-selector` folder to the `/wp-content/plugins/` directory
-1. Activate the plugin through the 'Plugins' menu in WordPress
-1. Custom style classes can be selected from the 'Styles' menu in the visual editor
-
-[standard WordPress installation method]: http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
-
-== Frequently Asked Questions ==
-
-= How can I use the custom classes? =
-
-When editing a post or page using the visual editor, you may select custom classes
-from within the "Styles" menu on the editor toolbar.
-
-= Theme Developers: How do I define custom classes for my theme? =
-
-Please reference the functions-sample.php file included with this plugin. This
-file contains an example of the code that needs to be added to the functions.php
-file within your theme directory. Copy the code and make sure to change the
-configuration values accordingly.
-
-= How do I get help if I have a problem? =
-
-Please direct support questions to the "Plugins and Hacks" section of the
-[WordPress.org Support Forum][]. Just make sure and include the tag
-'custom-class-selector'.
-
-[WordPress.org Support Forum]: http://wordpress.org/support/
-
-== Changelog ==
-
-= version 0.1 (Nov 05, 2009) =
- - In the beginning ...
\ No newline at end of file
diff --git a/blog/wp-content/plugins/disable-updates-wordpress-plugin b/blog/wp-content/plugins/disable-updates-wordpress-plugin
new file mode 160000
index 0000000..fb56931
--- /dev/null
+++ b/blog/wp-content/plugins/disable-updates-wordpress-plugin
@@ -0,0 +1 @@
+Subproject commit fb56931720b64b5297daf133a3ca8eef1d52c309
diff --git a/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/README b/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/README
deleted file mode 100644
index e69de29..0000000
diff --git a/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/plugin.php b/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/plugin.php
deleted file mode 100644
index f0e1204..0000000
--- a/blog/wp-content/plugins/google-chrome-frame-wordpress-plugin/plugin.php
+++ /dev/null
@@ -1,17 +0,0 @@
-Google Chrome Frame if available. And it's all thanks to Kenneth Reitz!
- Author: Kenneth Reitz
- Author URI: http://kennethreitz.com
- Version: 1.0
- */
-
-add_action('admin_menu', 'gopenid_admin_menu');
-
-function chromeframe_snippet() { ?>
-
-Kenneth Reitz!
- Author: Kenneth Reitz
- Author URI: http://kennethreitz.com
- Version: 0.3
- */
-
-add_action('admin_menu', 'gopenid_admin_menu');
-
-function gopenid_snippet() { ?>
-
-
-
';
- }
-
- /**
- * The switcher function for WordPress importers
- */
- function dispatch() {
- if (empty ($_GET['step']))
- $step = 0;
- else
- $step = (int) $_GET['step'];
-
- switch ($step) {
- case 0 :
- $this->greet();
- break;
- case 1 :
- check_admin_referer('import-podpress');
- $this->import();
- break;
- }
- }
-
- function podPressImport() {
- // Nothing.
- }
-}
-
-# Start the podPress importer
-$podPress_import = new podPressImport();
-
-# Add the podPress importer to the array of importers
-$wp_importers['podpress'] = array('PodPress', 'Import podPress podcasts into Podcasting.', array ($podPress_import, 'dispatch'));
-
-?>
\ No newline at end of file
diff --git a/blog/wp-content/plugins/podcasting/readme.txt b/blog/wp-content/plugins/podcasting/readme.txt
deleted file mode 100755
index d83c35e..0000000
--- a/blog/wp-content/plugins/podcasting/readme.txt
+++ /dev/null
@@ -1,225 +0,0 @@
-=== Podcasting ===
-Contributors: cavemonkey50, jesse_altman, spiralwebconsulting
-Donate link: http://plugins.spiralwebconsulting.com/podcasting.html#donate
-Tags: podcast, itunes, podcasting, rss, feed, enclosure
-Requires at least: 2.7
-Tested up to: 2.8.4
-Stable tag: 2.3
-
-*Podcasting is no longer supported. [Read this post](http://ronaldheft.com/2009/12/podcastings-plugin-development-comes-to-a-close/) for more information.*
-
-Podcasting enhances WordPress' existing podcast support by adding multiple iTunes-compatible feeds, media players, and an easy to use interface.
-
-== Description ==
-
-Podcasting brings complete podcasting support to WordPress. Podcasting will take a file from somewhere on the web (either your site or another site) and it will add it to an iTunes-based feed. Podcasting also includes a player allowing visitors to your site to view the file on the web.
-
-*Podcasting is brought to you for free by [Spiral Web Consulting](http://spiralwebconsulting.com/). Spiral Web Consulting is a small web development firm specializing in PHP development. Visit our website to learn more, and don't hesitate to ask us to develop your next big WordPress plugin idea.*
-
-= Features =
-
-- Adds a dedicated Podcasting feed with full iTunes support
-- Includes the ability to have multiple podcasting feeds based on file format or other factors
-- Includes both an audio and video player for in-post listening/watching
-- Fully integrates with any existing enclosures already stored in WordPress
-- Offers a migration tool for users of podPress
-
-For more information, visit the [Podcasting plugin page](http://plugins.spiralwebconsulting.com/podcasting.html).
-
-== Installation ==
-
-Please visit [Spiral Web Consulting's forum](http://plugins.spiralwebconsulting.com/forums/viewtopic.php?f=8&t=22) for installation information.
-
-== Frequently Asked Questions ==
-
-Please visit [Spiral Web Consulting's forum](http://plugins.spiralwebconsulting.com/forums/viewforum.php?f=8) for the latest FAQ information.
-
-== Screenshots ==
-
-1. An example of the Podcasting enclosure box before a podcast is added.
-2. The Podcasting enclosure box with an example podcast added.
-3. The audio player before an episode begins playing.
-4. The audio player in the middle of an episode.
-5. The video player before an episode is playing.
-
-Please visit the [Podcasting plugin page](http://plugins.spiralwebconsulting.com/podcasting.html#screenshots) for more screenshots.
-
-== Changelog ==
-
-= 2.3 =
-* Now displays the surrounding player text in feeds with a download link.
-* Adds support for the Send to Editor button to work with text editors other than tinyMCE.
-* Removes a foreach warning message that could appear at the top of a blog page if PHP error reporting is enabled and no formats are specified.
-
-= 2.2.5 =
-* Corrects incorrectly stripped characters from a feed's itunes:summary and itunes:subtitle tags.
-
-= 2.2.4 =
-* Corrects incorrectly stripped characters from a feed's itunes:summary and itunes:subtitle tags.
-* Corrects auto detect url for format feeds.
-
-= 2.2.3 =
-* Fixes a bug that was breaking the save button on the settings page in IE.
-
-= 2.2.2 =
-* Adds missing WordPress menu call that prevented users from loading the settings page under WordPress 2.8.1.
-* Adds a new advanced option to disable the 404 check. Only use this option if you know what you're doing.
-* Moves the disable auto-enclose option to a new Advanced Options subheading on the settings page.
-
-= 2.2.1 =
-* Adds support for WordPress' new changelog readme.txt standard. Version information is now available from within the plugin updater.
-* Enhances the links on the plugin page. Adds a settings, FAQ, and support link.
-
-= 2.2 =
-* Fixes the disappearing / missing enclosure bug introduced with WordPress 2.8's new "enclosure prune" method.
-* Adds a second-line of defense fix to WordPress 2.8's "enclosure prune" method that will prevent enclosures from becoming garbled serialized text.
-* Adds logic to disable the add podcast button for 3 seconds to prevent duplicate enclosures.
-* Adds an additional error message for non-standard http responses.
-* Improves 404 detection for HTML error pages.
-
-= 2.1.2 =
-* Adds error messages to the admin AJAX calls.
-* Adds comment with version number to header output.
-
-= 2.1.1 =
-* Fixes a UTF8 feed title encoding problem.
-* Supports WordPress 2.8.
-
-= 2.1 =
-* Adds local detection of mime types and file size. No longer requires an external connection to successfully enclose a file.
-* Removes stray player code that appears on some WordPress theme pages using the_excerpt.
-* Upgrades the JW FLV Media Player to version 4.4.
-* Adds player support (via JW FLV Media Player) for m4a files.
-
-= 2.0.4 =
-* Fixes encoding issues with certain file URLs. This should eliminate the cURL issue for most people.
-
-= 2.0.3 =
-* Corrects an incorrect function call in the podPress importer left over from converting to a class-based plugin.
-
-= 2.02 =
-* Corrects issue where a manually inserted player would not prevent the automatic player from being added.
-
-= 2.01 =
-* Fixes a blank page issue when automatically including the podcast player on posts.
-
-= 2.0 =
-* Podcasting is now supported by Spiral Web Consulting.
-* Corrects feed URL issues when a category with the name "podcast" existed. Note: Due to this change, the URL for format feeds has changed slightly.
-* Fixes a bug that prevented new enclosures from being added.
-* Converts Podcasting to a class-based plugin. This will make adding new features easier.
-* Drastically improves new/edit enclosure interface to conform with WordPress 2.7 design standards.
-* Adds an option to disable WordPress' automatic enclosing of file URLs.
-* Allows HTML to be entered in the text fields surrounding players.
-* Adds an option to use the video player for audio files.
-* Adds support for handling 404 error situations more gracefully.
-
-= 2.0b20 =
-* Corrects broken format feeds.
-* Adds several better methods for enclosing a feed (mainly fixing redirects not working).
-* Fixes all known feed validation issues as well as a few that would prevent iTunes clients from reading the feed.
-
-= 2.0b19 =
-* Fixes an error that could occur if cURL is missing from PHP.
-
-= 2.0b18 =
-* Corrects encoding issues with video file download links.
-
-= 2.0b17 =
-* Resolves an issue where enclosures could disappear from the main feed when Podcasting is activated.
-* Resolves an issue where a local enclosure was not working for some users do to a missing magic_mime on their server.
-
-= 2.0b16 =
-* Corrects a PHP warning that could occur prevent an enclosure from occurring.
-
-= 2.0b15 =
-* Corrects a bug in remote file retrieval present since beta 13.
-
-= 2.0b14 =
-* Applies the fixes in beta 13 to the podPress importer.
-* Fixes a rare PHP error related to the local enclosure attempt.
-* Corrects a potential XHTML error with certain themes.
-
-= 2.0b13 =
-* Greatly improves enclosure retrieval. If the file can’t be accessed via the internet, a local attempt will be made. Anyone experiencing the missing enclosures bug should upgrade to this version.
-* Adds a notification if there are issues connecting to the file.
-* Corrects some plugin conflicts.
-* Fixes issues with foreign characters in the blog title.
-
-= 2.0b12 =
-* Corrects an XML warning and error in the podcast feed related to the iTunes image.
-* Removes a warning that could display during a podPress import.
-
-= 2.0b11 =
-* Adds support for importing via WPMU.
-* Fixes a bug where the podPress importer would not handle relative URLs correctly.
-
-= 2.0b10 =
-* Improves file type detection for the Send to Editor button.
-* Corrects an XML warning in the podcast feed related to the iTunes image.
-* Improves robustness of script additions, possibly fixing some IE scripting errors.
-* Fixes some errors where importing from podPress would fail.
-
-= 2.0b9 =
-* Now alerts the user if the file they enter does not exist (404). This should help weed out the mysterious disappearing enclosures.
-* Fixes a conflict with some of WordPress 2.7’s admin jQuery (namely the show button in the media gallery).
-* Corrects an XML warning in the podcast feed related to the iTunes image.
-
-= 2.0b8 =
-* Corrects an error message related to the new automatic player addition.
-
-= 2.0b7 =
-* Supports WordPress 2.7 and now requires WordPress 2.6.
-* Includes an importer for migrating from podPress.
-* Adds a video player (JW FLV Player) and updates the audio player (WordPress Audio Player 2.0).
-* Adds an option to automatically include players above or below the content of a post.
-* Adds options to configure player variables on a global or per player basis.
-* Adds options for placing text above, before, and below a player, while specifying a field as a “download link”.
-* Adds a more robust method for enclosing files. This new method adds relative URL support, support for enclosing any type of file, and should alleviate the problems most users were having. If a server issue is detected, a warning is displayed with more information on how to correct the problem.
-* Adds an option to configure the language of RSS feeds.
-* Adds a standard RSS image tag to the feed when itunes:artwork is used.
-* Fixes countless potential feed validation issues.
-
-= 1.65 =
-* Corrects saved draft issue brought on by WordPress 2.6.
-= 1.64 =
-* Adds missing image showing the audio player’s colors.
-* Fixes a bug where changing a format’s slug would forget the format’s explicit setting.
-
-= 1.63 =
-* Corrects typo preventing 1.62’s fix from working.
-
-= 1.62 =
-* Resolves an issue where an episode would not be saved once navigating away from the page.
-
-= 1.61 =
-* Resolves an issue where certain URL characters such as spaces would cause a failure creating an enclosure.
-* Resolves validation issues with the RSS feed.
-
-= 1.6 =
-* Adds options to configure the audio player’s colors.
-
-= 1.52 =
-* The player is no longer replaced with the text “Download Podcast” in feeds to prevent that text from showing up in iTunes descriptions when the player is inserted first in a post.
-
-= 1.51 =
-* Fixes the Send to Editor button when the visual editor is disabled.
-
-= 1.5 =
-* Fixes compatibility issues with WordPress 2.5.
-* Updates to the user interface to reflect the changes in 2.5.
-* Episode addition interface is now fully AJAX. Add and delete episodes without having to refresh the page.
-* Converts [podcast] tag to new shortcode API.
-* Fixes Send to Editor button not working on the visual editor.
-* Note: Version 1.5 requires WordPress 2.5.
-
-= 1.02 =
-* Fixes a critical Javascript error affecting Internet Explorer and possibly other browsers.
-* It is recommended to install this update as soon as possible.
-
-= 1.01 =
-* Fixes a conflict with the Feedburner Feedsmith plugin.
-* Resolves AJAX errors when managing formats.
-
-= 1.0 =
-* Initial release.
\ No newline at end of file
diff --git a/blog/wp-content/plugins/podcasting/screenshot-1.png b/blog/wp-content/plugins/podcasting/screenshot-1.png
deleted file mode 100755
index f862293..0000000
Binary files a/blog/wp-content/plugins/podcasting/screenshot-1.png and /dev/null differ
diff --git a/blog/wp-content/plugins/podcasting/screenshot-2.png b/blog/wp-content/plugins/podcasting/screenshot-2.png
deleted file mode 100755
index 223ee33..0000000
Binary files a/blog/wp-content/plugins/podcasting/screenshot-2.png and /dev/null differ
diff --git a/blog/wp-content/plugins/podcasting/screenshot-3.png b/blog/wp-content/plugins/podcasting/screenshot-3.png
deleted file mode 100755
index af8bf14..0000000
Binary files a/blog/wp-content/plugins/podcasting/screenshot-3.png and /dev/null differ
diff --git a/blog/wp-content/plugins/podcasting/screenshot-4.png b/blog/wp-content/plugins/podcasting/screenshot-4.png
deleted file mode 100755
index 36da497..0000000
Binary files a/blog/wp-content/plugins/podcasting/screenshot-4.png and /dev/null differ
diff --git a/blog/wp-content/plugins/podcasting/screenshot-5.png b/blog/wp-content/plugins/podcasting/screenshot-5.png
deleted file mode 100755
index abe5ae3..0000000
Binary files a/blog/wp-content/plugins/podcasting/screenshot-5.png and /dev/null differ
diff --git a/blog/wp-content/plugins/post-plugin-library/admin-subpages.php b/blog/wp-content/plugins/post-plugin-library/admin-subpages.php
deleted file mode 100644
index c79aa8c..0000000
--- a/blog/wp-content/plugins/post-plugin-library/admin-subpages.php
+++ /dev/null
@@ -1,121 +0,0 @@
-__construct($parent_page);
- }
-
- function __construct($parent_page='') {
- if ($parent_page === '') {
- $parent_page = $_SERVER['QUERY_STRING'];
- $p1 = strpos($parent_page, 'page=');
- $p2 = strpos($parent_page, '&');
- if ($p2 === false) {
- $parent_page = substr($parent_page, $p1+5);
- } else {
- $parent_page = substr($parent_page, $p1+5, $p2-$p1-5);
- }
- }
- $this->parent_page = $parent_page;
- }
-
- function __destruct() {
- }
-
- function add_subpage($title, $slug, $view) {
- $this->pages[] = array('title' => $title, 'slug' => $slug, 'view' => $view);
- }
-
- function add_subpages($pages) {
- foreach ($pages as $page) {
- $this->pages[] = array('title' => $page[0], 'slug' => $page[1], 'view' => $page[2]);
- }
- }
-
- function page_from_slug($slug) {
- if (!isset($slug)) {
- return $this->pages[0];
- }
- foreach ($this->pages as $page) {
- if ($page['slug'] === $slug) {
- return $page;
- }
- }
- die('non-existent slug');
- }
-
- function display_menu() {
- echo "\n
- get_results("SELECT * FROM $wpdb->categories WHERE category_count <> 0 ORDER BY cat_name");
- $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");
- }
- if ($categories) {
- echo "\n\t
leave blank for default order', 'post_plugin_library') ?>
-
-
-
Output Tag
Order
Case
-
-
first
-
-
-
-
-
-
-
-
-
-
then
-
-
-
-
-
-
-
-
-
-
-
- get_col( "
- SELECT meta_key
- FROM $wpdb->postmeta
- WHERE meta_key NOT LIKE '\_%'
- GROUP BY meta_key
- ORDER BY meta_id DESC
- LIMIT $limit" );
- $metaselect = "";
- }
-
- ?>
-
-
-
-
-
Field
Order
Case
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
%
-
%
-
% ( adds up to 100% )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (overrides the sort criteria above)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ' . $plugin_data['Name'] . '';
- } else {
- $plugin_data['Title'] = $name;
- }
- }
- }
- return $plugin_data;
-}
-
-function ppl_admin_footer($plugin_file, $donate_key='') {
- $plugin_data = ppl_get_plugin_data($plugin_file);
- $output = array();
- $output[] = $plugin_data['Title'] . ' plugin';
- $output[] = 'Version ' . $plugin_data['Version'];
- $output[] = 'by ' . $plugin_data['Author'];
- if ($donate_key) {
- $donate_url = 'http://rmarsh.com/donate/' . $donate_key . '/';
- // random shades of red, orange and yellow to attract attention -- subtly I hope
- $colour = '#ff' . dechex(mt_rand(0, 255)) . '00';
- $output[] = 'All donations welcomed!';
- }
- echo implode(' | ', $output) . ' ';
-}
-
-?>
\ No newline at end of file
diff --git a/blog/wp-content/plugins/post-plugin-library/common_functions.php b/blog/wp-content/plugins/post-plugin-library/common_functions.php
deleted file mode 100644
index 8fdb007..0000000
--- a/blog/wp-content/plugins/post-plugin-library/common_functions.php
+++ /dev/null
@@ -1,648 +0,0 @@
-{...}'.
- $result = array();
- if($args){
- // the default separator is '&' but you may wish to include the character in a title, say,
- // so you can specify an alternative separator by making the first character of $args
- // '&' and the second character your new separator...
- if (substr($args, 0, 1) === '&') {
- $s = substr($args, 1, 1);
- $args = substr($args, 2);
- } else {
- $s = '&';
- }
- // separate the arguments into key=value pairs
- $arguments = explode($s, $args);
- foreach($arguments as $arg){
- if($arg){
- // find the position of the first '='
- $i = strpos($arg, '=');
- // if not a valid format ('key=value) we ignore it
- if ($i){
- $key = substr($arg, 0, $i);
- $val = substr($arg, $i+1);
- $result[$key]=$val;
- }
- }
- }
- }
- return $result;
-}
-
-function ppl_set_options($option_key, $arg, $default_output_template) {
- $options = get_option($option_key);
- // deal with compound options
- if (isset($arg['custom-key'])) {$arg['custom']['key'] = $arg['custom-key']; unset($arg['custom-key']);}
- if (isset($arg['custom-op'])) {$arg['custom']['op'] = $arg['custom-op']; unset($arg['custom-op']);}
- if (isset($arg['custom-value'])) {$arg['custom']['value'] = $arg['custom-value']; unset($arg['custom-value']);}
- if (isset($arg['age-direction'])) {$arg['age']['direction'] = $arg['age-direction']; unset($arg['age-direction']);}
- if (isset($arg['age-length'])) {$arg['age']['length'] = $arg['age-length']; unset($arg['age-length']);}
- if (isset($arg['age-duration'])) {$arg['age']['duration'] = $arg['age-duration']; unset($arg['age-duration']);}
- if (isset($arg['sort-by1'])) {$arg['sort']['by1'] = $arg['sort-by1']; unset($arg['sort-by1']);}
- if (isset($arg['sort-order1'])) {$arg['sort']['order1'] = $arg['sort-order1']; unset($arg['sort-order1']);}
- if (isset($arg['sort-case1'])) {$arg['sort']['case1'] = $arg['sort-case1']; unset($arg['sort-case1']);}
- if (isset($arg['sort-by2'])) {$arg['sort']['by2'] = $arg['sort-by2']; unset($arg['sort-by2']);}
- if (isset($arg['sort-order2'])) {$arg['sort']['order2'] = $arg['sort-order2']; unset($arg['sort-order2']);}
- if (isset($arg['sort-case2'])) {$arg['sort']['case2'] = $arg['sort-case2']; unset($arg['sort-case2']);}
- if (isset($arg['status-publish'])) {$arg['status']['publish'] = $arg['status-publish']; unset($arg['status-publish']);}
- if (isset($arg['status-private'])) {$arg['status']['private'] = $arg['status-private']; unset($arg['status-private']);}
- if (isset($arg['status-draft'])) {$arg['status']['draft'] = $arg['status-draft']; unset($arg['status-draft']);}
- if (isset($arg['status-future'])) {$arg['status']['future'] = $arg['status-future']; unset($arg['status-future']);}
- // then fill in the defaults
- if (!isset($arg['limit'])) $arg['limit'] = stripslashes($options['limit']);
- if (!isset($arg['skip'])) $arg['skip'] = stripslashes($options['skip']);
- if (!isset($arg['divider'])) $arg['divider'] = stripslashes($options['divider']);
- if (!isset($arg['omit_current_post'])) $arg['omit_current_post'] = $options['omit_current_post'];
- if (!isset($arg['just_current_post'])) $arg['just_current_post'] = $options['just_current_post'];
- if (!isset($arg['show_private'])) $arg['show_private'] = $options['show_private'];
- if (!isset($arg['show_pages'])) $arg['show_pages'] = $options['show_pages'];
- if (!isset($arg['show_attachments'])) $arg['show_attachments'] = $options['show_attachments'];
- if (!isset($arg['none_text'])) $arg['none_text'] = stripslashes($options['none_text']);
- if (!isset($arg['no_text'])) $arg['no_text'] = $options['no_text'];
- if (!isset($arg['tag_str'])) $arg['tag_str'] = stripslashes($options['tag_str']);
- if (!isset($arg['excluded_cats'])) $arg['excluded_cats'] = stripslashes($options['excluded_cats']);
- if (!isset($arg['included_cats'])) $arg['included_cats'] = stripslashes($options['included_cats']);
- if (!isset($arg['excluded_authors'])) $arg['excluded_authors'] = stripslashes($options['excluded_authors']);
- if (!isset($arg['included_authors'])) $arg['included_authors'] = stripslashes($options['included_authors']);
- if (!isset($arg['excluded_posts'])) $arg['excluded_posts'] = stripslashes($options['excluded_posts']);
- if (!isset($arg['included_posts'])) $arg['included_posts'] = stripslashes($options['included_posts']);
- if (!isset($arg['stripcodes'])) $arg['stripcodes'] = $options['stripcodes'];
- if (!isset($arg['prefix'])) $arg['prefix'] = stripslashes($options['prefix']);
- if (!isset($arg['suffix'])) $arg['suffix'] = stripslashes($options['suffix']);
- if (!isset($arg['output_template'])) $arg['output_template'] = stripslashes($options['output_template']);
- // an empty output_template makes no sense so we fall back to the default
- if ($arg['output_template'] == '') $arg['output_template'] = $default_output_template;
- if (!isset($arg['match_cat'])) $arg['match_cat'] = $options['match_cat'];
- if (!isset($arg['match_tags'])) $arg['match_tags'] = $options['match_tags'];
- if (!isset($arg['match_author'])) $arg['match_author'] = $options['match_author'];
- if (!isset($arg['age'])) $arg['age'] = $options['age'];
- if (!isset($arg['custom'])) $arg['custom'] = $options['custom'];
- if (!isset($arg['sort'])) $arg['sort'] = $options['sort'];
- if (!isset($arg['status'])) $arg['status'] = $options['status'];
-
- // just for recent_posts
- if (!isset($arg['date_modified'])) $arg['date_modified'] = $options['date_modified'];
-
- // just for recent_comments
- if (!isset($arg['group_by'])) $arg['group_by'] = $options['group_by'];
- if (!isset($arg['group_template'])) $arg['group_template'] = stripslashes($options['group_template']);
- if (!isset($arg['show_type'])) $arg['show_type'] = $options['show_type'];
- if (!isset($arg['no_author_comments'])) $arg['no_author_comments'] = $options['no_author_comments'];
- if (!isset($arg['no_user_comments'])) $arg['no_user_comments'] = $options['no_user_comments'];
- if (!isset($arg['unique'])) $arg['unique'] = $options['unique'];
-
- // just for similar_posts[feed]
- if (!isset($arg['combine'])) $arg['combine'] = $options['crossmatch'];
- if (!isset($arg['weight_content'])) $arg['weight_content'] = $options['weight_content'];
- if (!isset($arg['weight_title'])) $arg['weight_title'] = $options['weight_title'];
- if (!isset($arg['weight_tags'])) $arg['weight_tags'] = $options['weight_tags'];
- if (!isset($arg['num_terms'])) $arg['num_terms'] = stripslashes($options['num_terms']);
- if (!isset($arg['term_extraction'])) $arg['term_extraction'] = $options['term_extraction'];
- if (!isset($arg['hand_links'])) $arg['hand_links'] = $options['hand_links'];
-
- // just for other_posts
- if (!isset($arg['orderby'])) $arg['orderby'] = stripslashes($options['orderby']);
- if (!isset($arg['orderby_order'])) $arg['orderby_order'] = $options['orderby_order'];
- if (!isset($arg['orderby_case'])) $arg['orderby_case'] = $options['orderby_case'];
-
- // the last options cannot be set via arguments
- $arg['stripcodes'] = $options['stripcodes'];
- $arg['utf8'] = $options['utf8'];
- $arg['cjk'] = $options['cjk'];
- $arg['use_stemmer'] = $options['use_stemmer'];
- $arg['batch'] = $options['batch'];
- $arg['content_filter'] = $options['content_filter'];
- $arg['widget_parameters'] = stripslashes($options['widget_parameters']);
- $arg['widget_condition'] = stripslashes($options['widget_condition']);
- $arg['feed_on'] = $options['feed_on'];
- $arg['feed_priority'] = $options['feed_priority'];
- $arg['feed_parameters'] = stripslashes($options['feed_parameters']);
- $arg['append_on'] = $options['append_on'];
- $arg['append_priority'] = $options['append_priority'];
- $arg['append_parameters'] = stripslashes($options['append_parameters']);
- $arg['append_condition'] = stripslashes($options['append_condition']);
- $arg['exclude_users'] = $options['exclude_users'];
- $arg['count_home'] = $options['count_home'];
- $arg['count_feed'] = $options['count_feed'];
- $arg['count_single'] = $options['count_single'];
- $arg['count_archive'] = $options['count_archive'];
- $arg['count_category'] = $options['count_category'];
- $arg['count_page'] = $options['count_page'];
- $arg['count_search'] = $options['count_search'];
-
- return $arg;
-}
-
-function ppl_prepare_template($template) {
- // Now we process the output_template to find the embedded tags which are to be replaced
- // with values taken from the database.
- // A tag is of the form, {tag:ext}, where the tag part will be evaluated and replaced
- // and the optional ext part provides extra data pertinent to that tag
- preg_match_all('/{((?:[^{}]|{[^{}]*})*)}/', $template, $matches);
- $translations = array();
- foreach ($matches[1] as $match) {
- list($tag, $ext) = explode(':', $match, 2);
- $action = output_tag_action($tag);
- if (function_exists($action)) {
- // store the action that instantiates the tag
- $translations['acts'][] = $action;
- // add the tag in a form ready to use in translation later
- $translations['fulltags'][] = '{'.$match.'}';
- // the extra data if any
- $translations['exts'][] = $ext;
- }
- }
- return $translations;
-}
-
-function ppl_expand_template($result, $template, $translations, $option_key) {
- global $wpdb, $wp_version;
- $replacements = array();
- $numtags = count($translations['fulltags']);
- for ($i = 0; $i < $numtags; $i++) {
- $fulltag = $translations['fulltags'][$i];
- $act = $translations['acts'][$i];
- $ext = $translations['exts'][$i];
- $replacements[$fulltag] = $act($option_key, $result, $ext);
- }
- // Replace every valid tag with its value
- $tmp = strtr($template, $replacements)."\n";
- return $tmp;
-}
-
-
-function ppl_sort_items($sort, $results, $option_key, $group_template, $items) {
- $translations1 = ppl_prepare_template($sort['by1']);
- foreach ($results as $result) {
- $key1 = ppl_expand_template($result, $sort['by1'], $translations1, $option_key);
- if ($sort['case1'] !== 'false') $key1 = strtolower($key1);
- $keys1[] = $key1;
- }
- if ($sort['by2'] !== '') {
- $translations2 = ppl_prepare_template($sort['by2']);
- foreach ($results as $result) {
- $key2 = ppl_expand_template($result, $sort['by2'], $translations2, $option_key);
- if ($sort['case2'] !== 'false') $key2 = strtolower($key2);
- $keys2[] = $key2;
- }
- }
- if (!empty($keys2)) {
- array_multisort($keys1, intval($sort['order1']), $keys2, intval($sort['order2']), $results, $items);
- } else {
- array_multisort($keys1, intval($sort['order1']), $results, $items);
- }
- // merge the group titles into the items
- if ($group_template) {
- $group_translations = ppl_prepare_template($group_template);
- $prev_key = '';
- $insertions = 0;
- foreach ($keys1 as $n => $key) {
- if ($prev_key !== $key) {
- array_splice($items, $n+$insertions, 0, ppl_expand_template($results[$n], $group_template, $group_translations, $option_key));
- $insertions++;
- }
- $prev_key = $key;
- }
- }
- return $items;
-}
-
-// the $post global can be overwritten by the use of $wp_query so we go back to the source
-// note the addition of a 'manual overide' allowing the current posts to me marked by similar_posts_mark_current for example
-function ppl_current_post_id($manual_current_ID = -1) {
- $the_ID = -1;
- if ($manual_current_ID > 0) {
- $the_ID = $manual_current_ID;
- } else if (isset($GLOBALS['wp_the_query'])) {
- $the_ID = $GLOBALS['wp_the_query']->post->ID;
- if (!$the_ID) $the_ID = $GLOBALS['wp_the_query']->posts[0]->ID;
- } else {
- $the_ID = $GLOBALS['post']->ID;
- }
- return $the_ID;
-}
-
-
-/*
-
- Functions to fill in the WHERE part of the workhorse SQL
-
-*/
-
-function where_match_author() {
- $current_author = $GLOBALS['wp_the_query']->post->post_author;
- return "post_author = $current_author";
-}
-
-function where_match_tags($match_tags) {
- global $wpdb, $wp_version;
- $args = array('fields' => 'ids');
- $tag_ids = wp_get_object_terms(ppl_current_post_id(), 'post_tag', $args);
- if ( is_array($tag_ids) && count($tag_ids) > 0 ) {
- if ($match_tags === 'any') {
- $ids = get_objects_in_term($tag_ids, 'post_tag');
- } else {
- $ids = array();
- foreach ($tag_ids as $tag_id){
- if (count($ids) > 0) {
- $ids = array_intersect($ids, get_objects_in_term($tag_id, 'post_tag'));
- } else {
- $ids = get_objects_in_term($tag_id, 'post_tag');
- }
- }
- }
- if ( is_array($ids) && count($ids) > 0 ) {
- $ids = array_unique($ids);
- $out_posts = "'" . implode("', '", $ids) . "'";
- $sql = "$wpdb->posts.ID IN ($out_posts)";
- } else {
- $sql = "1 = 2";
- }
- } else {
- $sql = "1 = 2";
- }
- return $sql;
-}
-
-function where_show_pages($show_pages, $show_attachments='false') {
- if (function_exists('get_post_type')) {
- $typelist = array();
- if ($show_attachments === 'true') {$typelist[] = "'attachment'";};
- if ($show_pages === 'true') {$typelist[] = "'page'"; $typelist[] = "'post'";}
- else if ($show_pages === 'false') {$typelist[] = "'post'";}
- else if ($show_pages === 'but') {$typelist[] = "'page'";};
- if (count($typelist)===1) {
- $sql = "post_type=$typelist[0]";
- } else {
- $sql = "post_type IN (" . implode(',',$typelist) . ")";
- }
- } else {
- if ($show_pages === 'true') $sql = "post_status IN ('publish', 'static')";
- else if ($show_pages === 'false') $sql = "post_status = 'publish'";
- else if ($show_pages === 'but') $sql = "post_status = 'static'";
- }
- return $sql;
-}
-
-function where_show_status($status, $include_inherit='false') {
- $set = array();
- $status = (array) $status;
- // a quick way of allowing for attachments having status=inherit
- if ($include_inherit === 'true') $status['inherit'] = 'true';
- foreach ($status as $name => $state) {
- if ($state === 'true') $set[] = "'$name'";
- }
- if ($set) {
- $result = implode(',', $set);
- return "post_status IN ($result)";
- } else {
- return "1 = 2";
- }
-}
-
-// a replacement, for WP < 2.3, ONLY category children
-if (!function_exists('get_term_children')) {
- function get_term_children($term, $taxonomy) {
- if ($taxonomies !== 'category') return array();
- return get_categories('child_of='.$term);
- }
-}
-
-
-// a replacement, for WP < 2.3, ONLY to get posts with given category IDs
-if (!function_exists('get_objects_in_term')) {
- function get_objects_in_term($terms, $taxonomies) {
- global $wpdb;
- if ($taxonomies !== 'category') return array();
- $terms = "'" . implode("', '", $terms) . "'";
- $object_ids = $wpdb->get_col("SELECT post_id FROM $wpdb->post2cat WHERE category_id IN ($terms)");
- if (!$object_ids) return array();
- return $object_ids;
- }
-}
-
-function where_match_category() {
- global $wpdb, $wp_version;
- $cat_ids = '';
- foreach(get_the_category() as $cat) {
- if ($cat->cat_ID) $cat_ids .= $cat->cat_ID . ',';
- }
- $cat_ids = rtrim($cat_ids, ',');
- $catarray = explode(',', $cat_ids);
- foreach ( $catarray as $cat ) {
- $catarray = array_merge($catarray, get_term_children($cat, 'category'));
- }
- $catarray = array_unique($catarray);
- $ids = get_objects_in_term($catarray, 'category');
- $ids = array_unique($ids);
- if ( is_array($ids) && count($ids) > 0 ) {
- $out_posts = "'" . implode("', '", $ids) . "'";
- $sql = "$wpdb->posts.ID IN ($out_posts)";
- } else {
- $sql = "1 = 2";
- }
- return $sql;
-}
-
-function where_included_cats($included_cats) {
- global $wpdb, $wp_version;
- $catarray = explode(',', $included_cats);
- foreach ( $catarray as $cat ) {
- $catarray = array_merge($catarray, get_term_children($cat, 'category'));
- }
- $catarray = array_unique($catarray);
- $ids = get_objects_in_term($catarray, 'category');
- if ( is_array($ids) && count($ids) > 0 ) {
- $ids = array_unique($ids);
- $in_posts = "'" . implode("', '", $ids) . "'";
- $sql = "ID IN ($in_posts)";
- } else {
- $sql = "1 = 2";
- }
- return $sql;
-}
-
-function where_excluded_cats($excluded_cats) {
- global $wpdb, $wp_version;
- $catarray = explode(',', $excluded_cats);
- foreach ( $catarray as $cat ) {
- $catarray = array_merge($catarray, get_term_children($cat, 'category'));
- }
- $catarray = array_unique($catarray);
- $ids = get_objects_in_term($catarray, 'category');
- if ( is_array($ids) && count($ids) > 0 ) {
- $out_posts = "'" . implode("', '", $ids) . "'";
- $sql = "$wpdb->posts.ID NOT IN ($out_posts)";
- } else {
- $sql = "1 = 1";
- }
- return $sql;
-}
-
-function where_excluded_authors($excluded_authors){
- return "post_author NOT IN ( $excluded_authors )";
-}
-
-function where_included_authors($included_authors){
- return "post_author IN ( $included_authors )";
-}
-
-function where_excluded_posts($excluded_posts) {
- return "ID NOT IN ( $excluded_posts )";
-}
-
-function where_included_posts($included_posts) {
- return "ID IN ( $included_posts )";
-}
-
-function where_tag_str($tag_str) {
- global $wpdb;
- if ( strpos($tag_str, ',') !== false ) {
- $intags = explode(',', $tag_str);
- foreach ( (array) $intags as $tag ) {
- $tags[] = sanitize_term_field('name', $tag, 0, 'post_tag', 'db');
- }
- $tag_type = 'any';
- } else if ( strpos($tag_str, '+') !== false ) {
- $intags = explode('+', $tag_str);
- foreach ( (array) $intags as $tag ) {
- $tags[] = sanitize_term_field('name', $tag, 0, 'post_tag', 'db');
- }
- $tag_type = 'all';
- } else {
- $tags[] = sanitize_term_field('name', $tag_str, 0, 'post_tag', 'db');
- $tag_type = 'any';
- }
- $ids = array();
- if ($tag_type == 'any') {
- foreach ($tags as $tag){
- if (is_term($tag, 'post_tag')) {
- $t = get_term_by('name', $tag, 'post_tag');
- $ids = array_merge($ids, get_objects_in_term($t->term_id, 'post_tag'));
- }
- }
- } else {
- foreach ($tags as $tag){
- if (is_term($tag, 'post_tag')) {
- $t = get_term_by('name', $tag, 'post_tag');
- if (count($ids) > 0) {
- $ids = array_intersect($ids, get_objects_in_term($t->term_id, 'post_tag'));
- } else {
- $ids = get_objects_in_term($t->term_id, 'post_tag');
- }
- }
- }
- }
- if ( is_array($ids) && count($ids) > 0 ) {
- $ids = array_unique($ids);
- $out_posts = "'" . implode("', '", $ids) . "'";
- $sql .= "$wpdb->posts.ID IN ($out_posts)";
- } else $sql .= "1 = 2";
- return $sql;
-}
-
-// note the addition of a 'manual overide' allowing the current posts to me marked by similar_posts_mark_current for example
-function where_omit_post($manual_current_ID = -1) {
- $postid = ppl_current_post_id($manual_current_ID);
- if ($postid <= 1) $postid = -1;
- return "ID != $postid";
-}
-
-function where_just_post() {
- $postid = ppl_current_post_id();
- if ($postid <= 1) $postid = -1;
- return "ID = $postid";
-}
-
-function where_hide_pass() {
- return "post_password =''";
-}
-
-function where_hide_future() {
- // from wp 2.1 future posts are taken care of by post status
- $time_difference = get_option('gmt_offset');
- $now = gmdate("Y-m-d H:i:s",(time()+($time_difference*3600)));
- $sql = "post_date <= '$now'";
- return $sql;
-}
-
-function where_fulltext_match($weight_title, $titleterms, $weight_content, $contentterms, $weight_tags, $tagterms) {
- $wsql = array();
- if ($weight_title) $wsql[] = "MATCH (`title`) AGAINST ( \"$titleterms\" )";
- if ($weight_content) $wsql[] = "MATCH (`content`) AGAINST ( \"$contentterms\" )";
- if ($weight_tags) $wsql[] = "MATCH (`tags`) AGAINST ( \"$tagterms\" )";
- return '(' . implode(' OR ', $wsql) . ') ' ;
-}
-
-function where_author_comments() {
- $author_email = get_the_author_email();
- return "'$author_email' != comment_author_email";
-}
-
-function where_user_comments() {
- return "user_id = 0";
-}
-
-function score_fulltext_match($table_name, $weight_title, $titleterms, $weight_content, $contentterms, $weight_tags, $tagterms, $forced_ids='') {
- global $wpdb;
- $wsql = array();
- if ($weight_title) $wsql[] = "(".number_format($weight_title, 4, '.', '')." * (MATCH (`title`) AGAINST ( \"$titleterms\" )))";
- if ($weight_content) $wsql[] = "(".number_format($weight_content, 4, '.', '')." * (MATCH (`content`) AGAINST ( \"$contentterms\" )))";
- if ($weight_tags) $wsql[] = "(".number_format($weight_tags, 4, '.', '')." * (MATCH (`tags`) AGAINST ( \"$tagterms\" )))";
- if ($forced_ids) {
- // apply a delta function to boost the score for certain IDs
- $fIDs = explode(',', $forced_ids);
- foreach($fIDs as $fID) {
- $wsql[] = "100 * (1 - SIGN(ID ^ $fID))"; // the previous delta was $wsql[] = "100*EXP(-10*POW((ID-$fID),2))";
-
- }
- }
- return '(' . implode(' + ', $wsql) . " ) as score FROM `$table_name` LEFT JOIN `$wpdb->posts` ON `pID` = `ID` ";
-}
-
-function where_comment_type($comment_type) {
- if ($comment_type === 'comments') $sql = "comment_type = ''";
- elseif ($comment_type === 'trackbacks') $sql = "comment_type != ''";
- return $sql;
-}
-
-function where_check_age($direction, $length, $duration) {
- global $wp_version;
- if ('none' === $direction) return '';
- $age = "DATE_SUB(CURDATE(), INTERVAL $length $duration)";
- // we only filter out posts based on age, not pages
- if ('before' === $direction) {
- if (function_exists('get_post_type')) {
- return "(post_date <= $age OR post_type='page')";
- } else {
- return "(post_date <= $age OR post_status='static')";
- }
- } else {
- if (function_exists('get_post_type')) {
- return "(post_date >= $age OR post_type='page')";
- } else {
- return "(post_date >= $age OR post_status='static')";
- }
- }
-}
-
-function where_check_custom($key, $op, $value) {
- if ($op === 'EXISTS') {
- return "meta_key = '$key'";
- } else {
- return "(meta_key = '$key' && meta_value $op '$value')";
- }
-}
-
-/*
-
- End of SQL functions
-
-*/
-
-function ppl_microtime() {
- list($usec, $sec) = explode(" ", microtime());
- return ((float)$usec + (float)$sec);
-}
-
-/*
-
- Some routines to handle appending output
-
-*/
-
-// array of what to append to posts
-global $ppl_filter_data;
-$ppl_filter_data = array();
-
-// each plugin calls this on startup to have content scanned for its own tag
-function ppl_register_post_filter($type, $key, $class, $condition='') {
- global $ppl_filter_data;
- $options = get_option($key);
- $priority = $options[$type . '_priority'];
- $parameters = stripslashes($options[$type . '_parameters']);
- $ppl_filter_data [] = array('type' => $type, 'priority' => $priority, 'class' => $class, 'parameters' => $parameters, 'key' => $key, 'condition' => stripslashes($condition));
- // we want them in decreasing priority
- sort($ppl_filter_data);
-}
-
-function ppl_post_filter($content) {
- global $ppl_filter_data;
- foreach ($ppl_filter_data as $data) {
- if (('append' === $data['type'] && !is_feed() && eval($data['condition'])) || ('feed' === $data['type'] && is_feed()) )
- $content .= call_user_func_array(array($data['class'], 'execute'), array($data['parameters'], '
{link}
', $data['key']));
- }
- return $content;
-}
-
-function ppl_post_filter_init() {
- global $ppl_filter_data;
- if (!$ppl_filter_data) return;
- add_filter('the_content', 'ppl_post_filter', 5);
-}
-
-// watch out that the registration functions are called earlier
-add_action ('init', 'ppl_post_filter_init');
-
-/*
-
- Now some routines to handle content filtering
-
-*/
-
-// the '|'-separated list of valid content filter tags
-global $ppl_filter_tags;
-
-// each plugin calls this on startup to have content scanned for its own tag
-function ppl_register_content_filter($tag) {
- global $ppl_filter_tags;
- if (!$ppl_filter_tags) {
- $ppl_filter_tags = $tag;
- } else {
- $tags = explode('|', $ppl_filter_tags);
- $tags[] = $tag;
- $tags = array_unique($tags);
- $ppl_filter_tags = implode('|', $tags);
- }
-}
-
-
-function ppl_do_replace($matches) {
- return call_user_func(array($matches[1], 'execute'), $matches[2]);
-}
-
-function ppl_content_filter($content) {
- global $ppl_filter_tags;
- // replaces every instance of "", for example, with the output of the plugin
- // the filter tag can be followed by text which will be used as a parameter string to change the behaviour of the plugin
- return preg_replace_callback("//", "ppl_do_replace", $content);
-}
-
-function ppl_content_filter_init() {
- global $ppl_filter_tags;
- if (!$ppl_filter_tags) return;
- add_filter( 'the_content', 'ppl_content_filter', 5 );
- add_filter( 'the_content_rss', 'ppl_content_filter', 5 );
- add_filter( 'the_excerpt', 'ppl_content_filter', 5 );
- add_filter( 'the_excerpt_rss', 'ppl_content_filter', 5 );
- add_filter( 'widget_text', 'ppl_content_filter', 5 );
-}
-
-// watch out that the registration functions are called earlier
-add_action ('init', 'ppl_content_filter_init');
-add_action ('init', 'ppl_post_filter_init');
-
-?>
\ No newline at end of file
diff --git a/blog/wp-content/plugins/post-plugin-library/output_tags.php b/blog/wp-content/plugins/post-plugin-library/output_tags.php
deleted file mode 100644
index f9665a2..0000000
--- a/blog/wp-content/plugins/post-plugin-library/output_tags.php
+++ /dev/null
@@ -1,1072 +0,0 @@
-ID;
-}
-
-function otf_title ($option_key, $result, $ext) {
- $value = oth_truncate_text($result->post_title, $ext);
- return apply_filters('the_title', $value);
-}
-
-function otf_url($option_key, $result, $ext) {
- $value = apply_filters('the_permalink', get_permalink($result->ID));
- return oth_truncate_text($value, $ext);
-}
-
-function otf_author($option_key, $result, $ext) {
- if ($ext) {
- $s = explode(':', $ext);
- if (count($s) == 1) {
- $type = $s[0];
- }
- }
- switch ($type) {
- case 'display':
- $author = get_author_name($result->post_author);
- break;
- case 'full':
- $auth = get_userdata($result->post_author);
- $author = $auth->first_name.' '.$auth->last_name;
- break;
- case 'reverse':
- $auth = get_userdata($result->post_author);
- $author = $auth->last_name.', '.$auth->first_name;
- break;
- case 'first':
- $auth = get_userdata($result->post_author);
- $author = $auth->first_name;
- break;
- case 'last':
- $auth = get_userdata($result->post_author);
- $author = $auth->last_name;
- break;
- default:
- $author = get_author_name($result->post_author);
- }
- return $author;
-}
-
-function otf_authorurl($option_key, $result, $ext) {
- return get_author_posts_url($result->post_author);
-}
-
-function otf_date($option_key, $result, $ext) {
- if ($ext === 'raw') return $result->post_date;
- else return oth_format_date($result->post_date, $ext);
-}
-
-function otf_dateedited($option_key, $result, $ext) {
- if ($ext === 'raw') return $result->post_modified;
- else return oth_format_date($result->post_modified, $ext);
-}
-
-function otf_time($option_key, $result, $ext) {
- return oth_format_time($result->post_date, $ext);
-}
-
-function otf_timeedited($option_key, $result, $ext) {
- return oth_format_time($result->post_modified, $ext);
-}
-
-function otf_excerpt($option_key, $result, $ext) {
- if (!$ext) {
- $len = 55;
- $type = 'a';
- } else {
- $s = explode(':', $ext);
- if (count($s) == 1) {
- $s[] = 'a';
- }
- $len = $s[0];
- $type = $s[1];
- if ($type === 'b') {
- if (count($s) > 2) {
- $more = $s[2];
- } else {
- $more = ' …';
- }
- if (count($s) > 3) {
- if ($s[3] === 'link') {
- $url = otf_url($option_key, $result, '');
- $more = ''.$more.'';
- }
- }
- if (count($s) > 4) {
- $numsent = $s[4];
- }
- }
- }
- switch ($type) {
- case 'a':
- $value = trim($result->post_excerpt);
- if ($value == '') $value = $result->post_content;
- $value = oth_trim_excerpt($value, $ext);
- break;
- case 'b':
- $value = trim($result->post_excerpt);
- if ($value === '') {
- $value = $result->post_content;
- $value = convert_smilies($value);
- $value = oth_trim_extract($value, $len, $more, $numsent);
- $value = apply_filters('get_the_content', $value);
- remove_filter('the_content', 'ppl_content_filter', 5);
- remove_filter('the_content', 'ppl_post_filter', 5);
- $value = apply_filters('the_content', $value);
- add_filter('the_content', 'ppl_content_filter', 5);
- add_filter('the_content', 'ppl_post_filter', 5);
-
- } else {
- $value = convert_smilies($value);
- $value = apply_filters('get_the_excerpt', $value);
- remove_filter('the_excerpt', 'ppl_content_filter', 5);
- $value = apply_filters('the_excerpt', $value);
- add_filter('the_excerpt', 'ppl_content_filter', 5);
- }
- break;
- default:
- $value = trim($result->post_excerpt);
- if ($value == '') $value = $result->post_content;
- $value = oth_trim_excerpt($value, $len);
- break;
- }
- return $value;
-}
-
-function otf_snippet($option_key, $result, $ext) {
- $len = 100;
- $type = 'char';
- $more = '';
- $link = 'nolink';
- if ($ext) {
- $s = explode(':', $ext);
- if ($s[0]) $len = $s[0];
- if ($s[1]) $type = $s[1];
- if ($s[2]) $more = $s[2];
- if ($s[3]) $link = $s[3];
- }
- if ($link === 'link') {
- $url = otf_url($option_key, $result, '');
- $more = ''.$more.'';
- }
- return oth_format_snippet($result->post_content, $option_key, $type, $len, $more);
-}
-
-function otf_snippetword($option_key, $result, $ext) {
- $len = 100;
- $more = '';
- $link = 'nolink';
- if ($ext) {
- $s = explode(':', $ext);
- if ($s[0]) $len = $s[0];
- if ($s[1]) $more = $s[1];
- if ($s[2]) $link = $s[2];
- }
- if ($link === 'link') {
- $url = otf_url($option_key, $result, '');
- $more = ''.$more.'';
- }
- return oth_format_snippet($result->post_content, $option_key, 'word', $len, $more);
-}
-
-function otf_fullpost($option_key, $result, $ext) {
- remove_filter( 'the_content', 'ppl_content_filter', 5 );
- remove_filter( 'the_content', 'ppl_post_filter', 5 );
- $value = apply_filters('the_content', $result->post_content);
- add_filter( 'the_content', 'ppl_content_filter', 5 );
- add_filter( 'the_content', 'ppl_post_filter', 5 );
- return str_replace(']]>', ']]>', $value);
-}
-
-function otf_commentcount($option_key, $result, $ext) {
- $value = $result->comment_count;
- if ($ext) {
- $s = explode(':', $ext);
- if (count($s) == 3) {
- if ($value == 0) $value = $s[0];
- elseif ($value == 1) $value .= ' ' . $s[1];
- else $value .= ' ' . $s[2];
- }
- }
- return $value;
-}
-
-function otf_commentexcerpt($option_key, $result, $ext) {
- if (!$ext) {
- $len = 55;
- $type = 'a';
- } else {
- $s = explode(':', $ext);
- if (count($s) == 1) {
- $s[] = 'a';
- }
- $len = $s[0];
- $type = $s[1];
- if ($type === 'b') {
- if (count($s) > 2) {
- $more = $s[2];
- } else {
- $more = ' …';
- }
- if (count($s) > 3) {
- if ($s[3] === 'link') {
- $url = otf_commenturl($option_key, $result, '');
- $more = ''.$more.'';
- }
- }
- }
- }
- switch ($type) {
- case 'a':
- $value = oth_trim_comment_excerpt($result->comment_content, $ext);
- break;
- case 'b':
- $value = $result->comment_content;
- $value = convert_smilies($value);
-
- $text = str_replace(']]>', ']]>', $value);
- if ($len <= count(preg_split('/[\s]+/', strip_tags($text), -1))) {
- // remove html entities for now
- $text = str_replace("\x06", "", $text);
- preg_match_all("/&([a-z\d]{2,7}|#\d{2,5});/i", $text, $ents);
- $text = preg_replace("/&([a-z\d]{2,7}|#\d{2,5});/i", "\x06", $text);
- // now we start counting
- $parts = preg_split('/([\s]+)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
- $in_tag = false;
- $num_words = 0;
- $text = '';
- foreach($parts as $part) {
- if(0 < preg_match('/<[^>]*$/s', $part)) {
- $in_tag = true;
- } else if(0 < preg_match('/>[^<]*$/s', $part)) {
- $in_tag = false;
- }
- if(!$in_tag && '' != trim($part) && substr($part, -1, 1) != '>') {
- $num_words++;
- }
- $text .= $part;
- if($num_words >= $len && !$in_tag) break;
- }
- // put back the missing html entities
- foreach ($ents[0] as $ent) $text = preg_replace("/\x06/", $ent, $text, 1);
- $text = balanceTags($text, true);
- $value = $text . $more;
- }
- $value = apply_filters('get_comment_text', $value);
- break;
- default:
- $value = oth_trim_comment_excerpt($result->comment_content, $ext);
- break;
- }
- return $value;
-}
-
-function otf_commentsnippet($option_key, $result, $ext) {
- $len = 100;
- $type = 'char';
- $more = '';
- $link = 'nolink';
- if ($ext) {
- $s = explode(':', $ext);
- if ($s[0]) $len = $s[0];
- if ($s[1]) $type = $s[1];
- if ($s[2]) $more = $s[2];
- if ($s[3]) $link = $s[3];
- }
- if ($link === 'link') {
- $url = otf_commenturl($option_key, $result, '');
- $more = ''.$more.'';
- }
- return oth_format_snippet($result->comment_content, $option_key, $type, $len, $more);
-}
-
-function otf_commentsnippetword($option_key, $result, $ext) {
- $len = 100;
- $more = '';
- $link = 'nolink';
- if ($ext) {
- $s = explode(':', $ext);
- if ($s[0]) $len = $s[0];
- if ($s[1]) $more = $s[1];
- if ($s[2]) $link = $s[2];
- }
- if ($link === 'link') {
- $url = otf_commenturl($option_key, $result, '');
- $more = ''.$more.'';
- }
- return oth_format_snippet($result->comment_content, $option_key, 'word', $len, $more);
-}
-
-function otf_commentdate($option_key, $result, $ext) {
- if ($ext === 'raw') return $result->comment_date;
- return oth_format_date($result->comment_date, $ext);
-}
-
-function otf_commenttime($option_key, $result, $ext) {
- return oth_format_time($result->comment_date, $ext);
-}
-
-function otf_commentdategmt($option_key, $result, $ext) {
- if ($ext === 'raw') return $result->comment_date_gmt;
- return oth_format_date($result->comment_date_gmt, $ext);
-}
-
-function otf_commenttimegmt($option_key, $result, $ext) {
- return oth_format_time($result->comment_date_gmt, $ext);
-}
-
-function otf_commenter($option_key, $result, $ext) {
- $value = $result->comment_author;
- $value = apply_filters('get_comment_author', $value);
- $value = apply_filters('comment_author', $value);
- return oth_truncate_text($value, $ext);
-}
-
-function otf_commenterurl($option_key, $result, $ext) {
- $value = $result->comment_author_url;
- $value = apply_filters('get_comment_author_url', $value);
- return oth_truncate_text($value, $ext);
-}
-
-function otf_commenterlink($option_key, $result, $ext) {
- $url = otf_commenterurl($option_key, $result, '');
- $author = otf_commenter($option_key, $result, $ext);
- if (empty($url) || $url == 'http://') $value = $author;
- else $value = "$author";
- return $value;
-}
-
-function otf_commenterip($option_key, $result, $ext) {
- return $result->comment_author_IP;
-}
-
-function otf_commenturl($option_key, $result, $ext) {
- $value = apply_filters('the_permalink', get_permalink($result->ID)) . '#comment-' . $result->comment_ID;
- return oth_truncate_text($value, $ext);
-}
-
-function otf_commentlink($option_key, $result, $ext) {
- $ttl = otf_commenter($option_key, $result, '');
- $ttl = '' . $ttl . '';
- if (!$ext) $ext = ' commented on ';
- $ttl .= $ext;
- $ttl .= ''.otf_title($option_key, $result, '').'';
- $pml = otf_commenturl($option_key, $result, '');
- $pdt = oth_format_date($result->comment_date_gmt, '');
- $pdt .= __(' at ', 'post_plugin_library');
- $pdt .= oth_format_time($result->comment_date_gmt, '');
- return "$ttl";
-}
-
-function otf_commentlink2($option_key, $result, $ext) {
- $commenturl = otf_commenturl($option_key, $result, '');
- $commentdate = otf_commentdate($option_key, $result, '');
- $commenttime = otf_commenttime($option_key, $result, '');
- $title = otf_title($option_key, $result, '');
- $commenter = otf_commenter($option_key, $result, '');
- $commentexcerpt = otf_commentexcerpt($option_key, $result, '10');
- return "$commenter - $commentexcerpt…";
-}
-
-function otf_commentpopupurl($option_key, $result, $ext) {
- global $wpcommentspopupfile, $wpcommentsjavascript;
- $output = '';
- if ( $wpcommentsjavascript ) {
- if ( empty( $wpcommentspopupfile ) )
- $home = get_option('home');
- else
- $home = get_option('siteurl');
- $output .= $home . '/' . $wpcommentspopupfile . '?comments_popup=' . $result->ID;
- $output .= '#comment-' . $result->comment_ID;
- $output .= '" onclick="wpopen(this.href); return false';
- }
- return $output;
-}
-
-function otf_catlinks($option_key, $result, $ext) {
- return otf_categorylinks($option_key, $result, $ext);
-}
-
-function otf_categorylinks($option_key, $result, $ext) {
- $cats = get_the_category($result->ID);
- $value = ''; $n = 0;
- foreach ($cats as $cat) {
- if ($n > 0) $value .= $ext;
- $catname = apply_filters('single_cat_title', $cat->cat_name);
- $value .= ''.$catname.'';
- ++$n;
- }
- return $value;
-}
-
-function otf_catnames($option_key, $result, $ext) {
- return otf_categorynames($option_key, $result, $ext);
-}
-
-function otf_categorynames($option_key, $result, $ext) {
- $cats = get_the_category($result->ID);
- $value = ''; $n = 0;
- foreach ($cats as $cat) {
- if ($n > 0) $value .= $ext;
- $value .= apply_filters('single_cat_title', $cat->cat_name);
- ++$n;
- }
- return $value;
-}
-
-function otf_custom($option_key, $result, $ext) {
- $custom = get_post_custom($result->ID);
- return $custom[$ext][0];
-}
-
-function otf_tags($option_key, $result, $ext) {
- $tags = (array) get_the_tags($result->ID);
- $tag_list = array();
- foreach ( $tags as $tag ) {
- $tag_list[] = $tag->name;
- }
- if (!$ext) $ext = ', ';
- $tag_list = join( $ext, $tag_list );
- return $tag_list;
-}
-
-function otf_taglinks($option_key, $result, $ext) {
- $tags = (array) get_the_tags($result->ID);
- $tag_list = '';
- $tag_links = array();
- foreach ( $tags as $tag ) {
- $link = get_tag_link($tag->term_id);
- if ( is_wp_error( $link ) )
- return $link;
- $tag_links[] = '' . $tag->name . '';
- }
- if (!$ext) $ext = ' ';
- $tag_links = join( $ext, $tag_links );
- $tag_links = apply_filters( 'the_tags', $tag_links );
- $tag_list .= $tag_links;
- return $tag_list;
-}
-
-function otf_totalposts($option_key, $result, $ext) {
- global $wpdb;
- $value = '';
- if (function_exists('get_post_type')) {
- $value = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'");
- } else {
- $value = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
- }
- return $value;
-}
-
-function otf_totalpages($option_key, $result, $ext) {
- global $wpdb;
- $value = '';
- if (function_exists('get_post_type')) {
- $value = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'publish'");
- } else {
- $value = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'static'");
- }
- return $value;
-}
-
-function otf_link($option_key, $result, $ext) {
- $ttl = otf_title($option_key, $result, $ext);
- $pml = otf_url($option_key, $result, null);
- $pdt = otf_date($option_key, $result, null);
- return "$ttl";
-}
-
-function otf_score($option_key, $result, $ext) {
- return sprintf("%.0f", $result->score);
-}
-
-// tries to get the number of post views from a few popular plugins if the are installed
-function otf_postviews($option_key, $result, $ext) {
- global $wpdb;
- // alex king's popularity contest
- if (class_exists('ak_popularity_contest')) $count = $akpc->get_post_total($result->ID);
- // my own post view count
- else if (function_exists('popular_posts_views')) $count = popular_posts_views($result->ID);
- // lester chan's postviews
- else if (function_exists('the_views')) {
- $count = get_post_custom($result->ID);
- $count = intval($count['views'][0]);
- }
- // mark ghosh's top10
- else if (function_exists('show_post_count')) {$id = $result->ID; $count = $wpdb->get_var("select cntaccess from mostAccessed WHERE postnumber = $id");}
- // Ivan Djurdjevac's CountPosts
- else if (function_exists('HitThisPost')) {$id = $result->ID; $count = $wpdb->get_var("SELECT post_hits FROM $wpdb->posts WHERE ID=$id");}
- if (!$count) $count = 0;
- return $count;
-}
-
-function oth_get_actual_size($imgtag) {
- // first try extracting the width and height attributes
- if (preg_match('/\s+width\s*=\s*[\'|\"](.*?)[\'|\"]/is', $imgtag, $matches)) {
- $current_width = $matches[1];
- if (preg_match('/\s+height\s*=\s*[\'|\"](.*?)[\'|\"]/is', $imgtag, $matches)) {
- $current_height = $matches[1];
- }
- }
- // then try using the GD library
- if (!(($current_width) && ($current_height))) {
- // extract the image src url
- preg_match('/\s+src\s*=\s*[\'|\"](.*?)[\'|\"]/is', $imgtag, $matches);
- $error_level = error_reporting(0);
- if (function_exists('getimagesize') && $imagesize = getimagesize($matches[1])) {
- $current_width = $imagesize['0'];
- $current_height = $imagesize['1'];
- } else {
- // if all else fails...
- $current_width = $current_height = 0;
- }
- error_reporting($error_level);
- }
- return array($current_width, $current_height);
-}
-
-function oth_image_size_full($w, $h, $imgtag){
- return array(1, 1);
-}
-
-function oth_image_size_scale($w, $h, $imgtag){
- $maxsize = max($w, $h);
- list($current_width, $current_height) = oth_get_actual_size($imgtag);
- $width_ratio = $height_ratio = 1.0;
- if ($current_width > $maxsize)
- $width_ratio = $maxsize / $current_width;
- if ($current_height > $maxsize)
- $height_ratio = $maxsize / $current_height;
- // the smaller ratio is the one we need to fit it to the constraining box
- $ratio = min( $width_ratio, $height_ratio );
- $w = intval($current_width * $ratio);
- $h = intval($current_height * $ratio);
- return array($w, $h);
-}
-
-function oth_image_size_blank($w, $h, $imgtag){
- return array(0, 0);
-}
-
-function oth_image_size_exact($w, $h, $imgtag){
- return array($w, $h);
-}
-
-function oth_image_size_fixedw($w, $h, $imgtag){
- list($current_width, $current_height) = oth_get_actual_size($imgtag);
- $h = intval($w * ($current_height / $current_width));
- return array($w, $h);
-}
-
-function oth_image_size_fixedh($w, $h, $imgtag){
- list($current_width, $current_height) = oth_get_actual_size($imgtag);
- $w = intval($h * ($current_width / $current_height));
- return array($w, $h);
-}
-
-function oth_test($x) {
- if (empty($x)) return 'a';
- if (is_numeric($x)) return 'b';
- return 'c';
-}
-
-function oth_process($w, $h) {
- static $table = array( 'a' => array('a' => 'full', 'b' => 'scale', 'c' => 'blank'),
- 'b' => array('a' => 'scale', 'b' => 'exact', 'c' => 'fixedw'),
- 'c' => array('a' => 'blank', 'b' => 'fixedh', 'c' => 'blank'));
- return 'oth_image_size_' . $table[oth_test($w)][oth_test($h)];
-}
-
-function otf_image($option_key, $result, $ext) {
- // extract any image tags
- $content = $result->post_content;
- if ($ext) {
- $s = explode(':', $ext);
- if ($s[3] === 'post') {
- $content = apply_filters('the_content', $content);
- }
- }
- if ($s[4] === 'link') {
- $pattern = '/.+?a>/i';
- $pattern2 = '#(|>)#is';
- } else {
- $pattern = '//i';
- $pattern2 = '#(|>)#is';
- }
- if (!preg_match_all($pattern, $content, $matches)) {
- // no tags in content
- if (($s[5]) && ($s[6])) {
- // a default tag has been given
- return $s[5].':'.$s[6];
- } else {
- return '';
- }
- }
- $i = $s[0];
- if (!$i) $i = 0;
- $imgtag = $matches[0][$i];
- $process = oth_process($s[1],$s[2]);
- list($w, $h) = $process(intval($s[1]), intval($s[2]), $imgtag);
- if ($w === 0) return '';
- if ($w === 1) return $imgtag;
- // remove height or width if present
- $imgtag = preg_replace('/(width|height)\s*=\s*[\'|\"](.*?)[\'|\"]/is', '', $imgtag);
- // insert the new size
- $imgtag = preg_replace($pattern2, "$1 height=\"$h\" width=\"$w\" $2", $imgtag);
- return $imgtag;
-}
-
-function otf_imagesrc($option_key, $result, $ext) {
- // extract any image tags
- $content = $result->post_content;
- if ($ext) {
- $s = explode(':', $ext);
- if ($s[1] === 'post') {
- $content = apply_filters('the_content', $content);
- }
- if ($s[2]) $suffix = $s[2];
- }
- $pattern = '//i';
- if (!preg_match_all($pattern, $content, $matches)) return '';
- $i = $s[0];
- if (!$i) $i = 0;
- $imgsrc = $matches[1][$i];
- if ($suffix) {
- if ($suffix === '?m') $suffix = '-' . get_option('medium_size_w') . 'x' . get_option('medium_size_h');
- if ($suffix === '?t') $suffix = '-' . get_option('thumbnail_size_w') . 'x' . get_option('thumbnail_size_h');
- $pathinfo = pathinfo($imgsrc);
- $extension = $pathinfo['extension'];
- $imgsrc = str_replace(".$extension", "$suffix.$extension", $imgsrc);
- }
- return $imgsrc;
-}
-
-function otf_imagealt($option_key, $result, $ext) {
- // extract any image tags
- $content = $result->post_content;
- if ($ext) {
- $s = explode(':', $ext);
- if ($s[1] === 'post') {
- $content = apply_filters('the_content', $content);
- }
- if ($s[2]) $suffix = $s[2];
- }
- $pattern = '//i';
- if (!preg_match_all($pattern, $content, $matches)) return '';
- $i = $s[0];
- if (!$i) $i = 0;
- return $matches[1][$i];
-}
-
-function otf_gravatar($option_key, $result, $ext) {
- $size = 96;
- $rating = '';
- $default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=$size"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
- if ($ext) {
- $s = explode(':', $ext);
- if (isset($s[0])) $size = $s[0];
- if (isset($s[1])) $rating = $s[1];
- if (isset($s[3])) {
- $default = 'http:'.$s[3];
- } else {
- if (isset($s[2])) $default = $s[2];
- }
- }
- $email = '';
- if (isset($result->comment_author_email)) {
- $email = $result->comment_author_email;
- } else {
- $user = get_userdata($result->post_author);
- if ($user) $email = $user->user_email;
- }
- if (!empty($email)) {
- $out = 'http://www.gravatar.com/avatar/';
- $out .= md5(strtolower($email));
- $out .= '?s='.$size;
- $out .= '&d=' . urlencode( $default );
- if ('' !== $rating)
- $out .= "&r={$rating}";
- $avatar = "";
- } else {
- $avatar = "";
- }
- return apply_filters('get_avatar', $avatar, $email, $size, $default);
-}
-
-// returns the principal category id of a post -- if a cats are hierarchical chooses the most specific -- if multiple cats chooses the first (numerically smallest)
-function otf_categoryid($option_key, $result, $ext) {
- $cats = get_the_category($result->ID);
- foreach ($cats as $cat) {
- $parents[] = $cat->category_parent;
- }
- foreach ($cats as $cat) {
- if (!in_array($cat->cat_ID, $parents)) $categories[] = $cat->cat_ID;
- }
- return $categories[0];
-}
-
-// fails if parentheses are out of order or nested
-function oth_splitapart($subject) {
- $bits = explode(':', $subject);
- $inside = false;
- $newbits = array();
- $acc = '';
- foreach ($bits as $bit) {
- if (false !== strpos($bit, '{')) {
- $inside = true;
- $acc = '';
- }
- if (false !== strpos($bit, '}')) {
- $inside = false;
- if ($acc !== '') {
- $acc .= ':' . $bit;
- } else {
- $acc = $bit;
- }
- }
- if ($inside) {
- if ($acc !== '') {
- $acc .= ':' . $bit;
- } else {
- $acc = $bit;
- }
- } else {
- if ($acc !== '') {
- $newbits[] = $acc;
- $acc = '';
- } else {
- $newbits[] = $bit;
- }
- }
- }
- return $newbits;
-}
-
-function otf_if($option_key, $result, $ext) {
- global $post;
- $ID = ppl_current_post_id();
- $condition = 'true';
- $true = '';
- $false = '';
- if ($ext) {
- $s = oth_splitapart($ext);
- if (isset($s[0])) $condition = $s[0];
- if (isset($s[1])) $true = $s[1];
- if (isset($s[2])) $false = $s[2];
- }
- if (strpos($condition, '{')!==false) {
- $condition = ppl_expand_template($result, $condition, ppl_prepare_template($condition), $option_key);
- }
- if (eval("return ($condition);")) $tag = $true; else $tag = $false;
- // if the replacement tag contains pseudotags expand them
- if (strpos($tag, '}')!==false) {
- $tag = ppl_expand_template($result, $tag, ppl_prepare_template($tag), $option_key);
- }
- return $tag;
-}
-
-function otf_php($option_key, $result, $ext) {
- global $post;
- $ID = ppl_current_post_id();
- $value = '';
- if ($ext) {
- if (strpos($ext, '{')!==false) {
- $ext = ppl_expand_template($result, $ext, ppl_prepare_template($ext), $option_key);
- }
- ob_start();
- eval($ext);
- $value = ob_get_contents();
- ob_end_clean();
- }
- return $value;
-}
-
-
-// ****************************** Helper Functions *********************************************
-
-function oth_truncate_text($text, $ext) {
- if (!$ext) {
- return $text;
- }
- $s = explode(':', $ext);
- if (count($s) > 2) {
- return $text;
- }
- if (count($s) == 1) {
- $s[] = 'wrap';
- }
- $length = $s[0];
- $type = $s[1];
- switch ($type) {
- case 'wrap':
- $length += strlen(' ');
- if (!function_exists('mb_detect_encoding')) {
- return wordwrap($text, $length, ' ', true);
- } else {
- $e = mb_detect_encoding($text);
- $formatted = '';
- $position = -1;
- $prev_position = 0;
- $last_line = -1;
- while($position = mb_strpos($text, " ", ++$position, $e)) {
- if($position > $last_line + $length + 1) {
- $formatted.= mb_substr($text, $last_line + 1, $prev_position - $last_line - 1, $e).' ';
- $last_line = $prev_position;
- }
- $prev_position = $position;
- }
- $formatted.= mb_substr($text, $last_line + 1, mb_strlen( $text ), $e);
- return $formatted;
- }
- case 'chop':
- if (!function_exists('mb_detect_encoding')) {
- return substr($text, 0, $length);
- } else {
- $e = mb_detect_encoding($text);
- return mb_substr($text, 0, $length, $e);
- }
- case 'trim':
- if (strlen($text) > $length) {
- } else {
- return $text;
- }
- if (!function_exists('mb_detect_encoding')) {
- $textlen = strlen($text);
- if ($textlen > $length) {
- $text = substr($text, 0, $length-2);
- return rtrim($text,".").'…';
- } else {
- return $text;
- }
- } else {
- $e = mb_detect_encoding($text);
- $textlen = mb_strlen($text, $e);
- if ($textlen > $length) {
- $text = mb_substr($text, 0, $length-2, $e);
- return rtrim($text,".").'…';
- } else {
- return $text;
- }
- }
- case 'snip':
- if (!function_exists('mb_detect_encoding')) {
- $textlen = strlen($text);
- if ($textlen > $length) {
- $b = floor(($length - 2)/2);
- $l = $textlen - $b - 1;
- return substr($text, 0, $b).'…'.substr($text, $l);
- } else {
- return $text;
- }
- } else {
- $e = mb_detect_encoding($text);
- $textlen = mb_strlen($text, $e);
- if ($textlen > $length) {
- $b = floor(($length - 2)/2);
- $l = $textlen - $b - 1;
- return mb_substr($text, 0, $b, $e).'…'.mb_substr($text, $l, 1000, $e);
- } else {
- return $text;
- }
- }
- default:
- return wordwrap($t, $length, ' ', true);
- }
-}
-
-function oth_trim_extract($text, $len, $more, $numsent) {
- $text = str_replace(']]>', ']]>', $text);
- if(strpos($text, '')) {
- $parts = explode('', $text, 2);
- $text = $parts[0];
- } else {
- if ($len > count(preg_split('/[\s]+/', strip_tags($text), -1))) return $text;
- // remove html entities for now
- $text = str_replace("\x06", "", $text);
- preg_match_all("/&([a-z\d]{2,7}|#\d{2,5});/i", $text, $ents);
- $text = preg_replace("/&([a-z\d]{2,7}|#\d{2,5});/i", "\x06", $text);
- // now we start counting
- $parts = preg_split('/([\s]+)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
- $in_tag = false;
- $num_words = 0;
- $sentences = array();
- $words = '';
- foreach($parts as $part) {
- if(0 < preg_match('/<[^>]*$/s', $part)) {
- $in_tag = true;
- } else if(0 < preg_match('/>[^<]*$/s', $part)) {
- $in_tag = false;
- }
- if(!$in_tag && '' != trim($part) && substr($part, -1, 1) != '>') {
- $num_words++;
- }
- if(!$in_tag && '' != trim($part) && false !== strpos('.?!', substr($part, -1, 1))) {
- $sentences [] = $words . $part;
- $words = '';
- } else {
- $words .= $part;
- }
- if($num_words >= $len && !$in_tag) break;
- }
- if (!isset($numsent)) {
- $text = implode('', $sentences) . $words;
- } else {
- $numsent = abs($numsent);
- if ($numsent == 0) {
- $text = implode('', $sentences);
- } else {
- $text = implode('', array_slice($sentences, 0, $numsent));
- }
- }
- // put back the missing html entities
- foreach ($ents[0] as $ent) $text = preg_replace("/\x06/", $ent, $text, 1);
- }
- $text = balanceTags($text, true);
- $text = $text . $more;
- return $text;
-}
-
-function oth_format_snippet($content, $option_key, $trim, $len, $more) {
- $content = strip_tags($content);
- $p = get_option($option_key);
- if ($p['stripcodes']) $content = oth_strip_special_tags($content, $p['stripcodes']);
- // strip extra whitespace
- $content = preg_replace('/\s+/u', ' ', $content);
- $content = stripslashes($content);
- if (function_exists('mb_detect_encoding')) $enc = mb_detect_encoding($content);
- // grab a maximum number of characters
- if ($enc) {
- mb_internal_encoding($enc);
- if (mb_strlen($content) >= $len) {
- $snippet = mb_substr($content, 0, $len);
- if ($trim == 'word' && mb_strlen($snippet) == $len) {
- // trim back to the last full word--NB if our snippet ends on a word
- // boundary we still have to trim back to the non-word character
- // (the final 's' in the pattern makes sure we match newlines)
- preg_match('/^(.*)\W/su', $snippet, $matches);
- //if we can't get a single full word we use the full snippet
- // (we use $matches[1] because we don't want the white-space)
- if ($matches[1]) $snippet = $matches[1];
- }
- $snippet .= $more;
- } else {
- $snippet = $content;
- }
- } else {
- if (strlen($content) >= $len) {
- $snippet = substr($content, 0, $len);
- if ($trim == 'word' && strlen($snippet) == $len) {
- // trim back to the last full word--NB if our snippet ends on a word
- // boundary we still have to trim back to the non-word character
- // (the final 's' in the pattern makes sure we match newlines)
- preg_match('/^(.*)\W/s', $snippet, $matches);
- //if we can't get a single full word we use the full snippet
- // (we use $matches[1] because we don't want the white-space)
- if ($matches[1]) $snippet = $matches[1];
- }
- $snippet .= $more;
- } else {
- $snippet = $content;
- }
- }
- return $snippet;
-}
-
-function oth_strip_special_tags($text, $stripcodes) {
- $numtags = count($stripcodes);
- for ($i = 0; $i < $numtags; $i++) {
- if (!$stripcodes[$i]['start'] || !$stripcodes[$i]['end']) return $text;
- $pattern = '/('. oth_regescape($stripcodes[$i]['start']) . '(.*?)' . oth_regescape($stripcodes[$i]['end']) . ')/i';
- $text = preg_replace($pattern, '', $text);
- }
- return $text;
-}
-
-function oth_trim_excerpt($content, $len) {
- // taken from the wp_trim_excerpt filter
- remove_filter( 'the_content', 'ppl_content_filter', 5 );
- remove_filter( 'the_content', 'ppl_post_filter', 5 );
- $text = apply_filters('the_content', $content);
- add_filter( 'the_content', 'ppl_content_filter', 5 );
- add_filter( 'the_content', 'ppl_post_filter', 5 );
- $text = str_replace(']]>', ']]>', $text);
- $text = strip_tags($text);
- if (!$len) $len = 55;
- $excerpt_length = $len;
- $words = explode(' ', $text, $excerpt_length + 1);
- if (count($words) > $excerpt_length) {
- array_pop($words);
- $text = implode(' ', $words);
- }
- $text = convert_smilies($text);
- return $text;
-}
-
-function oth_trim_comment_excerpt($content, $len) {
- // adapted from the wp_trim_excerpt filter
- $text = $content;
- $text = apply_filters('get_comment_text', $text);
- $text = str_replace(']]>', ']]>', $text);
- $text = strip_tags($text);
- if (!$len) $len = 55;
- $excerpt_length = $len;
- $words = explode(' ', $text, $excerpt_length + 1);
- if (count($words) > $excerpt_length) {
- array_pop($words);
- $text = implode(' ', $words);
- }
- $text = convert_smilies($text);
- return $text;
-}
-
-function oth_format_date($date, $fmt) {
- if (!$fmt) $fmt = get_option('date_format');
- $d = mysql2date($fmt, $date);
- $d = apply_filters('get_the_time', $d, $fmt);
- return apply_filters('the_time', $d, $fmt);
-}
-
-function oth_format_time($time, $fmt) {
- if (!$fmt) $fmt = get_option('time_format');
- $d = mysql2date($fmt, $time);
- $d = apply_filters('get_the_time', $d, $fmt);
- return apply_filters('the_time', $d, $fmt);
-}
-
-function oth_regescape($s) {
- $s = str_replace('\\', '\\\\', $s);
- $s = str_replace('/', '\\/', $s);
- $s = str_replace('[', '\\[', $s);
- $s = str_replace(']', '\\]', $s);
- return $s;
-}
-
-?>
\ No newline at end of file
diff --git a/blog/wp-content/plugins/post-plugin-library/post-plugin-library.php b/blog/wp-content/plugins/post-plugin-library/post-plugin-library.php
deleted file mode 100644
index b59528f..0000000
--- a/blog/wp-content/plugins/post-plugin-library/post-plugin-library.php
+++ /dev/null
@@ -1,45 +0,0 @@
-Similar Posts, Recent Posts, Random Posts, and Recent Comments plugins. Make sure you have the latest version of this plugin.
-Author: Rob Marsh, SJ
-Version: 2.6.2.1
-Author URI: http://rmarsh.com/
-*/
-
-/*
-Copyright 2008 Rob Marsh, SJ (http://rmarsh.com)
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-define ('POST_PLUGIN_LIBRARY', true);
-
-if ( ! defined( 'WP_CONTENT_URL' ) )
- define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
-if ( ! defined( 'WP_CONTENT_DIR' ) )
- define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
-if ( ! defined( 'WP_PLUGIN_URL' ) )
- define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
-if ( ! defined( 'WP_PLUGIN_DIR' ) )
- define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
-
-if (!defined('CF_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/common_functions.php');
-if (!defined('ACF_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/admin_common_functions.php');
-if (!defined('OT_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/output_tags.php');
-if (!defined('ADMIN_SUBPAGES_LIBRARY')) require(WP_PLUGIN_DIR.'/post-plugin-library/admin-subpages.php');
-
-?>
\ No newline at end of file
diff --git a/blog/wp-content/plugins/post-plugin-library/post-plugin-library.pot b/blog/wp-content/plugins/post-plugin-library/post-plugin-library.pot
deleted file mode 100644
index 4ef4a7f..0000000
--- a/blog/wp-content/plugins/post-plugin-library/post-plugin-library.pot
+++ /dev/null
@@ -1,278 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Rob Marsh, SJ
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR , YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/post-plugin-library\n"
-"POT-Creation-Date: 2008-09-13 11:26+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME \n"
-"Language-Team: LANGUAGE \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: admin_common_functions.php:120
-msgid "Available Tags"
-msgstr ""
-
-#: admin_common_functions.php:200
-msgid ""
-"This option takes you to my site where you can inform me of any issues \r\n"
-"\tyou are having with this plugin. It also passes along useful debugging "
-"information such as \r\n"
-"\twhich versions of WordPress, PHP, and MySQL you are using, as well as the "
-"current \r\n"
-"\tplugin settings."
-msgstr ""
-
-#: admin_common_functions.php:204
-msgid "File Report"
-msgstr ""
-
-#: admin_common_functions.php:235
-msgid "The plugin and all its settings have been completely removed"
-msgstr ""
-
-#: admin_common_functions.php:243
-msgid ""
-"Deactivating a plugin from the Plugins page usually leaves all the plugin's"
-"\r\n"
-"\tsettings intact. Often this is the desired behaviour as you can then "
-"choose to reactivate the plugin \r\n"
-"\tand all your settings will still be in place. If, however, you want to "
-"remove this plugin \r\n"
-"\tcompletely, along with all its settings and tables, you can do so by "
-"pressing the button below."
-msgstr ""
-
-#: admin_common_functions.php:249
-msgid "Remove Plugin"
-msgstr ""
-
-#: admin_common_functions.php:282
-msgid "Number of posts to show:"
-msgstr ""
-
-#: admin_common_functions.php:291
-msgid "Number of posts to skip:"
-msgstr ""
-
-#: admin_common_functions.php:300
-msgid "Omit the current post?"
-msgstr ""
-
-#: admin_common_functions.php:314
-msgid "Show just the current post?"
-msgstr ""
-
-#: admin_common_functions.php:328
-msgid "Show password-protected posts?"
-msgstr ""
-
-#: admin_common_functions.php:342
-msgid "Show static pages?"
-msgstr ""
-
-#: admin_common_functions.php:357
-msgid "Show attachments?"
-msgstr ""
-
-#: admin_common_functions.php:371
-msgid "Match the current post's author?"
-msgstr ""
-
-#: admin_common_functions.php:385
-msgid "Match the current post's category?"
-msgstr ""
-
-#: admin_common_functions.php:400
-msgid "Match the current post's tags?"
-msgstr ""
-
-#: admin_common_functions.php:415
-msgid "Default display if no matches:"
-msgstr ""
-
-#: admin_common_functions.php:424
-msgid "Show nothing if no matches?"
-msgstr ""
-
-#: admin_common_functions.php:438
-msgid "Text and codes before the list:"
-msgstr ""
-
-#: admin_common_functions.php:447
-msgid "Text and codes after the list:"
-msgstr ""
-
-#: admin_common_functions.php:456
-msgid "Output template:"
-msgstr ""
-
-#: admin_common_functions.php:465
-msgid "Text and codes between items:"
-msgstr ""
-
-#: admin_common_functions.php:475
-msgid ""
-"Match posts with tags: (a,b matches posts with either tag, a+b only "
-"matches posts with both tags)"
-msgstr ""
-
-#: admin_common_functions.php:484
-msgid "Posts to exclude:"
-msgstr ""
-
-#: admin_common_functions.php:485 admin_common_functions.php:494
-msgid "comma-separated IDs"
-msgstr ""
-
-#: admin_common_functions.php:493
-msgid "Posts to include:"
-msgstr ""
-
-#: admin_common_functions.php:503
-msgid "Authors to exclude/include:"
-msgstr ""
-
-#: admin_common_functions.php:537
-msgid "Categories to exclude/include:"
-msgstr ""
-
-#: admin_common_functions.php:593
-msgid "Other plugins' tags to remove from snippet:"
-msgstr ""
-
-#: admin_common_functions.php:596
-msgid "opening"
-msgstr ""
-
-#: admin_common_functions.php:596
-msgid "closing"
-msgstr ""
-
-#: admin_common_functions.php:607
-msgid "Ignore posts :"
-msgstr ""
-
-#: admin_common_functions.php:635
-msgid "Display posts that are:"
-msgstr ""
-
-#: admin_common_functions.php:675
-msgid "Match posts by custom field:"
-msgstr ""
-
-#: admin_common_functions.php:706
-msgid "Output after post:"
-msgstr ""
-
-#: admin_common_functions.php:729
-msgid "Output in RSS feeds:"
-msgstr ""
-
-#: admin_common_functions.php:751
-msgid "Output in widget:"
-msgstr ""
-
-#: admin_common_functions.php:774
-msgid ""
-"Add Similar Posts to feeds? (DEPRECATED! This setting will be removed in the "
-"next major release - use the placement settings instead)"
-msgstr ""
-
-#: admin_common_functions.php:788
-msgid "Output in content: (via special tags)"
-msgstr ""
-
-#: admin_common_functions.php:810
-msgid "Sort Output By: leave blank for default order"
-msgstr ""
-
-#: admin_common_functions.php:878
-msgid "Select output by custom field:"
-msgstr ""
-
-#: admin_common_functions.php:911
-msgid "Maximum number of words to use for match:"
-msgstr ""
-
-#: admin_common_functions.php:920
-msgid "Extract terms to match by:"
-msgstr ""
-
-#: admin_common_functions.php:934
-msgid "Relative importance of:"
-msgstr ""
-
-#: admin_common_functions.php:949
-msgid "Look for manual links in custom field?"
-msgstr ""
-
-#: admin_common_functions.php:965
-msgid "Type of comment to show:"
-msgstr ""
-
-#: admin_common_functions.php:980
-msgid "Type of grouping:"
-msgstr ""
-
-#: admin_common_functions.php:996
-msgid "Group title template:"
-msgstr ""
-
-#: admin_common_functions.php:1005
-msgid "Omit comments by the post author?"
-msgstr ""
-
-#: admin_common_functions.php:1019
-msgid "Omit comments by registered users?"
-msgstr ""
-
-#: admin_common_functions.php:1033
-msgid "Order by date of last edit rather than date of creation?"
-msgstr ""
-
-#: admin_common_functions.php:1055
-msgid "Visit plugin homepage"
-msgstr ""
-
-#: output_tags.php:384
-msgid " at "
-msgstr ""
-
-#: output_tags.php:424
-#, php-format
-msgid "View all posts in %s"
-msgstr ""
-
-#. Plugin Name of an extension
-msgid "Post-Plugin Library"
-msgstr ""
-
-#. Plugin URI of an extension
-msgid "http://rmarsh.com/plugins/post-plugin-library/"
-msgstr ""
-
-#. Description of an extension
-msgid ""
-"Does nothing by itself but supplies common code for the Similar Posts, Recent Posts, Random Posts, and Recent Comments "
-"plugins. Make sure you have the latest version of this plugin."
-msgstr ""
-
-#. Author of an extension
-msgid "Rob Marsh, SJ"
-msgstr ""
-
-#. Author URI of an extension
-msgid "http://rmarsh.com/"
-msgstr ""
diff --git a/blog/wp-content/plugins/post-plugin-library/readme.txt b/blog/wp-content/plugins/post-plugin-library/readme.txt
deleted file mode 100644
index 90ac836..0000000
--- a/blog/wp-content/plugins/post-plugin-library/readme.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-=== Post-Plugin Library ===
-Contributors: RobMarsh
-Tags: posts, comments, random, recent, similar, related, popular, post-plugins
-Requires at least: 1.5
-Tested up to: 2.6.2
-Stable tag: 2.6.2.1
-
-The shared code library for Similar posts, Recent Posts, Random Posts, Popular Posts and Recent Comments.
-
-== Description ==
-
-The Post-Plugin Library does nothing by itself but **must** be installed to provide shared code for the [Similar Posts](http://wordpress.org/extend/plugins/similar-posts/), [Recent Posts](http://wordpress.org/extend/plugins/recent-posts-plugin/), [Random Posts](http://wordpress.org/extend/plugins/random-posts-plugin/), [Popular Posts](http://wordpress.org/extend/plugins/popular-posts-plugin/), and [Recent Comments](http://wordpress.org/extend/plugins/recent-comments-plugin/) plugins.
-
-== Installation ==
-
-1. IMPORTANT! If you are upgrading from a previous version first deactivate the plugin, then delete the plugin folder from your server.
-
-1. Upload the plugin folder to your /wp-content/plugins/ folder.
-
-1. Go to the **Plugins** page and activate the plugin.
-
-[My web site](http://rmarsh.com/) has [full instructions](http://rmarsh.com/plugins/) and [information on customisation](http://rmarsh.com/plugins/post-options/).
-
-== Version History ==
-
-* 2.6.2.1
- * support for recent comments to only show one comment per post
- * fix for donate link
-* 2.6.2.0
- * new {imagealt} output tag -- rather like {imagesrc}
- * {excerpt} can now trim to whole sentences
- * content filter can now take parameter string
- * widget can now take parameter string
- * output can be appended to posts & feeds
-* 2.6.1.0
- * the current post can be marked manually
- * widgets now honour the option to show no output if list is empty
- * {commenterlink} now respects the appropriate filter
-* 2.6.0.0
- * version bump to indicate compatibility with WP 2.6
- * fix to really include attachments
- * new parameter for {imagesrc} to append a suffix to the image name, e.g. to get the thumbnail for attachments
-* 2.5.0.11
- * new option to include attachments
- * {php} tag now accepts nested tags
- * new output tag {authorurl} -- permalink to archive of author's posts
- * fix for numeric locale issue in Similar Posts
-* 2.5.10
- * new option to select algorithm for term extraction in Similar Posts
- * new manual links option in Similar Posts
- * fix for faulty non-English tag indexing in Similar Posts
- * fix for page selection in old versions of WP
- * made omit current post try harder to find current post ID
-* 2.5.0.9
- * new option to order Recent Posts by date of last edit rather than date of creation
- * new option to match the current post's author
- * extended options for snippet and excerpt output tags
-* 2.5.0.7
- * new option to show by status, i.e., published/private/draft/future
- * {categorynames} and {categorylinks} apply 'single_cat_name' filter
- * fixes bug in WP pre-2.2 causing installation code to fail
-* 2.5.0.6
- * bug fix for new option for Recent Comments
-* 2.5.0.5
- * new option for Recent Comments: just_current_post
- * {snippet} and {commentsnippet} now handle '...'
- * {commentexcerpt} now same parameters as (excerpt}
-* 2.5.0.4
- * {commentpopupurl} targets the correct comment
-* 2.5.0.3
- * bug fix for showing pages when not selected
-* 2.5.0.2
- * {image} tag has even more options
- * new {commentpopupurl} tag
-* 2.5.0.1
- * made compatible with WP MU
-* 2.5.0
- * {image} has new post, link, and default parameters
- * new {imagesrc} tag
- * fix to empty category bug
-* 2.5b28
- * more work on {image} scaling
- * improvements to Similar Posts matching
- * experiment with Chinese/Korean/Japanese matching
-* 2.5b27
- * made {image} scaling more robust
-* 2.5b26
- * reverted thumnail serving (speed)
- * fix current post after extra query
-* 2.5b25
- * option to sort output, group templates
- * removed 'trim_before' option added more logical 'divider'
- * {date:raw}, {commentdate:raw}, etc.
- * fix for {image} resizing when and not
- * {image} now serves real thumbnails
-* 2.5b24
- * fix for recursive replacement by content filter
- * fix to {gravatar} to allow for 'identicon' etc.
- * fix to {commenter} to allow trimming
- * fix a warning in safe mode
-* 2.5b23
- * new option to filter on custom fields
- * proper nesting of braces in {if} ; also allowed in condition
- * improved bug report feature
- * better way to omit user comments
-* 2.5b22
- * show_pages option now possible to show only pages
- * update for {postviews}
- * fix {commenterlink} giving no output
-* 2.5b21
- * fix bug in {snippet} stripping
-* 2.5b20
- * fix default behaviour of {gravatar}
-* 2.5b18
- * new tag {if:condition:true:false}
-* 2.5b17
- * enhanced {php}
-* 2.5b16
- * fix submenus to work with Lighter Admin Drop Menu
-* 2.5b15
- * fix bugs, add 'included posts' setting
-* 2.5b14
- * enhanced bug reporter
-* 2.5b13
- * added {gravatar}, extended {author}
-* 2.5b11
- * fixed problem with bug reporter
-* 2.5b9
- * clarifying installation instructions
\ No newline at end of file
diff --git a/blog/wp-content/plugins/ps-disable-auto-formatting/js/250/ps_editor.js b/blog/wp-content/plugins/ps-disable-auto-formatting/js/250/ps_editor.js
deleted file mode 100644
index 5dc6f30..0000000
--- a/blog/wp-content/plugins/ps-disable-auto-formatting/js/250/ps_editor.js
+++ /dev/null
@@ -1,169 +0,0 @@
-wpEditorInit = function() {
- // Activate tinyMCE if it's the user's default editor
- if ( ( 'undefined' == typeof wpTinyMCEConfig ) || 'tinymce' == wpTinyMCEConfig.defaultEditor ) {
- document.getElementById('editorcontainer').style.padding = '0px';
- tinyMCE.execCommand("mceAddControl", false, "content");
- } else {
- var H;
- if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") )
- document.getElementById('content').style.height = H.ch - 30 + 'px';
- }
-};
-
-switchEditors = {
-
- saveCallback : function(el, content, body) {
-
- document.getElementById(el).style.color = '#fff';
- if ( tinyMCE.activeEditor.isHidden() )
- content = document.getElementById(el).value;
- else
- content = this.pre_wpautop(content);
-
- return content;
- },
-
- pre_wpautop : function(content) {
- // We have a TON of cleanup to do. Line breaks are already stripped.
-
- // Protect pre|script tags
- content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) {
- a = a.replace(/ [\r\n]*/g, '');
- return a.replace(/<\/?p( [^>]*)?>[\r\n]*/g, '');
- });
-
- // Pretty it up for the source editor
- var blocklist1 = 'blockquote|ul|ol|li|table|thead|tbody|tr|th|td|div|h[1-6]|p';
- content = content.replace(new RegExp('\\s*('+blocklist1+')>\\s*', 'mg'), '$1>\n');
- content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>');
-
- content = content.replace(new RegExp('
";
- } // end foreach role
-
- } // end foreach object_type
-
- echo '
';
- } // end foreach term
-
- while($depth) {
- echo '
';
- $depth--;
- }
-
- echo '';
- echo '
';
-
- // now display "select all" checkboxes for all terms in this taxonomy
- if ( empty( $single_item ) ) {
- if ( defined('SCOPER_EXTRA_SUBMIT_BUTTON') ) {
- echo '
';
- }
-?>
-
-
-
-
display_name_plural))?>
-
-
-
-
-$col_id;
-
- $all_items_ser = implode('-', $all_items_arr);
-
- //display "check for every term" shortcuts for each individual role
- global $scoper;
- $style = ' class="rs-backwhite"';
- foreach ( $role_defs_by_otype as $object_type => $roles ) {
- foreach ( array_keys($roles) as $role_handle ) {
- $style = ( ' class="alternate"' == $style ) ? ' class="rs-backwhite"' : ' class="alternate"';
-
- // $check_shorcut was displayed in first
";
- } // end foreach role
- } // end foreach roledef
-
- echo '
';
- } // endif not single item
-
-} // end function item_tree
-
-} // end class ScoperAdminBulk
-
-?>
\ No newline at end of file
diff --git a/blog/wp-content/plugins/role-scoper/admin/admin-dashboard_rs.php b/blog/wp-content/plugins/role-scoper/admin/admin-dashboard_rs.php
deleted file mode 100644
index 0b68e5b..0000000
--- a/blog/wp-content/plugins/role-scoper/admin/admin-dashboard_rs.php
+++ /dev/null
@@ -1,54 +0,0 @@
-pending) ) {
- echo "\n\t".'
';
- if ( $role_duration ) {
- _e("Role Duration specifies the time period in which a role is active.", 'scoper');
- echo ' ';
- }
-
- if ( $content_date_limits )
- _e("Content Date Limits narrow the content which the role applies to.", 'scoper');
-
- echo ' ';
- echo '
';
- _e('This controls what limits to apply to the User / Group roles you select for creation or modification. Currently stored limits are indicated by a dotted border around the User or Group name. For details, hover over the name or view the User or Group Profile.', 'scoper' );
- echo '
';
- echo "{$link_open}$generic_name{$link_close}: ";
- printf (__('%1$s has role assigned for the specified %2$s.', 'scoper'), $agent_caption, $display_name);
- echo '
';
-
- echo '
';
- echo "{$link_open}$generic_name{$link_close}: ";
- printf (__('%1$s has role assigned for the specified %2$s and, by default, for all its sub-%3$s. (Propagated roles can also be explicitly removed).', 'scoper'), $agent_caption, $display_name, $display_name_plural);
- echo '
';
-
- echo '
';
- echo "{$link_open}$generic_name{$link_close}: ";
- printf (__('%1$s does NOT have role assigned for the specified %2$s, but has it by default for sub-%3$s.', 'scoper'), $agent_caption, $display_name, $display_name_plural);
- echo '
';
-
- echo '
';
- echo '{' . "{$link_open}$generic_name{$link_close}" . '}: ';
- printf (__('%1$s has this role via propagation from parent %2$s, and by default for sub-%3$s.', 'scoper'), $agent_caption, $display_name, $display_name_plural);
- echo '
';
- printf( $msg, 'href="admin.php?page=rs-options"');
-
- _e('Another option is to categorise pages via the Page Category Plus plugin.', 'scoper');
-
- echo '
';
- }
- }
-
- // make use of filter provided by WP 2.7
- function flt_dropdown_pages($orig_options_html) {
- global $scoper, $post_ID;
-
- //log_mem_usage_rs( 'start flt_dropdown_pages()' );
-
- if ( strpos( $_SERVER['SCRIPT_NAME'], 'p-admin/options-' ) )
- return $orig_options_html;
-
- if ( empty($post_ID) )
- $object_id = $scoper->data_sources->detect('id', 'post', 0, 'post');
- else
- $object_id = $post_ID;
-
- if ( $object_id )
- $stored_parent_id = $scoper->data_sources->detect('parent', 'post', $object_id);
- else
- $stored_parent_id = 0;
-
- //if ( is_content_administrator_rs() ) // WP 2.7 excludes private pages from Administrator's parent dropdown
- // return $orig_options_html;
-
- if ( is_content_administrator_rs() ) {
- $can_associate_main = true;
-
- } elseif ( ! scoper_get_option( 'lock_top_pages' ) ) {
- global $current_user;
- $reqd_caps = array('edit_others_pages');
- $roles = $scoper->role_defs->qualify_roles($reqd_caps, '');
-
- $can_associate_main = array_intersect_key( $roles, $current_user->blog_roles[ANY_CONTENT_DATE_RS] );
- } else
- $can_associate_main = false;
-
- // Generate the filtered page parent options, but only if user can de-associate with main page, or if parent is already non-Main
- if ( $can_associate_main || ! $object_id || $stored_parent_id ) {
- $options_html = ScoperAdminUI::dropdown_pages($object_id, $stored_parent_id);
- } else {
- $options_html = '';
- }
-
- // User can't associate or de-associate a page with Main page unless they have edit_pages blog-wide.
- // Prepend the Main Page option if appropriate (or, to avoid submission errors, if we generated no other options)
- if ( ( strpos( $orig_options_html, __('Main Page (no parent)') ) || strpos($_SERVER['SCRIPT_NAME'], 'p-admin/page.php') || strpos($_SERVER['SCRIPT_NAME'], 'p-admin/page-new.php') )
- && ( $can_associate_main || ( $object_id && ! $stored_parent_id ) || empty($options_html) ) ) {
- $current = ( $stored_parent_id ) ? '' : ' selected="selected"';
- $option_main = "\t" . '";
- } else
- $option_main = '';
-
- //return "';
-
- //log_mem_usage_rs( 'end flt_dropdown_pages()' );
-
-
- // can't assume name/id for this dropdown (Quick Edit uses "post_parent")
- $mat = array();
- preg_match("/