Version Description
Download this release
Release Info
Developer | tenpura |
Plugin | WP Multibyte Patch |
Version | 1.8 |
Comparing to | |
See all releases |
Code changes from version 1.7 to 1.8
- ext/ja/class.php +2 -2
- js/word-count.js +1 -1
- js/word-count.min.js +1 -1
- js/wplink.js +4 -9
- js/wplink.min.js +1 -1
- readme.txt +3 -3
- wp-multibyte-patch.php +7 -5
ext/ja/class.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* WP Multibyte Patch Japanese Locale Extension
|
4 |
*
|
5 |
* @package WP_Multibyte_Patch
|
6 |
-
* @version 1.
|
7 |
* @author Seisuke Kuraishi <210pura@gmail.com>
|
8 |
* @copyright Copyright (c) 2013 Seisuke Kuraishi, Tinybit Inc.
|
9 |
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
|
@@ -118,7 +118,7 @@ if ( class_exists( 'multibyte_patch' ) ) :
|
|
118 |
$blog_encoding = $this->blog_encoding;
|
119 |
|
120 |
if ( isset( $_GET['s'] ) ) {
|
121 |
-
$_GET['s'] =
|
122 |
$_GET['s'] = mb_convert_kana( $_GET['s'], 's', $blog_encoding );
|
123 |
$_GET['s'] = preg_replace( "/ +/", " ", $_GET['s'] );
|
124 |
$_GET['s'] = wp_slash( $_GET['s'] );
|
3 |
* WP Multibyte Patch Japanese Locale Extension
|
4 |
*
|
5 |
* @package WP_Multibyte_Patch
|
6 |
+
* @version 1.8
|
7 |
* @author Seisuke Kuraishi <210pura@gmail.com>
|
8 |
* @copyright Copyright (c) 2013 Seisuke Kuraishi, Tinybit Inc.
|
9 |
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
|
118 |
$blog_encoding = $this->blog_encoding;
|
119 |
|
120 |
if ( isset( $_GET['s'] ) ) {
|
121 |
+
$_GET['s'] = wp_unslash( $_GET['s'] );
|
122 |
$_GET['s'] = mb_convert_kana( $_GET['s'], 's', $blog_encoding );
|
123 |
$_GET['s'] = preg_replace( "/ +/", " ", $_GET['s'] );
|
124 |
$_GET['s'] = wp_slash( $_GET['s'] );
|
js/word-count.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
settings : {
|
5 |
strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags
|
6 |
clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc.
|
7 |
-
count : /\S\s+/g
|
8 |
},
|
9 |
|
10 |
block : 0,
|
4 |
settings : {
|
5 |
strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags
|
6 |
clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc.
|
7 |
+
count : /\S\s+/g // word-counting regexp
|
8 |
},
|
9 |
|
10 |
block : 0,
|
js/word-count.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(a,b){wpWordCount={settings:{strip:/<[a-zA-Z\/][^<>]*>/g,clean:/[0-9.(),;:!?%#$¿'"_+=\\/-]+/g,count:/\S\s+/g
|
1 |
+
(function(a,b){wpWordCount={settings:{strip:/<[a-zA-Z\/][^<>]*>/g,clean:/[0-9.(),;:!?%#$¿'"_+=\\/-]+/g,count:/\S\s+/g},block:0,wc:function(e,g){var f=this,d=a(".word-count"),c=0;if(g===b){g=wordCountL10n.type}if(g!=="w"&&g!=="c"){g="w"}if(f.block){return}f.block=1;setTimeout(function(){if(e){if(g=="w"){e=e.replace(f.settings.strip," ").replace(/ | /gi," ");e=e.replace(f.settings.clean,"");e.replace(f.settings.count,function(){c++})}else{if(g=="c"){e=e.replace(f.settings.strip,"").replace(/^ +| +$/gm,"");e=e.replace(/ +| | /gi," ");e.replace(/[\S \u00A0\u3000]/g,function(){c++})}}}d.html(c.toString());setTimeout(function(){f.block=0},2000)},1)}};a(document).bind("wpcountwords",function(d,c){wpWordCount.wc(c)})}(jQuery));
|
js/wplink.js
CHANGED
@@ -121,8 +121,6 @@ var wpLink;
|
|
121 |
} else {
|
122 |
wpLink.setDefaultValues();
|
123 |
}
|
124 |
-
|
125 |
-
tinyMCEPopup.storeSelection();
|
126 |
},
|
127 |
|
128 |
close : function() {
|
@@ -226,7 +224,6 @@ var wpLink;
|
|
226 |
// If the values are empty, unlink and return
|
227 |
if ( ! attrs.href || attrs.href == 'http://' ) {
|
228 |
if ( e ) {
|
229 |
-
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
230 |
b = ed.selection.getBookmark();
|
231 |
ed.dom.remove(e, 1);
|
232 |
ed.selection.moveToBookmark(b);
|
@@ -236,8 +233,6 @@ var wpLink;
|
|
236 |
return;
|
237 |
}
|
238 |
|
239 |
-
tinyMCEPopup.execCommand("mceBeginUndoLevel");
|
240 |
-
|
241 |
if (e == null) {
|
242 |
ed.getDoc().execCommand("unlink", false, null);
|
243 |
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
|
@@ -252,7 +247,7 @@ var wpLink;
|
|
252 |
// Sometimes WebKit lets a user create a link where
|
253 |
// they shouldn't be able to. In this case, CreateLink
|
254 |
// injects "#mce_temp_url#" into their content. Fix it.
|
255 |
-
if ( $(e).text() == '#mce_temp_url#' ) {
|
256 |
ed.dom.remove(e);
|
257 |
e = null;
|
258 |
}
|
@@ -260,16 +255,16 @@ var wpLink;
|
|
260 |
ed.dom.setAttribs(e, attrs);
|
261 |
}
|
262 |
|
263 |
-
//
|
264 |
if ( e && (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') ) {
|
265 |
-
ed.focus();
|
266 |
ed.selection.select(e);
|
267 |
ed.selection.collapse(0);
|
268 |
tinyMCEPopup.storeSelection();
|
269 |
}
|
270 |
|
271 |
-
|
272 |
wpLink.close();
|
|
|
273 |
},
|
274 |
|
275 |
updateFields : function( e, li, originalEvent ) {
|
121 |
} else {
|
122 |
wpLink.setDefaultValues();
|
123 |
}
|
|
|
|
|
124 |
},
|
125 |
|
126 |
close : function() {
|
224 |
// If the values are empty, unlink and return
|
225 |
if ( ! attrs.href || attrs.href == 'http://' ) {
|
226 |
if ( e ) {
|
|
|
227 |
b = ed.selection.getBookmark();
|
228 |
ed.dom.remove(e, 1);
|
229 |
ed.selection.moveToBookmark(b);
|
233 |
return;
|
234 |
}
|
235 |
|
|
|
|
|
236 |
if (e == null) {
|
237 |
ed.getDoc().execCommand("unlink", false, null);
|
238 |
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
|
247 |
// Sometimes WebKit lets a user create a link where
|
248 |
// they shouldn't be able to. In this case, CreateLink
|
249 |
// injects "#mce_temp_url#" into their content. Fix it.
|
250 |
+
if ( tinymce.isWebKit && $(e).text() == '#mce_temp_url#' ) {
|
251 |
ed.dom.remove(e);
|
252 |
e = null;
|
253 |
}
|
255 |
ed.dom.setAttribs(e, attrs);
|
256 |
}
|
257 |
|
258 |
+
// Move the caret if selection was not an image.
|
259 |
if ( e && (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') ) {
|
|
|
260 |
ed.selection.select(e);
|
261 |
ed.selection.collapse(0);
|
262 |
tinyMCEPopup.storeSelection();
|
263 |
}
|
264 |
|
265 |
+
ed.execCommand("mceEndUndoLevel");
|
266 |
wpLink.close();
|
267 |
+
ed.focus();
|
268 |
},
|
269 |
|
270 |
updateFields : function( e, li, originalEvent ) {
|
js/wplink.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wpLink
|
1 |
+
var wpLink;!function(a){var b,c,d,e={},f={};wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",init:function(){e.dialog=a("#wp-link"),e.submit=a("#wp-link-submit"),e.url=a("#url-field"),e.nonce=a("#_ajax_linking_nonce"),e.title=a("#link-title-field"),e.openInNewTab=a("#link-target-checkbox"),e.search=a("#search-field"),f.search=new c(a("#search-results")),f.recent=new c(a("#most-recent-results")),f.elements=a(".query-results",e.dialog),e.dialog.keydown(wpLink.keydown),e.dialog.keyup(wpLink.keyup),e.submit.click(function(a){a.preventDefault(),wpLink.update()}),a("#wp-link-cancel").click(function(a){a.preventDefault(),wpLink.close()}),a("#internal-toggle").click(wpLink.toggleInternalLinking),f.elements.bind("river-select",wpLink.updateFields),e.search.keyup(wpLink.searchInternalLinks),e.dialog.bind("wpdialogrefresh",wpLink.refresh),e.dialog.bind("wpdialogbeforeopen",wpLink.beforeOpen),e.dialog.bind("wpdialogclose",wpLink.onClose)},beforeOpen:function(){wpLink.range=null,!wpLink.isMCE()&&document.selection&&(wpLink.textarea.focus(),wpLink.range=document.selection.createRange())},open:function(){wpActiveEditor&&(this.textarea=a("#"+wpActiveEditor).get(0),e.dialog.data("wpdialog")||e.dialog.wpdialog({title:wpLinkL10n.title,width:480,height:"auto",modal:!0,dialogClass:"wp-dialog"}),e.dialog.wpdialog("open"))},isMCE:function(){return tinyMCEPopup&&(b=tinyMCEPopup.editor)&&!b.isHidden()},refresh:function(){f.search.refresh(),f.recent.refresh(),wpLink.isMCE()?wpLink.mceRefresh():wpLink.setDefaultValues(),e.url.focus()[0].select(),f.recent.ul.children().length||f.recent.ajax()},mceRefresh:function(){var a;b=tinyMCEPopup.editor,tinyMCEPopup.restoreSelection(),(a=b.dom.getParent(b.selection.getNode(),"A"))?(e.url.val(b.dom.getAttrib(a,"href")),e.title.val(b.dom.getAttrib(a,"title")),e.openInNewTab.prop("checked","_blank"==b.dom.getAttrib(a,"target")),e.submit.val(wpLinkL10n.update)):wpLink.setDefaultValues()},close:function(){wpLink.isMCE()?tinyMCEPopup.close():e.dialog.wpdialog("close")},onClose:function(){wpLink.isMCE()||(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select()))},getAttrs:function(){return{href:e.url.val(),title:e.title.val(),target:e.openInNewTab.prop("checked")?"_blank":""}},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var a,b,c,d,e,f=wpLink.textarea;f&&(a=wpLink.getAttrs(),a.href&&"http://"!=a.href&&(b='<a href="'+a.href+'"',a.title&&(b+=' title="'+a.title+'"'),a.target&&(b+=' target="'+a.target+'"'),b+=">",document.selection&&wpLink.range?(f.focus(),wpLink.range.text=b+wpLink.range.text+"</a>",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):"undefined"!=typeof f.selectionStart&&(c=f.selectionStart,d=f.selectionEnd,selection=f.value.substring(c,d),b=b+selection+"</a>",e=c+b.length,c==d&&(e-="</a>".length),f.value=f.value.substring(0,c)+b+f.value.substring(d,f.value.length),f.selectionStart=f.selectionEnd=e),wpLink.close(),f.focus()))},mceUpdate:function(){var b,c,d=tinyMCEPopup.editor,e=wpLink.getAttrs();return tinyMCEPopup.restoreSelection(),b=d.dom.getParent(d.selection.getNode(),"A"),e.href&&"http://"!=e.href?(null==b?(d.getDoc().execCommand("unlink",!1,null),tinyMCEPopup.execCommand("mceInsertLink",!1,"#mce_temp_url#",{skip_undo:1}),tinymce.each(d.dom.select("a"),function(a){"#mce_temp_url#"==d.dom.getAttrib(a,"href")&&(b=a,d.dom.setAttribs(b,e))}),tinymce.isWebKit&&"#mce_temp_url#"==a(b).text()&&(d.dom.remove(b),b=null)):d.dom.setAttribs(b,e),!b||1==b.childNodes.length&&"IMG"==b.firstChild.nodeName||(d.selection.select(b),d.selection.collapse(0),tinyMCEPopup.storeSelection()),d.execCommand("mceEndUndoLevel"),wpLink.close(),d.focus(),void 0):(b&&(c=d.selection.getBookmark(),d.dom.remove(b,1),d.selection.moveToBookmark(c),tinyMCEPopup.execCommand("mceEndUndoLevel"),wpLink.close()),void 0)},updateFields:function(a,b,c){e.url.val(b.children(".item-permalink").val()),e.title.val(b.hasClass("no-title")?"":b.children(".item-title").text()),c&&"click"==c.type&&e.url.focus()},setDefaultValues:function(){e.url.val("http://"),e.title.val(""),e.submit.val(wpLinkL10n.save)},searchInternalLinks:function(){var b,c=a(this),d=c.val();if(d.length>1){if(f.recent.hide(),f.search.show(),wpLink.lastSearch==d)return;wpLink.lastSearch=d,b=c.parent().find(".spinner").show(),f.search.change(d),f.search.ajax(function(){b.hide()})}else f.search.hide(),f.recent.show()},next:function(){f.search.next(),f.recent.next()},prev:function(){f.search.prev(),f.recent.prev()},keydown:function(b){var c,d=a.ui.keyCode;switch(b.which){case d.UP:c="prev";case d.DOWN:c=c||"next",clearInterval(wpLink.keyInterval),wpLink[c](),wpLink.keyInterval=setInterval(wpLink[c],wpLink.keySensitivity);break;default:return}b.preventDefault()},keyup:function(b){var c=a.ui.keyCode;switch(b.which){case c.ESCAPE:return b.stopImmediatePropagation(),a(document).triggerHandler("wp_CloseOnEscape",[{event:b,what:"wplink",cb:wpLink.close}])||wpLink.close(),!1;case c.UP:case c.DOWN:clearInterval(wpLink.keyInterval);break;default:return}b.preventDefault()},delayedCallback:function(a,b){var c,d,e,f;return b?(setTimeout(function(){return d?a.apply(f,e):(c=!0,void 0)},b),function(){return c?a.apply(this,arguments):(e=arguments,f=this,d=!0,void 0)}):a},toggleInternalLinking:function(b){var c=a("#search-panel"),d=e.dialog.wpdialog("widget"),f=!c.is(":visible"),g=a(window);a(this).toggleClass("toggle-arrow-active",f),e.dialog.height("auto"),c.slideToggle(300,function(){setUserSetting("wplink",f?"1":"0"),e[f?"search":"url"].focus();var a=g.scrollTop(),b=d.offset().top,c=b+d.outerHeight(),h=c-g.height();h>a&&d.animate({top:b>h?b-h:a},200)}),b.preventDefault()}},c=function(b,c){var d=this;this.element=b,this.ul=b.children("ul"),this.waiting=b.find(".river-waiting"),this.change(c),this.refresh(),b.scroll(function(){d.maybeLoad()}),b.delegate("li","click",function(b){d.select(a(this),b)})},a.extend(c.prototype,{refresh:function(){this.deselect(),this.visible=this.element.is(":visible")},show:function(){this.visible||(this.deselect(),this.element.show(),this.visible=!0)},hide:function(){this.element.hide(),this.visible=!1},select:function(a,b){var c,d,e,f;a.hasClass("unselectable")||a==this.selected||(this.deselect(),this.selected=a.addClass("selected"),c=a.outerHeight(),d=this.element.height(),e=a.position().top,f=this.element.scrollTop(),0>e?this.element.scrollTop(f+e):e+c>d&&this.element.scrollTop(f+e-d+c),this.element.trigger("river-select",[a,b,this]))},deselect:function(){this.selected&&this.selected.removeClass("selected"),this.selected=!1},prev:function(){if(this.visible){var a;this.selected&&(a=this.selected.prev("li"),a.length&&this.select(a))}},next:function(){if(this.visible){var b=this.selected?this.selected.next("li"):a("li:not(.unselectable):first",this.element);b.length&&this.select(b)}},ajax:function(a){var b=this,c=1==this.query.page?0:wpLink.minRiverAJAXDuration,d=wpLink.delayedCallback(function(c,d){b.process(c,d),a&&a(c,d)},c);this.query.ajax(d)},change:function(a){this.query&&this._search==a||(this._search=a,this.query=new d(a),this.element.scrollTop(0))},process:function(b,c){var d="",e=!0,f="",g=1==c.page;b?a.each(b,function(){f=e?"alternate":"",f+=this.title?"":" no-title",d+=f?'<li class="'+f+'">':"<li>",d+='<input type="hidden" class="item-permalink" value="'+this.permalink+'" />',d+='<span class="item-title">',d+=this.title?this.title:wpLinkL10n.noTitle,d+='</span><span class="item-info">'+this.info+"</span></li>",e=!e}):g&&(d+='<li class="unselectable"><span class="item-title"><em>'+wpLinkL10n.noMatchesFound+"</em></span></li>"),this.ul[g?"html":"append"](d)},maybeLoad:function(){var a=this,b=this.element,c=b.scrollTop()+b.height();!this.query.ready()||c<this.ul.height()-wpLink.riverBottomThreshold||setTimeout(function(){var c=b.scrollTop(),d=c+b.height();!a.query.ready()||d<a.ul.height()-wpLink.riverBottomThreshold||(a.waiting.show(),b.scrollTop(c+a.waiting.outerHeight()),a.ajax(function(){a.waiting.hide()}))},wpLink.timeToTriggerRiver)}}),d=function(a){this.page=1,this.allLoaded=!1,this.querying=!1,this.search=a},a.extend(d.prototype,{ready:function(){return!(this.querying||this.allLoaded)},ajax:function(b){var c=this,d={action:"wp-link-ajax",page:this.page,_ajax_linking_nonce:e.nonce.val()};this.search&&(d.search=this.search),this.querying=!0,a.post(ajaxurl,d,function(a){c.page++,c.querying=!1,c.allLoaded=!a,b(a,d)},"json")}}),a(document).ready(wpLink.init)}(jQuery);
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== WP Multibyte Patch ===
|
2 |
Contributors: tenpura
|
3 |
Tags: multibyte,i18n,wp-multibyte-patch,Japanese
|
4 |
-
Requires at least: 3.
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Multibyte functionality enhancement for the WordPress Japanese package.
|
9 |
|
1 |
=== WP Multibyte Patch ===
|
2 |
Contributors: tenpura
|
3 |
Tags: multibyte,i18n,wp-multibyte-patch,Japanese
|
4 |
+
Requires at least: 3.7-RC1
|
5 |
+
Tested up to: 3.7
|
6 |
+
Stable tag: 1.8
|
7 |
|
8 |
Multibyte functionality enhancement for the WordPress Japanese package.
|
9 |
|
wp-multibyte-patch.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: WP Multibyte Patch
|
4 |
Description: Multibyte functionality enhancement for the WordPress Japanese package.
|
5 |
-
Version: 1.
|
6 |
Plugin URI: http://eastcoder.com/code/wp-multibyte-patch/
|
7 |
Author: Seisuke Kuraishi
|
8 |
Author URI: http://tinybit.co.jp/
|
@@ -15,7 +15,7 @@ Domain Path: /languages
|
|
15 |
* Multibyte functionality enhancement for the WordPress Japanese package.
|
16 |
*
|
17 |
* @package WP_Multibyte_Patch
|
18 |
-
* @version 1.
|
19 |
* @author Seisuke Kuraishi <210pura@gmail.com>
|
20 |
* @copyright Copyright (c) 2013 Seisuke Kuraishi, Tinybit Inc.
|
21 |
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
|
@@ -60,7 +60,7 @@ class multibyte_patch {
|
|
60 |
var $debug_suffix = '';
|
61 |
var $textdomain = 'wp-multibyte-patch';
|
62 |
var $lang_dir = 'languages';
|
63 |
-
var $required_version = '3.
|
64 |
var $query_based_vars = array();
|
65 |
|
66 |
// For fallback purpose only. (1.6)
|
@@ -354,8 +354,10 @@ class multibyte_patch {
|
|
354 |
if ( false !== $this->conf['patch_force_character_count'] && 'characters' != _x( 'words', 'word count: words or characters?' ) )
|
355 |
add_filter( 'gettext_with_context', array( $this, 'force_character_count' ), 10, 3 );
|
356 |
|
357 |
-
if ( false !== $this->conf['patch_force_twentytwelve_open_sans_off'] && 'twentytwelve' == get_template() )
|
358 |
add_action( 'wp_enqueue_scripts', array( $this, 'force_twentytwelve_open_sans_off' ), 99 );
|
|
|
|
|
359 |
|
360 |
if ( false !== $this->conf['patch_force_twentythirteen_google_fonts_off'] && 'twentythirteen' == get_template() ) {
|
361 |
add_action( 'wp_enqueue_scripts', array( $this, 'force_twentythirteen_google_fonts_off' ), 99 );
|
@@ -466,7 +468,7 @@ class multibyte_patch {
|
|
466 |
$this->has_mb_strlen = function_exists( 'mb_strlen' );
|
467 |
$this->debug_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
468 |
|
469 |
-
|
470 |
register_activation_hook( __FILE__, array( $this, 'activation_check' ) );
|
471 |
$this->filters();
|
472 |
}
|
2 |
/*
|
3 |
Plugin Name: WP Multibyte Patch
|
4 |
Description: Multibyte functionality enhancement for the WordPress Japanese package.
|
5 |
+
Version: 1.8
|
6 |
Plugin URI: http://eastcoder.com/code/wp-multibyte-patch/
|
7 |
Author: Seisuke Kuraishi
|
8 |
Author URI: http://tinybit.co.jp/
|
15 |
* Multibyte functionality enhancement for the WordPress Japanese package.
|
16 |
*
|
17 |
* @package WP_Multibyte_Patch
|
18 |
+
* @version 1.8
|
19 |
* @author Seisuke Kuraishi <210pura@gmail.com>
|
20 |
* @copyright Copyright (c) 2013 Seisuke Kuraishi, Tinybit Inc.
|
21 |
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
|
60 |
var $debug_suffix = '';
|
61 |
var $textdomain = 'wp-multibyte-patch';
|
62 |
var $lang_dir = 'languages';
|
63 |
+
var $required_version = '3.7-RC1';
|
64 |
var $query_based_vars = array();
|
65 |
|
66 |
// For fallback purpose only. (1.6)
|
354 |
if ( false !== $this->conf['patch_force_character_count'] && 'characters' != _x( 'words', 'word count: words or characters?' ) )
|
355 |
add_filter( 'gettext_with_context', array( $this, 'force_character_count' ), 10, 3 );
|
356 |
|
357 |
+
if ( false !== $this->conf['patch_force_twentytwelve_open_sans_off'] && 'twentytwelve' == get_template() ) {
|
358 |
add_action( 'wp_enqueue_scripts', array( $this, 'force_twentytwelve_open_sans_off' ), 99 );
|
359 |
+
add_action( 'admin_print_styles-appearance_page_custom-header', array( $this, 'force_twentytwelve_open_sans_off' ), 99 );
|
360 |
+
}
|
361 |
|
362 |
if ( false !== $this->conf['patch_force_twentythirteen_google_fonts_off'] && 'twentythirteen' == get_template() ) {
|
363 |
add_action( 'wp_enqueue_scripts', array( $this, 'force_twentythirteen_google_fonts_off' ), 99 );
|
468 |
$this->has_mb_strlen = function_exists( 'mb_strlen' );
|
469 |
$this->debug_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
470 |
|
471 |
+
load_plugin_textdomain( $this->textdomain, false, dirname( plugin_basename( __FILE__ ) ) . '/' . $this->lang_dir );
|
472 |
register_activation_hook( __FILE__, array( $this, 'activation_check' ) );
|
473 |
$this->filters();
|
474 |
}
|