Head Cleaner - Version 1.4.1.1

Version Description

Download this release

Release Info

Developer wokamoto
Plugin Icon wp plugin Head Cleaner
Version 1.4.1.1
Comparing to
See all releases

Code changes from version 1.4.1 to 1.4.1.1

Files changed (3) hide show
  1. head-cleaner.php +17 -17
  2. readme.txt +4 -1
  3. readme_ja.txt +1 -1
head-cleaner.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Head Cleaner
4
- Version: 1.4.1
5
  Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
6
  Description: Cleaning tags from your WordPress header and footer.
7
  Author: wokamoto
@@ -1030,20 +1030,14 @@ class HeadCleaner extends wokController {
1030
  // Get permalink
1031
  //**************************************************************************************
1032
  private function _get_permalink() {
1033
- if (is_home()) {
1034
- $url = trailingslashit(get_bloginfo('wpurl'));
1035
- } elseif (function_exists('site_url')) {
1036
- $url = site_url($_SERVER['REQUEST_URI']);
1037
- } else {
1038
- $url = get_bloginfo('url');
1039
- if (! preg_match('|^(https?://[^/]*)|', $url, $host)) {
1040
- $host[1] = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off')
1041
- ? 'http://'
1042
- : 'https://' . $_SERVER['SERVER_NAME'];
1043
- }
1044
- $url = preg_replace('/\?[^s].*$/i', '', $host[1] . $_SERVER['REQUEST_URI']);
1045
- unset($host);
1046
- }
1047
  return ($url);
1048
  }
1049
 
@@ -2673,15 +2667,21 @@ E__O__T;
2673
 
2674
  if (is_home()) {
2675
  $excerpt = get_bloginfo('description');
 
2676
  } elseif(is_singular()) {
2677
  global $wpmp_conf, $post;
 
2678
  $id = get_the_ID();
2679
  if (!isset($post)) {
2680
- $post = &get_post(get_the_ID());
2681
  }
2682
  $title = trim(wp_title('', false));
2683
 
2684
- $thumb = has_post_thumbnail($id) ? preg_replace("/^.*['\"](https?:\/\/[^'\"]*)['\"].*/i","$1",get_the_post_thumbnail($id)) : '';
 
 
 
 
2685
  if (empty($thumb) && preg_match_all('/<img .*src=[\'"]([^\'"]+)[\'"]/', $post->post_content, $matches, PREG_SET_ORDER)) {
2686
  $thumb = $matches[0][1];
2687
  }
1
  <?php
2
  /*
3
  Plugin Name: Head Cleaner
4
+ Version: 1.4.1.1
5
  Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
6
  Description: Cleaning tags from your WordPress header and footer.
7
  Author: wokamoto
1030
  // Get permalink
1031
  //**************************************************************************************
1032
  private function _get_permalink() {
1033
+ $url = get_bloginfo('url');
1034
+ if (! preg_match('|^(https?://[^/]*)|', $url, $host)) {
1035
+ $host[1] = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off')
1036
+ ? 'http://'
1037
+ : 'https://' . $_SERVER['SERVER_NAME'];
1038
+ }
1039
+ $url = preg_replace( '/\?[^s].*$/i', '', $host[1] . $_SERVER['REQUEST_URI']);
1040
+ unset($host);
 
 
 
 
 
 
1041
  return ($url);
1042
  }
1043
 
2667
 
2668
  if (is_home()) {
2669
  $excerpt = get_bloginfo('description');
2670
+
2671
  } elseif(is_singular()) {
2672
  global $wpmp_conf, $post;
2673
+
2674
  $id = get_the_ID();
2675
  if (!isset($post)) {
2676
+ $post = &get_post($id);
2677
  }
2678
  $title = trim(wp_title('', false));
2679
 
2680
+ $thumb = (
2681
+ has_post_thumbnail($id)
2682
+ ? preg_replace("/^.*['\"](https?:\/\/[^'\"]*)['\"].*/i","$1",get_the_post_thumbnail($id))
2683
+ : ''
2684
+ );
2685
  if (empty($thumb) && preg_match_all('/<img .*src=[\'"]([^\'"]+)[\'"]/', $post->post_content, $matches, PREG_SET_ORDER)) {
2686
  $thumb = $matches[0][1];
2687
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=9S8AJ
4
  Tags: head, header, footer, javascript, css, optimization, minified, performance, facebook, OGP
5
  Requires at least: 2.5
6
  Tested up to: 3.1
7
- Stable tag: 1.4.1
8
 
9
  Cleaning tags from your WordPress header and footer.
10
 
@@ -91,6 +91,9 @@ Head Cleaner Ver.1.1.5 includes 'php_browscap.ini' .
91
 
92
  == Changelog ==
93
 
 
 
 
94
  **1.4.1 - January 19, 2011**
95
  Add OPG (Open Graph Protocol) tags.
96
 
4
  Tags: head, header, footer, javascript, css, optimization, minified, performance, facebook, OGP
5
  Requires at least: 2.5
6
  Tested up to: 3.1
7
+ Stable tag: 1.4.1.1
8
 
9
  Cleaning tags from your WordPress header and footer.
10
 
91
 
92
  == Changelog ==
93
 
94
+ **1.4.1.1 - January 25, 2011**
95
+ Fixed a bug, Canonical tag issue.
96
+
97
  **1.4.1 - January 19, 2011**
98
  Add OPG (Open Graph Protocol) tags.
99
 
readme_ja.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=9S8AJ
4
  Tags: head optimization, javascript, css, optimization, minified, performance
5
  Requires at least: 2.5
6
  Tested up to: 3.1
7
- Stable tag: 1.4.1
8
 
9
  Head と footer をお掃除します。
10
 
4
  Tags: head optimization, javascript, css, optimization, minified, performance
5
  Requires at least: 2.5
6
  Tested up to: 3.1
7
+ Stable tag: 1.4.1.1
8
 
9
  Head と footer をお掃除します。
10