Plugin Directory

Changeset 3489455


Ignore:
Timestamp:
03/23/2026 10:11:02 PM (9 days ago)
Author:
seraphinitesoft
Message:

seraphinite-accelerator: 2.28.18.

Location:
seraphinite-accelerator
Files:
144 added
16 edited

Legend:

Unmodified
Added
Removed
  • seraphinite-accelerator/trunk/Cmn/Gen.php

    r3486643 r3489455  
    38933893            $args[ 'provider' ] = 'CURL';
    38943894        if( !isset( $args[ 'user-agent' ] ) )
    3895             $args[ 'user-agent' ] = 'seraph-accel-Agent/2.28.17';
     3895            $args[ 'user-agent' ] = 'seraph-accel-Agent/2.28.18';
    38963896        if( !isset( $args[ 'timeout' ] ) )
    38973897            $args[ 'timeout' ] = 5;
     
    55425542        if( is_array( $id ) )
    55435543        {
    5544             $ctx = $id[ 1 ];
     5544            $ctx = ($id[ 1 ]??null);
    55455545            $id = $id[ 0 ];
    5546         }
     5546            if( !is_array( $id ) )
     5547                $id = array( $id, $id );
     5548        }
     5549        else
     5550            $id = array( $id, $id );
    55475551
    55485552        if( $number !== null )
    5549             return( $ctx ? _nx( $id, $id, $number, $ctx, $domain ) : _n( $id, $id, $number, $domain ) );
    5550         return( $ctx ? _x( $id, $ctx, $domain ) : __( $id, $domain ) );
     5553            return( $ctx ? _nx( $id[ 0 ], $id[ 1 ], $number, $ctx, $domain ) : _n( $id[ 0 ], $id[ 1 ], $number, $domain ) );
     5554        return( $ctx ? _x( $id[ 0 ], $ctx, $domain ) : __( $id[ 0 ], $domain ) );
    55515555    }
    55525556
     
    70617065        return( Gen::S_OK );
    70627066    }
     7067
     7068    static function HumanTimeDiff( $from = 0, $to = 0, $signed = false )
     7069    {
     7070        if( !$from )
     7071            $from = time();
     7072
     7073        $diff = ( int )( $to - $from );
     7074        if( $diff < 0 )
     7075            $diff = -1 * $diff;
     7076        else
     7077            $signed = false;
     7078
     7079        $since = '';
     7080
     7081        $secs = ( int )( ( $diff % MINUTE_IN_SECONDS ) / 1 );
     7082        {
     7083            if( $signed )
     7084                $secs *= -1;
     7085            $since = sprintf( Wp::GetLocString( array( array( '%s second', '%s seconds' ), null ), $secs ), $secs );
     7086        }
     7087
     7088        $mins = ( int )( ( $diff % HOUR_IN_SECONDS ) / MINUTE_IN_SECONDS );
     7089        if( $mins )
     7090        {
     7091            if( $signed )
     7092                $mins *= -1;
     7093            $since = sprintf( Wp::GetLocString( array( 'HumanTimeDiffDigitbefore_%1$s%2$s', 'admin.Common' ), null, 'seraphinite-accelerator' ), sprintf( Wp::GetLocString( array( array( '%s minute', '%s minutes' ) ), $mins ), $mins ), $since );
     7094        }
     7095
     7096        $hours = ( int )( ( $diff % DAY_IN_SECONDS ) / HOUR_IN_SECONDS );
     7097        if( $hours )
     7098        {
     7099            if( $signed )
     7100                $hours *= -1;
     7101            $since = sprintf( Wp::GetLocString( array( array( '%s hour', '%s hours' ) ), $hours ), $hours ) . ' ' . $since;
     7102        }
     7103
     7104        $days = ( int )( $diff / DAY_IN_SECONDS );
     7105        if( $days )
     7106        {
     7107            if( $signed )
     7108                $days *= -1;
     7109            $since = sprintf( Wp::GetLocString( array( array( '%s day', '%s days' ) ), $days ), $days ) . ' ' . $since;
     7110        }
     7111
     7112        return( $since );
     7113    }
    70637114}
    70647115
  • seraphinite-accelerator/trunk/Cmn/Plugin.php

    r3486643 r3489455  
    317317            $args[ 'id' ] = 'wordpress-accelerator';
    318318            $args[ 'name' ] = 'Accelerator';
    319             $args[ 'v' ] = '2.28.17';
     319            $args[ 'v' ] = '2.28.18';
    320320            $args[ 'pk' ] = 'Base';
    321321            $args[ 'cfg' ] = '';
     
    339339            $lastCheckPackage = 'Base';
    340340
    341         if( $lastCheckVer !== '2.28.17' || $lastCheckPackage !== 'Base' )
     341        if( $lastCheckVer !== '2.28.18' || $lastCheckPackage !== 'Base' )
    342342        {
    343343            $state = Plugin::StateGet();
    344344
    345             if( $lastCheckVer !== '2.28.17' && !isset( $state[ 'changeVerCheck' ] ) )
     345            if( $lastCheckVer !== '2.28.18' && !isset( $state[ 'changeVerCheck' ] ) )
    346346            {
    347347                $state[ 'changeVerCheck' ] = $lastCheckVer !== null ? $lastCheckVer : '';
     
    360360        if( !$bForce )
    361361        {
    362             if( $bFirstTimeOnly && $lastCheckVer == '2.28.17' )
     362            if( $bFirstTimeOnly && $lastCheckVer == '2.28.18' )
    363363                return( Gen::S_FALSE );
    364364
     
    366366            if( $lastUpdTime && ( $curUpdTime - $lastUpdTime ) <= 3600 )
    367367                return( Gen::S_FALSE );
    368 
    369             if( self::$_sessTouched )
    370                 return( Gen::S_FALSE );
    371         }
     368        }
     369
     370        if( self::$_sessTouched )
     371            return( Gen::S_FALSE );
    372372
    373373        self::$_sessTouched = true;
     
    379379            $args[ 'id' ] = 'wordpress-accelerator';
    380380            $args[ 'name' ] = 'Accelerator';
    381             $args[ 'v' ] = '2.28.17';
     381            $args[ 'v' ] = '2.28.18';
    382382            $args[ 'pk' ] = 'Base';
    383383            $args[ 'cfg' ] = '';
     
    396396            {
    397397                $data[ 'updTime' ] = $curUpdTime;
    398                 $data[ 'plgVer' ] = '2.28.17';
     398                $data[ 'plgVer' ] = '2.28.18';
    399399                $data[ 'plgPk' ] = 'Base';
    400400
     
    407407        }
    408408
    409         $requestRes = Wp::RemoteGet( $urlRemoteCfg, array( 'timeout' => $bForce ? 30 : 5, 'redirection' => 5 ) );
     409        $requestRes = Wp::RemoteGet( $urlRemoteCfg, array( 'timeout' => $bForce ? ( is_int( $bForce ) ? $bForce : 30 ) : 5, 'redirection' => 5 ) );
    410410
    411411        $timeMdf = self::_Update_GetMdfTime( $requestRes );
     
    413413        $data[ 'mdfTime' ] = $timeMdf;
    414414        $data[ 'updTime' ] = $curUpdTime;
    415         $data[ 'plgVer' ] = '2.28.17';
     415        $data[ 'plgVer' ] = '2.28.18';
    416416        $data[ 'plgPk' ] = 'Base';
    417417
     
    431431    }
    432432
    433     static function Get()
    434     {
    435 
    436         PluginRmtCfg::Update();
     433    static function Get( $bForce = false )
     434    {
     435
     436        PluginRmtCfg::Update( $bForce );
    437437        $data = PluginOptions::Get( self::STG_VER, self::STG_ID, __CLASS__ . '::' );
    438438        return( $data[ 'data' ] );
     
    14481448        esc_html_x( 'Start', 'admin.Common', 'seraphinite-accelerator' );
    14491449
     1450        esc_html_x( 'HumanTimeDiffDigitbefore_%1$s%2$s', 'admin.Common', 'seraphinite-accelerator' );
     1451
    14501452        esc_html_x( 'FuncBlocked_%1$s', 'admin.Common_Msg', 'seraphinite-accelerator' );
    14511453        esc_html_x( 'ExecErr_%1$s', 'admin.Common_Msg', 'seraphinite-accelerator' );
     
    14801482
    14811483        $urlProductInfo = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlProductInfo' );
    1482         $urlAboutPluginImg = file_exists( __DIR__ . '/../Images/ProductLogo.png' ) ? add_query_arg( array( 'v' => '2.28.17' ), Plugin::FileUri( '../Images/ProductLogo.png', __FILE__ ) ) : null;
     1484        $urlAboutPluginImg = file_exists( __DIR__ . '/../Images/ProductLogo.png' ) ? add_query_arg( array( 'v' => '2.28.18' ), Plugin::FileUri( '../Images/ProductLogo.png', __FILE__ ) ) : null;
    14831485        $urlAboutPluginDocs = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlProductDocs' );
    14841486        $urlAboutPluginSupport = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlProductSupport' );
    1485         $url3rdPartySoft = file_exists( __DIR__ . '/../third-party-software.html' ) ? add_query_arg( array( 'v' => '2.28.17' ), Plugin::FileUri( '../third-party-software.html', __FILE__ ) ) : null;
     1487        $url3rdPartySoft = file_exists( __DIR__ . '/../third-party-software.html' ) ? add_query_arg( array( 'v' => '2.28.18' ), Plugin::FileUri( '../third-party-software.html', __FILE__ ) ) : null;
    14861488
    14871489        $urlEula = null;
     
    14921494
    14931495        {
    1494             $version = esc_html( '2.28.17' );
     1496            $version = esc_html( '2.28.18' );
    14951497
    14961498            $res .= Ui::TagOpen( 'div' );
     
    15411543        $rmtCfg = PluginRmtCfg::Get();
    15421544
    1543         $urlAboutUsLogoImg = file_exists( __DIR__ . '/../Images/VendorLogo.png' ) ? add_query_arg( array( 'v' => '2.28.17' ), Plugin::FileUri( '../Images/VendorLogo.png', __FILE__ ) ) : null;
     1545        $urlAboutUsLogoImg = file_exists( __DIR__ . '/../Images/VendorLogo.png' ) ? add_query_arg( array( 'v' => '2.28.18' ), Plugin::FileUri( '../Images/VendorLogo.png', __FILE__ ) ) : null;
    15441546        $urlMorePlugins = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlMorePlugins' );
    15451547        $urlMoreInfo = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlMain' );
     
    20702072
    20712073            $verFrom = self::_PrevVer_GetInt( $plgVerPrev );
    2072             $verTo = self::_PrevVer_GetInt( '2.28.17' );
     2074            $verTo = self::_PrevVer_GetInt( '2.28.18' );
    20732075            if( $verTo < $verFrom )
    20742076                list( $verTo, $verFrom ) = array( $verFrom, $verTo );
     
    21952197                continue;
    21962198
    2197             wp_enqueue_style( Plugin::CmnScriptId( $id ), add_query_arg( Plugin::GetFileUrlPackageParams(), $fileUrl . '/' . $id . '.css' ), array(), '2.28.17' );
     2199            wp_enqueue_style( Plugin::CmnScriptId( $id ), add_query_arg( Plugin::GetFileUrlPackageParams(), $fileUrl . '/' . $id . '.css' ), array(), '2.28.18' );
    21982200
    21992201            self::$g_aAlreadyIncludedObj[ 'css' ][ $id ] = true;
     
    22622264            $scrHndId = Plugin::CmnScriptId( $id );
    22632265
    2264             wp_register_script( $scrHndId, add_query_arg( Plugin::GetFileUrlPackageParams(), $fileUrl . '/' . $id . '.js' ), $deps, '2.28.17' );
     2266            wp_register_script( $scrHndId, add_query_arg( Plugin::GetFileUrlPackageParams(), $fileUrl . '/' . $id . '.js' ), $deps, '2.28.18' );
    22652267            if( $id == 'Gen' )
    22662268                Plugin::Loc_ScriptLoad( $scrHndId );
     
    24622464    static function _on_check_plugins_updates( $locales )
    24632465    {
    2464         $hrUpdated = PluginRmtCfg::Update();
     2466        $hrUpdated = PluginRmtCfg::Update( 2 );
    24652467
    24662468        return( $locales );
     
    27072709                            var sendDataUrl = "<?php echo( Gen::GetArrField( $rmtCfg, 'Questionnaires.SendAnswerUrlTpl' ) ); ?>";
    27082710                            sendDataUrl = sendDataUrl.replace( "{EndPointId}",                  encodeURI( "<?php echo( Wp::GetSiteId() ); ?>" ) );
    2709                             sendDataUrl = sendDataUrl.replace( "{PluginVersion}",               encodeURI( "2.28.17" ) );
     2711                            sendDataUrl = sendDataUrl.replace( "{PluginVersion}",               encodeURI( "2.28.18" ) );
    27102712                            sendDataUrl = sendDataUrl.replace( "{PluginMode}",                  encodeURI( "base" ) );
    27112713                            sendDataUrl = sendDataUrl.replace( "{PluginPackage}",               encodeURI( "Base" ) );
  • seraphinite-accelerator/trunk/Cmn/Ui.php

    r3485735 r3489455  
    99{
    1010
    11     static function Link( $content, $href, $newWnd = false, $prms = null, $attrs = null )
     11    static function Link( $content, $href = null, $newWnd = false, $prms = null, $attrs = null )
    1212    {
    1313        if( $attrs === null )
    1414            $attrs = array();
     15
     16        if( $href === null )
     17            $href = $content;
    1518
    1619        $showLink = !empty( $href ) || ($prms[ 'showIfNoHref' ]??null);
  • seraphinite-accelerator/trunk/cache_ex.php

    r3486643 r3489455  
    6767
    6868    if( $bHdr )
    69         @header( 'X-Seraph-Accel-Cache: 2.28.17;' . $debugInfo );
     69        @header( 'X-Seraph-Accel-Cache: 2.28.18;' . $debugInfo );
    7070
    7171    if( $bLog )
     
    996996    {
    997997        $_SERVER[ 'SERAPH_ACCEL_ORIG_USER_AGENT' ] = ($_SERVER[ 'HTTP_USER_AGENT' ]??'');
    998         $_SERVER[ 'HTTP_USER_AGENT' ] = 'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 seraph-accel-Agent/2.28.17';
     998        $_SERVER[ 'HTTP_USER_AGENT' ] = 'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 Seraph-Accel-Agent/2.28.18';
    999999    }
    10001000
  • seraphinite-accelerator/trunk/common.php

    r3486643 r3489455  
    26482648        'debugInfo' => false,
    26492649        'debug' => false,
    2650         'emojiIcons' => false,
     2650        'emojiIcons' => true,
    26512651
    26522652        'log' => false,
     
    42334233function GetViewTypeUserAgent( $viewsDeviceGrp )
    42344234{
    4235     return( 'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 seraph-accel-Agent/2.28.17 ' . ucwords( implode( ' ', Gen::GetArrField( $viewsDeviceGrp, array( 'agents' ), array() ) ) ) );
     4235    return( 'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 Seraph-Accel-Agent/2.28.18 ' . ucwords( implode( ' ', Gen::GetArrField( $viewsDeviceGrp, array( 'agents' ), array() ) ) ) );
    42364236}
    42374237
     
    45124512            $itemType = ( int )($item[ 'tp' ]??0);
    45134513            if( $itemType == 0 )
    4514                 CachePostPreparePageEx( ($data[ 'm' ]??null), ($data[ 'u' ]??null), ($item[ 's' ]??null), isset( $data[ 'l' ] ) ? -480 : ( int )($data[ 'p' ]??null), ($data[ 'p' ]??null), ($data[ 'h' ]??null), $data[ 'to' ], isset( $data[ 'rdr' ] ) ? ( $data[ 'rdr' ] + 1 ) : null, ($data[ 'l' ]??null) );
     4514                CachePostPreparePageEx( ($data[ 'm' ]??null), ($data[ 'u' ]??null), ($item[ 's' ]??null), isset( $data[ 'l' ] ) ? -480 : ( int )($data[ 'p' ]??null), ($data[ 'p' ]??null), ($data[ 'h' ]??null), $data[ 'to' ], isset( $data[ 'rdr' ] ) ? ( $data[ 'rdr' ] + 1 ) : 0, ($data[ 'l' ]??null) );
    45154515            else
    45164516                CachePostPrepareObjEx( $itemType, ($data[ 'u' ]??null), ($item[ 's' ]??null), ( int )($data[ 'p' ]??null), $data, ( int )($data[ 'p' ]??null), ( float )($item[ 't' ]??null) );
     
    47254725            $bClnDsc = true;
    47264726            if( $urlRemoteAbort = Gen::GetArrField( $ctlRes, array( 'remote', 'urlAbort' ) ) )
    4727                 Wp::RemotePost( $urlRemoteAbort, array( 'timeout' => 2, 'sslverify' => false ) );
     4727                Wp::RemotePost( $urlRemoteAbort, array( 'timeout' => 5, 'sslverify' => false ) );
    47284728        }
    47294729
     
    50495049
    50505050            }
    5051             else if( Gen::StrStartsWith( $this -> skipStatus, 'engineRemote' ) && !( $this -> skipStatus == 'engineRemoteMgrAccessDenied' || $this -> skipStatus == 'engineRemoteAccessDenied' || $this -> skipStatus == 'engineRemoteNoLicense' ) )
     5051            else if( Gen::StrStartsWith( $this -> skipStatus, 'engineRemote' ) && !( $this -> skipStatus == 'engineRemoteAccessDenied' || $this -> skipStatus == 'engineRemoteNoLicense' ) )
    50525052            {
    50535053                if( ($this -> data[ 'rdr' ]??0) < 1000000 )
     
    51655165{
    51665166
    5167     $fileIdx = OnAsyncTasksGetPushUrlFile( true );
    5168     if( isset( $_SERVER[ 'PHP_SELF' ] ) && ( $uriPath = Gen::GetArrField( Net::UrlParse( $url ), 'path' ) ) && $uriPath != '/' )
    5169     {
    5170         $uriPath = substr( $uriPath, strlen( Gen::GetFileDir( $_SERVER[ 'REQUEST_URI' ] ) ) );
    5171         if( @file_exists( Gen::GetFileDir( $_SERVER[ 'SCRIPT_FILENAME' ] ) . rawurldecode( $uriPath ) . '/' . $fileIdx ) )
    5172             $fileIdx = $uriPath . '/' . $fileIdx;
    5173     }
    5174 
    51755167    $tmStamp = microtime( true );
    5176     return( ProcessQueueItemCtx::MakeRequest( $asyncMode, 'GET', Net::UrlAddArgs( Plugin::AsyncTaskPushGetUrlEx( Wp::GetSiteWpRootUrl( $fileIdx ), 'O', $tmStamp ), array( 'nonce' => hash_hmac( 'md5', Plugin::AsyncTaskPushGetTimerun( $tmStamp ), GetSalt() ) ) ), array(  ) ) );
     5168    return( ProcessQueueItemCtx::MakeRequest( $asyncMode, 'GET', Net::UrlAddArgs( Plugin::AsyncTaskPushGetUrlEx( $url, 'O', $tmStamp ), array( 'nonce' => hash_hmac( 'md5', Plugin::AsyncTaskPushGetTimerun( $tmStamp ), GetSalt() ) ) ), array(  ) ) );
    51775169}
    51785170
     
    54715463    $dirQueue = GetCacheDir() . '/q/' . $siteId;
    54725464
    5473     if( $priority == 10 )
     5465    if( $priority == 10 && $retryIdx === null )
    54745466    {
    54755467        $count = 0;
     
    57485740    $args = array( 'sslverify' => false, 'timeout' => $timeout, 'headers' => array() );
    57495741    if( $userAgentCmn )
    5750         $args[ 'headers' ][ 'User-Agent' ] = 'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 seraph-accel-Agent/2.28.17';
     5742        $args[ 'headers' ][ 'User-Agent' ] = 'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 Seraph-Accel-Agent/2.28.18';
    57515743
    57525744    if( $serverId = Net::UrlParse( $url ) )
     
    62646256    {
    62656257        if( !isset( $headers[ 'User-Agent' ] ) )
    6266             $headers[ 'User-Agent' ] = ($headers[ 'X-Seraph-Accel-Postpone-User-Agent' ]??'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 seraph-accel-Agent/2.28.17');
     6258            $headers[ 'User-Agent' ] = ($headers[ 'X-Seraph-Accel-Postpone-User-Agent' ]??'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 Seraph-Accel-Agent/2.28.18');
    62676259        $headers[ 'User-Agent' ] = str_replace( 'seraph-accel-Agent/', 'seraph-accel-Agent-WarmUp/', $headers[ 'User-Agent' ] );
    62686260
  • seraphinite-accelerator/trunk/languages/seraphinite-accelerator-admin.pot

    r3486643 r3489455  
    77msgid ""
    88msgstr ""
    9 "#-#-#-#-#  cmn.admin.pot (seraphinite-accelerator 2.28.17)  #-#-#-#-#\n"
    10 "Project-Id-Version: seraphinite-accelerator 2.28.17\n"
     9"#-#-#-#-#  cmn.admin.pot (seraphinite-accelerator 2.28.18)  #-#-#-#-#\n"
     10"Project-Id-Version: seraphinite-accelerator 2.28.18\n"
    1111"Report-Msgid-Bugs-To: support@s-sols.com\n"
    1212"MIME-Version: 1.0\n"
    1313"Content-Type: text/plain; charset=UTF-8\n"
    1414"Content-Transfer-Encoding: 8bit\n"
    15 "#-#-#-#-#  main.admin.pot (seraphinite-accelerator 2.28.17)  #-#-#-#-#\n"
    16 "Project-Id-Version: seraphinite-accelerator 2.28.17\n"
     15"#-#-#-#-#  main.admin.pot (seraphinite-accelerator 2.28.18)  #-#-#-#-#\n"
     16"Project-Id-Version: seraphinite-accelerator 2.28.18\n"
    1717"Report-Msgid-Bugs-To: support@s-sols.com\n"
    1818"MIME-Version: 1.0\n"
     
    203203msgstr ""
    204204
     205# %1$s %2$s
     206#, php-format
     207msgctxt "admin.Common"
     208msgid "HumanTimeDiffDigitbefore_%1$s%2$s"
     209msgstr ""
     210
    205211# Function '%1$s' is blocked
    206212#, php-format
     
    886892msgstr ""
    887893
     894# Ended unexpectedly
     895msgctxt "admin.Manage_Queue"
     896msgid "ErrTerminated"
     897msgstr ""
     898
     899# Probably, there is not enough memory or was external termination
     900msgctxt "admin.Manage_Queue"
     901msgid "ErrTerminatedDsc"
     902msgstr ""
     903
     904# Maximum execution time exceeded
     905msgctxt "admin.Manage_Queue"
     906msgid "ErrTimeout"
     907msgstr ""
     908
     909# Probably, PHP execution time should be increased
     910msgctxt "admin.Manage_Queue"
     911msgid "ErrTimeoutDsc"
     912msgstr ""
     913
     914# Maximum waiting time exceeded
     915msgctxt "admin.Manage_Queue"
     916msgid "WarnTimeout"
     917msgstr ""
     918
     919# Probably, remote optimization is busy
     920msgctxt "admin.Manage_Queue"
     921msgid "WarnTimeoutDsc"
     922msgstr ""
     923
     924# Stopped
     925msgctxt "admin.Manage_Queue"
     926msgid "WarnAborted"
     927msgstr ""
     928
     929# Not found
     930msgctxt "admin.Manage_Queue"
     931msgid "ErrNotFound"
     932msgstr ""
     933
     934# Redirection
     935msgctxt "admin.Manage_Queue"
     936msgid "ErrRedir"
     937msgstr ""
     938
     939# Redirection (temporary)
     940msgctxt "admin.Manage_Queue"
     941msgid "ErrRedirTmp"
     942msgstr ""
     943
     944# Self-learning completion is needed
     945msgctxt "admin.Manage_Queue"
     946msgid "LearnNeeded"
     947msgstr ""
     948
     949# Remote processing is not allowed
     950msgctxt "admin.Manage_Queue"
     951msgid "EngineRemoteAccessDenied"
     952msgstr ""
     953
     954# Remote processing is busy
     955msgctxt "admin.Manage_Queue"
     956msgid "EngineRemoteBusy"
     957msgstr ""
     958
     959# Completed
     960msgctxt "admin.Manage_Queue"
     961msgid "StateOk"
     962msgstr ""
     963
     964# Already optimized
     965msgctxt "admin.Manage_Queue"
     966msgid "StateSkipAlreadyProcessed"
     967msgstr ""
     968
     969# Not changed
     970msgctxt "admin.Manage_Queue"
     971msgid "StateSkipNotChanged"
     972msgstr ""
     973
     974# Skipped: %1$s
     975#, php-format
     976msgctxt "admin.Manage_Queue"
     977msgid "StateSkip_%1$s"
     978msgstr ""
     979
     980# Failed: %1$s
     981#, php-format
     982msgctxt "admin.Manage_Queue"
     983msgid "StateErr_%1$s"
     984msgstr ""
     985
    888986# Geo location
    889987msgctxt "admin.Settings_Views_Geo"
  • seraphinite-accelerator/trunk/languages/seraphinite-accelerator.pot

    r3486643 r3489455  
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: seraphinite-accelerator 2.28.17\n"
     9"Project-Id-Version: seraphinite-accelerator 2.28.18\n"
    1010"Report-Msgid-Bugs-To: support@s-sols.com\n"
    1111"MIME-Version: 1.0\n"
  • seraphinite-accelerator/trunk/main.php

    r3486643 r3489455  
    4343function _AddMenus( $accepted = false )
    4444{
    45     add_menu_page( Plugin::GetPluginString( 'TitleLong' ), Plugin::GetNavMenuTitle(), 'manage_options', 'seraph_accel_manage',                                                                      $accepted ? 'seraph_accel\\_ManagePage' : 'seraph_accel\\Plugin::OutputNotAcceptedPageContent', Plugin::FileUri( 'icon.png?v=2.28.17', __FILE__ ) );
     45    add_menu_page( Plugin::GetPluginString( 'TitleLong' ), Plugin::GetNavMenuTitle(), 'manage_options', 'seraph_accel_manage',                                                                      $accepted ? 'seraph_accel\\_ManagePage' : 'seraph_accel\\Plugin::OutputNotAcceptedPageContent', Plugin::FileUri( 'icon.png?v=2.28.18', __FILE__ ) );
    4646    add_submenu_page( 'seraph_accel_manage', esc_html_x( 'Title', 'admin.Manage', 'seraphinite-accelerator' ), esc_html_x( 'Title', 'admin.Manage', 'seraphinite-accelerator' ), 'manage_options', 'seraph_accel_manage',   $accepted ? 'seraph_accel\\_ManagePage' : 'seraph_accel\\Plugin::OutputNotAcceptedPageContent' );
    4747    add_submenu_page( 'seraph_accel_manage', Wp::GetLocString( 'Settings' ), Wp::GetLocString( 'Settings' ), 'manage_options', 'seraph_accel_settings',                                     $accepted ? 'seraph_accel\\_SettingsPage' : 'seraph_accel\\Plugin::OutputNotAcceptedPageContent' );
     
    12871287{
    12881288    Plugin::CmnScripts( array( 'Cmn', 'Gen', 'Ui', 'Net', 'AdminUi' ) );
    1289     wp_register_script( Plugin::ScriptId( 'Admin' ), add_query_arg( Plugin::GetFileUrlPackageParams(), Plugin::FileUrl( 'Admin.js', __FILE__ ) ), array_merge( array( 'jquery' ), Plugin::CmnScriptId( array( 'Cmn', 'Gen', 'Ui', 'Net' ) ) ), '2.28.17' );
     1289    wp_register_script( Plugin::ScriptId( 'Admin' ), add_query_arg( Plugin::GetFileUrlPackageParams(), Plugin::FileUrl( 'Admin.js', __FILE__ ) ), array_merge( array( 'jquery' ), Plugin::CmnScriptId( array( 'Cmn', 'Gen', 'Ui', 'Net' ) ) ), '2.28.18' );
    12901290    Plugin::Loc_ScriptLoad( Plugin::ScriptId( 'Admin' ) );
    12911291    wp_enqueue_script( Plugin::ScriptId( 'Admin' ) );
     
    14541454                        Ui::Button( Wp::safe_html_x( 'SrvDel', 'admin.Manage_Operate', 'seraphinite-accelerator' ), false, null, null, 'button', array( 'class' => array( 'ctlSpaceAfter', 'ctlSpaceVBefore', 'ctlVaMiddle' ), 'style' => array( 'min-width' => '7em' ), 'onclick' => 'seraph_accel.Manager._int.OnCacheOp(this,10,"' . wp_create_nonce( 'op-10' ) . '");return false;' ) ) .
    14551455                        Ui::Button( Wp::GetLocString( 'Cancel' ), false, null, null, 'button', array( 'class' => array( 'ctlSpaceAfter', 'ctlSpaceVBefore', 'ctlVaMiddle', 'cancel' ), 'style' => array( 'min-width' => '7em' ), 'disabled' => true, 'onclick' => 'seraph_accel.Manager._int.OnCacheOpCancel(this,undefined,"' . wp_create_nonce( 'op-cancel' ) . '");return false;' ) ) .
    1456                         Ui::NumberBox( null, 5, array( 'min' => 1, 'class' => array( 'ctlSpaceAfter', 'ctlSpaceVBefore', 'ctlVaMiddle', 'tmDataRefresh' ), 'style' => array( 'display' => 'none', 'width' => '4em' ) ) ) .
     1456                        Ui::NumberBox( null, 5, array( 'min' => 1, 'class' => array( 'ctlSpaceAfter', 'ctlSpaceVBefore', 'ctlVaMiddle', 'tmDataRefresh' ), 'placeholder' => '0', 'style' => array( 'display' => 'none', 'width' => '4em' ) ) ) .
    14571457                        Ui::Spinner( false, array( 'class' => 'ctlSpaceAfter ctlSpaceVBefore ctlVaMiddle', 'style' => array( 'display' => 'none' ) ) ) .
    14581458                        Ui::Tag( 'span', null, array( 'class' => 'ctlSpaceAfter ctlSpaceVBefore ctlVaMiddle ctlInlineBlock descr', 'style' => array( 'display' => 'none' ) ) ) .
     
    15291529    $rmtCfg = PluginRmtCfg::Get();
    15301530
    1531     $urlLogoImg = add_query_arg( array( 'v' => '2.28.17' ), Plugin::FileUri( 'Images/hosting-icon-banner.svg', __FILE__ ) );
     1531    $urlLogoImg = add_query_arg( array( 'v' => '2.28.18' ), Plugin::FileUri( 'Images/hosting-icon-banner.svg', __FILE__ ) );
    15321532    $urlMoreInfo = Plugin::RmtCfgFld_GetLoc( $rmtCfg, 'Links.UrlHostingInfo' );
    15331533
     
    23412341}
    23422342
     2343function GetQueueItem_Done_Attrs( $data )
     2344{
     2345    $iconClr = '';
     2346    $stateDsc = '';
     2347    $hr = ($data[ 'hr' ]??null);
     2348    $error = ($data[ 'r' ]??null);
     2349
     2350    if( !$error )
     2351    {
     2352        $httpCode = Net::GetResponseCodeFromHr( $hr );
     2353        if( $httpCode )
     2354        {
     2355            $error = ( string )$httpCode;
     2356        }
     2357        else if( $hr == Gen::E_INVALID_STATE )
     2358        {
     2359            $error = esc_html_x( 'ErrTerminated', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2360            $stateDsc = esc_html_x( 'ErrTerminatedDsc', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2361        }
     2362        else if( $hr == Gen::E_TIMEOUT )
     2363        {
     2364            $error = esc_html_x( 'ErrTimeout', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2365            $stateDsc = esc_html_x( 'ErrTimeoutDsc', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2366        }
     2367        else if( $hr == Gen::S_TIMEOUT )
     2368        {
     2369            $error = esc_html_x( 'WarnTimeout', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2370            $stateDsc = esc_html_x( 'WarnTimeoutDsc', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2371        }
     2372        else if( $hr == Gen::S_ABORTED )
     2373            $error = esc_html_x( 'WarnAborted', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2374        else
     2375            $error = sprintf( '0x%08X', $hr );
     2376    }
     2377    else
     2378    {
     2379        if( Gen::StrStartsWith( $error, 'err:' ) )
     2380            $error = substr( $error, 4 );
     2381        else if( Gen::StrStartsWith( $error, 'httpCode:' ) )
     2382        {
     2383            $error = substr( $error, 9 );
     2384            switch( substr( $error, 0, 3 ) )
     2385            {
     2386            case '404': $error = esc_html_x( 'ErrNotFound', 'admin.Manage_Queue', 'seraphinite-accelerator' ) . substr( $error, 3 ); break;
     2387            case '308':
     2388            case '301': $error = esc_html_x( 'ErrRedir', 'admin.Manage_Queue', 'seraphinite-accelerator' ) . substr( $error, 3 ); break;
     2389            case '307':
     2390            case '302': $error = esc_html_x( 'ErrRedirTmp', 'admin.Manage_Queue', 'seraphinite-accelerator' ) . substr( $error, 3 ); break;
     2391            }
     2392        }
     2393        else if( $error == 'lrnNeed' )
     2394        {
     2395            $error = esc_html_x( 'LearnNeeded', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2396        }
     2397        else if( Gen::StrStartsWith( $error, 'engineRemote' ) )
     2398        {
     2399            if( $error == 'engineRemoteAccessDenied' || $error == 'engineRemoteNoLicense' )
     2400                $error = esc_html_x( 'EngineRemoteAccessDenied', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2401            else
     2402                $error = esc_html_x( 'EngineRemoteBusy', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2403        }
     2404
     2405        if( ( $pos = strpos( $error, ":" ) ) !== false )
     2406        {
     2407            $stateDsc = MsgUnpackLocIds( rawurldecode( substr( $error, $pos + 1 ) ) );
     2408            $error = substr( $error, 0, $pos );
     2409        }
     2410
     2411        $error = MsgUnpackLocIds( rawurldecode( $error ) );
     2412    }
     2413
     2414    if( $hr == Gen::S_OK )
     2415    {
     2416        $state = esc_html_x( 'StateOk', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2417        $iconClr = 'success';
     2418
     2419        $stateDsc = MsgUnpackLocIds( Gen::GetArrField( $data, array( 'w' ), array() ) );
     2420        foreach( $stateDsc as &$stateDscItem )
     2421        {
     2422            if( Gen::StrStartsWith( $stateDscItem, 'engineRemote' ) )
     2423            {
     2424                if( $stateDscItem == 'engineRemoteAccessDenied' || $stateDscItem == 'engineRemoteNoLicense' )
     2425                    $stateDscItem = esc_html_x( 'EngineRemoteAccessDenied', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2426                else
     2427                    $stateDscItem = esc_html_x( 'EngineRemoteBusy', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2428            }
     2429            else
     2430                $iconClr = 'warning';
     2431        }
     2432        unset( $stateDscItem );
     2433        $stateDsc = implode( "\n", $stateDsc );
     2434    }
     2435    else if( Gen::HrSucc( $hr ) )
     2436    {
     2437        if( $error === 'alreadyProcessed' )
     2438            $state = esc_html_x( 'StateSkipAlreadyProcessed', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2439        else if( $error === 'notChanged' )
     2440            $state = esc_html_x( 'StateSkipNotChanged', 'admin.Manage_Queue', 'seraphinite-accelerator' );
     2441        else
     2442            $state = sprintf( esc_html_x( 'StateSkip_%1$s', 'admin.Manage_Queue', 'seraphinite-accelerator' ), $error );
     2443        $iconClr = 'normal';
     2444    }
     2445    else
     2446    {
     2447        $state = sprintf( esc_html_x( 'StateErr_%1$s', 'admin.Manage_Queue', 'seraphinite-accelerator' ), $error );
     2448        $iconClr = 'error';
     2449    }
     2450
     2451    $duration = ($data[ 'td' ]??null);
     2452
     2453    if( $aInfo = Gen::GetArrField( $data, array( 'i' ), array() ) )
     2454    {
     2455        foreach( $aInfo as $infoKey => $infoVal )
     2456        {
     2457            if( !$infoVal )
     2458                continue;
     2459
     2460            if( $stateDsc )
     2461                $stateDsc .= "\n";
     2462            if( is_string( $infoKey ) )
     2463            {
     2464                $infoKey = MsgUnpackLocIds( $infoKey );
     2465                $stateDsc .= '{TAG_U_OPEN}' . $infoKey . '{TAG_U_CLOSE}' . "\n";
     2466            }
     2467            $infoVal = MsgUnpackLocIds( $infoVal );
     2468            if( is_array( $infoVal ) )
     2469                $stateDsc .= implode( "\n", $infoVal );
     2470            else
     2471                $stateDsc .= $infoVal;
     2472        }
     2473    }
     2474
     2475    return( array( $iconClr, $state, $stateDsc, $duration ) );
     2476}
     2477
    23432478function OnAsyncTask_CacheRevalidateAll( $args )
    23442479{
  • seraphinite-accelerator/trunk/oper.php

    r3486643 r3489455  
    11571157    foreach( $viewId === null ? array( 'cmn' ) : $viewId as $viewIdI )
    11581158        if( CacheOpViewsHeadersGetViewId( $viewIdI ) == 'cmn' )
    1159             $res[ $viewIdI ] = array( 'User-Agent' => 'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 seraph-accel-Agent/2.28.17' );
     1159            $res[ $viewIdI ] = array( 'User-Agent' => 'Mozilla/99999.9 AppleWebKit/9999999.99 (KHTML, like Gecko) Chrome/999999.0.9999.99 Safari/9999999.99 Seraph-Accel-Agent/2.28.18' );
    11601160
    11611161    if( ($settCache[ 'views' ]??null) )
     
    18901890    }
    18911891
     1892    if( in_array( 'translatepress-multilingual', $availablePlugins ) )
     1893    {
     1894
     1895        foreach( Gen::GetArrField( get_option( 'trp_settings' ), array( 'trp-multiple-domains' ), array() ) as $lang => $aInfo )
     1896        {
     1897            if( !($aInfo[ 'enabled' ]??null) )
     1898                continue;
     1899
     1900            if( $domain = Gen::GetArrField( $aInfo, array( 'domain' ), '' ) )
     1901                $aAddrSite[] = trim( Net::UrlDeParse( Net::UrlParse( $domain ), 0, array(), array( PHP_URL_HOST, PHP_URL_PORT, PHP_URL_PATH ) ), '/' );
     1902        }
     1903    }
     1904
    18921905    if( in_array( 'multiple-domain', $availablePlugins ) )
    18931906    {
  • seraphinite-accelerator/trunk/options.php

    r3486643 r3489455  
    142142
    143143    Plugin::CmnScripts( array( 'Cmn', 'Gen', 'Ui', 'Net', 'AdminUi' ) );
    144     wp_register_script( Plugin::ScriptId( 'Admin' ), add_query_arg( Plugin::GetFileUrlPackageParams(), Plugin::FileUrl( 'Admin.js', __FILE__ ) ), array_merge( array( 'jquery' ), Plugin::CmnScriptId( array( 'Cmn', 'Gen', 'Ui', 'Net' ) ) ), '2.28.17' );
     144    wp_register_script( Plugin::ScriptId( 'Admin' ), add_query_arg( Plugin::GetFileUrlPackageParams(), Plugin::FileUrl( 'Admin.js', __FILE__ ) ), array_merge( array( 'jquery' ), Plugin::CmnScriptId( array( 'Cmn', 'Gen', 'Ui', 'Net' ) ) ), '2.28.18' );
    145145    Plugin::Loc_ScriptLoad( Plugin::ScriptId( 'Admin' ) );
    146146    wp_enqueue_script( Plugin::ScriptId( 'Admin' ) );
     
    152152    $isPaidLockedContent = false;
    153153
    154     $rmtCfg = PluginRmtCfg::Get();
     154    $rmtCfg = PluginRmtCfg::Get( 2 );
    155155    $sett = Plugin::SettGet();
    156156    $dtCurLoc = new \DateTime( 'now', DateTimeZone::FromOffset( Wp::GetGmtOffset() ) );
  • seraphinite-accelerator/trunk/plugin_root.php

    r3486643 r3489455  
    66Text Domain: seraphinite-accelerator
    77Domain Path: /languages
    8 Version: 2.28.17
     8Version: 2.28.18
    99Author: Seraphinite Solutions
    1010Author URI: https://www.s-sols.com
  • seraphinite-accelerator/trunk/readme.txt

    r3486670 r3489455  
    66Requires at least: 4.5
    77Tested up to: 6.9
    8 Stable tag: 2.28.17
     8Stable tag: 2.28.18
    99License: GPLv2 or later (if another license is not provided)
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    163163== Changelog ==
    164164
     165= 2.28.18 =
     166
     167Improvements:
     168
     169* Defining scope in HTML replacement.
     170* Fast optimization: styles processing.
     171* Restarting failed queue items.
     172* Support of subdomains of TranslatePress.
     173
     174Fixes:
     175
     176* Simple thread of optimization doesnt work with custom 'index.php'.
     177
    165178= 2.28.17 =
    166179
     
    168181
    169182* Defining scope in HTML replacement.
     183* Disabled getting external critical images while fast optimization.
    170184* FOX - Currency Switcher.
    171185
Note: See TracChangeset for help on using the changeset viewer.