Head Cleaner - Version 1.4.0.4

Version Description

Download this release

Release Info

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

Code changes from version 1.4.0.3 to 1.4.0.4

Files changed (3) hide show
  1. head-cleaner.php +8 -5
  2. readme.txt +1 -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.0.3
5
  Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
6
  Description: Cleaning tags from your WordPress header and footer.
7
  Author: wokamoto
@@ -2355,9 +2355,10 @@ E__O__T;
2355
  // Get function name
2356
  //**************************************************************************************
2357
  private function _get_function_name($function) {
2358
- return (is_object($function[0])
2359
  ? (get_class($function[0]) !== FALSE ? get_class($function[0]) : $function[0]) . '::' . $function[1]
2360
  : $function );
 
2361
  }
2362
 
2363
  //**************************************************************************************
@@ -2378,9 +2379,11 @@ E__O__T;
2378
  foreach ($active_filters as $priority => $filters) {
2379
  foreach ($filters as $filter) {
2380
  $function_name = $this->_get_function_name($filter['function']);
2381
- if (!isset($this->filters[$tag]))
2382
- $this->filters[$tag] = array();
2383
- $this->filters[$tag][$function_name] = $priority;
 
 
2384
  }
2385
  }
2386
  unset($active_filters);
1
  <?php
2
  /*
3
  Plugin Name: Head Cleaner
4
+ Version: 1.4.0.4
5
  Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
6
  Description: Cleaning tags from your WordPress header and footer.
7
  Author: wokamoto
2355
  // Get function name
2356
  //**************************************************************************************
2357
  private function _get_function_name($function) {
2358
+ $retval = (is_object($function[0])
2359
  ? (get_class($function[0]) !== FALSE ? get_class($function[0]) : $function[0]) . '::' . $function[1]
2360
  : $function );
2361
+ return (!is_object($retval) && !is_array($retval) ? $retval : FALSE);
2362
  }
2363
 
2364
  //**************************************************************************************
2379
  foreach ($active_filters as $priority => $filters) {
2380
  foreach ($filters as $filter) {
2381
  $function_name = $this->_get_function_name($filter['function']);
2382
+ if (FALSE !== $function_name) {
2383
+ if (!isset($this->filters[$tag]))
2384
+ $this->filters[$tag] = array();
2385
+ $this->filters[$tag][$function_name] = $priority;
2386
+ }
2387
  }
2388
  }
2389
  unset($active_filters);
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
5
  Requires at least: 2.5
6
  Tested up to: 3.0.2
7
- Stable tag: 1.4.0.3
8
 
9
  Cleaning tags from your WordPress header and footer.
10
 
4
  Tags: head, header, footer, javascript, css, optimization, minified, performance
5
  Requires at least: 2.5
6
  Tested up to: 3.0.2
7
+ Stable tag: 1.4.0.4
8
 
9
  Cleaning tags from your WordPress header and footer.
10
 
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.0.2
7
- Stable tag: 1.4.0.3
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.0.2
7
+ Stable tag: 1.4.0.4
8
 
9
  Head と footer をお掃除します。
10