Head Cleaner - Version 1.4.1.2

Version Description

Download this release

Release Info

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

Code changes from version 1.4.1.1 to 1.4.1.2

head-cleaner.php CHANGED
@@ -1,7 +1,7 @@
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
1
  <?php
2
  /*
3
  Plugin Name: Head Cleaner
4
+ Version: 1.4.1.2
5
  Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
6
  Description: Cleaning tags from your WordPress header and footer.
7
  Author: wokamoto
includes/common-controller.php CHANGED
@@ -28,6 +28,7 @@ class wokController {
28
  var $note, $error;
29
  var $charset;
30
  var $wp25, $wp26, $wp27, $wp28, $wp29, $wp30, $wp31;
 
31
 
32
  var $jquery_js = 'includes/js/jquery-1.4.2.min.js';
33
  var $jquery_ver = '1.4.2';
@@ -70,6 +71,12 @@ class wokController {
70
 
71
  if (!isset($wok_script_manager) && class_exists('wokScriptManager'))
72
  $wok_script_manager = new wokScriptManager();
 
 
 
 
 
 
73
  }
74
 
75
  function setPluginDir($file) {
@@ -221,11 +228,15 @@ class wokController {
221
  }
222
 
223
  // Output Javascript
 
 
 
224
  function writeScript($out = '', $place = 'head') {
225
  global $wok_script_manager;
226
  if ($out == '' || !isset($wok_script_manager))
227
  return;
228
- add_filter($place.'_script/manageScripts', create_function('$js', 'return $js . "'.addcslashes($out,'"').'";'));
 
229
  }
230
 
231
  // Regist jQuery
@@ -302,9 +313,9 @@ class wokScriptManager {
302
  $this->__construct();
303
  }
304
  function __construct() {
305
- global $wp_scripts;
306
- if (!is_a($wp_scripts, 'WP_Scripts'))
307
- $wp_scripts = new WP_Scripts();
308
 
309
  add_action('admin_head', array($this, 'adminHeadPrintScript'), 11);
310
  add_action('wp_head', array($this, 'headPrintScript'), 11);
@@ -357,15 +368,15 @@ class wokScriptManager {
357
  }
358
 
359
  function adminHeadPrintScript() {
360
- $this->printScript(apply_filters('admin_head_script/manageScripts', ''));
361
  }
362
 
363
  function headPrintScript() {
364
- $this->printScript(apply_filters('head_script/manageScripts', ''));
365
  }
366
 
367
  function footerPrintScript() {
368
- $this->printScript(apply_filters('footer_script/manageScripts', ''));
369
  }
370
  }
371
  endif;
28
  var $note, $error;
29
  var $charset;
30
  var $wp25, $wp26, $wp27, $wp28, $wp29, $wp30, $wp31;
31
+ var $inline_js;
32
 
33
  var $jquery_js = 'includes/js/jquery-1.4.2.min.js';
34
  var $jquery_ver = '1.4.2';
71
 
72
  if (!isset($wok_script_manager) && class_exists('wokScriptManager'))
73
  $wok_script_manager = new wokScriptManager();
74
+
75
+ $this->inline_js = array(
76
+ 'admin_head' => '',
77
+ 'head' => '',
78
+ 'footer' => '',
79
+ );
80
  }
81
 
82
  function setPluginDir($file) {
228
  }
229
 
230
  // Output Javascript
231
+ function scriptConcat($js, $place) {
232
+ return $js . $this->inline_js[$place];
233
+ }
234
  function writeScript($out = '', $place = 'head') {
235
  global $wok_script_manager;
236
  if ($out == '' || !isset($wok_script_manager))
237
  return;
238
+ $this->inline_js[$place] .= $out;
239
+ add_filter($place.'_script/manageScripts', array(&$this, "scriptConcat"), 10, 2);
240
  }
241
 
242
  // Regist jQuery
313
  $this->__construct();
314
  }
315
  function __construct() {
316
+ // global $wp_scripts;
317
+ // if (!is_a($wp_scripts, 'WP_Scripts'))
318
+ // $wp_scripts = new WP_Scripts();
319
 
320
  add_action('admin_head', array($this, 'adminHeadPrintScript'), 11);
321
  add_action('wp_head', array($this, 'headPrintScript'), 11);
368
  }
369
 
370
  function adminHeadPrintScript() {
371
+ $this->printScript(apply_filters('admin_head_script/manageScripts', '', 'admin_head'));
372
  }
373
 
374
  function headPrintScript() {
375
+ $this->printScript(apply_filters('head_script/manageScripts', '', 'head'));
376
  }
377
 
378
  function footerPrintScript() {
379
+ $this->printScript(apply_filters('footer_script/manageScripts', '', 'footer'));
380
  }
381
  }
382
  endif;
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.1
8
 
9
  Cleaning tags from your WordPress header and footer.
10
 
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.2
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.1
7
- Stable tag: 1.4.1.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.2
8
 
9
  Head と footer をお掃除します。
10