Version Description
Download this release
Release Info
Developer | tenpura |
Plugin | WP Multibyte Patch |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5 to 1.5.1
- ext/ja/class.php +4 -4
- ext/ja/wplink.dev.js +16 -7
- ext/ja/wplink.js +1 -1
- readme.txt +3 -3
- wp-multibyte-patch.php +4 -4
ext/ja/class.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
|
4 |
/*
|
5 |
WPLANG: ja
|
6 |
-
Plugin Version: 1.5
|
7 |
Description: Japanese Locale Extension.
|
8 |
Author: Kuraishi (tenpura)
|
9 |
Extension URI: http://eastcoder.com/code/wp-multibyte-patch/
|
@@ -71,7 +71,7 @@ class multibyte_patch_ext extends multibyte_patch {
|
|
71 |
$mode = ($test_str_after != $test_str_before) ? 'UTF-8' : 'JIS';
|
72 |
}
|
73 |
|
74 |
-
$phpmailer_props = $this->get_phpmailer_properties(
|
75 |
$recipient_methods = array('to' => array('add' => 'AddAddress', 'clear' => 'ClearAddresses'), 'cc' => array('add' => 'AddCC', 'clear' => 'ClearCCs'), 'bcc' => array('add' => 'AddBCC', 'clear' => 'ClearBCCs'));
|
76 |
|
77 |
if('UTF-8' == $mode) {
|
@@ -145,11 +145,11 @@ class multibyte_patch_ext extends multibyte_patch {
|
|
145 |
}
|
146 |
|
147 |
function wplink_js(&$scripts) {
|
148 |
-
$scripts->add('wplink', plugin_dir_url(__FILE__) . "wplink{$this->debug_suffix}.js", array('jquery', 'wpdialogs'), '
|
149 |
}
|
150 |
|
151 |
function word_count_js(&$scripts) {
|
152 |
-
$scripts->add('word-count', plugin_dir_url(__FILE__) . "word-count{$this->debug_suffix}.js", array('jquery'), '20110515');
|
153 |
$this->import_l10n_entry('Word count: %s', 'wp-multibyte-patch');
|
154 |
}
|
155 |
|
3 |
|
4 |
/*
|
5 |
WPLANG: ja
|
6 |
+
Plugin Version: 1.5.1
|
7 |
Description: Japanese Locale Extension.
|
8 |
Author: Kuraishi (tenpura)
|
9 |
Extension URI: http://eastcoder.com/code/wp-multibyte-patch/
|
71 |
$mode = ($test_str_after != $test_str_before) ? 'UTF-8' : 'JIS';
|
72 |
}
|
73 |
|
74 |
+
$phpmailer_props = $this->get_phpmailer_properties($phpmailer);
|
75 |
$recipient_methods = array('to' => array('add' => 'AddAddress', 'clear' => 'ClearAddresses'), 'cc' => array('add' => 'AddCC', 'clear' => 'ClearCCs'), 'bcc' => array('add' => 'AddBCC', 'clear' => 'ClearBCCs'));
|
76 |
|
77 |
if('UTF-8' == $mode) {
|
145 |
}
|
146 |
|
147 |
function wplink_js(&$scripts) {
|
148 |
+
$scripts->add('wplink', plugin_dir_url(__FILE__) . "wplink{$this->debug_suffix}.js", array('jquery', 'wpdialogs'), '20111128', 1);
|
149 |
}
|
150 |
|
151 |
function word_count_js(&$scripts) {
|
152 |
+
$scripts->add('word-count', plugin_dir_url(__FILE__) . "word-count{$this->debug_suffix}.js", array('jquery'), '20110515', 1);
|
153 |
$this->import_l10n_entry('Word count: %s', 'wp-multibyte-patch');
|
154 |
}
|
155 |
|
ext/ja/wplink.dev.js
CHANGED
@@ -9,13 +9,14 @@ var wpLink;
|
|
9 |
riverBottomThreshold: 5,
|
10 |
keySensitivity: 100,
|
11 |
lastSearch: '',
|
12 |
-
textarea:
|
13 |
|
14 |
init : function() {
|
15 |
inputs.dialog = $('#wp-link');
|
16 |
inputs.submit = $('#wp-link-submit');
|
17 |
// URL
|
18 |
inputs.url = $('#url-field');
|
|
|
19 |
// Secondary options
|
20 |
inputs.title = $('#link-title-field');
|
21 |
// Advanced Options
|
@@ -30,10 +31,13 @@ var wpLink;
|
|
30 |
inputs.dialog.keydown( wpLink.keydown );
|
31 |
inputs.dialog.keyup( wpLink.keyup );
|
32 |
inputs.submit.click( function(e){
|
|
|
33 |
wpLink.update();
|
|
|
|
|
34 |
e.preventDefault();
|
|
|
35 |
});
|
36 |
-
$('#wp-link-cancel').click( wpLink.close );
|
37 |
$('#internal-toggle').click( wpLink.toggleInternalLinking );
|
38 |
|
39 |
rivers.elements.bind('river-select', wpLink.updateFields );
|
@@ -49,12 +53,17 @@ var wpLink;
|
|
49 |
wpLink.range = null;
|
50 |
|
51 |
if ( ! wpLink.isMCE() && document.selection ) {
|
52 |
-
wpLink.textarea
|
53 |
wpLink.range = document.selection.createRange();
|
54 |
}
|
55 |
},
|
56 |
|
57 |
open : function() {
|
|
|
|
|
|
|
|
|
|
|
58 |
// Initialize the dialog if necessary (html mode).
|
59 |
if ( ! inputs.dialog.data('wpdialog') ) {
|
60 |
inputs.dialog.wpdialog({
|
@@ -102,7 +111,7 @@ var wpLink;
|
|
102 |
// If link exists, select proper values.
|
103 |
if ( e = ed.dom.getParent(ed.selection.getNode(), 'A') ) {
|
104 |
// Set URL and description.
|
105 |
-
inputs.url.val( e
|
106 |
inputs.title.val( ed.dom.getAttrib(e, 'title') );
|
107 |
// Set open in new tab.
|
108 |
if ( "_blank" == ed.dom.getAttrib(e, 'target') )
|
@@ -127,7 +136,7 @@ var wpLink;
|
|
127 |
|
128 |
onClose: function() {
|
129 |
if ( ! wpLink.isMCE() ) {
|
130 |
-
wpLink.textarea
|
131 |
if ( wpLink.range ) {
|
132 |
wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
|
133 |
wpLink.range.select();
|
@@ -152,7 +161,7 @@ var wpLink;
|
|
152 |
|
153 |
htmlUpdate : function() {
|
154 |
var attrs, html, start, end, cursor,
|
155 |
-
textarea = wpLink.textarea
|
156 |
|
157 |
if ( ! textarea )
|
158 |
return;
|
@@ -564,7 +573,7 @@ var wpLink;
|
|
564 |
query = {
|
565 |
action : 'wp-link-ajax',
|
566 |
page : this.page,
|
567 |
-
'_ajax_linking_nonce' :
|
568 |
};
|
569 |
|
570 |
if ( this.search )
|
9 |
riverBottomThreshold: 5,
|
10 |
keySensitivity: 100,
|
11 |
lastSearch: '',
|
12 |
+
textarea: '',
|
13 |
|
14 |
init : function() {
|
15 |
inputs.dialog = $('#wp-link');
|
16 |
inputs.submit = $('#wp-link-submit');
|
17 |
// URL
|
18 |
inputs.url = $('#url-field');
|
19 |
+
inputs.nonce = $('#_ajax_linking_nonce');
|
20 |
// Secondary options
|
21 |
inputs.title = $('#link-title-field');
|
22 |
// Advanced Options
|
31 |
inputs.dialog.keydown( wpLink.keydown );
|
32 |
inputs.dialog.keyup( wpLink.keyup );
|
33 |
inputs.submit.click( function(e){
|
34 |
+
e.preventDefault();
|
35 |
wpLink.update();
|
36 |
+
});
|
37 |
+
$('#wp-link-cancel').click( function(e){
|
38 |
e.preventDefault();
|
39 |
+
wpLink.close();
|
40 |
});
|
|
|
41 |
$('#internal-toggle').click( wpLink.toggleInternalLinking );
|
42 |
|
43 |
rivers.elements.bind('river-select', wpLink.updateFields );
|
53 |
wpLink.range = null;
|
54 |
|
55 |
if ( ! wpLink.isMCE() && document.selection ) {
|
56 |
+
wpLink.textarea.focus();
|
57 |
wpLink.range = document.selection.createRange();
|
58 |
}
|
59 |
},
|
60 |
|
61 |
open : function() {
|
62 |
+
if ( !wpActiveEditor )
|
63 |
+
return;
|
64 |
+
|
65 |
+
this.textarea = $('#'+wpActiveEditor).get(0);
|
66 |
+
|
67 |
// Initialize the dialog if necessary (html mode).
|
68 |
if ( ! inputs.dialog.data('wpdialog') ) {
|
69 |
inputs.dialog.wpdialog({
|
111 |
// If link exists, select proper values.
|
112 |
if ( e = ed.dom.getParent(ed.selection.getNode(), 'A') ) {
|
113 |
// Set URL and description.
|
114 |
+
inputs.url.val( ed.dom.getAttrib(e, 'href') );
|
115 |
inputs.title.val( ed.dom.getAttrib(e, 'title') );
|
116 |
// Set open in new tab.
|
117 |
if ( "_blank" == ed.dom.getAttrib(e, 'target') )
|
136 |
|
137 |
onClose: function() {
|
138 |
if ( ! wpLink.isMCE() ) {
|
139 |
+
wpLink.textarea.focus();
|
140 |
if ( wpLink.range ) {
|
141 |
wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
|
142 |
wpLink.range.select();
|
161 |
|
162 |
htmlUpdate : function() {
|
163 |
var attrs, html, start, end, cursor,
|
164 |
+
textarea = wpLink.textarea;
|
165 |
|
166 |
if ( ! textarea )
|
167 |
return;
|
573 |
query = {
|
574 |
action : 'wp-link-ajax',
|
575 |
page : this.page,
|
576 |
+
'_ajax_linking_nonce' : inputs.nonce.val()
|
577 |
};
|
578 |
|
579 |
if ( this.search )
|
ext/ja/wplink.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wpLink;(function(f){var b={},e={},d,a,c;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:
|
1 |
+
var wpLink;(function(f){var b={},e={},d,a,c;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",init:function(){b.dialog=f("#wp-link");b.submit=f("#wp-link-submit");b.url=f("#url-field");b.nonce=f("#_ajax_linking_nonce");b.title=f("#link-title-field");b.openInNewTab=f("#link-target-checkbox");b.search=f("#search-field");e.search=new a(f("#search-results"));e.recent=new a(f("#most-recent-results"));e.elements=f(".query-results",b.dialog);b.dialog.keydown(wpLink.keydown);b.dialog.keyup(wpLink.keyup);b.submit.click(function(g){g.preventDefault();wpLink.update()});f("#wp-link-cancel").click(function(g){g.preventDefault();wpLink.close()});f("#internal-toggle").click(wpLink.toggleInternalLinking);e.elements.bind("river-select",wpLink.updateFields);b.search.keyup(wpLink.searchInternalLinks);b.dialog.bind("wpdialogrefresh",wpLink.refresh);b.dialog.bind("wpdialogbeforeopen",wpLink.beforeOpen);b.dialog.bind("wpdialogclose",wpLink.onClose)},beforeOpen:function(){wpLink.range=null;if(!wpLink.isMCE()&&document.selection){wpLink.textarea.focus();wpLink.range=document.selection.createRange()}},open:function(){if(!wpActiveEditor){return}this.textarea=f("#"+wpActiveEditor).get(0);if(!b.dialog.data("wpdialog")){b.dialog.wpdialog({title:wpLinkL10n.title,width:480,height:"auto",modal:true,dialogClass:"wp-dialog",zIndex:300000})}b.dialog.wpdialog("open")},isMCE:function(){return tinyMCEPopup&&(d=tinyMCEPopup.editor)&&!d.isHidden()},refresh:function(){e.search.refresh();e.recent.refresh();if(wpLink.isMCE()){wpLink.mceRefresh()}else{wpLink.setDefaultValues()}b.url.focus()[0].select();if(!e.recent.ul.children().length){e.recent.ajax()}},mceRefresh:function(){var g;d=tinyMCEPopup.editor;tinyMCEPopup.restoreSelection();if(g=d.dom.getParent(d.selection.getNode(),"A")){b.url.val(d.dom.getAttrib(g,"href"));b.title.val(d.dom.getAttrib(g,"title"));if("_blank"==d.dom.getAttrib(g,"target")){b.openInNewTab.prop("checked",true)}b.submit.val(wpLinkL10n.update)}else{wpLink.setDefaultValues()}tinyMCEPopup.storeSelection()},close:function(){if(wpLink.isMCE()){tinyMCEPopup.close()}else{b.dialog.wpdialog("close")}},onClose:function(){if(!wpLink.isMCE()){wpLink.textarea.focus();if(wpLink.range){wpLink.range.moveToBookmark(wpLink.range.getBookmark());wpLink.range.select()}}},getAttrs:function(){return{href:b.url.val(),title:b.title.val(),target:b.openInNewTab.prop("checked")?"_blank":""}},update:function(){if(wpLink.isMCE()){wpLink.mceUpdate()}else{wpLink.htmlUpdate()}},htmlUpdate:function(){var i,j,l,h,k,g=wpLink.textarea;if(!g){return}i=wpLink.getAttrs();if(!i.href||i.href=="http://"){return}j='<a href="'+i.href+'"';if(i.title){j+=' title="'+i.title+'"'}if(i.target){j+=' target="'+i.target+'"'}j+=">";if(typeof g.selectionStart!=="undefined"){l=g.selectionStart;h=g.selectionEnd;selection=g.value.substring(l,h);j=j+selection+"</a>";k=l+j.length;if(l==h){k-="</a>".length}g.value=g.value.substring(0,l)+j+g.value.substring(h,g.value.length);g.selectionStart=g.selectionEnd=k}else{if(document.selection&&wpLink.range){g.focus();wpLink.range.text=j+wpLink.range.text+"</a>";wpLink.range.moveToBookmark(wpLink.range.getBookmark());wpLink.range.select();wpLink.range=null}}wpLink.close();g.focus()},mceUpdate:function(){var h=tinyMCEPopup.editor,i=wpLink.getAttrs(),j,g;tinyMCEPopup.restoreSelection();j=h.dom.getParent(h.selection.getNode(),"A");if(!i.href||i.href=="http://"){if(j){tinyMCEPopup.execCommand("mceBeginUndoLevel");g=h.selection.getBookmark();h.dom.remove(j,1);h.selection.moveToBookmark(g);tinyMCEPopup.execCommand("mceEndUndoLevel");wpLink.close()}return}tinyMCEPopup.execCommand("mceBeginUndoLevel");if(j==null){h.getDoc().execCommand("unlink",false,null);tinyMCEPopup.execCommand("CreateLink",false,"#mce_temp_url#",{skip_undo:1});tinymce.each(h.dom.select("a"),function(k){if(h.dom.getAttrib(k,"href")=="#mce_temp_url#"){j=k;h.dom.setAttribs(j,i)}});if(f(j).text()=="#mce_temp_url#"){h.dom.remove(j);j=null}}else{h.dom.setAttribs(j,i)}if(j&&(j.childNodes.length!=1||j.firstChild.nodeName!="IMG")){h.focus();h.selection.select(j);h.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand("mceEndUndoLevel");wpLink.close()},updateFields:function(i,h,g){b.url.val(h.children(".item-permalink").val());b.title.val(h.hasClass("no-title")?"":h.children(".item-title").text());if(g&&g.type=="click"){b.url.focus()}},setDefaultValues:function(){b.url.val("http://");b.title.val("");b.submit.val(wpLinkL10n.save)},searchInternalLinks:function(){var h=f(this),i,g=h.val();if(g.length>1){e.recent.hide();e.search.show();if(wpLink.lastSearch==g){return}wpLink.lastSearch=g;i=h.siblings("img.waiting").show();e.search.change(g);e.search.ajax(function(){i.hide()})}else{e.search.hide();e.recent.show()}},next:function(){e.search.next();e.recent.next()},prev:function(){e.search.prev();e.recent.prev()},keydown:function(i){var h,g=f.ui.keyCode;switch(i.which){case g.UP:h="prev";case g.DOWN:h=h||"next";clearInterval(wpLink.keyInterval);wpLink[h]();wpLink.keyInterval=setInterval(wpLink[h],wpLink.keySensitivity);break;default:return}i.preventDefault()},keyup:function(h){var g=f.ui.keyCode;switch(h.which){case g.ESCAPE:h.stopImmediatePropagation();if(!f(document).triggerHandler("wp_CloseOnEscape",[{event:h,what:"wplink",cb:wpLink.close}])){wpLink.close()}return false;break;case g.UP:case g.DOWN:clearInterval(wpLink.keyInterval);break;default:return}h.preventDefault()},delayedCallback:function(i,g){var l,k,j,h;if(!g){return i}setTimeout(function(){if(k){return i.apply(h,j)}l=true},g);return function(){if(l){return i.apply(this,arguments)}j=arguments;h=this;k=true}},toggleInternalLinking:function(h){var g=f("#search-panel"),i=b.dialog.wpdialog("widget"),k=!g.is(":visible"),j=f(window);f(this).toggleClass("toggle-arrow-active",k);b.dialog.height("auto");g.slideToggle(300,function(){setUserSetting("wplink",k?"1":"0");b[k?"search":"url"].focus();var l=j.scrollTop(),o=i.offset().top,m=o+i.outerHeight(),n=m-j.height();if(n>l){i.animate({top:n<o?o-n:l},200)}});h.preventDefault()}};a=function(i,h){var g=this;this.element=i;this.ul=i.children("ul");this.waiting=i.find(".river-waiting");this.change(h);this.refresh();i.scroll(function(){g.maybeLoad()});i.delegate("li","click",function(j){g.select(f(this),j)})};f.extend(a.prototype,{refresh:function(){this.deselect();this.visible=this.element.is(":visible")},show:function(){if(!this.visible){this.deselect();this.element.show();this.visible=true}},hide:function(){this.element.hide();this.visible=false},select:function(h,k){var j,i,l,g;if(h.hasClass("unselectable")||h==this.selected){return}this.deselect();this.selected=h.addClass("selected");j=h.outerHeight();i=this.element.height();l=h.position().top;g=this.element.scrollTop();if(l<0){this.element.scrollTop(g+l)}else{if(l+j>i){this.element.scrollTop(g+l-i+j)}}this.element.trigger("river-select",[h,k,this])},deselect:function(){if(this.selected){this.selected.removeClass("selected")}this.selected=false},prev:function(){if(!this.visible){return}var g;if(this.selected){g=this.selected.prev("li");if(g.length){this.select(g)}}},next:function(){if(!this.visible){return}var g=this.selected?this.selected.next("li"):f("li:not(.unselectable):first",this.element);if(g.length){this.select(g)}},ajax:function(j){var h=this,i=this.query.page==1?0:wpLink.minRiverAJAXDuration,g=wpLink.delayedCallback(function(k,l){h.process(k,l);if(j){j(k,l)}},i);this.query.ajax(g)},change:function(g){if(this.query&&this._search==g){return}this._search=g;this.query=new c(g);this.element.scrollTop(0)},process:function(h,l){var i="",j=true,g="",k=l.page==1;if(!h){if(k){i+='<li class="unselectable"><span class="item-title"><em>'+wpLinkL10n.noMatchesFound+"</em></span></li>"}}else{f.each(h,function(){g=j?"alternate":"";g+=this["title"]?"":" no-title";i+=g?'<li class="'+g+'">':"<li>";i+='<input type="hidden" class="item-permalink" value="'+this["permalink"]+'" />';i+='<span class="item-title">';i+=this["title"]?this["title"]:wpLinkL10n.noTitle;i+='</span><span class="item-info">'+this["info"]+"</span></li>";j=!j})}this.ul[k?"html":"append"](i)},maybeLoad:function(){var h=this,i=this.element,g=i.scrollTop()+i.height();if(!this.query.ready()||g<this.ul.height()-wpLink.riverBottomThreshold){return}setTimeout(function(){var j=i.scrollTop(),k=j+i.height();if(!h.query.ready()||k<h.ul.height()-wpLink.riverBottomThreshold){return}h.waiting.show();i.scrollTop(j+h.waiting.outerHeight());h.ajax(function(){h.waiting.hide()})},wpLink.timeToTriggerRiver)}});c=function(g){this.page=1;this.allLoaded=false;this.querying=false;this.search=g};f.extend(c.prototype,{ready:function(){return !(this.querying||this.allLoaded)},ajax:function(i){var g=this,h={action:"wp-link-ajax",page:this.page,_ajax_linking_nonce:b.nonce.val()};if(this.search){h.search=this.search}this.querying=true;f.post(ajaxurl,h,function(j){g.page++;g.querying=false;g.allLoaded=!j;i(j,h)},"json")}});f(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.5
|
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.3
|
5 |
+
Tested up to: 3.3
|
6 |
+
Stable tag: 1.5.1
|
7 |
|
8 |
Multibyte functionality enhancement for the WordPress Japanese package.
|
9 |
|
wp-multibyte-patch.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Multibyte Patch
|
|
4 |
Plugin URI: http://eastcoder.com/code/wp-multibyte-patch/
|
5 |
Description: Enhances multibyte string I/O functionality of WordPress.
|
6 |
Author: Kuraishi (tenpura)
|
7 |
-
Version: 1.5
|
8 |
Author URI: http://eastcoder.com/
|
9 |
Text Domain: wp-multibyte-patch
|
10 |
Domain Path: /languages
|
@@ -45,7 +45,7 @@ class multibyte_patch {
|
|
45 |
var $has_mbfunctions;
|
46 |
var $textdomain = 'wp-multibyte-patch';
|
47 |
var $lang_dir = 'languages';
|
48 |
-
var $required_version = '3.
|
49 |
var $query_based_vars = array();
|
50 |
|
51 |
function guess_encoding($string, $encoding = '') {
|
@@ -202,7 +202,7 @@ class multibyte_patch {
|
|
202 |
return ($this->conf['ascii_threshold'] < round(@(mb_strlen($string, $encoding) / strlen($string)) * 100)) ? true : false;
|
203 |
}
|
204 |
|
205 |
-
function wp_trim_excerpt($text) {
|
206 |
$raw_excerpt = $text;
|
207 |
|
208 |
$blog_encoding = $this->blog_encoding;
|
@@ -214,7 +214,7 @@ class multibyte_patch {
|
|
214 |
|
215 |
$text = apply_filters('the_content', $text);
|
216 |
$text = str_replace(']]>', ']]>', $text);
|
217 |
-
$text =
|
218 |
$excerpt_length = apply_filters('excerpt_length', $this->conf['excerpt_length']);
|
219 |
$excerpt_mblength = apply_filters('excerpt_mblength', $this->conf['excerpt_mblength']);
|
220 |
$excerpt_more = apply_filters('excerpt_more', $this->conf['excerpt_more']);
|
4 |
Plugin URI: http://eastcoder.com/code/wp-multibyte-patch/
|
5 |
Description: Enhances multibyte string I/O functionality of WordPress.
|
6 |
Author: Kuraishi (tenpura)
|
7 |
+
Version: 1.5.1
|
8 |
Author URI: http://eastcoder.com/
|
9 |
Text Domain: wp-multibyte-patch
|
10 |
Domain Path: /languages
|
45 |
var $has_mbfunctions;
|
46 |
var $textdomain = 'wp-multibyte-patch';
|
47 |
var $lang_dir = 'languages';
|
48 |
+
var $required_version = '3.3';
|
49 |
var $query_based_vars = array();
|
50 |
|
51 |
function guess_encoding($string, $encoding = '') {
|
202 |
return ($this->conf['ascii_threshold'] < round(@(mb_strlen($string, $encoding) / strlen($string)) * 100)) ? true : false;
|
203 |
}
|
204 |
|
205 |
+
function wp_trim_excerpt($text = '') {
|
206 |
$raw_excerpt = $text;
|
207 |
|
208 |
$blog_encoding = $this->blog_encoding;
|
214 |
|
215 |
$text = apply_filters('the_content', $text);
|
216 |
$text = str_replace(']]>', ']]>', $text);
|
217 |
+
$text = wp_strip_all_tags($text);
|
218 |
$excerpt_length = apply_filters('excerpt_length', $this->conf['excerpt_length']);
|
219 |
$excerpt_mblength = apply_filters('excerpt_mblength', $this->conf['excerpt_mblength']);
|
220 |
$excerpt_more = apply_filters('excerpt_more', $this->conf['excerpt_more']);
|