Version Description
Download this release
Release Info
Developer | wokamoto |
Plugin | Head Cleaner |
Version | 1.3.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.3 to 1.3.4
- head-cleaner.php +53 -2
- readme.txt +4 -1
- readme_ja.txt +1 -1
head-cleaner.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Head Cleaner
|
4 |
-
Version: 1.3.
|
5 |
Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
|
6 |
Description: Cleaning tags from your WordPress header and footer.
|
7 |
Author: wokamoto
|
@@ -109,7 +109,7 @@ if (!class_exists('wokController') || !class_exists('wokScriptManager'))
|
|
109 |
//**************************************************************************************
|
110 |
class HeadCleanerController extends wokController {
|
111 |
public $plugin_name = 'head-cleaner';
|
112 |
-
public $plugin_ver = '1.3.
|
113 |
|
114 |
// Deafault Options
|
115 |
private $options_default = array(
|
@@ -165,6 +165,7 @@ class HeadCleanerController extends wokController {
|
|
165 |
'stats_footer' , // WordPress.com Stats
|
166 |
'uga_wp_footer_track' , // Ultimate Google Analytics
|
167 |
'tam_google_analytics::insert_tracking_code' , // TaM Google Analytics
|
|
|
168 |
);
|
169 |
|
170 |
private $default_head_filters = array(
|
@@ -176,6 +177,11 @@ class HeadCleanerController extends wokController {
|
|
176 |
'wp_generator' ,
|
177 |
);
|
178 |
|
|
|
|
|
|
|
|
|
|
|
179 |
/**********************************************************
|
180 |
* Constructor
|
181 |
***********************************************************/
|
@@ -301,6 +307,15 @@ class HeadCleanerController extends wokController {
|
|
301 |
//**************************************************************************************
|
302 |
public function head_start(){
|
303 |
if (! $this->_is_ktai() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
ob_start(array(&$this, 'head_cleaner'));
|
305 |
$this->mtime_start = microtime();
|
306 |
|
@@ -321,14 +336,46 @@ class HeadCleanerController extends wokController {
|
|
321 |
//**************************************************************************************
|
322 |
public function footer_start(){
|
323 |
if (! $this->_is_ktai() && $this->options['foot_js'] ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
ob_start(array(&$this, 'footer_cleaner'));
|
325 |
$this->mtime_start = microtime();
|
|
|
326 |
add_action('wp_footer', array(&$this, 'end'), HC_PRIORITY);
|
327 |
$this->_get_filters('wp_footer');
|
328 |
$this->_change_filters_priority('wp_footer');
|
329 |
}
|
330 |
}
|
331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
//**************************************************************************************
|
333 |
// ob_end_flush
|
334 |
//**************************************************************************************
|
@@ -356,6 +403,8 @@ class HeadCleanerController extends wokController {
|
|
356 |
if (!function_exists('str_get_html'))
|
357 |
return trim($buffer) . "\n";
|
358 |
|
|
|
|
|
359 |
$url = $this->_get_permalink();
|
360 |
|
361 |
$xml_head = "<?xml version=\"1.0\" encoding=\"{$this->charset}\"?>\n";
|
@@ -698,6 +747,8 @@ class HeadCleanerController extends wokController {
|
|
698 |
if (!function_exists('str_get_html'))
|
699 |
return trim($buffer) . "\n";
|
700 |
|
|
|
|
|
701 |
$ret_val = '';
|
702 |
$script_tag = ''; $inline_js = '';
|
703 |
$other_tag = '';
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Head Cleaner
|
4 |
+
Version: 1.3.4
|
5 |
Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
|
6 |
Description: Cleaning tags from your WordPress header and footer.
|
7 |
Author: wokamoto
|
109 |
//**************************************************************************************
|
110 |
class HeadCleanerController extends wokController {
|
111 |
public $plugin_name = 'head-cleaner';
|
112 |
+
public $plugin_ver = '1.3.4';
|
113 |
|
114 |
// Deafault Options
|
115 |
private $options_default = array(
|
165 |
'stats_footer' , // WordPress.com Stats
|
166 |
'uga_wp_footer_track' , // Ultimate Google Analytics
|
167 |
'tam_google_analytics::insert_tracking_code' , // TaM Google Analytics
|
168 |
+
'Ktai_Entry::add_check_messages' , // Ktai Entry
|
169 |
);
|
170 |
|
171 |
private $default_head_filters = array(
|
177 |
'wp_generator' ,
|
178 |
);
|
179 |
|
180 |
+
private $ob_handlers = array(
|
181 |
+
'All_in_One_SEO_Pack::output_callback_for_title' => 'enable' ,
|
182 |
+
);
|
183 |
+
|
184 |
+
|
185 |
/**********************************************************
|
186 |
* Constructor
|
187 |
***********************************************************/
|
307 |
//**************************************************************************************
|
308 |
public function head_start(){
|
309 |
if (! $this->_is_ktai() ) {
|
310 |
+
$ob_handlers = (array) ob_list_handlers();
|
311 |
+
if ( count($ob_handlers) > 0 ) {
|
312 |
+
foreach ( $ob_handlers as $ob_handler ) {
|
313 |
+
if ( isset($this->ob_handlers[$ob_handler]) )
|
314 |
+
$this->ob_handlers[$ob_handler] = true;
|
315 |
+
}
|
316 |
+
ob_end_flush();
|
317 |
+
}
|
318 |
+
|
319 |
ob_start(array(&$this, 'head_cleaner'));
|
320 |
$this->mtime_start = microtime();
|
321 |
|
336 |
//**************************************************************************************
|
337 |
public function footer_start(){
|
338 |
if (! $this->_is_ktai() && $this->options['foot_js'] ) {
|
339 |
+
$ob_handlers = (array) ob_list_handlers();
|
340 |
+
if ( count($ob_handlers) > 0 ) {
|
341 |
+
foreach ( $ob_handlers as $ob_handler ) {
|
342 |
+
if ( isset($this->ob_handlers[$ob_handler]) )
|
343 |
+
$this->ob_handlers[$ob_handler] = true;
|
344 |
+
}
|
345 |
+
ob_end_flush();
|
346 |
+
}
|
347 |
+
|
348 |
ob_start(array(&$this, 'footer_cleaner'));
|
349 |
$this->mtime_start = microtime();
|
350 |
+
|
351 |
add_action('wp_footer', array(&$this, 'end'), HC_PRIORITY);
|
352 |
$this->_get_filters('wp_footer');
|
353 |
$this->_change_filters_priority('wp_footer');
|
354 |
}
|
355 |
}
|
356 |
|
357 |
+
//**************************************************************************************
|
358 |
+
// ob_handler
|
359 |
+
//**************************************************************************************
|
360 |
+
private function ob_handler($content){
|
361 |
+
foreach ( $this->ob_handlers as $ob_handler => $enable ) {
|
362 |
+
if ( $enable ) {
|
363 |
+
switch ($ob_handler) {
|
364 |
+
case 'All_in_One_SEO_Pack::output_callback_for_title':
|
365 |
+
global $aiosp;
|
366 |
+
if ( isset($aiosp) )
|
367 |
+
$content = $aiosp->rewrite_title($content);
|
368 |
+
break;
|
369 |
+
default :
|
370 |
+
break;
|
371 |
+
}
|
372 |
+
$this->ob_handlers[$ob_handler] = false;
|
373 |
+
}
|
374 |
+
}
|
375 |
+
|
376 |
+
return $content;
|
377 |
+
}
|
378 |
+
|
379 |
//**************************************************************************************
|
380 |
// ob_end_flush
|
381 |
//**************************************************************************************
|
403 |
if (!function_exists('str_get_html'))
|
404 |
return trim($buffer) . "\n";
|
405 |
|
406 |
+
$buffer = $this->ob_handler($buffer);
|
407 |
+
|
408 |
$url = $this->_get_permalink();
|
409 |
|
410 |
$xml_head = "<?xml version=\"1.0\" encoding=\"{$this->charset}\"?>\n";
|
747 |
if (!function_exists('str_get_html'))
|
748 |
return trim($buffer) . "\n";
|
749 |
|
750 |
+
$buffer = $this->ob_handler($buffer);
|
751 |
+
|
752 |
$ret_val = '';
|
753 |
$script_tag = ''; $inline_js = '';
|
754 |
$other_tag = '';
|
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: 2.9.1
|
7 |
-
Stable tag: 1.3.
|
8 |
|
9 |
Cleaning tags from your WordPress header and footer.
|
10 |
|
@@ -88,6 +88,9 @@ Head Cleaner Ver.1.1.5 includes 'php_browscap.ini' .
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
91 |
**1.3.3 - January 27, 2010**
|
92 |
Add an item to the Options page set.
|
93 |
(Added the option to remove the JavaScript)
|
4 |
Tags: head, header, footer, javascript, css, optimization, minified, performance
|
5 |
Requires at least: 2.5
|
6 |
Tested up to: 2.9.1
|
7 |
+
Stable tag: 1.3.4
|
8 |
|
9 |
Cleaning tags from your WordPress header and footer.
|
10 |
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
**1.3.4 - February 9, 2010**
|
92 |
+
Fixed a conflict with "[All in One SEO Pack](http://wordpress.org/extend/plugins/all-in-one-seo-pack/)".
|
93 |
+
|
94 |
**1.3.3 - January 27, 2010**
|
95 |
Add an item to the Options page set.
|
96 |
(Added the option to remove the JavaScript)
|
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: 2.9.1
|
7 |
-
Stable tag: 1.3.
|
8 |
|
9 |
Head �� footer �����|�����܂��B
|
10 |
|
4 |
Tags: head optimization, javascript, css, optimization, minified, performance
|
5 |
Requires at least: 2.5
|
6 |
Tested up to: 2.9.1
|
7 |
+
Stable tag: 1.3.4
|
8 |
|
9 |
Head �� footer �����|�����܂��B
|
10 |
|