Permalink
Browse files

final QA for 1.1.0 release

  • Loading branch information...
1 parent 3a40996 commit 6d09d67d67b54dae05482b9d96f76833c975c694 @wmark committed Jul 9, 2010
Showing with 8 additions and 7 deletions.
  1. +7 −6 ossdl-cdn.php
  2. +1 −1 readme.txt
View
@@ -99,36 +99,37 @@ function ossdl_off_menu() {
function ossdl_off_options() {
if ( isset($_POST['action']) && ( $_POST['action'] == 'update_ossdl_off' )){
update_option('ossdl_off_cdn_url', $_POST['ossdl_off_cdn_url']);
- update_option('ossdl_off_include_dirs', $_POST['ossdl_off_include_dirs']);
+ update_option('ossdl_off_include_dirs', $_POST['ossdl_off_include_dirs'] == '' ? 'wp-content,wp-includes' : $_POST['ossdl_off_include_dirs']);
update_option('ossdl_off_exclude', $_POST['ossdl_off_exclude']);
}
+ $example_cdn_uri = str_replace('http://', 'http://cdn.', str_replace('www.', '', get_option('siteurl')));
?><div class="wrap">
<h2>OSSDL CDN off-linker</h2>
<p>Many Wordpress plugins misbehave when linking to their JS or CSS files, and yet there is no filter to let your old posts point to a statics' site or CDN for images.
Therefore this plugin replaces at any links into <code>wp-content</code> and <code>wp-includes</code> directories (except for PHP files) the <code>blog_url</code> by the URL you provide below.
That way you can either copy all the static content to a dedicated host or mirror the files at a CDN by <a href="http://knowledgelayer.softlayer.com/questions/365/How+does+Origin+Pull+work%3F" target="_blank">origin pull</a>.</p>
- <p><strong style="color: red">WARNING:</strong> Test some static urls e.g., <code>http://static.mydomain.com/wp-includes/js/prototype.js</code> to ensure your CDN service is fully working before saving changes.</p>
+ <p><strong style="color: red">WARNING:</strong> Test some static urls e.g., <code><?php echo(get_option('ossdl_off_cdn_url') == get_option('siteurl') ? $example_cdn_uri : get_option('ossdl_off_cdn_url')); ?>/wp-includes/js/prototype.js</code> to ensure your CDN service is fully working before saving changes.</p>
<p><form method="post" action="">
<table class="form-table"><tbod>
<tr valign="top">
<th scope="row"><label for="ossdl_off_cdn_url">off-site URL</label></th>
<td>
- <input type="text" name="ossdl_off_cdn_url" value="<?php echo get_option('ossdl_off_cdn_url'); ?>" size="64" class="regular-text code" />
- <span class="description">The new URL to be used in place of <?php echo get_option('siteurl'); ?> for rewriting. No trailing <code>/</code> please. E.g. <code><?php echo str_replace('http://', 'http://cdn.', str_replace('www.', '', get_option('siteurl'))); ?></code>.</span>
+ <input type="text" name="ossdl_off_cdn_url" value="<?php echo(get_option('ossdl_off_cdn_url')); ?>" size="64" class="regular-text code" />
+ <span class="description">The new URL to be used in place of <?php echo(get_option('siteurl')); ?> for rewriting. No trailing <code>/</code> please. E.g. <code><?php echo($example_cdn_uri); ?></code>.</span>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="ossdl_off_include_dirs">include dirs</label></th>
<td>
- <input type="text" name="ossdl_off_include_dirs" value="<?php echo get_option('ossdl_off_include_dirs'); ?>" size="64" class="regular-text code" />
+ <input type="text" name="ossdl_off_include_dirs" value="<?php echo(get_option('ossdl_off_include_dirs')); ?>" size="64" class="regular-text code" />
<span class="description">Directories to include in static file matching. Use a comma as the delimiter. Default is <code>wp-content, wp-includes</code>, which will be enforced if this field is left empty.</span>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="ossdl_off_exclude">exclude if substring</label></th>
<td>
- <input type="text" name="ossdl_off_exclude" value="<?php echo get_option('ossdl_off_exclude'); ?>" size="64" class="regular-text code" />
+ <input type="text" name="ossdl_off_exclude" value="<?php echo(get_option('ossdl_off_exclude')); ?>" size="64" class="regular-text code" />
<span class="description">Excludes something from being rewritten if one of the above strings is found in the match. Use a comma as the delimiter. E.g. <code>.php, .flv, .do</code>, always include <code>.php</code> (default).</span>
</td>
</tr>
View
@@ -80,7 +80,7 @@ Therefore, please send me at least one page with the plugin turned off and on, a
== Changelog ==
= 1.1.0 =
-* list input for having matches excluded
+* an input field has been added for defining matches that shall be excluded from rewriting
* added the feature to include additional (to `wp-content` and `wp-includes`) directories for rewriting
* fixed: bug which messed with urls located at the root level of the site, introduced in 1.0.2 (thanks to Vic Holtreman for reporting)

0 comments on commit 6d09d67

Please sign in to comment.