Version Description
Download this release
Release Info
Developer | wokamoto |
Plugin | Head Cleaner |
Version | 1.4.2.10 |
Comparing to | |
See all releases |
Code changes from version 1.4.2.9 to 1.4.2.10
- head-cleaner.php +73 -22
- includes/common-controller.php +7 -5
- includes/regist_ajax_libs.php +172 -144
- readme.txt +1 -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.4.2.
|
5 |
Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
|
6 |
Description: Cleaning tags from your WordPress header and footer.
|
7 |
Author: wokamoto
|
@@ -68,7 +68,7 @@ if (!class_exists('InputValidator'))
|
|
68 |
//**************************************************************************************
|
69 |
class HeadCleaner extends wokController {
|
70 |
public $plugin_name = 'head-cleaner';
|
71 |
-
public $plugin_ver = '1.4.2.
|
72 |
|
73 |
const PRIORITY = 10000;
|
74 |
const ANALYZE_EXPIRED = 604800; // 60 * 60 * 24 * 7 [sec.]
|
@@ -106,11 +106,13 @@ class HeadCleaner extends wokController {
|
|
106 |
'img_base64' => false ,
|
107 |
'add_ogp_tag' => false ,
|
108 |
'ogp_default_image' => '' ,
|
|
|
109 |
'og_locale' => '' ,
|
110 |
'fb_admins' => '' ,
|
111 |
'fb_app_id' => '' ,
|
112 |
'add_last_modified' => false ,
|
113 |
'paranoia_mode' => false ,
|
|
|
114 |
);
|
115 |
|
116 |
private $wp_url = '';
|
@@ -158,7 +160,7 @@ class HeadCleaner extends wokController {
|
|
158 |
/**********************************************************
|
159 |
* Constructor
|
160 |
***********************************************************/
|
161 |
-
function __construct() {
|
162 |
$this->init(__FILE__);
|
163 |
$this->options = $this->_init_options($this->getOptions());
|
164 |
$this->filters = $this->options['filters'];
|
@@ -169,13 +171,17 @@ class HeadCleaner extends wokController {
|
|
169 |
$this->self_url = $this->wp_plugin_url( basename(dirname(__FILE__)) ) . basename(__FILE__);
|
170 |
$this->lang = (defined('WPLANG') ? WPLANG : 'ja');
|
171 |
$this->charset = get_option('blog_charset');
|
|
|
|
|
|
|
|
|
172 |
$this->last_modified["posts"] = 0;
|
173 |
$this->last_modified["theme"] = 0;
|
174 |
$this->_get_filters('wp_head');
|
175 |
$this->_get_filters('wp_footer');
|
176 |
|
177 |
// Create Directory for Cache
|
178 |
-
if (
|
179 |
$this->cache_path = $this->_create_cache_dir();
|
180 |
if ($this->cache_path !== false) {
|
181 |
$this->cache_url = str_replace(ABSPATH, $this->wp_url, $this->cache_path);
|
@@ -238,9 +244,6 @@ class HeadCleaner extends wokController {
|
|
238 |
if (function_exists('register_deactivation_hook')) {
|
239 |
register_deactivation_hook(__FILE__, array(&$this, 'deactivation'));
|
240 |
}
|
241 |
-
if ( function_exists('register_uninstall_hook') ) {
|
242 |
-
register_uninstall_hook(__FILE__, array(&$this, 'uninstall'));
|
243 |
-
}
|
244 |
}
|
245 |
|
246 |
/**********************************************************
|
@@ -656,18 +659,37 @@ class HeadCleaner extends wokController {
|
|
656 |
}
|
657 |
|
658 |
// ***** Parse Start! *****
|
|
|
659 |
$meta_tag = $this->_dom_to_html($dom->find("meta"));
|
660 |
$title_tag = $this->_dom_to_html($dom->find("title"), 1);
|
661 |
$base_tag = $this->_dom_to_html($dom->find("base"), 1);
|
662 |
$link_tag = $this->_dom_to_html($dom->find("link[rel!='stylesheet']"), false, '/alternate stylesheet/i');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
663 |
if (count($dom->find("link[rel='canonical']")) <= 0 && $this->options['canonical_tag'])
|
664 |
$link_tag .= $this->_tag_trim('<link rel="canonical" href="' . htmlspecialchars($url, ENT_QUOTES) . '" />');
|
665 |
-
list($css_tag, $inline_css) = $this->_parse_stylesheet_tag($dom->find("link[rel*='stylesheet']"), $dom->find("style"));
|
666 |
-
list($script_tag, $inline_js, $foot_js) = $this->_parse_script_tag($dom->find("script"));
|
667 |
$noscript_tag = $this->_dom_to_html($dom->find("noscript"));
|
668 |
$object_tag = $this->_dom_to_html($dom->find("object"));
|
669 |
$object_tag .= $this->_rdf_convert($dom->find("rdf:RDF"));
|
670 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
$dom->clear();
|
672 |
unset($dom);
|
673 |
|
@@ -747,6 +769,9 @@ class HeadCleaner extends wokController {
|
|
747 |
if (!$this->_is_user_logged_in() && $this->options['paranoia_mode']) {
|
748 |
$ret_val = $this->html_cleaner($ret_val);
|
749 |
}
|
|
|
|
|
|
|
750 |
|
751 |
$ret_val = apply_filters($this->plugin_name.'/head_cleaner', $ret_val);
|
752 |
return $ret_val;
|
@@ -819,7 +844,7 @@ class HeadCleaner extends wokController {
|
|
819 |
//**************************************************************************************
|
820 |
// parse stylesheet tag
|
821 |
//**************************************************************************************
|
822 |
-
private function _parse_stylesheet_tag($elements_linktag, $elements_styletag){
|
823 |
$css_tag = '';
|
824 |
$css_tag_with_id = '';
|
825 |
$css_tag_with_title = '';
|
@@ -828,6 +853,8 @@ class HeadCleaner extends wokController {
|
|
828 |
$wk_inline_css = array();
|
829 |
$inline_css = '';
|
830 |
$inner_css_src = array();
|
|
|
|
|
831 |
|
832 |
// css file
|
833 |
foreach ((array) $elements_linktag as $element) {
|
@@ -835,6 +862,9 @@ class HeadCleaner extends wokController {
|
|
835 |
if (strpos($css_tag, $tag) === false) {
|
836 |
if (strpos($element->href, $this->wp_url) === false) {
|
837 |
$css_tag .= $this->_tag_trim($tag);
|
|
|
|
|
|
|
838 |
} elseif ( isset($element->id) && !empty($element->id) ) {
|
839 |
$css_tag_with_id .= $this->_tag_trim($tag);
|
840 |
} elseif ( (isset($element->title) && !empty($element->title)) || strtolower($element->rel) == 'alternate stylesheet' ) {
|
@@ -941,7 +971,7 @@ class HeadCleaner extends wokController {
|
|
941 |
//**************************************************************************************
|
942 |
// parse script tag
|
943 |
//**************************************************************************************
|
944 |
-
private function _parse_script_tag($elements){
|
945 |
$script_tag = '';
|
946 |
$inner_js = '';
|
947 |
$inline_js = '';
|
@@ -949,6 +979,8 @@ class HeadCleaner extends wokController {
|
|
949 |
$js_src = array();
|
950 |
$js_libs = array();
|
951 |
$inner_js_src = array();
|
|
|
|
|
952 |
|
953 |
foreach ((array) $elements as $element) {
|
954 |
if (!isset($element->src)) {
|
@@ -972,6 +1004,12 @@ class HeadCleaner extends wokController {
|
|
972 |
}
|
973 |
unset($matches);
|
974 |
|
|
|
|
|
|
|
|
|
|
|
|
|
975 |
if ($find !== false) {
|
976 |
$version = trim(substr($version, -1) === '.' ? substr($version, 0, -1) : $version);
|
977 |
if (empty($version))
|
@@ -2150,7 +2188,7 @@ class HeadCleaner extends wokController {
|
|
2150 |
if (!file_exists($dir))
|
2151 |
return false;
|
2152 |
|
2153 |
-
$rewrite_base = trailingslashit(str_replace(
|
2154 |
|
2155 |
$text = '# BEGIN Head Cleaner' . "\n"
|
2156 |
. '<IfModule mod_rewrite.c>' . "\n"
|
@@ -2425,17 +2463,23 @@ jQuery(function($){
|
|
2425 |
$out .= '</tr>'."\n";
|
2426 |
|
2427 |
$out .= '<tr>';
|
2428 |
-
$out .= '<td class="ogp-options">';
|
|
|
|
|
|
|
|
|
|
|
2429 |
$out .= __('og:locale', $this->textdomain_name);
|
2430 |
$out .= $this->_input_text('og_locale');
|
2431 |
-
$out .= '</
|
2432 |
-
$out .= '<
|
2433 |
$out .= __('fb:admins', $this->textdomain_name);
|
2434 |
$out .= $this->_input_text('fb_admins');
|
2435 |
-
$out .= '</
|
2436 |
-
$out .= '<
|
2437 |
$out .= __('fb:app_id', $this->textdomain_name);
|
2438 |
$out .= $this->_input_text('fb_app_id');
|
|
|
2439 |
$out .= '</td>';
|
2440 |
$out .= '</tr>'."\n";
|
2441 |
|
@@ -2647,6 +2691,7 @@ jQuery(function($){
|
|
2647 |
'canonical_tag',
|
2648 |
'add_ogp_tag',
|
2649 |
'ogp_default_image',
|
|
|
2650 |
'og_locale',
|
2651 |
'fb_admins',
|
2652 |
'fb_app_id',
|
@@ -2684,6 +2729,7 @@ jQuery(function($){
|
|
2684 |
case 'ogp_default_image':
|
2685 |
// $iv->set_rules($field, array('trim','esc_html','url'));
|
2686 |
// break;
|
|
|
2687 |
case 'og_locale':
|
2688 |
case 'fb_admins':
|
2689 |
case 'fb_app_id':
|
@@ -3158,6 +3204,7 @@ jQuery(function($){
|
|
3158 |
if ( is_home() ) {
|
3159 |
$excerpt = get_bloginfo('description');
|
3160 |
$title = $site_name;
|
|
|
3161 |
|
3162 |
} elseif( is_singular() ) {
|
3163 |
global $wpmp_conf, $post;
|
@@ -3202,10 +3249,11 @@ jQuery(function($){
|
|
3202 |
? $wpmp_conf["excerpt_mblength"]
|
3203 |
: 255
|
3204 |
);
|
|
|
3205 |
$excerpt = trim(preg_replace(
|
3206 |
array('/[\n\r]/', '/\[[^\]]+\]/'),
|
3207 |
array('', ' '),
|
3208 |
-
|
3209 |
));
|
3210 |
$excerpt = (
|
3211 |
function_exists('mb_strimwidth')
|
@@ -3224,6 +3272,8 @@ jQuery(function($){
|
|
3224 |
$ogp_tags = '';
|
3225 |
if ( !empty($this->options['og_locale']) )
|
3226 |
$ogp_tags .= sprintf($ogp_tag, 'og:locale', $this->options['og_locale']);
|
|
|
|
|
3227 |
if ( !empty($site_name) )
|
3228 |
$ogp_tags .= sprintf($ogp_tag, 'og:site_name', esc_html($site_name));
|
3229 |
if ( !empty($url) )
|
@@ -3234,8 +3284,6 @@ jQuery(function($){
|
|
3234 |
$ogp_tags .= sprintf($ogp_tag, 'og:image', esc_html($thumb));
|
3235 |
if ( !empty($excerpt) )
|
3236 |
$ogp_tags .= sprintf($ogp_tag, 'og:description', esc_html($excerpt));
|
3237 |
-
if ( !empty($type) )
|
3238 |
-
$ogp_tags .= sprintf($ogp_tag, 'og:type', esc_html($type));
|
3239 |
if ( !empty($this->options['fb_admins']) )
|
3240 |
$ogp_tags .= sprintf($ogp_tag, 'fb:admins', $this->options['fb_admins']);
|
3241 |
if ( !empty($this->options['fb_app_id']) )
|
@@ -3447,4 +3495,7 @@ jQuery(function($){
|
|
3447 |
//**************************************************************************************
|
3448 |
global $head_cleaner;
|
3449 |
|
3450 |
-
|
|
|
|
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Head Cleaner
|
4 |
+
Version: 1.4.2.10
|
5 |
Plugin URI: http://wppluginsj.sourceforge.jp/head-cleaner/
|
6 |
Description: Cleaning tags from your WordPress header and footer.
|
7 |
Author: wokamoto
|
68 |
//**************************************************************************************
|
69 |
class HeadCleaner extends wokController {
|
70 |
public $plugin_name = 'head-cleaner';
|
71 |
+
public $plugin_ver = '1.4.2.11';
|
72 |
|
73 |
const PRIORITY = 10000;
|
74 |
const ANALYZE_EXPIRED = 604800; // 60 * 60 * 24 * 7 [sec.]
|
106 |
'img_base64' => false ,
|
107 |
'add_ogp_tag' => false ,
|
108 |
'ogp_default_image' => '' ,
|
109 |
+
'og_type_top' => 'website' ,
|
110 |
'og_locale' => '' ,
|
111 |
'fb_admins' => '' ,
|
112 |
'fb_app_id' => '' ,
|
113 |
'add_last_modified' => false ,
|
114 |
'paranoia_mode' => false ,
|
115 |
+
'dns-prefetch' => true ,
|
116 |
);
|
117 |
|
118 |
private $wp_url = '';
|
160 |
/**********************************************************
|
161 |
* Constructor
|
162 |
***********************************************************/
|
163 |
+
function __construct($uninstall = false) {
|
164 |
$this->init(__FILE__);
|
165 |
$this->options = $this->_init_options($this->getOptions());
|
166 |
$this->filters = $this->options['filters'];
|
171 |
$this->self_url = $this->wp_plugin_url( basename(dirname(__FILE__)) ) . basename(__FILE__);
|
172 |
$this->lang = (defined('WPLANG') ? WPLANG : 'ja');
|
173 |
$this->charset = get_option('blog_charset');
|
174 |
+
|
175 |
+
if ($uninstall)
|
176 |
+
return;
|
177 |
+
|
178 |
$this->last_modified["posts"] = 0;
|
179 |
$this->last_modified["theme"] = 0;
|
180 |
$this->_get_filters('wp_head');
|
181 |
$this->_get_filters('wp_footer');
|
182 |
|
183 |
// Create Directory for Cache
|
184 |
+
if ($this->options['cache_enabled']) {
|
185 |
$this->cache_path = $this->_create_cache_dir();
|
186 |
if ($this->cache_path !== false) {
|
187 |
$this->cache_url = str_replace(ABSPATH, $this->wp_url, $this->cache_path);
|
244 |
if (function_exists('register_deactivation_hook')) {
|
245 |
register_deactivation_hook(__FILE__, array(&$this, 'deactivation'));
|
246 |
}
|
|
|
|
|
|
|
247 |
}
|
248 |
|
249 |
/**********************************************************
|
659 |
}
|
660 |
|
661 |
// ***** Parse Start! *****
|
662 |
+
$other_domain = array();
|
663 |
$meta_tag = $this->_dom_to_html($dom->find("meta"));
|
664 |
$title_tag = $this->_dom_to_html($dom->find("title"), 1);
|
665 |
$base_tag = $this->_dom_to_html($dom->find("base"), 1);
|
666 |
$link_tag = $this->_dom_to_html($dom->find("link[rel!='stylesheet']"), false, '/alternate stylesheet/i');
|
667 |
+
$link_tags = explode("\n", $link_tag);
|
668 |
+
$link_tag = '';
|
669 |
+
foreach ($link_tags as $tag) {
|
670 |
+
if ( strpos(strtolower($tag), 'dns-prefetch') !== false ) {
|
671 |
+
$href = preg_replace('/^.*href=[\'"]([^\'"]*)[\'"].*$/i', '$1', $tag);
|
672 |
+
$domain = preg_replace('/^.*https?:(\/\/[^\/]+)\/?.*$/i', '$1', $href);
|
673 |
+
if ( !in_array($domain,$other_domain) )
|
674 |
+
$other_domain[] = $domain;
|
675 |
+
} else {
|
676 |
+
$link_tag .= $tag . "\n";
|
677 |
+
}
|
678 |
+
}
|
679 |
if (count($dom->find("link[rel='canonical']")) <= 0 && $this->options['canonical_tag'])
|
680 |
$link_tag .= $this->_tag_trim('<link rel="canonical" href="' . htmlspecialchars($url, ENT_QUOTES) . '" />');
|
681 |
+
list($css_tag, $inline_css) = $this->_parse_stylesheet_tag($dom->find("link[rel*='stylesheet']"), $dom->find("style"), $other_domain);
|
682 |
+
list($script_tag, $inline_js, $foot_js) = $this->_parse_script_tag($dom->find("script"), $other_domain);
|
683 |
$noscript_tag = $this->_dom_to_html($dom->find("noscript"));
|
684 |
$object_tag = $this->_dom_to_html($dom->find("object"));
|
685 |
$object_tag .= $this->_rdf_convert($dom->find("rdf:RDF"));
|
686 |
+
if ( $this->options['dns-prefetch'] && count($other_domain) > 0 ) {
|
687 |
+
$dns_prefetch = '';
|
688 |
+
foreach ( $other_domain as $domain ) {
|
689 |
+
$dns_prefetch .= sprintf('<link rel="dns-prefetch" href="%s" />' . "\n", $domain);
|
690 |
+
}
|
691 |
+
$link_tag = $dns_prefetch . $link_tag;
|
692 |
+
}
|
693 |
$dom->clear();
|
694 |
unset($dom);
|
695 |
|
769 |
if (!$this->_is_user_logged_in() && $this->options['paranoia_mode']) {
|
770 |
$ret_val = $this->html_cleaner($ret_val);
|
771 |
}
|
772 |
+
|
773 |
+
if ( $doctype !== 'xhtml' )
|
774 |
+
$ret_val = preg_replace('# */>#', '>', $ret_val);
|
775 |
|
776 |
$ret_val = apply_filters($this->plugin_name.'/head_cleaner', $ret_val);
|
777 |
return $ret_val;
|
844 |
//**************************************************************************************
|
845 |
// parse stylesheet tag
|
846 |
//**************************************************************************************
|
847 |
+
private function _parse_stylesheet_tag($elements_linktag, $elements_styletag, &$other_domain){
|
848 |
$css_tag = '';
|
849 |
$css_tag_with_id = '';
|
850 |
$css_tag_with_title = '';
|
853 |
$wk_inline_css = array();
|
854 |
$inline_css = '';
|
855 |
$inner_css_src = array();
|
856 |
+
if ( !is_array($other_domain) )
|
857 |
+
$other_domain = array();
|
858 |
|
859 |
// css file
|
860 |
foreach ((array) $elements_linktag as $element) {
|
862 |
if (strpos($css_tag, $tag) === false) {
|
863 |
if (strpos($element->href, $this->wp_url) === false) {
|
864 |
$css_tag .= $this->_tag_trim($tag);
|
865 |
+
$domain = preg_replace('/^https?:(\/\/[^\/]+)\/?.*$/i', '$1', $element->href);
|
866 |
+
if ( !in_array($domain,$other_domain) )
|
867 |
+
$other_domain[] = $domain;
|
868 |
} elseif ( isset($element->id) && !empty($element->id) ) {
|
869 |
$css_tag_with_id .= $this->_tag_trim($tag);
|
870 |
} elseif ( (isset($element->title) && !empty($element->title)) || strtolower($element->rel) == 'alternate stylesheet' ) {
|
971 |
//**************************************************************************************
|
972 |
// parse script tag
|
973 |
//**************************************************************************************
|
974 |
+
private function _parse_script_tag($elements, &$other_domain){
|
975 |
$script_tag = '';
|
976 |
$inner_js = '';
|
977 |
$inline_js = '';
|
979 |
$js_src = array();
|
980 |
$js_libs = array();
|
981 |
$inner_js_src = array();
|
982 |
+
if ( !is_array($other_domain) )
|
983 |
+
$other_domain = array();
|
984 |
|
985 |
foreach ((array) $elements as $element) {
|
986 |
if (!isset($element->src)) {
|
1004 |
}
|
1005 |
unset($matches);
|
1006 |
|
1007 |
+
if (strpos($src, $this->wp_url) === false) {
|
1008 |
+
$domain = preg_replace('/^https?:(\/\/[^\/]+)\/?.*$/i', '$1', $src);
|
1009 |
+
if ( !in_array($domain,$other_domain) )
|
1010 |
+
$other_domain[] = $domain;
|
1011 |
+
}
|
1012 |
+
|
1013 |
if ($find !== false) {
|
1014 |
$version = trim(substr($version, -1) === '.' ? substr($version, 0, -1) : $version);
|
1015 |
if (empty($version))
|
2188 |
if (!file_exists($dir))
|
2189 |
return false;
|
2190 |
|
2191 |
+
$rewrite_base = trailingslashit(str_replace(ABSPATH, '/', $dir));
|
2192 |
|
2193 |
$text = '# BEGIN Head Cleaner' . "\n"
|
2194 |
. '<IfModule mod_rewrite.c>' . "\n"
|
2463 |
$out .= '</tr>'."\n";
|
2464 |
|
2465 |
$out .= '<tr>';
|
2466 |
+
$out .= '<td class="ogp-options" colspan="3">';
|
2467 |
+
$out .= '<span style="margin-right:.5em;">';
|
2468 |
+
$out .= __('og:type (top page)', $this->textdomain_name);
|
2469 |
+
$out .= $this->_input_text('og_type_top');
|
2470 |
+
$out .= '</span>';
|
2471 |
+
$out .= '<span style="margin-right:.5em;">';
|
2472 |
$out .= __('og:locale', $this->textdomain_name);
|
2473 |
$out .= $this->_input_text('og_locale');
|
2474 |
+
$out .= '</span>';
|
2475 |
+
$out .= '<span style="margin-right:.5em;">';
|
2476 |
$out .= __('fb:admins', $this->textdomain_name);
|
2477 |
$out .= $this->_input_text('fb_admins');
|
2478 |
+
$out .= '</span>';
|
2479 |
+
$out .= '<span style="margin-right:.5em;">';
|
2480 |
$out .= __('fb:app_id', $this->textdomain_name);
|
2481 |
$out .= $this->_input_text('fb_app_id');
|
2482 |
+
$out .= '</span>';
|
2483 |
$out .= '</td>';
|
2484 |
$out .= '</tr>'."\n";
|
2485 |
|
2691 |
'canonical_tag',
|
2692 |
'add_ogp_tag',
|
2693 |
'ogp_default_image',
|
2694 |
+
'og_type_top',
|
2695 |
'og_locale',
|
2696 |
'fb_admins',
|
2697 |
'fb_app_id',
|
2729 |
case 'ogp_default_image':
|
2730 |
// $iv->set_rules($field, array('trim','esc_html','url'));
|
2731 |
// break;
|
2732 |
+
case 'og_type_top':
|
2733 |
case 'og_locale':
|
2734 |
case 'fb_admins':
|
2735 |
case 'fb_app_id':
|
3204 |
if ( is_home() ) {
|
3205 |
$excerpt = get_bloginfo('description');
|
3206 |
$title = $site_name;
|
3207 |
+
$type = $this->options['og_type_top'];
|
3208 |
|
3209 |
} elseif( is_singular() ) {
|
3210 |
global $wpmp_conf, $post;
|
3249 |
? $wpmp_conf["excerpt_mblength"]
|
3250 |
: 255
|
3251 |
);
|
3252 |
+
$excerpt = strip_tags($post->post_content);
|
3253 |
$excerpt = trim(preg_replace(
|
3254 |
array('/[\n\r]/', '/\[[^\]]+\]/'),
|
3255 |
array('', ' '),
|
3256 |
+
$excerpt
|
3257 |
));
|
3258 |
$excerpt = (
|
3259 |
function_exists('mb_strimwidth')
|
3272 |
$ogp_tags = '';
|
3273 |
if ( !empty($this->options['og_locale']) )
|
3274 |
$ogp_tags .= sprintf($ogp_tag, 'og:locale', $this->options['og_locale']);
|
3275 |
+
if ( !empty($type) )
|
3276 |
+
$ogp_tags .= sprintf($ogp_tag, 'og:type', esc_html($type));
|
3277 |
if ( !empty($site_name) )
|
3278 |
$ogp_tags .= sprintf($ogp_tag, 'og:site_name', esc_html($site_name));
|
3279 |
if ( !empty($url) )
|
3284 |
$ogp_tags .= sprintf($ogp_tag, 'og:image', esc_html($thumb));
|
3285 |
if ( !empty($excerpt) )
|
3286 |
$ogp_tags .= sprintf($ogp_tag, 'og:description', esc_html($excerpt));
|
|
|
|
|
3287 |
if ( !empty($this->options['fb_admins']) )
|
3288 |
$ogp_tags .= sprintf($ogp_tag, 'fb:admins', $this->options['fb_admins']);
|
3289 |
if ( !empty($this->options['fb_app_id']) )
|
3495 |
//**************************************************************************************
|
3496 |
global $head_cleaner;
|
3497 |
|
3498 |
+
if (!defined('WP_UNINSTALL_PLUGIN'))
|
3499 |
+
$head_cleaner = new HeadCleaner(false);
|
3500 |
+
else
|
3501 |
+
$head_cleaner = new HeadCleaner(true);
|
includes/common-controller.php
CHANGED
@@ -27,7 +27,7 @@ class wokController {
|
|
27 |
var $admin_option, $admin_action, $admin_hook;
|
28 |
var $note, $error;
|
29 |
var $charset;
|
30 |
-
var $wp25, $wp26, $wp27, $wp28, $wp29, $wp30, $wp31, $wp32;
|
31 |
var $inline_js;
|
32 |
|
33 |
var $jquery_js = 'includes/js/jquery-1.4.2.min.js';
|
@@ -50,6 +50,8 @@ class wokController {
|
|
50 |
$this->wp30 = version_compare($wp_version, "3.0", ">=");
|
51 |
$this->wp31 = version_compare($wp_version, "3.1", ">=");
|
52 |
$this->wp32 = version_compare($wp_version, "3.2", ">=");
|
|
|
|
|
53 |
|
54 |
$this->setPluginDir($file);
|
55 |
$this->loadTextdomain();
|
@@ -65,10 +67,10 @@ class wokController {
|
|
65 |
$this->admin_hook = array();
|
66 |
|
67 |
$this->options = array();
|
68 |
-
$this->option_name = (
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
|
73 |
if (!isset($wok_script_manager) && class_exists('wokScriptManager'))
|
74 |
$wok_script_manager = new wokScriptManager();
|
27 |
var $admin_option, $admin_action, $admin_hook;
|
28 |
var $note, $error;
|
29 |
var $charset;
|
30 |
+
var $wp25, $wp26, $wp27, $wp28, $wp29, $wp30, $wp31, $wp32, $wp33, $wp34;
|
31 |
var $inline_js;
|
32 |
|
33 |
var $jquery_js = 'includes/js/jquery-1.4.2.min.js';
|
50 |
$this->wp30 = version_compare($wp_version, "3.0", ">=");
|
51 |
$this->wp31 = version_compare($wp_version, "3.1", ">=");
|
52 |
$this->wp32 = version_compare($wp_version, "3.2", ">=");
|
53 |
+
$this->wp33 = version_compare($wp_version, "3.3", ">=");
|
54 |
+
$this->wp34 = version_compare($wp_version, "3.4", ">=");
|
55 |
|
56 |
$this->setPluginDir($file);
|
57 |
$this->loadTextdomain();
|
67 |
$this->admin_hook = array();
|
68 |
|
69 |
$this->options = array();
|
70 |
+
$this->option_name = (
|
71 |
+
isset($this->plugin_name) && !empty($this->plugin_name)
|
72 |
+
? $this->plugin_name
|
73 |
+
: $this->plugin_dir ) . " Options";
|
74 |
|
75 |
if (!isset($wok_script_manager) && class_exists('wokScriptManager'))
|
76 |
$wok_script_manager = new wokScriptManager();
|
includes/regist_ajax_libs.php
CHANGED
@@ -6,7 +6,7 @@ License:
|
|
6 |
Released under the GPL license
|
7 |
http://www.gnu.org/copyleft/gpl.html
|
8 |
|
9 |
-
Copyright 2009 -
|
10 |
|
11 |
This program is free software; you can redistribute it and/or modify
|
12 |
it under the terms of the GNU General Public License as published by
|
@@ -24,11 +24,15 @@ License:
|
|
24 |
*/
|
25 |
global $wp_version;
|
26 |
|
27 |
-
if (!defined('AJAX_LIBS_GOOGLE'))
|
28 |
-
|
|
|
|
|
29 |
|
30 |
-
$jquery_ver = '1.7.
|
31 |
-
if (version_compare($wp_version, "3.
|
|
|
|
|
32 |
$jquery_ver = '1.7.1';
|
33 |
elseif (version_compare($wp_version, "3.2", ">="))
|
34 |
$jquery_ver = '1.6.1';
|
@@ -125,7 +129,28 @@ function enqueue_ajax_lib_stylesheets() {
|
|
125 |
if ( !is_a($wp_scripts, 'WP_Scripts') )
|
126 |
return;
|
127 |
|
128 |
-
$stylesheets = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
foreach ( $stylesheets as $value ) {
|
130 |
if ( array_search( $value, $wp_scripts->queue ) != false )
|
131 |
wp_enqueue_style($value);
|
@@ -162,145 +187,148 @@ add_filter('print_scripts_array', 'cs_handlejqueryconflict');
|
|
162 |
//**************************************************************************************
|
163 |
// Google AJAX Libraries
|
164 |
//**************************************************************************************
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
//
|
170 |
-
//
|
171 |
-
//
|
172 |
-
//
|
173 |
-
//
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
//
|
178 |
-
//
|
179 |
-
//
|
180 |
-
//
|
181 |
-
//
|
182 |
-
//
|
183 |
-
|
184 |
-
register_script('scriptaculous-
|
185 |
-
register_script('scriptaculous-
|
186 |
-
register_script('scriptaculous-
|
187 |
-
register_script('scriptaculous-
|
188 |
-
register_script('scriptaculous-
|
189 |
-
register_script('scriptaculous-
|
190 |
-
register_script('scriptaculous', '', array('scriptaculous-
|
191 |
-
|
192 |
-
|
193 |
-
//
|
194 |
-
//
|
195 |
-
//
|
196 |
-
//
|
197 |
-
//
|
198 |
-
// path
|
199 |
-
//
|
200 |
-
|
201 |
-
register_script('jquery
|
202 |
-
|
203 |
-
|
204 |
-
//
|
205 |
-
//
|
206 |
-
//
|
207 |
-
//
|
208 |
-
//
|
209 |
-
// path
|
210 |
-
//
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
//
|
216 |
-
//
|
217 |
-
//
|
218 |
-
//
|
219 |
-
//
|
220 |
-
// path
|
221 |
-
//
|
222 |
-
|
223 |
-
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
register_script('yui-
|
238 |
-
register_script('yui-
|
239 |
-
register_script('yui-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
-
// YUI
|
250 |
-
register_script('yui-
|
251 |
-
register_script('yui-
|
252 |
-
register_script('yui-
|
253 |
-
register_script('yui-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
register_script('yui-imageloader', AJAX_LIBS_YUI_URL.'imageloader/imageloader-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
259 |
-
register_script('yui-json', AJAX_LIBS_YUI_URL.'json/json-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
260 |
-
register_script('yui-resize', AJAX_LIBS_YUI_URL.'resize/resize-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
261 |
-
register_script('yui-selector', AJAX_LIBS_YUI_URL.'selector/selector-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
262 |
-
register_script('yui-yuiloader', AJAX_LIBS_YUI_URL.'yuiloader/yuiloader-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
263 |
-
|
264 |
-
// YUI's UI Controls
|
265 |
-
register_script('yui-container', AJAX_LIBS_YUI_URL.'container/container-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
266 |
-
register_script('yui-menu', AJAX_LIBS_YUI_URL.'menu/menu-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
267 |
-
register_script('yui-autocomplete', AJAX_LIBS_YUI_URL.'autocomplete/autocomplete-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
268 |
-
register_script('yui-button', AJAX_LIBS_YUI_URL.'button/button-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
269 |
-
register_script('yui-calendar', AJAX_LIBS_YUI_URL.'calendar/calendar-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
270 |
-
register_script('yui-charts', AJAX_LIBS_YUI_URL.'charts/charts-experimental-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
271 |
-
register_script('yui-colorpicker', AJAX_LIBS_YUI_URL.'colorpicker/colorpicker-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
272 |
-
register_script('yui-datatable', AJAX_LIBS_YUI_URL.'datatable/datatable-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
273 |
-
register_script('yui-editor', AJAX_LIBS_YUI_URL.'editor/editor-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
274 |
-
register_script('yui-imagecropper', AJAX_LIBS_YUI_URL.'imagecropper/imagecropper-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
275 |
-
register_script('yui-layout', AJAX_LIBS_YUI_URL.'layout/layout-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
276 |
-
register_script('yui-slider', AJAX_LIBS_YUI_URL.'slider/slider-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
277 |
-
register_script('yui-tabview', AJAX_LIBS_YUI_URL.'tabview/tabview-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
278 |
-
register_script('yui-treeview', AJAX_LIBS_YUI_URL.'treeview/treeview-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
279 |
-
register_script('yui-uploader', AJAX_LIBS_YUI_URL.'uploader/uploader-experimental-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
280 |
-
if (function_exists('wp_register_style')) {
|
281 |
-
wp_register_style('yui-container', AJAX_LIBS_YUI_URL.'container/assets/skins/sam/container.css', array('yui'), AJAX_LIBS_YUI_VER);
|
282 |
-
wp_register_style('yui-menu', AJAX_LIBS_YUI_URL.'menu/assets/skins/sam/menu.css', array('yui'), AJAX_LIBS_YUI_VER);
|
283 |
-
wp_register_style('yui-autocomplete', AJAX_LIBS_YUI_URL.'autocomplete/assets/skins/sam/autocomplete.css', array('yui'), AJAX_LIBS_YUI_VER);
|
284 |
-
wp_register_style('yui-button', AJAX_LIBS_YUI_URL.'button/assets/skins/sam/button.css', array('yui'), AJAX_LIBS_YUI_VER);
|
285 |
-
wp_register_style('yui-calendar', AJAX_LIBS_YUI_URL.'calendar/assets/skins/sam/calendar.css', array('yui'), AJAX_LIBS_YUI_VER);
|
286 |
-
wp_register_style('yui-colorpicker', AJAX_LIBS_YUI_URL.'colorpicker/assets/skins/sam/colorpicker.css', array('yui'), AJAX_LIBS_YUI_VER);
|
287 |
-
wp_register_style('yui-datatable', AJAX_LIBS_YUI_URL.'datatable/assets/skins/sam/datatable.css', array('yui'), AJAX_LIBS_YUI_VER);
|
288 |
-
wp_register_style('yui-editor', AJAX_LIBS_YUI_URL.'editor/assets/skins/sam/editor.css', array('yui'), AJAX_LIBS_YUI_VER);
|
289 |
-
wp_register_style('yui-imagecropper', AJAX_LIBS_YUI_URL.'imagecropper/assets/skins/sam/imagecropper.css', array('yui'), AJAX_LIBS_YUI_VER);
|
290 |
-
wp_register_style('yui-layout', AJAX_LIBS_YUI_URL.'layout/assets/skins/sam/layout.css', array('yui'), AJAX_LIBS_YUI_VER);
|
291 |
-
wp_register_style('yui-resize', AJAX_LIBS_YUI_URL.'resize/assets/skins/sam/resize.css', array('yui'), AJAX_LIBS_YUI_VER);
|
292 |
-
wp_register_style('yui-tabview', AJAX_LIBS_YUI_URL.'tabview/assets/skins/sam/tabview.css', array('yui'), AJAX_LIBS_YUI_VER);
|
293 |
-
wp_register_style('yui-treeview', AJAX_LIBS_YUI_URL.'treeview/assets/skins/sam/treeview.css', array('yui'), AJAX_LIBS_YUI_VER);
|
294 |
-
}
|
295 |
|
296 |
-
|
297 |
-
register_script('yui-logger', AJAX_LIBS_YUI_URL.'logger/logger-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
298 |
-
register_script('yui-profiler', AJAX_LIBS_YUI_URL.'profiler/profiler-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
299 |
-
register_script('yui-profilerviewer', AJAX_LIBS_YUI_URL.'profilerviewer/profilerviewer-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
300 |
-
register_script('yui-yuitest', AJAX_LIBS_YUI_URL.'yuitest/yuitest-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
301 |
-
if (function_exists('wp_register_style')) {
|
302 |
-
wp_register_style('yui-logger', AJAX_LIBS_YUI_URL.'logger/assets/skins/sam/logger.css', array('yui'), AJAX_LIBS_YUI_VER);
|
303 |
-
wp_register_style('yui-profilerviewer', AJAX_LIBS_YUI_URL.'profilerviewer/assets/skins/sam/profilerviewer.css', array('yui'), AJAX_LIBS_YUI_VER);
|
304 |
}
|
305 |
-
|
306 |
-
endif;
|
6 |
Released under the GPL license
|
7 |
http://www.gnu.org/copyleft/gpl.html
|
8 |
|
9 |
+
Copyright 2009 - 2012 wokamoto (email : wokamoto1973@gmail.com)
|
10 |
|
11 |
This program is free software; you can redistribute it and/or modify
|
12 |
it under the terms of the GNU General Public License as published by
|
24 |
*/
|
25 |
global $wp_version;
|
26 |
|
27 |
+
if (!defined('AJAX_LIBS_GOOGLE'))
|
28 |
+
define('AJAX_LIBS_GOOGLE', true);
|
29 |
+
if (!defined('AJAX_LIBS_YUI'))
|
30 |
+
define('AJAX_LIBS_YUI', true);
|
31 |
|
32 |
+
$jquery_ver = '1.7.2';
|
33 |
+
if (version_compare($wp_version, "3.4.1", ">="))
|
34 |
+
$jquery_ver = '1.7.2';
|
35 |
+
elseif (version_compare($wp_version, "3.3", ">="))
|
36 |
$jquery_ver = '1.7.1';
|
37 |
elseif (version_compare($wp_version, "3.2", ">="))
|
38 |
$jquery_ver = '1.6.1';
|
129 |
if ( !is_a($wp_scripts, 'WP_Scripts') )
|
130 |
return;
|
131 |
|
132 |
+
$stylesheets = array(
|
133 |
+
'yui',
|
134 |
+
'yui-reset',
|
135 |
+
'yui-base',
|
136 |
+
'yui-fonts',
|
137 |
+
'yui-grids',
|
138 |
+
'yui-container',
|
139 |
+
'yui-menu',
|
140 |
+
'yui-autocomplete',
|
141 |
+
'yui-button',
|
142 |
+
'yui-calendar',
|
143 |
+
'yui-colorpicker',
|
144 |
+
'yui-datatable',
|
145 |
+
'yui-editor',
|
146 |
+
'yui-imagecropper',
|
147 |
+
'yui-layout',
|
148 |
+
'yui-resize',
|
149 |
+
'yui-tabview',
|
150 |
+
'yui-treeview',
|
151 |
+
'yui-logger',
|
152 |
+
'yui-profilerviewer',
|
153 |
+
);
|
154 |
foreach ( $stylesheets as $value ) {
|
155 |
if ( array_search( $value, $wp_scripts->queue ) != false )
|
156 |
wp_enqueue_style($value);
|
187 |
//**************************************************************************************
|
188 |
// Google AJAX Libraries
|
189 |
//**************************************************************************************
|
190 |
+
function hc_googlo_ajax_libraries() {
|
191 |
+
if (AJAX_LIBS_GOOGLE && class_exists('WP_Scripts')) :
|
192 |
+
register_script('jsapi', GOOGLE_JS_API_URL);
|
193 |
+
|
194 |
+
// prototype
|
195 |
+
// name: prototype
|
196 |
+
// versions: 1.6.0.3
|
197 |
+
// load request: google.load("prototype", "1.6.0.3");
|
198 |
+
// path: http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js
|
199 |
+
// site: http://www.prototypejs.org/
|
200 |
+
register_script('prototype', AJAX_LIBS_PROTOTYPE_JS, array(), AJAX_LIBS_PROTOTYPE_JS_VER);
|
201 |
+
|
202 |
+
// script.aculo.us
|
203 |
+
// name: scriptaculous
|
204 |
+
// versions: 1.8.2
|
205 |
+
// load request: google.load("scriptaculous", "1.8.2");
|
206 |
+
// path: http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js
|
207 |
+
// site: http://script.aculo.us/
|
208 |
+
// note: this library depends on prototype. before loading this module, you must load prototype e.g.:
|
209 |
+
register_script('scriptaculous-root', AJAX_LIBS_SCRIPTACULOUS.'scriptaculous.js', array('prototype'), AJAX_LIBS_SCRIPTACULOUS_VER);
|
210 |
+
register_script('scriptaculous-builder', AJAX_LIBS_SCRIPTACULOUS.'builder.js', array('scriptaculous-root'), AJAX_LIBS_SCRIPTACULOUS_VER);
|
211 |
+
register_script('scriptaculous-dragdrop', AJAX_LIBS_SCRIPTACULOUS.'dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), AJAX_LIBS_SCRIPTACULOUS_VER);
|
212 |
+
register_script('scriptaculous-effects', AJAX_LIBS_SCRIPTACULOUS.'effects.js', array('scriptaculous-root'), AJAX_LIBS_SCRIPTACULOUS_VER);
|
213 |
+
register_script('scriptaculous-slider', AJAX_LIBS_SCRIPTACULOUS.'slider.js', array('scriptaculous-effects'), AJAX_LIBS_SCRIPTACULOUS_VER);
|
214 |
+
register_script('scriptaculous-sound', AJAX_LIBS_SCRIPTACULOUS.'sound.js', array( 'scriptaculous-root' ), AJAX_LIBS_SCRIPTACULOUS_VER);
|
215 |
+
register_script('scriptaculous-controls', AJAX_LIBS_SCRIPTACULOUS.'controls.js', array('scriptaculous-root'), AJAX_LIBS_SCRIPTACULOUS_VER);
|
216 |
+
register_script('scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), AJAX_LIBS_SCRIPTACULOUS_VER);
|
217 |
+
|
218 |
+
// jQuery
|
219 |
+
// name: jquery
|
220 |
+
// versions: 1.4.2
|
221 |
+
// load request: google.load("jquery", "1.4.2");
|
222 |
+
// extras: uncompressed:true, e.g., google.load("jquery", "1.4", {uncompressed:true});
|
223 |
+
// path: http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
|
224 |
+
// path(u): http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js
|
225 |
+
// site: http://jquery.com/
|
226 |
+
register_script('jquery', AJAX_LIBS_JQUERY, array(), AJAX_LIBS_JQUERY_VER);
|
227 |
+
register_script('jquery.ui', AJAX_LIBS_JQUERY_UI, array('jquery'), AJAX_LIBS_JQUERY_UI_VER);
|
228 |
+
|
229 |
+
// mootools
|
230 |
+
// name: mootools
|
231 |
+
// versions: 1.11
|
232 |
+
// load request: google.load("mootools", "1.11");
|
233 |
+
// extras: uncompressed:true, e.g., google.load("mootools", "1.11", {uncompressed:true});
|
234 |
+
// path: http://ajax.googleapis.com/ajax/libs/mootools/1.11/mootools-yui-compressed.js
|
235 |
+
// path(u): http://ajax.googleapis.com/ajax/libs/mootools/1.11/mootools.js
|
236 |
+
// site: http://mootools.net/
|
237 |
+
register_script('mootools', AJAX_LIBS_MOOTOOLS, array(), AJAX_LIBS_MOOTOOLS_VER);
|
238 |
+
|
239 |
+
|
240 |
+
// dojo
|
241 |
+
// name: dojo
|
242 |
+
// versions: 1.1.1
|
243 |
+
// load request: google.load("dojo", "1.1.1");
|
244 |
+
// extras: uncompressed:true, e.g., google.load("dojo", "1.1.1", {uncompressed:true});
|
245 |
+
// path: http://ajax.googleapis.com/ajax/libs/dojo/1.1.1/dojo/dojo.xd.js
|
246 |
+
// path(u): http://ajax.googleapis.com/ajax/libs/dojo/1.1.1/dojo/dojo.xd.js.uncompressed.js
|
247 |
+
// site: http://dojotoolkit.org/
|
248 |
+
register_script('dojo', AJAX_LIBS_DOJO, array(), AJAX_LIBS_DOJO_VER);
|
249 |
+
|
250 |
+
endif;
|
251 |
+
|
252 |
+
//**************************************************************************************
|
253 |
+
// YUI Libraries
|
254 |
+
//**************************************************************************************
|
255 |
+
if (AJAX_LIBS_YUI && class_exists('WP_Scripts')) :
|
256 |
+
// YUI
|
257 |
+
// name: yui
|
258 |
+
// versions: 2.7.0
|
259 |
+
// path: http://yui.yahooapis.com/2.7.0/build/yahoo/yahoo-min.js
|
260 |
+
// site: http://developer.yahoo.com/yui/
|
261 |
+
|
262 |
+
// YUI Core
|
263 |
+
register_script('yui-core', AJAX_LIBS_YUI_URL.'yahoo/yahoo-min.js', array(), AJAX_LIBS_YUI_VER);
|
264 |
+
register_script('yui-dom', AJAX_LIBS_YUI_URL.'dom/dom-min.js', array(), AJAX_LIBS_YUI_VER);
|
265 |
+
register_script('yui-event', AJAX_LIBS_YUI_URL.'event/event-min.js', array(), AJAX_LIBS_YUI_VER);
|
266 |
+
register_script('yui', '', array('yui-core', 'yui-dom', 'yui-event'), AJAX_LIBS_YUI_VER);
|
267 |
+
if (function_exists('wp_register_style')) {
|
268 |
+
wp_register_style('yui-reset', AJAX_LIBS_YUI_URL.'reset/reset-min.css', array(), AJAX_LIBS_YUI_VER);
|
269 |
+
wp_register_style('yui-base', AJAX_LIBS_YUI_URL.'base/base-min.css', array(), AJAX_LIBS_YUI_VER);
|
270 |
+
wp_register_style('yui-fonts', AJAX_LIBS_YUI_URL.'fonts/fonts-min.css', array(), AJAX_LIBS_YUI_VER);
|
271 |
+
wp_register_style('yui-grids', AJAX_LIBS_YUI_URL.'grids/grids-min.css', array(), AJAX_LIBS_YUI_VER);
|
272 |
+
wp_register_style('yui', '', array('yui-reset', 'yui-base', 'yui-fonts', 'yui-grids'), AJAX_LIBS_YUI_VER);
|
273 |
+
}
|
274 |
|
275 |
+
// YUI Utilities
|
276 |
+
register_script('yui-element', AJAX_LIBS_YUI_URL.'element/element-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
277 |
+
register_script('yui-animation', AJAX_LIBS_YUI_URL.'animation/animation-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
278 |
+
register_script('yui-connection', AJAX_LIBS_YUI_URL.'connection/connection-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
279 |
+
register_script('yui-cookie', AJAX_LIBS_YUI_URL.'cookie/cookie-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
280 |
+
register_script('yui-datasource', AJAX_LIBS_YUI_URL.'datasource/datasource-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
281 |
+
register_script('yui-dragdrop', AJAX_LIBS_YUI_URL.'dragdrop/dragdrop-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
282 |
+
register_script('yui-get', AJAX_LIBS_YUI_URL.'get/get-min.js', array('yui-core'), AJAX_LIBS_YUI_VER);
|
283 |
+
register_script('yui-history', AJAX_LIBS_YUI_URL.'history/history-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
284 |
+
register_script('yui-imageloader', AJAX_LIBS_YUI_URL.'imageloader/imageloader-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
285 |
+
register_script('yui-json', AJAX_LIBS_YUI_URL.'json/json-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
286 |
+
register_script('yui-resize', AJAX_LIBS_YUI_URL.'resize/resize-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
287 |
+
register_script('yui-selector', AJAX_LIBS_YUI_URL.'selector/selector-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
288 |
+
register_script('yui-yuiloader', AJAX_LIBS_YUI_URL.'yuiloader/yuiloader-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
289 |
+
|
290 |
+
// YUI's UI Controls
|
291 |
+
register_script('yui-container', AJAX_LIBS_YUI_URL.'container/container-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
292 |
+
register_script('yui-menu', AJAX_LIBS_YUI_URL.'menu/menu-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
293 |
+
register_script('yui-autocomplete', AJAX_LIBS_YUI_URL.'autocomplete/autocomplete-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
294 |
+
register_script('yui-button', AJAX_LIBS_YUI_URL.'button/button-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
295 |
+
register_script('yui-calendar', AJAX_LIBS_YUI_URL.'calendar/calendar-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
296 |
+
register_script('yui-charts', AJAX_LIBS_YUI_URL.'charts/charts-experimental-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
297 |
+
register_script('yui-colorpicker', AJAX_LIBS_YUI_URL.'colorpicker/colorpicker-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
298 |
+
register_script('yui-datatable', AJAX_LIBS_YUI_URL.'datatable/datatable-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
299 |
+
register_script('yui-editor', AJAX_LIBS_YUI_URL.'editor/editor-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
300 |
+
register_script('yui-imagecropper', AJAX_LIBS_YUI_URL.'imagecropper/imagecropper-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
301 |
+
register_script('yui-layout', AJAX_LIBS_YUI_URL.'layout/layout-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
302 |
+
register_script('yui-slider', AJAX_LIBS_YUI_URL.'slider/slider-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
303 |
+
register_script('yui-tabview', AJAX_LIBS_YUI_URL.'tabview/tabview-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
304 |
+
register_script('yui-treeview', AJAX_LIBS_YUI_URL.'treeview/treeview-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
305 |
+
register_script('yui-uploader', AJAX_LIBS_YUI_URL.'uploader/uploader-experimental-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
306 |
+
if (function_exists('wp_register_style')) {
|
307 |
+
wp_register_style('yui-container', AJAX_LIBS_YUI_URL.'container/assets/skins/sam/container.css', array('yui'), AJAX_LIBS_YUI_VER);
|
308 |
+
wp_register_style('yui-menu', AJAX_LIBS_YUI_URL.'menu/assets/skins/sam/menu.css', array('yui'), AJAX_LIBS_YUI_VER);
|
309 |
+
wp_register_style('yui-autocomplete', AJAX_LIBS_YUI_URL.'autocomplete/assets/skins/sam/autocomplete.css', array('yui'), AJAX_LIBS_YUI_VER);
|
310 |
+
wp_register_style('yui-button', AJAX_LIBS_YUI_URL.'button/assets/skins/sam/button.css', array('yui'), AJAX_LIBS_YUI_VER);
|
311 |
+
wp_register_style('yui-calendar', AJAX_LIBS_YUI_URL.'calendar/assets/skins/sam/calendar.css', array('yui'), AJAX_LIBS_YUI_VER);
|
312 |
+
wp_register_style('yui-colorpicker', AJAX_LIBS_YUI_URL.'colorpicker/assets/skins/sam/colorpicker.css', array('yui'), AJAX_LIBS_YUI_VER);
|
313 |
+
wp_register_style('yui-datatable', AJAX_LIBS_YUI_URL.'datatable/assets/skins/sam/datatable.css', array('yui'), AJAX_LIBS_YUI_VER);
|
314 |
+
wp_register_style('yui-editor', AJAX_LIBS_YUI_URL.'editor/assets/skins/sam/editor.css', array('yui'), AJAX_LIBS_YUI_VER);
|
315 |
+
wp_register_style('yui-imagecropper', AJAX_LIBS_YUI_URL.'imagecropper/assets/skins/sam/imagecropper.css', array('yui'), AJAX_LIBS_YUI_VER);
|
316 |
+
wp_register_style('yui-layout', AJAX_LIBS_YUI_URL.'layout/assets/skins/sam/layout.css', array('yui'), AJAX_LIBS_YUI_VER);
|
317 |
+
wp_register_style('yui-resize', AJAX_LIBS_YUI_URL.'resize/assets/skins/sam/resize.css', array('yui'), AJAX_LIBS_YUI_VER);
|
318 |
+
wp_register_style('yui-tabview', AJAX_LIBS_YUI_URL.'tabview/assets/skins/sam/tabview.css', array('yui'), AJAX_LIBS_YUI_VER);
|
319 |
+
wp_register_style('yui-treeview', AJAX_LIBS_YUI_URL.'treeview/assets/skins/sam/treeview.css', array('yui'), AJAX_LIBS_YUI_VER);
|
320 |
+
}
|
321 |
|
322 |
+
// YUI Developer Tools: Logging, Testing and Profiling
|
323 |
+
register_script('yui-logger', AJAX_LIBS_YUI_URL.'logger/logger-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
324 |
+
register_script('yui-profiler', AJAX_LIBS_YUI_URL.'profiler/profiler-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
325 |
+
register_script('yui-profilerviewer', AJAX_LIBS_YUI_URL.'profilerviewer/profilerviewer-beta-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
326 |
+
register_script('yui-yuitest', AJAX_LIBS_YUI_URL.'yuitest/yuitest-min.js', array('yui'), AJAX_LIBS_YUI_VER);
|
327 |
+
if (function_exists('wp_register_style')) {
|
328 |
+
wp_register_style('yui-logger', AJAX_LIBS_YUI_URL.'logger/assets/skins/sam/logger.css', array('yui'), AJAX_LIBS_YUI_VER);
|
329 |
+
wp_register_style('yui-profilerviewer', AJAX_LIBS_YUI_URL.'profilerviewer/assets/skins/sam/profilerviewer.css', array('yui'), AJAX_LIBS_YUI_VER);
|
330 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
|
332 |
+
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
}
|
334 |
+
add_action('init', 'hc_googlo_ajax_libraries');
|
|
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.3.1
|
7 |
-
Stable tag: 1.4.2.
|
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.3.1
|
7 |
+
Stable tag: 1.4.2.10
|
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.3.1
|
7 |
-
Stable tag: 1.4.2.
|
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.3.1
|
7 |
+
Stable tag: 1.4.2.10
|
8 |
|
9 |
Head と footer をお掃除します。
|
10 |
|