Changeset 3461042
- Timestamp:
- 02/13/2026 08:21:31 PM (7 weeks ago)
- Location:
- seraphinite-post-docx-source
- Files:
-
- 45 added
- 17 edited
-
tags/2.16.15 (added)
-
tags/2.16.15/Cmn (added)
-
tags/2.16.15/Cmn/AdminUi.css (added)
-
tags/2.16.15/Cmn/AdminUi.js (added)
-
tags/2.16.15/Cmn/Cmn.js (added)
-
tags/2.16.15/Cmn/Ext (added)
-
tags/2.16.15/Cmn/Ext/pdf (added)
-
tags/2.16.15/Cmn/Ext/pdf/pdf.js (added)
-
tags/2.16.15/Cmn/Ext/pdf/pdf.worker.js (added)
-
tags/2.16.15/Cmn/Fs.php (added)
-
tags/2.16.15/Cmn/Gen.js (added)
-
tags/2.16.15/Cmn/Gen.php (added)
-
tags/2.16.15/Cmn/Img.php (added)
-
tags/2.16.15/Cmn/Net.js (added)
-
tags/2.16.15/Cmn/Plugin.php (added)
-
tags/2.16.15/Cmn/Ui.js (added)
-
tags/2.16.15/Cmn/Ui.php (added)
-
tags/2.16.15/Ext (added)
-
tags/2.16.15/Ext/MathJax (added)
-
tags/2.16.15/Ext/MathJax/CHtml.css (added)
-
tags/2.16.15/Images (added)
-
tags/2.16.15/Images/ProductLogo.png (added)
-
tags/2.16.15/Images/VendorLogo.png (added)
-
tags/2.16.15/View.js (added)
-
tags/2.16.15/common.php (added)
-
tags/2.16.15/editor.js (added)
-
tags/2.16.15/helper.php (added)
-
tags/2.16.15/icon.png (added)
-
tags/2.16.15/languages (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-Gen-en_US.json (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-Gen-ru_RU.json (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-admin-en_US.mo (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-admin-ru_RU.mo (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-admin.pot (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-editor-en_US.json (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-editor-ru_RU.json (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-en_US.mo (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source-ru_RU.mo (added)
-
tags/2.16.15/languages/seraphinite-post-docx-source.pot (added)
-
tags/2.16.15/main.php (added)
-
tags/2.16.15/options.php (added)
-
tags/2.16.15/readme.txt (added)
-
tags/2.16.15/seraphinite-post-docx-source.php (added)
-
tags/2.16.15/third-party-software.html (added)
-
tags/2.16.15/wpml-config.xml (added)
-
trunk/Cmn/Fs.php (modified) (1 diff)
-
trunk/Cmn/Gen.js (modified) (1 diff)
-
trunk/Cmn/Gen.php (modified) (32 diffs)
-
trunk/Cmn/Img.php (modified) (7 diffs)
-
trunk/Cmn/Plugin.php (modified) (22 diffs)
-
trunk/Cmn/Ui.php (modified) (7 diffs)
-
trunk/common.php (modified) (1 diff)
-
trunk/languages/seraphinite-post-docx-source-admin-en_US.mo (modified) (previous)
-
trunk/languages/seraphinite-post-docx-source-admin-ru_RU.mo (modified) (previous)
-
trunk/languages/seraphinite-post-docx-source-admin.pot (modified) (1 diff)
-
trunk/languages/seraphinite-post-docx-source-en_US.mo (modified) (previous)
-
trunk/languages/seraphinite-post-docx-source-ru_RU.mo (modified) (previous)
-
trunk/languages/seraphinite-post-docx-source.pot (modified) (1 diff)
-
trunk/main.php (modified) (4 diffs)
-
trunk/options.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/seraphinite-post-docx-source.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seraphinite-post-docx-source/trunk/Cmn/Fs.php
r3238125 r3461042 265 265 'roff' => 'application/x-troff', 266 266 'rpm' => 'application/x-rpm', 267 'rss' => 'application/rss+xml', 267 268 'rtf' => 'text/rtf', 268 269 'rtx' => 'text/richtext', -
seraphinite-post-docx-source/trunk/Cmn/Gen.js
r3201981 r3461042 10 10 return d},DeepCopy:I,Extend:J,JsonParse:function(a){try{var b=JSON.parse(a)}catch(c){}return b},RegExpFromStr:function(a){var b=a.match(/^([\/~@;%#'])(.*?)\1([gimsuy]*)$/);return b?new RegExp(b[2],b[3].split("").filter(function(c,d,h){return h.indexOf(c)===d}).join("")):new RegExp(a)},GetObjField:D,SetObjField:function(a,b,c){var d=b.split(3<arguments.length&&void 0!==arguments[3]?arguments[3]:".");if(d.length){for(var h=0;h<d.length-1;h++){var n=d[h];a[n]||(a[n]=h+1<d.length&&"+"==d[h+1]||"string"!== 11 11 typeof n?[]:{});a=a[n]}n=d[d.length-1];"+"==n?"function"===typeof a.push&&a.push(c):a[n]=c}},GetObjContId:function(a){return E(JSON.stringify(a),'true false { } " : ,'.split(" "),"1 ".split(" "))},AsyncChain:function(){return new Promise(function(a,b){a()})},RunModules:K,EvalInCtx:function(a,b){if(a)return function(){return eval(a)}.call(b)},hr:{SEVERITY_SUCCESS:0,SEVERITY_ERROR:1,FACILITY_INTERNET:12,FACILITY_HTTP:25,S_OK:0,S_FALSE:1,S_FAIL:16389,S_ABORTED:459975,E_NOTIMPL:2147500033,E_FAIL:2147500037, 12 E_UNSUPPORTED:2147500065,E_INVALIDARG:2147942487,E_INVALID_STATE:2147947423,E_INTERNAL:2147943759,E_DATACORRUPTED:2147943792,E_NOT_FOUND:2147943568,E_ACCESS_DENIED:2147942405,E_ABORTED:2147943623, Make:function(a,b,c){return a<<31|b<<16|c&65535},Code:function(a){return a&65535},Facility:function(a){return a>>16&8191},Succ:function(a){return!(a&2147483648)},Fail:function(a){return!!(a&2147483648)}}};seraph_pds.Plugin={GetErrorDescr:function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:13 null,c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:!1,d=seraph_pds.Wp.Loc.GetApi(),h=d._x;d=d.sprintf;var n=d("Err_%08X",a),q=c&&seraph_pds.Gen.hr.Succ(a)?d("Err_%08X",seraph_pds.Gen.hr.Make(seraph_pds.Gen.hr.SEVERITY_ERROR,seraph_pds.Gen.hr.Facility(a),a)):null;c=[];b&&(c.push({id:n,ctx:b}),q&&c.push({id:q,ctx:b}));c.push({id:n,ctx:"admin.ErrDescr_Common"});q&&c.push({id:q,ctx:"admin.ErrDescr_Common"});c.push({id:"Def_%08X",ctx:"admin.ErrDescr_Common"});for(var y in c)if(q=c[y],b=q.id, 14 q=d(h(b,q.ctx,"seraphinite-post-docx-source"),a),q!=b)return q;return n},GetRootUrl:function(){return this._int.urlRoot},GetAdminApiUrl:function(){return this._int.urlAdminApi},GetApiUrl:function(){return this._int.urlApi},_int:{urlRoot:"",urlAdminApi:"",urlApi:""}};seraph_pds.Wp={Loc:{GetApi:function(){var a=null;a=window.wp&&window.wp.i18n?window.wp.i18n:{__:function(b,c){return seraph_pds.Wp.Loc._int.dcnpgettext(c,void 0,b)},_x:function(b,c,d){return seraph_pds.Wp.Loc._int.dcnpgettext(d,c,b)},15 _n:function(b,c,d,h){return seraph_pds.Wp.Loc._int.dcnpgettext(h,void 0,b,c,d)},_nx:function(b,c,d,h,n){return seraph_pds.Wp.Loc._int.dcnpgettext(n,h,b,c,d)},sprintf:seraph_pds.Wp.Loc._int.sprintf};a.vsprintf||(a.vsprintf=function(b,c){return a.sprintf.apply(null,[b].concat(c||[]))});return a},SetData:function(a,b){return window.wp&&window.wp.i18n?window.wp.i18n.setLocaleData(a,b):seraph_pds.Wp.Loc._int.setLocaleData(a,b)},GetLang:function(){return seraph_pds.Wp.Loc._int.lang}}};(function(){function a(f){for(var g=12 E_UNSUPPORTED:2147500065,E_INVALIDARG:2147942487,E_INVALID_STATE:2147947423,E_INTERNAL:2147943759,E_DATACORRUPTED:2147943792,E_NOT_FOUND:2147943568,E_ACCESS_DENIED:2147942405,E_ABORTED:2147943623,E_CONTEXT_EXPIRED:2147944331,Make:function(a,b,c){return a<<31|b<<16|c&65535},Code:function(a){return a&65535},Facility:function(a){return a>>16&8191},Succ:function(a){return!(a&2147483648)},Fail:function(a){return!!(a&2147483648)}}};seraph_pds.Plugin={GetErrorDescr:function(a){var b=1<arguments.length&& 13 void 0!==arguments[1]?arguments[1]:null,c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:!1,d=seraph_pds.Wp.Loc.GetApi(),h=d._x;d=d.sprintf;var n=d("Err_%08X",a),q=c&&seraph_pds.Gen.hr.Succ(a)?d("Err_%08X",seraph_pds.Gen.hr.Make(seraph_pds.Gen.hr.SEVERITY_ERROR,seraph_pds.Gen.hr.Facility(a),a)):null;c=[];b&&(c.push({id:n,ctx:b}),q&&c.push({id:q,ctx:b}));c.push({id:n,ctx:"admin.ErrDescr_Common"});q&&c.push({id:q,ctx:"admin.ErrDescr_Common"});c.push({id:"Def_%08X",ctx:"admin.ErrDescr_Common"}); 14 for(var y in c)if(q=c[y],b=q.id,q=d(h(b,q.ctx,"seraphinite-post-docx-source"),a),q!=b)return q;return n},GetRootUrl:function(){return this._int.urlRoot},GetAdminApiUrl:function(){return this._int.urlAdminApi},GetApiUrl:function(){return this._int.urlApi},_int:{urlRoot:"",urlAdminApi:"",urlApi:""}};seraph_pds.Wp={Loc:{GetApi:function(){var a=null;a=window.wp&&window.wp.i18n?window.wp.i18n:{__:function(b,c){return seraph_pds.Wp.Loc._int.dcnpgettext(c,void 0,b)},_x:function(b,c,d){return seraph_pds.Wp.Loc._int.dcnpgettext(d, 15 c,b)},_n:function(b,c,d,h){return seraph_pds.Wp.Loc._int.dcnpgettext(h,void 0,b,c,d)},_nx:function(b,c,d,h,n){return seraph_pds.Wp.Loc._int.dcnpgettext(n,h,b,c,d)},sprintf:seraph_pds.Wp.Loc._int.sprintf};a.vsprintf||(a.vsprintf=function(b,c){return a.sprintf.apply(null,[b].concat(c||[]))});return a},SetData:function(a,b){return window.wp&&window.wp.i18n?window.wp.i18n.setLocaleData(a,b):seraph_pds.Wp.Loc._int.setLocaleData(a,b)},GetLang:function(){return seraph_pds.Wp.Loc._int.lang}}};(function(){function a(f){for(var g= 16 16 [],k=[],m,p,e;m=f.match(v);){p=m[0];for((e=f.substr(0,m.index).trim())&&g.push(e);e=k.pop();){if(y[p]){if(y[p][0]===e){p=y[p][1]||p;break}}else if(0<=q.indexOf(e)||n[e]<n[p]){k.push(e);break}g.push(e)}y[p]||k.push(p);f=f.substr(m.index+p.length)}(f=f.trim())&&g.push(f);return g.concat(k.reverse())}function b(f){var g=a(f);return function(k){a:{var m=[],p,e;for(p=0;p<g.length;p++){var u=g[p];if(e=B[u])try{var t=e.apply(null,m.splice(-1*e.length))}catch(l){k=l;break a}else t=k.hasOwnProperty(u)?k[u]: 17 17 +u;m.push(t)}k=m[0]}return k}}function c(f){var g=b(f);return function(k){return+g({n:k})}}function d(f){var g=f;if(z[g])g=z[g];else{for(var k=g,m,p=[],e=0;k;){if(null!==(m=r.text.exec(k)))p.push(m[0]);else if(null!==(m=r.modulo.exec(k)))p.push("%");else if(null!==(m=r.placeholder.exec(k))){if(m[2]){e|=1;var u=[],t=m[2],l;if(null!==(l=r.key.exec(t)))for(u.push(l[1]);""!==(t=t.substring(l[0].length));)if(null!==(l=r.key_access.exec(t)))u.push(l[1]);else if(null!==(l=r.index_access.exec(t)))u.push(l[1]); -
seraphinite-post-docx-source/trunk/Cmn/Gen.php
r3238125 r3461042 108 108 } 109 109 110 static function NullIfEmpty( $v ) 111 { 112 return( empty( $v ) ? null : $v ); 113 } 114 110 115 static function NormArrFieldKey( $key ) 111 116 { … … 183 188 $fieldPath = explode( $sep, $fieldPath ); 184 189 self::_SetArrField( $arr, $fieldPath, null, true ); 190 } 191 192 static function RenameArrField( &$arr, $fieldPath, $fieldPathNew, $sep = '.' ) 193 { 194 if( !is_array( $fieldPath ) ) 195 $fieldPath = explode( $sep, $fieldPath ); 196 if( !is_array( $fieldPathNew ) ) 197 $fieldPathNew = explode( $sep, $fieldPathNew ); 198 199 $v = self::_GetArrField( $arr, $fieldPath, null, false, true, $bFound ); 200 if( !$bFound ) 201 return; 202 203 self::_SetArrField( $arr, $fieldPath, null, true ); 204 self::_SetArrField( $arr, $fieldPathNew, $v ); 185 205 } 186 206 … … 503 523 } 504 524 525 const HTACCESS_SOFT_NAME = 0; 526 const HTACCESS_SOFT_VER = 1; 527 const HTACCESS_SOFT_SUBNAME = 2; 528 505 529 static function HtAccess_IsSupported() 506 530 { 507 531 508 return( !!Gen::CallFunc( 'apache_get_version' ) || preg_match( '@apache@i', isset( $_SERVER[ 'SERVER_SOFTWARE' ] ) ? $_SERVER[ 'SERVER_SOFTWARE' ] : '' ) || preg_match( '@litespeed@i', isset( $_SERVER[ 'SERVER_SOFTWARE' ] ) ? $_SERVER[ 'SERVER_SOFTWARE' ] : '' ) ); 532 $sVer = Gen::CallFunc( 'apache_get_version' ); 533 if( !$sVer ) 534 $sVer = (isset($_SERVER[ 'SERVER_SOFTWARE' ])?$_SERVER[ 'SERVER_SOFTWARE' ]:null); 535 536 if( !is_string( $sVer ) ) 537 return( false ); 538 539 if( !preg_match( '@(apache|litespeed)(?:/([\\d\\.]+))?@i', $sVer, $m ) ) 540 return( false ); 541 542 $res = array( Gen::HTACCESS_SOFT_NAME => strtolower( $m[ 1 ] ), Gen::HTACCESS_SOFT_VER => (isset($m[ 2 ])?$m[ 2 ]:'0') ); 543 if( preg_match( '@IdeaWebServer@i', $sVer ) ) 544 $res[ Gen::HTACCESS_SOFT_SUBNAME ] = 'ideawebserver'; 545 return( $res ); 509 546 } 510 547 … … 825 862 static private function _FileOpen( $filename, $mode, $use_include_path = false ) 826 863 { 864 827 865 if( strpos( $mode, 'r' ) !== false && !@file_exists( $filename ) ) 866 return( false ); 867 if( strpos( $mode, 'x' ) !== false && @file_exists( $filename ) ) 828 868 return( false ); 829 869 … … 983 1023 } 984 1024 1025 static function FileGetContents( $file ) 1026 { 1027 return( @file_exists( $file ) ? @file_get_contents( $file ) : false ); 1028 } 1029 1030 static function FilePutContents( $file, $data ) 1031 { 1032 if( is_dir( $file ) ) 1033 Gen::DelDir( $file ); 1034 return( @file_put_contents( $file, $data ) ); 1035 } 1036 985 1037 static function SetLastSlash( $filepath, $set = true, $slash = '/' ) 986 1038 { … … 1061 1113 } 1062 1114 1063 static function StrStartsWith( string $haystack, $needle )1115 static function StrStartsWith( string $haystack, $needle, &$needleKey = null ) 1064 1116 { 1065 1117 if( is_string( $needle ) ) … … 1070 1122 } 1071 1123 1072 foreach( $needle as $ needleEl )1124 foreach( $needle as $k => $needleEl ) 1073 1125 if( Gen::StrStartsWith( $haystack, $needleEl ) ) 1126 { 1127 $needleKey = $k; 1074 1128 return( true ); 1129 } 1075 1130 1076 1131 return( false ); 1077 1132 } 1078 1133 1079 static function StrEndsWith( string $haystack, $needle )1134 static function StrEndsWith( string $haystack, $needle, &$needleKey = null ) 1080 1135 { 1081 1136 if( is_string( $needle ) ) … … 1086 1141 } 1087 1142 1088 foreach( $needle as $ needleEl )1143 foreach( $needle as $k => $needleEl ) 1089 1144 if( Gen::StrEndsWith( $haystack, $needleEl ) ) 1145 { 1146 $needleKey = $k; 1090 1147 return( true ); 1148 } 1091 1149 1092 1150 return( false ); … … 1263 1321 } 1264 1322 1323 static function ArrMap( array $arr, $cbItem ) 1324 { 1325 $a = array(); 1326 foreach( $arr as $k => $v ) 1327 $a[] = call_user_func_array( $cbItem, array( $k, $v ) ); 1328 return( $a ); 1329 } 1330 1265 1331 static function GetCurRequestTime( $serverArgs = null ) 1266 1332 { … … 1376 1442 flush(); 1377 1443 1378 error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR );1379 1380 1444 return( Gen::CloseCurRequestSessionForContinueBgWorkEx() ); 1381 1445 } … … 1410 1474 $fileHtaccess = Gen::GetFileDir( $file ) . '/.htaccess'; 1411 1475 if( !@file_exists( $fileHtaccess ) ) 1476 { 1477 Gen::MakeDir( Gen::GetFileDir( $file ), true ); 1412 1478 @file_put_contents( $fileHtaccess, 'Options -Indexes' ); 1479 } 1413 1480 } 1414 1481 … … 1607 1674 } 1608 1675 1609 static function GetCallStack( $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, $limit = 0 ) 1610 { 1611 $a = @debug_backtrace( ( int )$options, ( int )$limit ); 1676 const GETCALLSTACK_OPT_AS_ARRAY = 0x80; 1677 const GETCALLSTACK_OPT_ALL = Gen::GETCALLSTACK_OPT_AS_ARRAY; 1678 1679 static function GetCallStack( $options = DEBUG_BACKTRACE_PROVIDE_OBJECT , $limit = 0 ) 1680 { 1681 $a = @debug_backtrace( ( ( int )$options & ~Gen::GETCALLSTACK_OPT_ALL ), ( int )$limit ); 1612 1682 array_splice( $a, 0, 1 ); 1613 1683 1614 $res = '';1684 $res = ( $options & Gen::GETCALLSTACK_OPT_AS_ARRAY ) ? array() : ''; 1615 1685 foreach( $a as $i => $info ) 1616 1686 { 1617 if( $res )1618 $res .= "\n";1619 1620 $res .= '#' . $i . ' '; 1687 $r = ''; 1688 if( !( $options & Gen::GETCALLSTACK_OPT_AS_ARRAY ) ) 1689 $r = '#' . $i . ' '; 1690 1621 1691 if( (isset($info[ 'file' ])?$info[ 'file' ]:null) ) 1622 $r es.= $info[ 'file' ];1692 $r .= $info[ 'file' ]; 1623 1693 else 1624 $r es.= '{}';1694 $r .= '{}'; 1625 1695 if( (isset($info[ 'line' ])?$info[ 'line' ]:null) !== null ) 1626 $r es.= '(' . $info[ 'line' ] . ')';1627 1628 $r es.= ': ';1696 $r .= '(' . $info[ 'line' ] . ')'; 1697 1698 $r .= ': '; 1629 1699 1630 1700 if( (isset($info[ 'class' ])?$info[ 'class' ]:null) ) 1631 $r es.= $info[ 'class' ];1701 $r .= $info[ 'class' ]; 1632 1702 if( (isset($info[ 'type' ])?$info[ 'type' ]:null) ) 1633 $r es.= $info[ 'type' ];1634 $r es.= Gen::GetArrField( $info, array( 'function' ), '' ) . '(';1703 $r .= $info[ 'type' ]; 1704 $r .= Gen::GetArrField( $info, array( 'function' ), '' ) . '('; 1635 1705 1636 1706 foreach( Gen::GetArrField( $info, array( 'args' ), array() ) as $iArg => $arg ) 1637 1707 { 1638 1708 if( $iArg ) 1639 $res .= ', '; 1640 $res .= str_replace( array( '\\\\', '\\/' ), array( '\\', '/' ), @json_encode( $arg ) ); 1641 } 1642 $res .= ')'; 1709 $r .= ', '; 1710 $r .= str_replace( array( '\\\\', '\\/' ), array( '\\', '/' ), @json_encode( $arg ) ); 1711 } 1712 $r .= ')'; 1713 1714 if( $options & Gen::GETCALLSTACK_OPT_AS_ARRAY ) 1715 $res[] = $r; 1716 else 1717 { 1718 if( $res ) 1719 $res .= "\n"; 1720 $res .= $r; 1721 } 1643 1722 } 1644 1723 … … 1658 1737 if( $sQuote === '' ) 1659 1738 $sQuote = $c; 1660 else if( $sQuote === $c && $cPrev !== '\\' ) 1661 $sQuote = ''; 1739 else if( $sQuote === $c ) 1740 { 1741 if( $cPrev !== '\\' ) 1742 $sQuote = ''; 1743 else if( $c === '\'' ) 1744 $data[ $i ] = "\x02"; 1745 } 1746 else 1747 { 1748 if( $c === '\'' ) 1749 $data[ $i ] = "\x02"; 1750 else if( $c === '"' && $cPrev !== '\\' ) 1751 $data[ $i ] = "\x03"; 1752 } 1753 1662 1754 continue; 1663 1755 } … … 1670 1762 $data = preg_replace( '@([\'"}])\\s*,\\s*}@', '$1}', $data ); 1671 1763 $data = str_replace( array( "\t", "\r", "\n" ), ' ', $data ); 1672 $data = str_replace( "\x01", ':', $data );1764 $data = str_replace( array( "\x01", "\x02", "\x03" ), array( ':', '\'', '\\"' ), $data ); 1673 1765 return( $data ); 1674 1766 } 1675 1767 1676 static function JsonGetEndPos( $posStart, $data ) 1677 { 1768 static function JsonGetStartEndPos( $pos, $data, $dir = 1 ) 1769 { 1770 $l = strlen( $data ); 1771 if( !$l ) 1772 return( null ); 1773 1774 $aScp = null; 1775 switch( $data[ $pos ] ) 1776 { 1777 case '{': $aScp = array( '{', '}' ); break; 1778 case '[': $aScp = array( '[', ']' ); break; 1779 case '"': $aScp = array( '"', '"' ); break; 1780 case '\'': $aScp = array( '\'', '\'' ); break; 1781 } 1782 1783 if( !$aScp ) 1784 return( null ); 1785 1678 1786 $n = 0; 1679 for( $pos = $posStart; $pos < strlen( $data ); $pos++ ) 1680 { 1681 if( $data[ $pos ] == '{' ) 1787 for( ; $pos < $l && $pos >= 0; $pos += $dir ) 1788 { 1789 if( $pos > 0 && $data[ $pos - 1 ] == '\\' ) 1790 continue; 1791 1792 if( $data[ $pos ] == $aScp[ 0 ] && ( !$n || $aScp[ 0 ] != $aScp[ 1 ] ) ) 1682 1793 $n++; 1683 else if( $data[ $pos ] == '}')1794 else if( $data[ $pos ] == $aScp[ 1 ] ) 1684 1795 { 1685 1796 $n--; … … 1689 1800 } 1690 1801 1691 return( $n ? null : ( $pos + 1 ) ); 1802 return( $n ? null : ( $pos + ( $dir > 0 ? 1 : 0 ) ) ); 1803 } 1804 1805 static function JsonGetEndPos( $posStart, $data ) 1806 { 1807 return( Gen::JsonGetStartEndPos( $posStart, $data, 1 ) ); 1808 } 1809 1810 static function JsonGetStartPos( $posEnd, $data ) 1811 { 1812 return( Gen::JsonGetStartEndPos( $posEnd, $data, -1 ) ); 1692 1813 } 1693 1814 1694 1815 static function VarCmp( $v1, $v2 ) 1695 1816 { 1696 if( $v1 < $v2 ) 1697 return( -1 ); 1698 if( $v1 > $v2 ) 1699 return( 1 ); 1700 return( 0 ); 1817 if( $v1 == $v2 ) 1818 return( 0 ); 1819 return( $v1 > $v2 ? 1 : -1 ); 1701 1820 } 1702 1821 … … 1706 1825 $fmt[ 'indent' ] = Gen::GetArrField( $fmt, array( 'indent' ), "\t" ); 1707 1826 $fmt[ 'elemSpace' ] = Gen::GetArrField( $fmt, array( 'elemSpace' ), "\n" ); 1827 $fmt[ 'assignSpaceBefore' ] = Gen::GetArrField( $fmt, array( 'assignSpaceBefore' ), ' ' ); 1828 $fmt[ 'assignSpaceAfter' ] = Gen::GetArrField( $fmt, array( 'assignSpaceAfter' ), ' ' ); 1829 $fmt[ 'escValNl' ] = Gen::GetArrField( $fmt, array( 'escValNl' ), false ); 1708 1830 return( self::_VarExport( $v, $fmt, $level ) ); 1709 1831 } … … 1717 1839 case 'integer': 1718 1840 return( ( string )$v ); 1719 case 'string':1720 return( '\'' . str_replace( array( '\\', '\'' ), array( '\\\\', '\\\'' ), $v ) . '\'' );1721 1841 case 'double': 1722 1842 return( preg_replace( '@([^\\.])0+$@', '${1}', sprintf( '%.' . ( string )$fmt[ 'floatPrec' ] . 'F', $v ) ) ); 1843 1844 case 'string': 1845 $v = json_encode( $v, JSON_UNESCAPED_SLASHES ); 1846 $v = str_replace( array( '${' ), array( '\\${' ), $v ); 1847 return( $v ); 1723 1848 1724 1849 case 'array': 1725 1850 $res = 'array(' . $fmt[ 'elemSpace' ]; 1726 1851 foreach( $v as $k => $vI ) 1727 $res .= str_repeat( $fmt[ 'indent' ], $level + 1 ) . self::_VarExport( $k, $fmt ) . ' => '. self::_VarExport( $vI, $fmt, $level + 1 ) . ',' . $fmt[ 'elemSpace' ];1852 $res .= str_repeat( $fmt[ 'indent' ], $level + 1 ) . self::_VarExport( $k, $fmt ) . $fmt[ 'assignSpaceBefore' ] . '=>' . $fmt[ 'assignSpaceAfter' ] . self::_VarExport( $vI, $fmt, $level + 1 ) . ',' . $fmt[ 'elemSpace' ]; 1728 1853 $res .= str_repeat( $fmt[ 'indent' ], $level ) . ')'; 1729 1854 return( $res ); 1730 1855 1731 1856 case 'object': 1732 return( ( string )$v);1857 return( self::_VarExport( ( array )$v, $fmt, $level ) ); 1733 1858 } 1734 1859 … … 1860 1985 } 1861 1986 1987 static function Constant( string $name, $def = null ) 1988 { 1989 return( defined( $name ) ? @constant( $name ) : $def ); 1990 } 1991 1862 1992 static private $_lastErrDsc = null; 1863 1993 static private $_fnGetTmpDir = null; … … 2034 2164 function GetErrDescr() 2035 2165 { 2166 2036 2167 $dir = Gen::GetFileDir( $this -> file ); 2037 2168 return( @is_writable( $dir ) ? LocId::Pack( 'FileModifyErr_%1$s', 'Common', array( $this -> file ) ) : LocId::Pack( 'DirWriteErr_%1$s', 'Common', array( $dir ) ) ); … … 3171 3302 } 3172 3303 3304 static function GetHeaderFromWpRemoteRequestRes( $requestRes, $name ) 3305 { 3306 $hdr = wp_remote_retrieve_header( $requestRes, $name ); 3307 if( is_array( $hdr ) ) 3308 $hdr = (isset($hdr[ 0 ])?$hdr[ 0 ]:null); 3309 return( is_string( $hdr ) ? $hdr : '' ); 3310 } 3311 3173 3312 static function GetSiteAddrFromUrl( $url, $withScheme = false ) 3174 3313 { … … 3304 3443 { 3305 3444 $args = array(); 3306 @parse_str( $query, $args );3445 @parse_str( ( string )$query, $args ); 3307 3446 return( $args ); 3308 3447 } … … 3512 3651 if( !isset( $args[ 'provider' ] ) ) 3513 3652 $args[ 'provider' ] = 'CURL'; 3514 if( !isset( $args[ 'user agent' ] ) )3515 $args[ 'user agent' ] = 'seraph-pds-Agent/2.16.14';3653 if( !isset( $args[ 'user-agent' ] ) ) 3654 $args[ 'user-agent' ] = 'seraph-pds-Agent/2.16.15'; 3516 3655 if( !isset( $args[ 'timeout' ] ) ) 3517 3656 $args[ 'timeout' ] = 5; … … 3529 3668 if( $method === 'POST' ) 3530 3669 curl_setopt( $hCurl, CURLOPT_POST, true ); 3531 curl_setopt( $hCurl, CURLOPT_USERAGENT, $args[ 'user agent' ] );3670 curl_setopt( $hCurl, CURLOPT_USERAGENT, $args[ 'user-agent' ] ); 3532 3671 if( isset( $args[ 'referer' ] ) ) 3533 3672 curl_setopt( $hCurl, CURLOPT_REFERER, $args[ 'referer' ] ); … … 3789 3928 { 3790 3929 if( !$children ) 3791 return( $children);3930 return( array() ); 3792 3931 3793 3932 if( $children -> length !== 1 ) … … 3962 4101 } 3963 4102 4103 static function Append( $nd, $ndChild ) 4104 { 4105 if( !$nd || !$ndChild ) 4106 return( false ); 4107 4108 if( is_array( $ndChild ) ) 4109 { 4110 foreach( $ndChild as $ndChildI ) 4111 $nd -> appendChild( $ndChildI ); 4112 } 4113 else 4114 $nd -> appendChild( $ndChild ); 4115 4116 return( true ); 4117 } 4118 3964 4119 static function GetAttrNode( $nd, $name ) 3965 4120 { … … 4016 4171 return( false ); 4017 4172 4018 $val = HtmlNd::GetAttrClass( $nd ); 4019 4020 if( !is_array( $valClasses ) ) 4021 $valClasses = explode( ' ', @trim( $valClasses ) ); 4022 4023 if( !is_array( $valClassesRemove ) ) 4024 $valClassesRemove = explode( ' ', @trim( $valClassesRemove ) ); 4025 4026 foreach( $valClasses as $valClass ) 4027 if( strlen( ( string )$valClass ) && !in_array( $valClass, $val ) ) 4028 $val[] = $valClass; 4029 4030 foreach( $valClassesRemove as $valClassRemove ) 4031 while( ( $i = array_search( $valClassRemove, $val ) ) !== false ) 4032 unset( $val[ $i ] ); 4033 4034 $val = implode( ' ', $val ); 4173 $val = Ui::AddRemoveAttrClass( $nd -> getAttribute( 'class' ), $valClasses, $valClassesRemove ); 4035 4174 if( strlen( $val ) ) 4036 4175 $nd -> setAttribute( 'class', $val ); … … 4244 4383 if( $aChildren ) 4245 4384 foreach( $aChildren as $child ) 4246 $nd -> appendChild( $child ); 4385 if( $child ) 4386 $nd -> appendChild( $child ); 4247 4387 4248 4388 return( $nd ); … … 4625 4765 $bracketsLevel--; 4626 4766 if( $bracketsLevel == 0 ) 4767 { 4768 $pos++; 4627 4769 break; 4770 } 4628 4771 } 4629 4772 … … 4644 4787 4645 4788 return( $res ); 4646 }4647 4648 static function File_SetDefineVal( $file, $name, $val )4649 {4650 if( !file_exists( $file ) )4651 return( Gen::E_NOT_FOUND );4652 4653 if( !is_writable( $file ) )4654 return( Gen::E_ACCESS_DENIED );4655 4656 $fileContent = file_get_contents( $file );4657 if( !$fileContent )4658 return( Gen::E_ACCESS_DENIED );4659 4660 if( !function_exists( 'token_get_all' ) )4661 {4662 if( !Gen::StrStartsWith( $fileContent, '<?php' ) )4663 return( Gen::S_FALSE );4664 4665 $fileContent = "<?php\ndefine( '" . $name . "', " . var_export( $val, true ) . " );\n" . substr( $fileContent, 5 );4666 }4667 else if( !Php::Content_SetDefineVal( $fileContent, $name, $val ) )4668 return( Gen::S_FALSE );4669 4670 if( !is_integer( file_put_contents( $file, $fileContent, LOCK_EX ) ) )4671 return( Gen::E_FAIL );4672 4673 return( Gen::S_OK );4674 }4675 4676 static function Content_SetDefineVal( &$fileContent, $name, $val )4677 {4678 $tokens = Php::Tokens_GetFromContent( $fileContent );4679 if( $tokens === false )4680 return( false );4681 4682 if( !Php::Tokens_SetDefineVal( $tokens, $name, $val ) )4683 return( false );4684 4685 $fileContent = Php::Tokens_GetContent( $tokens );4686 return( true );4687 }4688 4689 static function Tokens_SetDefineVal( &$tokens, $name, $val )4690 {4691 4692 $firstInsertPos = Php::Tokens_Find( $tokens, T_OPEN_TAG );4693 if( $firstInsertPos === false )4694 {4695 $tokensInsert = array();4696 $tokensInsert[] = array( Php::TI_ID => T_OPEN_TAG, Php::TI_CONTENT => Php::T_OPEN_TAG_CONTENT );4697 $tokensInsert[] = array( Php::TI_ID => T_WHITESPACE, Php::TI_CONTENT => PHP_EOL . PHP_EOL );4698 4699 Php::Tokens_Insert( $tokens, count( $tokens ), $tokensInsert );4700 4701 $firstInsertPos = count( $tokens );4702 }4703 else4704 {4705 $firstInsertPos++;4706 4707 $firstInsertPos = Php::Tokens_Find( $tokens, array( 'e' => array( T_WHITESPACE ) ), null, $firstInsertPos );4708 if( $firstInsertPos === false )4709 $firstInsertPos = count( $tokens );4710 }4711 4712 $defineValPos = false;4713 for( $i = $firstInsertPos; ; )4714 {4715 $i = Php::Tokens_Find( $tokens, T_STRING, 'define', $i );4716 if( $i === false )4717 break;4718 $i++;4719 4720 $callArgs = Php::Tokens_GetCallArgs( $tokens, $i );4721 if( empty( $callArgs ) || count( $callArgs ) != 2 )4722 continue;4723 4724 if( Php::Token_GetEncapsedStrVal( Php::Token_GetContent( Php::Tokens_CallArgs_GetSingleArg( $callArgs, 0 ), T_CONSTANT_ENCAPSED_STRING ) ) != $name )4725 continue;4726 4727 Php::Tokens_CallArgs_GetSingleArg( $callArgs, 1, $defineValPos );4728 break;4729 }4730 4731 $changed = false;4732 4733 if( $defineValPos === false )4734 {4735 $tokensInsert = array();4736 $tokensInsert[] = array( Php::TI_ID => T_STRING, Php::TI_CONTENT => 'define' );4737 $tokensInsert[] = array( Php::TI_ID => T_ELEMENT, Php::TI_CONTENT => '(' );4738 $tokensInsert[] = array( Php::TI_ID => T_CONSTANT_ENCAPSED_STRING, Php::TI_CONTENT => '\'' . $name . '\'' );4739 $tokensInsert[] = array( Php::TI_ID => T_ELEMENT, Php::TI_CONTENT => ',' );4740 $tokensInsert[] = array( Php::TI_ID => T_WHITESPACE, Php::TI_CONTENT => ' ' );4741 4742 {4743 $defineValPos = count( $tokensInsert );4744 $tokensInsert[] = array( Php::TI_ID => T_CONSTANT_ENCAPSED_STRING, Php::TI_CONTENT => '\'\'' );4745 }4746 4747 $tokensInsert[] = array( Php::TI_ID => T_ELEMENT, Php::TI_CONTENT => ')' );4748 $tokensInsert[] = array( Php::TI_ID => T_ELEMENT, Php::TI_CONTENT => ';' );4749 $tokensInsert[] = array( Php::TI_ID => T_WHITESPACE, Php::TI_CONTENT => PHP_EOL . PHP_EOL );4750 4751 Php::Tokens_Insert( $tokens, $firstInsertPos, $tokensInsert );4752 $defineValPos += $firstInsertPos;4753 4754 $changed = true;4755 }4756 4757 {4758 4759 $tokenValNew = null;4760 switch( gettype( $val ) )4761 {4762 case 'string':4763 $token = $tokens[ $defineValPos ];4764 4765 $cQuote = null;4766 if( $token[ Php::TI_ID ] == T_CONSTANT_ENCAPSED_STRING )4767 $cQuote = substr( $token[ Php::TI_CONTENT ], 0, 1 );4768 4769 if( empty( $cQuote ) )4770 $cQuote = '\'';4771 4772 $tokenValNew = array( Php::TI_ID => T_CONSTANT_ENCAPSED_STRING, Php::TI_CONTENT => $cQuote . $val . $cQuote );4773 break;4774 4775 case 'boolean':4776 $tokenValNew = array( Php::TI_ID => T_STRING, Php::TI_CONTENT => $val ? 'true' : 'false' );4777 break;4778 4779 case 'integer':4780 $tokenValNew = array( Php::TI_ID => T_LNUMBER, Php::TI_CONTENT => '' . $val );4781 break;4782 4783 case 'double':4784 $tokenValNew = array( Php::TI_ID => T_DNUMBER, Php::TI_CONTENT => '' . $val );4785 break;4786 4787 default:4788 return( false );4789 break;4790 }4791 4792 if( $tokens[ $defineValPos ] != $tokenValNew )4793 {4794 $tokens[ $defineValPos ] = $tokenValNew;4795 $changed = true;4796 }4797 }4798 4799 return( true );4800 4789 } 4801 4790 } … … 4988 4977 } 4989 4978 4990 static function GetSiteId( $ mode = null)4991 { 4992 if( $ mode === 'OLD')4979 static function GetSiteId( $ver = 2 ) 4980 { 4981 if( $ver === null ) 4993 4982 $siteUrl = Wp::GetSiteWpRootUrl(); 4983 else if( $ver === 1 ) 4984 $siteUrl = Wp::GetSiteRootUrl( '', 'base' ); 4994 4985 else 4995 $siteUrl = Wp::GetSiteRootUrl( '', 'base');4986 $siteUrl = Wp::GetSiteRootUrl(); 4996 4987 4997 4988 $siteUrlParts = @parse_url( $siteUrl ); … … 5091 5082 5092 5083 $obj -> headers_sent = ( array )$headers; 5093 if( isset( $options[ 'user agent' ] ) )5094 $obj -> headers_sent[ 'User-Agent' ] = $options[ 'user agent' ];5084 if( isset( $options[ 'user-agent' ] ) ) 5085 $obj -> headers_sent[ 'User-Agent' ] = $options[ 'user-agent' ]; 5095 5086 }; 5096 5087 … … 6504 6495 return( get_home_path() ); 6505 6496 } 6497 6498 static function _Cfg_Tokens_SetDefineVal( &$tokens, $name, $val ) 6499 { 6500 6501 $firstInsertPos = Php::Tokens_Find( $tokens, T_OPEN_TAG ); 6502 if( $firstInsertPos === false ) 6503 { 6504 $tokensInsert = array(); 6505 $tokensInsert[] = array( Php::TI_ID => T_OPEN_TAG, Php::TI_CONTENT => Php::T_OPEN_TAG_CONTENT ); 6506 $tokensInsert[] = array( Php::TI_ID => T_WHITESPACE, Php::TI_CONTENT => PHP_EOL . PHP_EOL ); 6507 6508 Php::Tokens_Insert( $tokens, count( $tokens ), $tokensInsert ); 6509 6510 $firstInsertPos = count( $tokens ); 6511 6512 unset( $tokensInsert ); 6513 } 6514 else 6515 { 6516 $firstInsertPos++; 6517 6518 $firstInsertPos = Php::Tokens_Find( $tokens, array( 'e' => array( T_WHITESPACE ) ), null, $firstInsertPos ); 6519 if( $firstInsertPos === false ) 6520 $firstInsertPos = count( $tokens ); 6521 } 6522 6523 $definePos = false; 6524 $defineValPos = false; 6525 for( $i = $firstInsertPos; ; ) 6526 { 6527 $i = Php::Tokens_Find( $tokens, T_STRING, 'define', $i ); 6528 if( $i === false ) 6529 break; 6530 6531 $iDefine = $i; 6532 $i++; 6533 6534 $callArgs = Php::Tokens_GetCallArgs( $tokens, $i ); 6535 $iEnd = Php::Tokens_Find( $tokens, T_ELEMENT, ';', $i ); 6536 if( $iEnd === false ) 6537 continue; 6538 6539 $i = $iEnd + 1; 6540 6541 if( empty( $callArgs ) || count( $callArgs ) != 2 ) 6542 continue; 6543 6544 if( Php::Token_GetEncapsedStrVal( Php::Token_GetContent( Php::Tokens_CallArgs_GetSingleArg( $callArgs, 0 ), T_CONSTANT_ENCAPSED_STRING ) ) != $name ) 6545 continue; 6546 6547 if( $defineValPos === false ) 6548 { 6549 $definePos = array( $iDefine, $i - $iDefine ); 6550 Php::Tokens_CallArgs_GetSingleArg( $callArgs, 1, $defineValPos ); 6551 continue; 6552 } 6553 6554 array_splice( $tokens, $iDefine, $i - $iDefine ); 6555 $i = $iDefine; 6556 } 6557 6558 $changed = false; 6559 6560 if( $defineValPos === false ) 6561 { 6562 $tokensInsert = array(); 6563 $tokensInsert[] = array( Php::TI_ID => T_STRING, Php::TI_CONTENT => 'define' ); 6564 $tokensInsert[] = array( Php::TI_ID => T_ELEMENT, Php::TI_CONTENT => '(' ); 6565 $tokensInsert[] = array( Php::TI_ID => T_CONSTANT_ENCAPSED_STRING, Php::TI_CONTENT => '\'' . $name . '\'' ); 6566 $tokensInsert[] = array( Php::TI_ID => T_ELEMENT, Php::TI_CONTENT => ',' ); 6567 $tokensInsert[] = array( Php::TI_ID => T_WHITESPACE, Php::TI_CONTENT => ' ' ); 6568 6569 { 6570 $defineValPos = count( $tokensInsert ); 6571 $tokensInsert[] = array( Php::TI_ID => T_CONSTANT_ENCAPSED_STRING, Php::TI_CONTENT => '\'\'' ); 6572 } 6573 6574 $tokensInsert[] = array( Php::TI_ID => T_ELEMENT, Php::TI_CONTENT => ')' ); 6575 $tokensInsert[] = array( Php::TI_ID => T_ELEMENT, Php::TI_CONTENT => ';' ); 6576 $tokensInsert[] = array( Php::TI_ID => T_WHITESPACE, Php::TI_CONTENT => PHP_EOL . PHP_EOL ); 6577 6578 Php::Tokens_Insert( $tokens, $firstInsertPos, $tokensInsert ); 6579 $definePos = array( $firstInsertPos, count( $tokensInsert ) ); 6580 $defineValPos += $firstInsertPos; 6581 6582 unset( $tokensInsert ); 6583 6584 $changed = true; 6585 } 6586 6587 { 6588 6589 $tokenValNew = null; 6590 switch( gettype( $val ) ) 6591 { 6592 case 'string': 6593 $token = $tokens[ $defineValPos ]; 6594 6595 $cQuote = null; 6596 if( $token[ Php::TI_ID ] == T_CONSTANT_ENCAPSED_STRING ) 6597 $cQuote = substr( $token[ Php::TI_CONTENT ], 0, 1 ); 6598 6599 if( empty( $cQuote ) ) 6600 $cQuote = '\''; 6601 6602 $tokenValNew = array( Php::TI_ID => T_CONSTANT_ENCAPSED_STRING, Php::TI_CONTENT => $cQuote . $val . $cQuote ); 6603 break; 6604 6605 case 'boolean': 6606 $tokenValNew = array( Php::TI_ID => T_STRING, Php::TI_CONTENT => $val ? 'true' : 'false' ); 6607 break; 6608 6609 case 'integer': 6610 $tokenValNew = array( Php::TI_ID => T_LNUMBER, Php::TI_CONTENT => '' . $val ); 6611 break; 6612 6613 case 'double': 6614 $tokenValNew = array( Php::TI_ID => T_DNUMBER, Php::TI_CONTENT => '' . $val ); 6615 break; 6616 6617 default: 6618 return( false ); 6619 break; 6620 } 6621 6622 if( $tokens[ $defineValPos ] != $tokenValNew ) 6623 { 6624 $tokens[ $defineValPos ] = $tokenValNew; 6625 $changed = true; 6626 } 6627 } 6628 6629 $inclPos = false; 6630 for( $i = $firstInsertPos; ; ) 6631 { 6632 $i = Php::Tokens_Find( $tokens, array( 'i' => array( T_REQUIRE, T_REQUIRE_ONCE, T_INCLUDE, T_INCLUDE_ONCE ) ), null, $i ); 6633 if( $i === false ) 6634 break; 6635 6636 $iInclude = $i; 6637 $i++; 6638 6639 $iEnd = Php::Tokens_Find( $tokens, T_ELEMENT, ';', $i ); 6640 if( $iEnd === false ) 6641 continue; 6642 6643 $iArg = Php::Tokens_Find( $tokens, array( 'i' => array( T_CONSTANT_ENCAPSED_STRING ) ), array( '\'wp-settings.php\'' ), $i, $iEnd - $i ); 6644 if( $iEnd === false || $iArg > $iEnd ) 6645 continue; 6646 6647 $inclPos = array( $iInclude, $iEnd - $iInclude ); 6648 break; 6649 } 6650 6651 if( $inclPos !== false && $inclPos[ 0 ] < $definePos[ 0 ] ) 6652 { 6653 $tokensInsert = array_splice( $tokens, $definePos[ 0 ], $definePos[ 1 ] ); 6654 $tokensInsert[] = array( Php::TI_ID => T_WHITESPACE, Php::TI_CONTENT => PHP_EOL . PHP_EOL ); 6655 Php::Tokens_Insert( $tokens, $firstInsertPos, $tokensInsert ); 6656 unset( $tokensInsert ); 6657 } 6658 6659 return( true ); 6660 } 6661 6662 static function _Cfg_SetDefineValEx( &$fileContent, $name, $val ) 6663 { 6664 $tokens = Php::Tokens_GetFromContent( $fileContent ); 6665 if( $tokens === false ) 6666 { 6667 6668 if( !Gen::StrStartsWith( $fileContent, '<?php' ) ) 6669 return( false ); 6670 6671 $fileContent = "<?php\ndefine( '" . $name . "', " . var_export( $val, true ) . " );\n" . substr( $fileContent, 5 ); 6672 return( true ); 6673 } 6674 6675 if( !self::_Cfg_Tokens_SetDefineVal( $tokens, $name, $val ) ) 6676 return( false ); 6677 6678 $fileContent = Php::Tokens_GetContent( $tokens ); 6679 return( true ); 6680 } 6681 6682 static function Cfg_SetDefineValEx( $file, $name, $val ) 6683 { 6684 if( !file_exists( $file ) ) 6685 return( Gen::E_NOT_FOUND ); 6686 6687 if( !is_writable( $file ) ) 6688 return( Gen::E_ACCESS_DENIED ); 6689 6690 $fileContent = file_get_contents( $file ); 6691 if( !$fileContent ) 6692 return( Gen::E_ACCESS_DENIED ); 6693 6694 if( !self::_Cfg_SetDefineValEx( $fileContent, $name, $val ) ) 6695 return( Gen::S_FALSE ); 6696 6697 if( !is_integer( file_put_contents( $file, $fileContent, LOCK_EX ) ) ) 6698 return( Gen::E_FAIL ); 6699 6700 return( Gen::S_OK ); 6701 } 6506 6702 } 6507 6703 -
seraphinite-post-docx-source/trunk/Cmn/Img.php
r3238125 r3461042 34 34 { 35 35 36 $data = @file_get_contents( $file );36 $data = Gen::FileGetContents( $file ); 37 37 return( $data !== false ? Img::GetInfoFromData( $data, $ext ) : null ); 38 38 } … … 301 301 302 302 $res = Gen::CallFunc( $fn, $args ); 303 303 304 if( !$fileIsTmp ) 304 305 { … … 329 330 if( $hr == Gen::S_OK ) 330 331 { 331 $res = @file_get_contents( $file );332 $res = Gen::FileGetContents( $file ); 332 333 if( $res === false ) 333 334 { … … 428 429 } 429 430 430 static function CreateCopyResample( $h, $sizeDst, $rcSrc = null, $rcDst = null, $bgClr = null ) 431 static function CreateCopyScale( $h, $cx, $cy, $mode = IMG_BILINEAR_FIXED ) 432 { 433 if( !$h || !$cx || !$cy ) 434 return( null ); 435 436 $hNew = @imagescale( $h, $cx, $cy, $mode ); 437 if( $hNew === false && $mode != IMG_BILINEAR_FIXED ) 438 $hNew = @imagescale( $h, $cx, $cy, IMG_BILINEAR_FIXED ); 439 if( $hNew === false ) 440 return( null ); 441 442 return( $hNew ); 443 } 444 445 static function CreateCopyResample( $h, $sizeDst, $rcSrc = null, $rcDst = null, $bgClr = null, $mode = IMG_BILINEAR_FIXED ) 431 446 { 432 447 if( !$sizeDst[ 'cx' ] || !$sizeDst[ 'cy' ] ) … … 440 455 $rcDst = array( 'x' => 0, 'y' => 0, 'cx' => $sizeDst[ 'cx' ], 'cy' => $sizeDst[ 'cy' ] ); 441 456 457 if( function_exists( 'imagesetinterpolation' ) ) 458 @imagesetinterpolation( $hNew, $mode ); 442 459 @imagesavealpha( $hNew, true ); 443 460 … … 724 741 else if( $fileIsTmp ) 725 742 { 726 $res = @file_get_contents( $file );743 $res = Gen::FileGetContents( $file ); 727 744 if( $res === false ) 728 745 { … … 841 858 else if( $fileIsTmp ) 842 859 { 843 $res = @file_get_contents( $file );860 $res = Gen::FileGetContents( $file ); 844 861 if( $res === false ) 845 862 { -
seraphinite-post-docx-source/trunk/Cmn/Plugin.php
r3238125 r3461042 11 11 12 12 static private $_cache = null; 13 static private $_blogId = null; 13 14 14 15 static function Get( $ver, $name, $cbNs = '', $rawExtData = null ) 15 16 { 16 $data = Gen::GetArrField( self::$_cache, array( PluginOptions::GetMultiSitePrefix(), $name ) ); 17 $aKey = array( PluginOptions::GetMultiSitePrefix(), $name ); 18 19 $data = Gen::GetArrField( self::$_cache, $aKey ); 17 20 if( $data ) 18 21 return( $data ); … … 68 71 } 69 72 70 self::$_cache[ $name ] = $data;73 Gen::SetArrField( self::$_cache, $aKey, $data ); 71 74 return( $data ); 72 75 } … … 119 122 static function GetMultiSitePrefix() 120 123 { 121 if( is_multisite() ) 122 return( Plugin::IsInited() ? get_current_blog_id() : 0 ); 123 return( '' ); 124 return( is_multisite() ? PluginOptions::GetBlogId() : '' ); 125 } 126 127 static function SetBlogId( $id ) 128 { 129 $idPrev = self::$_blogId; 130 self::$_blogId = $id; 131 return( $idPrev ); 132 } 133 134 static function GetBlogId() 135 { 136 if( self::$_blogId !== null ) 137 return( self::$_blogId ); 138 return( Plugin::IsInited() ? get_current_blog_id() : Gen::Constant( 'BLOG_ID_CURRENT_SITE', 0 ) ); 124 139 } 125 140 } … … 292 307 $args[ 'id' ] = 'wordpress-post-docx-source'; 293 308 $args[ 'name' ] = 'Post%20.DOCX%20Source'; 294 $args[ 'v' ] = '2.16.1 4';309 $args[ 'v' ] = '2.16.15'; 295 310 $args[ 'pk' ] = 'Base'; 296 311 $args[ 'cfg' ] = ''; … … 314 329 $lastCheckPackage = 'Base'; 315 330 316 if( $lastCheckVer !== '2.16.1 4' || $lastCheckPackage !== 'Base' )331 if( $lastCheckVer !== '2.16.15' || $lastCheckPackage !== 'Base' ) 317 332 { 318 333 $state = Plugin::StateGet(); 319 334 320 if( $lastCheckVer !== '2.16.1 4' && !isset( $state[ 'changeVerCheck' ] ) )335 if( $lastCheckVer !== '2.16.15' && !isset( $state[ 'changeVerCheck' ] ) ) 321 336 { 322 337 $state[ 'changeVerCheck' ] = $lastCheckVer !== null ? $lastCheckVer : ''; … … 335 350 if( !$bForce ) 336 351 { 337 if( $bFirstTimeOnly && $lastCheckVer == '2.16.1 4' )352 if( $bFirstTimeOnly && $lastCheckVer == '2.16.15' ) 338 353 return( Gen::S_FALSE ); 339 354 … … 354 369 $args[ 'id' ] = 'wordpress-post-docx-source'; 355 370 $args[ 'name' ] = 'Post%20.DOCX%20Source'; 356 $args[ 'v' ] = '2.16.1 4';371 $args[ 'v' ] = '2.16.15'; 357 372 $args[ 'pk' ] = 'Base'; 358 373 $args[ 'cfg' ] = ''; … … 371 386 { 372 387 $data[ 'updTime' ] = $curUpdTime; 373 $data[ 'plgVer' ] = '2.16.1 4';388 $data[ 'plgVer' ] = '2.16.15'; 374 389 $data[ 'plgPk' ] = 'Base'; 375 390 … … 388 403 $data[ 'mdfTime' ] = $timeMdf; 389 404 $data[ 'updTime' ] = $curUpdTime; 390 $data[ 'plgVer' ] = '2.16.1 4';405 $data[ 'plgVer' ] = '2.16.15'; 391 406 $data[ 'plgPk' ] = 'Base'; 392 407 … … 420 435 return( 0 ); 421 436 422 return( @strtotime( wp_remote_retrieve_header( $requestRes, 'last-modified' ) ) );437 return( @strtotime( Net::GetHeaderFromWpRemoteRequestRes( $requestRes, 'last-modified' ) ) ); 423 438 } 424 439 … … 637 652 } 638 653 654 Gen::SetTempDirFunc( 'seraph_pds\\Wp::GetTempDir' ); 655 639 656 Gen::CallFunc( 'seraph_pds\\OnInit', array( $isAdminMode ) ); 640 657 … … 927 944 928 945 $urlProductInfo = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlProductInfo' ); 929 $urlAboutPluginImg = file_exists( __DIR__ . '/../Images/ProductLogo.png' ) ? add_query_arg( array( 'v' => '2.16.1 4' ), Plugin::FileUri( '../Images/ProductLogo.png', __FILE__ ) ) : null;946 $urlAboutPluginImg = file_exists( __DIR__ . '/../Images/ProductLogo.png' ) ? add_query_arg( array( 'v' => '2.16.15' ), Plugin::FileUri( '../Images/ProductLogo.png', __FILE__ ) ) : null; 930 947 $urlAboutPluginDocs = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlProductDocs' ); 931 948 $urlAboutPluginSupport = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlProductSupport' ); 932 $url3rdPartySoft = file_exists( __DIR__ . '/../third-party-software.html' ) ? add_query_arg( array( 'v' => '2.16.1 4' ), Plugin::FileUri( '../third-party-software.html', __FILE__ ) ) : null;949 $url3rdPartySoft = file_exists( __DIR__ . '/../third-party-software.html' ) ? add_query_arg( array( 'v' => '2.16.15' ), Plugin::FileUri( '../third-party-software.html', __FILE__ ) ) : null; 933 950 934 951 $urlEula = null; … … 939 956 940 957 { 941 $version = esc_html( '2.16.1 4' );958 $version = esc_html( '2.16.15' ); 942 959 943 960 $res .= Ui::TagOpen( 'div' ); … … 988 1005 $rmtCfg = PluginRmtCfg::Get(); 989 1006 990 $urlAboutUsLogoImg = file_exists( __DIR__ . '/../Images/VendorLogo.png' ) ? add_query_arg( array( 'v' => '2.16.1 4' ), Plugin::FileUri( '../Images/VendorLogo.png', __FILE__ ) ) : null;1007 $urlAboutUsLogoImg = file_exists( __DIR__ . '/../Images/VendorLogo.png' ) ? add_query_arg( array( 'v' => '2.16.15' ), Plugin::FileUri( '../Images/VendorLogo.png', __FILE__ ) ) : null; 991 1008 $urlMorePlugins = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlMorePlugins' ); 992 1009 $urlMoreInfo = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlMain' ); … … 1139 1156 } 1140 1157 1141 static function SettGet( $settRawExt = null ) 1142 { 1158 static function SettGet( $settRawExt = null, $clearCache = false ) 1159 { 1160 if( $clearCache ) 1161 Plugin::SettCacheClear(); 1143 1162 return( PluginOptions::Get( PLUGIN_SETT_VER, 'Sett', 'seraph_pds\\', $settRawExt ) ); 1144 1163 } 1145 1164 1146 static function SettGetGlobal( $settRawExt = null )1165 static function SettGetGlobal( $settRawExt = null, $clearCache = false ) 1147 1166 { 1148 1167 if( !is_multisite() ) 1149 return( Plugin::SettGet( $settRawExt ) );1168 return( Plugin::SettGet( $settRawExt, $clearCache ) ); 1150 1169 1151 1170 $restoreBlog = false; … … 1156 1175 } 1157 1176 1158 $sett = Plugin::SettGet( $settRawExt );1177 $sett = Plugin::SettGet( $settRawExt, $clearCache ); 1159 1178 1160 1179 if( $restoreBlog ) … … 1515 1534 1516 1535 $verFrom = self::_PrevVer_GetInt( $plgVerPrev ); 1517 $verTo = self::_PrevVer_GetInt( '2.16.1 4' );1536 $verTo = self::_PrevVer_GetInt( '2.16.15' ); 1518 1537 if( $verTo < $verFrom ) 1519 1538 list( $verTo, $verFrom ) = array( $verFrom, $verTo ); … … 1640 1659 continue; 1641 1660 1642 wp_enqueue_style( Plugin::CmnScriptId( $id ), add_query_arg( Plugin::GetFileUrlPackageParams(), $fileUrl . '/' . $id . '.css' ), array(), '2.16.1 4' );1661 wp_enqueue_style( Plugin::CmnScriptId( $id ), add_query_arg( Plugin::GetFileUrlPackageParams(), $fileUrl . '/' . $id . '.css' ), array(), '2.16.15' ); 1643 1662 1644 1663 self::$g_aAlreadyIncludedObj[ 'css' ][ $id ] = true; … … 1707 1726 $scrHndId = Plugin::CmnScriptId( $id ); 1708 1727 1709 wp_register_script( $scrHndId, add_query_arg( Plugin::GetFileUrlPackageParams(), $fileUrl . '/' . $id . '.js' ), $deps, '2.16.1 4' );1728 wp_register_script( $scrHndId, add_query_arg( Plugin::GetFileUrlPackageParams(), $fileUrl . '/' . $id . '.js' ), $deps, '2.16.15' ); 1710 1729 if( $id == 'Gen' ) 1711 1730 Plugin::Loc_ScriptLoad( $scrHndId ); … … 2152 2171 var sendDataUrl = "<?php echo( Gen::GetArrField( $rmtCfg, 'Questionnaires.SendAnswerUrlTpl' ) ); ?>"; 2153 2172 sendDataUrl = sendDataUrl.replace( "{EndPointId}", encodeURI( "<?php echo( Wp::GetSiteId() ); ?>" ) ); 2154 sendDataUrl = sendDataUrl.replace( "{PluginVersion}", encodeURI( "2.16.1 4" ) );2173 sendDataUrl = sendDataUrl.replace( "{PluginVersion}", encodeURI( "2.16.15" ) ); 2155 2174 sendDataUrl = sendDataUrl.replace( "{PluginMode}", encodeURI( "base" ) ); 2156 2175 sendDataUrl = sendDataUrl.replace( "{PluginPackage}", encodeURI( "Base" ) ); … … 2184 2203 { 2185 2204 2186 Gen::CallFunc( 'seraph_pds\\OnActivate' );2205 Gen::CallFunc( 'seraph_pds\\OnActivate', array( Gen::Constant( 'WP_NETWORK_ADMIN' ) ) ); 2187 2206 } 2188 2207 … … 2190 2209 { 2191 2210 2192 Gen::CallFunc( 'seraph_pds\\OnDeactivate' );2211 Gen::CallFunc( 'seraph_pds\\OnDeactivate', array( Gen::Constant( 'WP_NETWORK_ADMIN' ) ) ); 2193 2212 } 2194 2213 -
seraphinite-post-docx-source/trunk/Cmn/Ui.php
r3238125 r3461042 375 375 } 376 376 377 static function DeParseClassAttr( $v ) 378 { 379 return( implode( ' ', $v ) ); 380 } 381 382 static function AddRemoveAttrClassEx( $val, $valClasses, $valClassesRemove = '' ) 383 { 384 if( !is_array( $valClasses ) ) 385 $valClasses = $valClasses !== '' ? explode( ' ', @trim( $valClasses ) ) : array(); 386 387 if( !is_array( $valClassesRemove ) ) 388 $valClassesRemove = $valClassesRemove !== '' ? explode( ' ', @trim( $valClassesRemove ) ) : array(); 389 390 foreach( $valClasses as $valClass ) 391 if( strlen( ( string )$valClass ) && !in_array( $valClass, $val ) ) 392 $val[] = $valClass; 393 394 foreach( $valClassesRemove as $valClassRemove ) 395 while( ( $i = array_search( $valClassRemove, $val ) ) !== false ) 396 unset( $val[ $i ] ); 397 398 return( $val ); 399 } 400 401 static function AddRemoveAttrClass( $val, $valClasses, $valClassesRemove = '' ) 402 { 403 $val = Ui::ParseClassAttr( $val ); 404 $val = Ui::AddRemoveAttrClassEx( $val, $valClasses, $valClassesRemove ); 405 $val = Ui::DeParseClassAttr( $val ); 406 return( $val ); 407 } 408 377 409 static function IsSrcAttrData( $v ) 378 410 { … … 410 442 411 443 $res = array(); 412 $lastSrcData = null; 413 414 foreach( explode( ',', $v ) as $args ) 415 { 416 $args = array_map( 'trim', explode( ' ', Gen::StrReplaceWhileChanging( ' ', ' ', str_replace( array( "\t", "\r", "\n", "\0", "\x0B" ), ' ', trim( $args ) ) ) ) ); 417 418 if( Ui::IsSrcAttrData( $args[ 0 ] ) ) 419 { 420 $lastSrcData = $args[ 0 ]; 421 continue; 422 } 423 424 if( $lastSrcData ) 425 { 426 $args[ 0 ] = $lastSrcData . ',' . $args[ 0 ]; 427 $lastSrcData = null; 428 } 429 430 $res[] = $args; 431 } 444 while( preg_match( '@(?:\\s[\\d.]+[wx](,)|(,\\s))@S', $v, $m, PREG_OFFSET_CAPTURE ) ) 445 { 446 if( $m[ 1 ][ 1 ] === -1 ) 447 $m[ 1 ] = $m[ 2 ]; 448 $res[] = substr( $v, 0, $m[ 1 ][ 1 ] ); 449 $v = substr( $v, $m[ 1 ][ 1 ] + strlen( $m[ 1 ][ 0 ] ) ); 450 } 451 $res[] = $v; 452 453 $res = array_map( 454 function( $resI ) 455 { 456 return( array_map( 'trim', explode( ' ', Gen::StrReplaceWhileChanging( ' ', ' ', str_replace( array( "\t", "\r", "\n", "\0", "\x0B" ), ' ', trim( $resI ) ) ) ) ) ); 457 } 458 , $res ); 432 459 433 460 return( $res ); … … 746 773 } 747 774 748 static function TokensList_GetVal( $value, callable$cbItem = null, $unmask = false )775 static function TokensList_GetVal( $value, $cbItem = null, $unmask = false ) 749 776 { 750 777 $value = @stripslashes( $value ); … … 990 1017 } 991 1018 992 static function PostBoxes( $title, $metaBoxes = array( 'body' => null ), array$callbacks = null, $callbacks_args = null, $blocksAttrs = null )1019 static function PostBoxes( $title, $metaBoxes = array( 'body' => null ), $callbacks = null, $callbacks_args = null, $blocksAttrs = null ) 993 1020 { 994 1021 wp_enqueue_script( 'postbox' ); … … 1370 1397 } 1371 1398 1399 static function StyleMediaMinMax( $min, $max ) 1400 { 1401 $res = ''; 1402 1403 if( $min ) 1404 $res .= '(min-width: ' . ( string )$min . 'px)'; 1405 1406 if( $min && $max ) 1407 $res .= ' and '; 1408 1409 if( $max ) 1410 $res .= '(max-width: ' . ( string )$max . 'px)'; 1411 1412 return( $res ); 1413 } 1414 1372 1415 static function TagGetPos( $tag, $data, $offset = 0 ) 1373 1416 { … … 1391 1434 $pos = $pos[ 0 ][ 1 ]; 1392 1435 1393 if( $bSkipComments && substr( $data, $pos + 1, 1 ) == '!' )1436 if( $bSkipComments && substr( $data, $pos + 1, 2 ) == '!-' ) 1394 1437 { 1395 1438 $offset = strpos( $data, '-->', $pos + 4 ); … … 1451 1494 $posEnd = $pos + $n; 1452 1495 return( array( $pos, $posEnd, $n ) ); 1496 } 1497 1498 static function TagOffsetPos( &$tagPos, $offset = 0 ) 1499 { 1500 if( $tagPos ) 1501 { 1502 $tagPos[ 0 ] += $offset; 1503 $tagPos[ 1 ] += $offset; 1504 } 1453 1505 } 1454 1506 -
seraphinite-post-docx-source/trunk/common.php
r3121524 r3461042 73 73 function _dublHdr( $requestRes, $tag ) 74 74 { 75 $tagVal = wp_remote_retrieve_header( $requestRes, $tag );75 $tagVal = Net::GetHeaderFromWpRemoteRequestRes( $requestRes, $tag ); 76 76 if( !empty( $tagVal ) ) 77 77 header( $tag . ': ' . $tagVal ); -
seraphinite-post-docx-source/trunk/languages/seraphinite-post-docx-source-admin.pot
r3238125 r3461042 7 7 msgid "" 8 8 msgstr "" 9 "#-#-#-#-# cmn.admin.pot (seraphinite-post-docx-source 2.16.1 4) #-#-#-#-#\n"10 "Project-Id-Version: seraphinite-post-docx-source 2.16.1 4\n"9 "#-#-#-#-# cmn.admin.pot (seraphinite-post-docx-source 2.16.15) #-#-#-#-#\n" 10 "Project-Id-Version: seraphinite-post-docx-source 2.16.15\n" 11 11 "Report-Msgid-Bugs-To: support@s-sols.com\n" 12 12 "MIME-Version: 1.0\n" 13 13 "Content-Type: text/plain; charset=UTF-8\n" 14 14 "Content-Transfer-Encoding: 8bit\n" 15 "#-#-#-#-# main.admin.pot (seraphinite-post-docx-source 2.16.1 4) #-#-#-#-#\n"16 "Project-Id-Version: seraphinite-post-docx-source 2.16.1 4\n"15 "#-#-#-#-# main.admin.pot (seraphinite-post-docx-source 2.16.15) #-#-#-#-#\n" 16 "Project-Id-Version: seraphinite-post-docx-source 2.16.15\n" 17 17 "Report-Msgid-Bugs-To: support@s-sols.com\n" 18 18 "MIME-Version: 1.0\n" -
seraphinite-post-docx-source/trunk/languages/seraphinite-post-docx-source.pot
r3238125 r3461042 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: seraphinite-post-docx-source 2.16.1 4\n"9 "Project-Id-Version: seraphinite-post-docx-source 2.16.15\n" 10 10 "Report-Msgid-Bugs-To: support@s-sols.com\n" 11 11 "MIME-Version: 1.0\n" -
seraphinite-post-docx-source/trunk/main.php
r3238125 r3461042 20 20 { 21 21 if( $formulasStylesLoadMode == 'Static' ) 22 wp_enqueue_style( 'seraph-pds-MathJax-CHtml', Plugin::FileUrl( 'Ext/MathJax/CHtml.css', __FILE__ ), array(), '2.16.1 4' );23 wp_enqueue_script( Plugin::ScriptId( 'View' ), add_query_arg( Plugin::GetFileUrlPackageParams(), Plugin::FileUrl( 'View.js', __FILE__ ) ), array(), '2.16.1 4' );22 wp_enqueue_style( 'seraph-pds-MathJax-CHtml', Plugin::FileUrl( 'Ext/MathJax/CHtml.css', __FILE__ ), array(), '2.16.15' ); 23 wp_enqueue_script( Plugin::ScriptId( 'View' ), add_query_arg( Plugin::GetFileUrlPackageParams(), Plugin::FileUrl( 'View.js', __FILE__ ) ), array(), '2.16.15' ); 24 24 } 25 25 } 26 26 ); 27 27 28 function OnActivate( )29 { 30 } 31 32 function OnDeactivate( )28 function OnActivate( $bAllMultisites ) 29 { 30 } 31 32 function OnDeactivate( $bAllMultisites ) 33 33 { 34 34 } … … 39 39 add_options_page( Plugin::GetSettingsTitle(), Plugin::GetNavMenuTitle(), 'manage_options', 'seraph_pds_settings', $accepted ? 'seraph_pds\\_SettingsPage' : 'seraph_pds\\Plugin::OutputNotAcceptedPageContent' ); 40 40 if( _UserCanUsePlugin() ) 41 add_menu_page( Plugin::GetPluginString( 'TitleLong' ), Plugin::GetNavMenuTitle(), 'publish_posts', 'seraph_pds_main', $accepted ? 'seraph_pds\\_UploadPage' : 'seraph_pds\\Plugin::OutputNotAcceptedPageContent', Plugin::FileUri( 'icon.png?v=2.16.1 4', __FILE__ ) );41 add_menu_page( Plugin::GetPluginString( 'TitleLong' ), Plugin::GetNavMenuTitle(), 'publish_posts', 'seraph_pds_main', $accepted ? 'seraph_pds\\_UploadPage' : 'seraph_pds\\Plugin::OutputNotAcceptedPageContent', Plugin::FileUri( 'icon.png?v=2.16.15', __FILE__ ) ); 42 42 } 43 43 … … 347 347 _LoadScripts(); 348 348 349 if( _IsGutenbergActive() ) 350 { 351 wp_enqueue_script( 'wp-block-library' ); 352 Wp::AddInlineScript( 'wp-block-library', 'jQuery( document ).on( "ready", function(){ wp.blockLibrary.registerCoreBlocks(); } )' ); 353 } 354 349 355 Plugin::DisplayAdminFooterRateItContent(); 350 356 … … 405 411 return; 406 412 407 wp_register_script( Plugin::ScriptId( 'editor' ), add_query_arg( Plugin::GetFileUrlPackageParams(), Plugin::FileUrl( 'editor.js', __FILE__ ) ), array_merge( array( 'jquery' ), Plugin::CmnScriptId( array( 'Cmn', 'Gen', 'Ui', 'Net' ) ) ), '2.16.1 4' );413 wp_register_script( Plugin::ScriptId( 'editor' ), add_query_arg( Plugin::GetFileUrlPackageParams(), Plugin::FileUrl( 'editor.js', __FILE__ ) ), array_merge( array( 'jquery' ), Plugin::CmnScriptId( array( 'Cmn', 'Gen', 'Ui', 'Net' ) ) ), '2.16.15' ); 408 414 Plugin::Loc_ScriptLoad( Plugin::ScriptId( 'editor' ) ); 409 415 wp_enqueue_script( Plugin::ScriptId( 'editor' ) ); -
seraphinite-post-docx-source/trunk/options.php
r3207098 r3461042 560 560 echo( \seraph_pds\Ui::SettBlock_ItemSubTbl_Begin() ); 561 561 { 562 $fldId = 'docTypes/' . $postType . '/notexistLinksAction'; $radioGroupName = 'seraph_pds/' . $fldId; $fldVal = \seraph_pds\Gen::GetArrField( $sett, $fldId, ' CheckOnly', '/' );562 $fldId = 'docTypes/' . $postType . '/notexistLinksAction'; $radioGroupName = 'seraph_pds/' . $fldId; $fldVal = \seraph_pds\Gen::GetArrField( $sett, $fldId, 'No', '/' ); 563 563 564 564 ?> -
seraphinite-post-docx-source/trunk/readme.txt
r3238125 r3461042 5 5 Requires PHP: 5.4 6 6 Requires at least: 4.5 7 Stable tag: 2.16.1 48 Version: 2.16.1 47 Stable tag: 2.16.15 8 Version: 2.16.15 9 9 Tested up to: 6.7 10 10 License: GPLv2 or later (if another license is not provided) … … 107 107 == Changelog == 108 108 109 = 2.16.15 = 110 111 Improvements: 112 113 * Plugin only one instance launch protection. 114 * Preventing license checking from wrong site ID. 115 116 Fixes: 117 118 * Activation on 'mystagingwebsite.com' with wrong site address. 119 * Asynchronous tasks execution: timestamp is wrong on some servers. 120 * Deprecation warning in 'TokensList_GetVal' of 'cbItem' parameter. 121 * Setting 'define' values in 'wp-config.php' doesnt matter if they are located after including of 'wp-settings.php'. 122 * When 'Use blocks (Gutenberg) formatting' is enabled, there is no content after adding via batch mode. 123 109 124 = 2.16.14 = 110 125 -
seraphinite-post-docx-source/trunk/seraphinite-post-docx-source.php
r3238125 r3461042 6 6 Text Domain: seraphinite-post-docx-source 7 7 Domain Path: /languages 8 Version: 2.16.1 48 Version: 2.16.15 9 9 Author: Seraphinite Solutions 10 10 Author URI: https://www.s-sols.com … … 16 16 17 17 18 if( defined( 'SERAPH_PDS_VER' ) ) 19 return; 18 // ####################################################################### 20 19 21 define( 'SERAPH_PDS_VER', '2.16.14' ); 20 if( !defined( 'SERAPH_PDS_PLUGIN_DIR' ) ) define( 'SERAPH_PDS_PLUGIN_DIR', __DIR__ ); else if( SERAPH_PDS_PLUGIN_DIR != __DIR__ ) return; 21 22 // ####################################################################### 22 23 23 24 include( __DIR__ . '/main.php' );
Note: See TracChangeset
for help on using the changeset viewer.