Plugin Directory

Changeset 2704885


Ignore:
Timestamp:
04/05/2022 08:48:30 AM (4 years ago)
Author:
wp01ru
Message:

Обновление

Location:
wp01/trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • wp01/trunk/assets/js/main.js

    r2390571 r2704885  
    3939            current = document.location.hash;
    4040        }
     41
     42// start new
     43
     44        // Backup download
     45        $('body').on('submit', '.ajax-file-download', function (e) {
     46            e.preventDefault();
     47            let url = $(this).attr('action');
     48            let fileName = $(this).find('input[name=filename]').val();
     49            let path = $(this).find('input[name=path]').val();
     50            $.post(url, {action: 'wp01_generate_zip_archive', target: fileName, path: path}, function (response) {
     51                var link = document.createElement('a');
     52                document.body.appendChild(link);
     53                link.href=response.url;
     54                link.click();
     55            });
     56        });
     57        //
     58
     59// end new
    4160
    4261        $('.wp01-langSelect')
  • wp01/trunk/content/en/step-3.php

    r2539876 r2704885  
    157157</div>
    158158
    159 <h4>1. Install the plugins</h4>
    160 
    161 <p>To improve loading speed of website you should to install
    162    some of the plugins, each of which ment to optimize
    163    any of components.</p>
     159
     160<h3>I. Plugins for acceleration</h3>
     161<p>Install plugins corresponding to the required tasks</p>
    164162
    165163<?php
     
    11441142<div class="tc">
    11451143    /* WP01: Отложенная загрузка Яндекс Метрика */<br>
    1146     &lt;script&gt;<br>
    1147     var fired = false;<br>
    1148     window.addEventListener(&#039;scroll&#039;, () =&gt; {<br>
    1149         if (fired === false) {<br>
    1150             fired = true;<br>
    1151             setTimeout(() =&gt; {<br>
    1152                 // START: стандартный отрывок из кода Я.метрики<br>
    1153                 (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};<br>
    1154                 m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})<br>
    1155                 (window, document, &quot;script&quot;, &quot;https://mc.yandex.ru/metrika/tag.js&quot;, &quot;ym&quot;);<br>
    1156                 ym(<font color="red">12345678</font>, &quot;init&quot;, {<br>
    1157                     clickmap:true,<br>
    1158                     trackLinks:true,<br>
    1159                     accurateTrackBounce:true<br>
    1160                     webvisor:true<br>
    1161                 });<br>
    1162                 // END: стандартный отрывок из кода Я.метрики<br>
    1163             }, 100);<br>
    1164         }<br>
    1165     },{passive: true});<br>
    1166     &lt;/script&gt;<br><br>
     1144&lt;script&gt;<br>
     1145let leLoadedJs = false;<br>
     1146window.addEventListener(&#039;scroll&#039;, getExtJs,{passive: true});<br>
     1147window.addEventListener(&#039;touchstart&#039;, getExtJs);<br>
     1148window.addEventListener(&#039;mousemove&#039;, getExtJs);<br>
     1149window.addEventListener(&#039;click&#039;, getExtJs);<br>
     1150window.addEventListener(&#039;keydown&#039;, getExtJs);<br>
     1151setTimeout(getExtJs,200);<br>
     1152function getExtJs(){<br>
     1153    if (leLoadedJs === false) {<br>
     1154        leLoadedJs = true;<br>
     1155        window.removeEventListener(&#039;scroll&#039;, getExtJs, false);<br>
     1156        window.removeEventListener(&#039;touchstart&#039;, getExtJs, false);<br>
     1157        window.removeEventListener(&#039;mousemove&#039;, getExtJs, false);<br>
     1158        window.removeEventListener(&#039;click&#039;, getExtJs, false);<br>
     1159        window.removeEventListener(&#039;keydown&#039;, getExtJs, false);<br>
     1160        setTimeout(function(){<br>
     1161            // START: стандартный отрывок из кода Я.метрики<br>
     1162            (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};<br>
     1163            m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})<br>
     1164            (window, document, &quot;script&quot;, &quot;https://mc.yandex.ru/metrika/tag.js&quot;, &quot;ym&quot;);<br>
     1165            ym(<font color="red">12345678</font>, &quot;init&quot;, {<br>
     1166                id:<font color="red">12345678</font>,<br>
     1167                clickmap:true,<br>
     1168                trackLinks:true,<br>
     1169                accurateTrackBounce:true<br>
     1170            });<br>
     1171            // END: стандартный отрывок из кода Я.метрики<br>
     1172        }, 100);<br>
     1173    }<br>
     1174}<br>
     1175&lt;/script&gt;<br><br>
    11671176</div>
    11681177
     
    11991208    /* WP01: Отложенная загрузка Google Analytics */<br>
    12001209    &lt;script&gt;<br>
    1201     var fired = false;<br>
    1202     window.addEventListener(&#039;scroll&#039;, () =&gt; {<br>
    1203         if (fired === false) {<br>
    1204             fired = true;<br>
    1205             setTimeout(() =&gt; {<br>
    1206                 var GTMObject = document.createElement(&quot;script&quot;);<br>
    1207                 GTMObject.src = &#039;https://www.googletagmanager.com/gtag/js?id=<font color="red">UA-123456789-1</font>&#039;;<br>
    1208                 GTMObject.async = true;<br>
    1209                 document.getElementsByTagName(&#039;head&#039;)[0].appendChild(GTMObject);<br>
    1210                 window.dataLayer = window.dataLayer || [];<br>
    1211                 function gtag(){dataLayer.push(arguments);}<br>
    1212                 gtag(&#039;js&#039;, new Date());<br>
    1213                 gtag(&#039;config&#039;, &#039;<font color="red">UA-123456789-1</font>&#039;);<br>
    1214             }, 100);<br>
    1215         }<br>
    1216     },{passive: true});<br>
    1217     &lt;/script&gt;<br><br>
     1210let leLoadedJs = false;<br>
     1211window.addEventListener(&#039;scroll&#039;, getExtJs,{passive: true});<br>
     1212window.addEventListener(&#039;touchstart&#039;, getExtJs);<br>
     1213window.addEventListener(&#039;mousemove&#039;, getExtJs);<br>
     1214window.addEventListener(&#039;click&#039;, getExtJs);<br>
     1215window.addEventListener(&#039;keydown&#039;, getExtJs);<br>
     1216setTimeout(getExtJs,200);<br>
     1217function getExtJs(){<br>
     1218    if (leLoadedJs === false) {<br>
     1219        leLoadedJs = true;<br>
     1220        window.removeEventListener(&#039;scroll&#039;, getExtJs, false);<br>
     1221        window.removeEventListener(&#039;touchstart&#039;, getExtJs, false);<br>
     1222        window.removeEventListener(&#039;mousemove&#039;, getExtJs, false);<br>
     1223        window.removeEventListener(&#039;click&#039;, getExtJs, false);<br>
     1224        window.removeEventListener(&#039;keydown&#039;, getExtJs, false);<br>
     1225        setTimeout(function() {<br>
     1226            var GTMObject = document.createElement(&quot;script&quot;);<br>
     1227            GTMObject.src = &#039;https://www.googletagmanager.com/gtag/js?id=<font color="red">UA-123456789-1</font>&#039;;<br>
     1228            GTMObject.async = true;<br>
     1229            document.getElementsByTagName(&#039;head&#039;)[0].appendChild(GTMObject);<br>
     1230            window.dataLayer = window.dataLayer || [];<br>
     1231            function gtag(){dataLayer.push(arguments);}<br>
     1232            gtag(&#039;js&#039;, new Date());<br>
     1233            gtag(&#039;config&#039;, &#039;<font color="red">UA-123456789-1</font>&#039;);<br>
     1234        }, 100);<br>
     1235    }<br>
     1236}<br>
     1237&lt;/script&gt;<br><br>
    12181238</div>
    12191239
     
    12241244    /* WP01: Отложенная загрузка внешних скриптов */<br>
    12251245    &lt;script&gt;<br>
    1226     var fired = false;<br>
    1227     window.addEventListener(&#039;scroll&#039;, () =&gt; {<br>
    1228         if (fired === false) {<br>
    1229             fired = true;<br>
    1230             setTimeout(() =&gt; {<br>
     1246let leLoadedJs = false;<br>
     1247window.addEventListener(&#039;scroll&#039;, getExtJs,{passive: true});<br>
     1248window.addEventListener(&#039;touchstart&#039;, getExtJs);<br>
     1249window.addEventListener(&#039;mousemove&#039;, getExtJs);<br>
     1250window.addEventListener(&#039;click&#039;, getExtJs);<br>
     1251window.addEventListener(&#039;keydown&#039;, getExtJs);<br>
     1252setTimeout(getExtJs,200);<br>
     1253function getExtJs(){<br>
     1254    if (leLoadedJs === false) {<br>
     1255        leLoadedJs = true;<br>
     1256        window.removeEventListener(&#039;scroll&#039;, getExtJs, false);<br>
     1257        window.removeEventListener(&#039;touchstart&#039;, getExtJs, false);<br>
     1258        window.removeEventListener(&#039;mousemove&#039;, getExtJs, false);<br>
     1259        window.removeEventListener(&#039;click&#039;, getExtJs, false);<br>
     1260        window.removeEventListener(&#039;keydown&#039;, getExtJs, false);<br>
     1261        setTimeout(function() {<br>
    12311262                // START<br>
    12321263                // код внешних скриптов (всё, что между &lt;script&gt; и &lt;/script&gt;)<br>
    12331264                // END<br>
    1234             }, 100);<br>
    1235         }<br>
    1236     },{passive: true});<br>
    1237     &lt;/script&gt;<br><br>
     1265        }, 100);<br>
     1266    }<br>
     1267}<br>
     1268&lt;/script&gt;<br><br>
    12381269</div>
    12391270
     
    13341365?>
    13351366
    1336 <h3>Manual implementations:</h3>
    1337 
    1338 <h4>2. Reduce amount of records revisions and autosaves interval</h4>
     1367<h3>II. Quick backup</h3>
     1368<p>Before manual code implementations, we strongly recommend making a backup copy of the files that will be edited</p>
     1369
     1370<?php
     1371/* start new */
     1372$titles = array('Name', 'Location', 'Appointment', 'Management');
     1373   
     1374        $structure = array(
     1375            array(
     1376                "filename" => '.htaccess',
     1377                "path" => '/',
     1378                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     1379                "comment" => 'Additional Web Server configuration file',
     1380                "button_text" => 'Download'
     1381            ),
     1382            array(
     1383                "filename" => 'wp-config.php',
     1384                "path" => '/',
     1385                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     1386                "comment" => 'WordPress Configuration File',
     1387                "button_text" => 'Download'
     1388               
     1389            ),
     1390            array(
     1391                "filename" => 'footer.php',
     1392                "path" => '/wp-content/themes/'. get_template() . '/',
     1393                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     1394                "comment" => 'The lower part of the site template',
     1395                "button_text" => 'Download'
     1396            ),
     1397            array(
     1398                "filename" => 'header.php',
     1399                "path" => '/wp-content/themes/'. get_template() . '/',
     1400                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     1401                "comment" => 'The top part of the website template',
     1402                "button_text" => 'Download'
     1403            ),
     1404            array(
     1405                "filename" => 'functions.php',
     1406                "path" => '/wp-content/themes/'. get_template() . '/',
     1407                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     1408                "comment" => 'Theme file with custom functions',
     1409                "button_text" => 'Download'
     1410            )
     1411        );
     1412
     1413    WP01_Table::build_backup_table($titles, $structure);
     1414    /* end new */
     1415?>
     1416
     1417<h3>III. Manual implementations</h3>
     1418<p>Install/edit the code according to the required task</p>
     1419
     1420<h4>1. Reduce amount of records revisions and autosaves interval</h4>
    13391421<div class="collapse collapsed">
    13401422    <div class="collapse-title collapse-toggler">Set the conditions</div>
     
    13501432</div>
    13511433
    1352 <h4>3. Activate the caching</h4>
     1434<h4>2. Activate the caching</h4>
    13531435<div class="collapse collapsed">
    13541436    <div class="collapse-title collapse-toggler">Write in .htaccess file the following rules</div>
     
    14131495</div>
    14141496
    1415 <h4>4. Compressing files before sending to user</h4>
     1497<h4>3. Compressing files before sending to user</h4>
    14161498<div class="collapse collapsed">
    14171499    <div class="collapse-title collapse-toggler">Write in .htaccess file the following rules</div>
     
    14511533</div>
    14521534
    1453 <h4>5. Use the latest version of PHP supported by WordPress</h4>
     1535<h4>4. Use the latest version of PHP supported by WordPress</h4>
    14541536<div class="collapse collapsed">
    14551537    <div class="collapse-title collapse-toggler">Follow the recommendations</div>
     
    14901572</div>
    14911573
    1492 <h4>6. Optimize png/jpg/gif images</h4>
     1574<h4>5. Optimize png/jpg/gif images</h4>
    14931575<div class="collapse collapsed">
    14941576    <div class="collapse-title collapse-toggler">Use online/offline tools</div>
     
    15041586</div>
    15051587
    1506 <h4>7. Optimize SVG images</h4>
     1588<h4>6. Optimize SVG images</h4>
    15071589<div class="collapse collapsed">
    15081590    <div class="collapse-title collapse-toggler">Use the online constructor</div>
     
    15151597</div>
    15161598
    1517 <h4>8. Optimize the icon file</h4>
     1599<h4>7. Optimize the icon file</h4>
    15181600<div class="collapse collapsed">
    15191601    <div class="collapse-title collapse-toggler">Use the online constructor</div>
     
    15361618</div>
    15371619
    1538 <h4>9. Prevent hotlinks to images</h4>
     1620<h4>8. Prevent hotlinks to images</h4>
    15391621<div class="collapse collapsed">
    15401622    <div class="collapse-title collapse-toggler">Write in .htaccess file the following rules</div>
     
    15731655</div>
    15741656
    1575 <h4>10. Configure the display of all text while loading web fonts</h4>
     1657<h4>9. Configure the display of all text while loading web fonts</h4>
    15761658<div class="collapse collapsed">
    15771659    <div class="collapse-title collapse-toggler">Make edits to the theme's CSS files</div>
     
    15941676</div>
    15951677
    1596 <h4>11. Set up preloading of web fonts</h4>
     1678<h4>10. Set up preloading of web fonts</h4>
    15971679<div class="collapse collapsed">
    15981680    <div class="collapse-title collapse-toggler">Set the upload conditions</div>
     
    16111693</div>
    16121694
    1613 <h4>12. Increase the memory limit for scripts</h4>
     1695<h4>11. Increase the memory limit for scripts</h4>
    16141696<div class="collapse collapsed">
    16151697    <div class="collapse-title collapse-toggler">Write down the increased values</div>
     
    16321714</div>
    16331715
    1634 <h4>13. Create a DNS resolving</h4>
     1716<h4>12. Create a DNS resolving</h4>
    16351717<div class="collapse collapsed">
    16361718    <div class="collapse-title collapse-toggler">List of important external resources</div>
     
    16501732</div>
    16511733
    1652 <h4>14. Disable loading dashicons. min. css in Frontend</h4>
     1734<h4>13. Disable loading dashicons. min. css in Frontend</h4>
    16531735<div class="collapse collapsed">
    16541736    <div class="collapse-title collapse-toggler">Set the icon ban code</div>
     
    16781760</div>
    16791761
    1680 <h4>15. Check the relevance of Yandex. Metrica</h4>
     1762<h4>14. Check the relevance of Yandex. Metrica</h4>
    16811763<div class="collapse collapsed">
    16821764    <div class="collapse-title collapse-toggler">Learn the code for asynchrony</div>
     
    16971779</div>
    16981780
    1699 <h4>16. Disable "aggressive checking" for updates</h4>
     1781<h4>15. Disable "aggressive checking" for updates</h4>
    17001782<div class="collapse collapsed">
    17011783    <div class="collapse-title collapse-toggler">Use the code</div>
     
    17501832</div>
    17511833
    1752 <h4>17. Delayed loading of JivoSite</h4>
     1834<h4>16. Delayed loading of JivoSite</h4>
    17531835<div class="collapse collapsed">
    17541836    <div class="collapse-title collapse-toggler">Correct the code</div>
     
    18131895</div>
    18141896
    1815 <h4>18. Postpone loading of VK widgets</h4>
     1897<h4>17. Postpone loading of VK widgets</h4>
    18161898<div class="collapse collapsed">
    18171899    <div class="collapse-title collapse-toggler">Use the code</div>
     
    18521934</div>
    18531935
    1854 <h4>19. Use a minified version of jQuery</h4>
     1936<h4>18. Use a minified version of jQuery</h4>
    18551937<div class="collapse collapsed">
    18561938    <div class="collapse-title collapse-toggler">Replace the file</div>
     
    18751957</div>
    18761958
    1877 <h4>20. Apply translation caching</h4>
     1959<h4>19. Apply translation caching</h4>
    18781960<div class="collapse collapsed">
    18791961    <div class="collapse-title collapse-toggler">Implement the library</div>
     
    18921974</div>
    18931975
    1894 <h4>21. Speed up your website with WooCommerce</h4>
     1976<h4>20. Speed up your website with WooCommerce</h4>
    18951977<div class="collapse collapsed">
    18961978    <div class="collapse-title collapse-toggler">Disable unused resources</div>
  • wp01/trunk/content/en/step-4.php

    r2539876 r2704885  
    100100</table>
    101101
    102 <h4>1. Install the plugins</h4>
    103 
    104 <p>To protect the website you need to install several plugins.</p>
     102<h3>I. Plugins for acceleration</h3>
     103<p>Install plugins corresponding to the required tasks</p>
    105104
    106105<?php
     
    642641?>
    643642
    644 <h3>Manual implementations:</h3>
    645 
    646 <h4>2. Check for unique keys and authentication salts</h4>
     643<h3>II. Quick backup</h3>
     644<p>Before manual code implementations, we strongly recommend making a backup copy of the files that will be edited</p>
     645
     646<?php
     647/* start new */
     648$titles = array('Name', 'Location', 'Appointment', 'Management');
     649   
     650        $structure = array(
     651            array(
     652                "filename" => '.htaccess',
     653                "path" => '/',
     654                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     655                "comment" => 'Additional Web Server configuration file',
     656                "button_text" => 'Download'
     657            ),
     658            array(
     659                "filename" => 'wp-config.php',
     660                "path" => '/',
     661                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     662                "comment" => 'WordPress Configuration File',
     663                "button_text" => 'Download'
     664               
     665            ),
     666            array(
     667                "filename" => 'footer.php',
     668                "path" => '/wp-content/themes/'. get_template() . '/',
     669                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     670                "comment" => 'The lower part of the site template',
     671                "button_text" => 'Download'
     672            ),
     673            array(
     674                "filename" => 'header.php',
     675                "path" => '/wp-content/themes/'. get_template() . '/',
     676                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     677                "comment" => 'The top part of the website template',
     678                "button_text" => 'Download'
     679            ),
     680            array(
     681                "filename" => 'functions.php',
     682                "path" => '/wp-content/themes/'. get_template() . '/',
     683                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     684                "comment" => 'Theme file with custom functions',
     685                "button_text" => 'Download'
     686            )
     687        );
     688
     689    WP01_Table::build_backup_table($titles, $structure);
     690    /* end new */
     691?>
     692
     693<h3>III. Manual implementations</h3>
     694<p>Install/edit the code according to the required task</p>
     695
     696<h4>1. Check for unique keys and authentication salts</h4>
    647697<div class="collapse collapsed">
    648698    <div class="collapse-title collapse-toggler">Check the code</div>
     
    659709</div>
    660710
    661 <h4>3. Update the CMS, theme, plugins, and translations</h4>
     711<h4>2. Update the CMS, theme, plugins, and translations</h4>
    662712<div class="collapse collapsed">
    663713    <div class="collapse-title collapse-toggler">Follow the recommendations</div>
     
    687737</div>
    688738
    689 <h4>4. Check the origin of the theme and plugins</h4>
     739<h4>3. Check the origin of the theme and plugins</h4>
    690740<div class="collapse collapsed">
    691741    <div class="collapse-title collapse-toggler">Follow the recommendations</div>
     
    707757</div>
    708758
    709 <h4>5. Prohibit offline browsers from downloading the site</h4>
     759<h4>4. Prohibit offline browsers from downloading the site</h4>
    710760<div class="collapse collapsed">
    711761    <div class="collapse-title collapse-toggler">Add robots.txt instructions</div>
     
    9631013</div>
    9641014
    965 <h4>6. Transfer wp-config.php to a higher level</h4>
     1015<h4>5. Transfer wp-config.php to a higher level</h4>
    9661016<div class="collapse collapsed">
    9671017    <div class="collapse-title collapse-toggler">Read the instructions</div>
     
    9831033</div>
    9841034
    985 <h4>7. Use tamper-proof passwords</h4>
     1035<h4>6. Use tamper-proof passwords</h4>
    9861036<div class="collapse collapsed">
    9871037    <div class="collapse-title collapse-toggler">Follow the recommendations</div>
     
    10141064</div>
    10151065
    1016 <h4>8. Remove unused plugins/themes</h4>
     1066<h4>7. Remove unused plugins/themes</h4>
    10171067<div class="collapse collapsed">
    10181068    <div class="collapse-title collapse-toggler">Follow the recommendations</div>
     
    10371087</div>
    10381088
    1039 <h4>9. Switch to the developer-supported PHP version</h4>
     1089<h4>8. Switch to the developer-supported PHP version</h4>
    10401090<div class="collapse collapsed">
    10411091    <div class="collapse-title collapse-toggler">Follow the recommendations</div>
     
    10641114</div>
    10651115
    1066 <h4>10. Check the site files with a cloud-based antivirus</h4>
     1116<h4>9. Check the site files with a cloud-based antivirus</h4>
    10671117<div class="collapse collapsed">
    10681118    <div class="collapse-title collapse-toggler">Implement an antivirus solution</div>
     
    10831133</div>
    10841134
    1085 <h4>11. Check for leaks (according to data from the darknet) sites by email</h4>
     1135<h4>10. Check for leaks (according to data from the darknet) sites by email</h4>
    10861136<div class="collapse collapsed">
    10871137    <div class="collapse-title collapse-toggler">Perform the check</div>
     
    11091159</div>
    11101160
    1111 <h4>12. Reduce the load on the site</h4>
     1161<h4>11. Reduce the load on the site</h4>
    11121162<div class="collapse collapsed">
    11131163    <div class="collapse-title collapse-toggler">Write down the restrictions</div>
     
    11281178</div>
    11291179
    1130 <h4>13. Check the site for hidden administrators</h4>
     1180<h4>12. Check the site for hidden administrators</h4>
    11311181<div class="collapse collapsed">
    11321182    <div class="collapse-title collapse-toggler">Perform the check</div>
     
    11491199</div>
    11501200
    1151 <h4>14. Create a user for publishing articles</h4>
     1201<h4>13. Create a user for publishing articles</h4>
    11521202<div class="collapse collapsed">
    11531203    <div class="collapse-title collapse-toggler">Follow these steps</div>
  • wp01/trunk/content/en/step-5.php

    r2539876 r2704885  
    7575</table>
    7676
    77 <h4>1. Install the plugins</h4>
    78 
    79 <p>To prepare the website to SEO you need to perform several actions</p>
     77<h3>I. Plugins for acceleration</h3>
     78<p>Install plugins corresponding to the required tasks</p>
     79
    8080<?php
    8181
    82 $titles = array('Плагин', 'Статус', 'Аналоги', 'Замена кодом', 'Задача', 'Важность модуля', 'Управление', 'Инструкция по настройке');
     82$titles = array('Plugin', 'Status', 'Analogs', 'Replace by code', 'Objective', 'Module importance', 'Control', 'Installation instruction');
    8383$plugins = array(
    8484    array(
     
    502502?>
    503503
    504 <h3>Manual implementations:</h3>
    505 
    506 <h4>2. Adjust a permalinks</h4>
     504<h3>II. Quick backup</h3>
     505<p>Before manual code implementations, we strongly recommend making a backup copy of the files that will be edited</p>
     506
     507<?php
     508/* start new */
     509$titles = array('Name', 'Location', 'Appointment', 'Management');
     510   
     511        $structure = array(
     512            array(
     513                "filename" => '.htaccess',
     514                "path" => '/',
     515                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     516                "comment" => 'Additional Web Server configuration file',
     517                "button_text" => 'Download'
     518            ),
     519            array(
     520                "filename" => 'wp-config.php',
     521                "path" => '/',
     522                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     523                "comment" => 'WordPress Configuration File',
     524                "button_text" => 'Download'
     525               
     526            ),
     527            array(
     528                "filename" => 'footer.php',
     529                "path" => '/wp-content/themes/'. get_template() . '/',
     530                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     531                "comment" => 'The lower part of the site template',
     532                "button_text" => 'Download'
     533            ),
     534            array(
     535                "filename" => 'header.php',
     536                "path" => '/wp-content/themes/'. get_template() . '/',
     537                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     538                "comment" => 'The top part of the website template',
     539                "button_text" => 'Download'
     540            ),
     541            array(
     542                "filename" => 'functions.php',
     543                "path" => '/wp-content/themes/'. get_template() . '/',
     544                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     545                "comment" => 'Theme file with custom functions',
     546                "button_text" => 'Download'
     547            )
     548        );
     549
     550    WP01_Table::build_backup_table($titles, $structure);
     551    /* end new */
     552?>
     553
     554<h3>III. Manual implementations</h3>
     555<p>Install/edit the code according to the required task</p>
     556
     557<h4>1. Adjust a permalinks</h4>
    507558<div class="collapse collapsed">
    508559    <div class="collapse-title collapse-toggler">Follow the steps</div>
     
    514565</div> 
    515566
    516 <h4>3. Implement correct indexing instructions</h4>
     567<h4>2. Implement correct indexing instructions</h4>
    517568<div class="collapse collapsed">
    518569    <div class="collapse-title collapse-toggler">Check the robots.txt file</div>
     
    605656</div>
    606657
    607 <h4>4. Check the domain name with the "www" prefix" (for archived CMS versions)</h4>
     658<h4>3. Check the domain name with the "www" prefix" (for archived CMS versions)</h4>
    608659<div class="collapse collapsed">
    609660    <div class="collapse-title collapse-toggler">Analyze and implement the code</div>
  • wp01/trunk/content/en/step-6.php

    r2539876 r2704885  
    6767</table>
    6868
    69 <h4>1. Install the necessary plugins</h4>
    70 
    71 <p>We recommend you to perform additional settings to improve the quality of the site.</p>
     69<h3>I. Plugins for acceleration</h3>
     70<p>Install plugins corresponding to the required tasks</p>
     71
    7272<?php
    7373
    74 $titles = array('Плагин', 'Статус', 'Аналоги', 'Замена кодом', 'Задача', 'Важность модуля', 'Управление', 'Инструкция по настройке');
     74$titles = array('Plugin', 'Status', 'Analogs', 'Replace by code', 'Objective', 'Module importance', 'Control', 'Installation instruction');
    7575$plugins = array(
    7676    array(
     
    249249?>
    250250
    251 <h3>Manual implementations and third-party programs:</h3>
    252 
    253 <h4>2. Analyze the log file</h4>
     251<h3>II. Quick backup</h3>
     252<p>Before manual code implementations, we strongly recommend making a backup copy of the files that will be edited</p>
     253
     254<?php
     255/* start new */
     256$titles = array('Name', 'Location', 'Appointment', 'Management');
     257   
     258        $structure = array(
     259            array(
     260                "filename" => '.htaccess',
     261                "path" => '/',
     262                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     263                "comment" => 'Additional Web Server configuration file',
     264                "button_text" => 'Download'
     265            ),
     266            array(
     267                "filename" => 'wp-config.php',
     268                "path" => '/',
     269                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     270                "comment" => 'WordPress Configuration File',
     271                "button_text" => 'Download'
     272               
     273            ),
     274            array(
     275                "filename" => 'footer.php',
     276                "path" => '/wp-content/themes/'. get_template() . '/',
     277                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     278                "comment" => 'The lower part of the site template',
     279                "button_text" => 'Download'
     280            ),
     281            array(
     282                "filename" => 'header.php',
     283                "path" => '/wp-content/themes/'. get_template() . '/',
     284                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     285                "comment" => 'The top part of the website template',
     286                "button_text" => 'Download'
     287            ),
     288            array(
     289                "filename" => 'functions.php',
     290                "path" => '/wp-content/themes/'. get_template() . '/',
     291                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     292                "comment" => 'Theme file with custom functions',
     293                "button_text" => 'Download'
     294            )
     295        );
     296
     297    WP01_Table::build_backup_table($titles, $structure);
     298    /* end new */
     299?>
     300
     301<h3>III. Manual implementations</h3>
     302<p>Install/edit the code according to the required task</p>
     303
     304<h4>1. Analyze the log file</h4>
    254305<div class="collapse collapsed">
    255306    <div class="collapse-title collapse-toggler">Find the overloads in the log file</div>
  • wp01/trunk/content/en/step-7.php

    r2457105 r2704885  
    88
    99<div class="card tip step7-card">
    10     <h3>Contact us and we will answer</h3>
     10    <h3>Any comments on the WP01 plugin?</h3>
    1111    <form action="<?php echo admin_url('admin-ajax.php') ?>" method="GET" class="step7-inputs ajax-mail">
    1212        <div class="step7-short-input form-field form-required term-name-wrap">
  • wp01/trunk/content/ru/step-3.php

    r2539876 r2704885  
    152152</div>
    153153
    154 <h4>1. Установите плагины</h4>
    155 
    156 <p>Для ускорения работы вашего сайта нужно установить ряд плагинов, каждый из которых направлен на оптимизацию
    157     какой-либо составляющей.</p>
     154<h3>I. Плагины для ускорения</h3>
     155<p>Установите плагины соответствующие необходимым задачам</p>
    158156
    159157<?php
     
    11421140<div class="tc">
    11431141    /* WP01: Отложенная загрузка Яндекс Метрика */<br>
    1144     &lt;script&gt;<br>
    1145     var fired = false;<br>
    1146     window.addEventListener(&#039;scroll&#039;, () =&gt; {<br>
    1147         if (fired === false) {<br>
    1148             fired = true;<br>
    1149             setTimeout(() =&gt; {<br>
    1150                 // START: стандартный отрывок из кода Я.метрики<br>
    1151                 (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};<br>
    1152                 m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})<br>
    1153                 (window, document, &quot;script&quot;, &quot;https://mc.yandex.ru/metrika/tag.js&quot;, &quot;ym&quot;);<br>
    1154                 ym(<font color="red">12345678</font>, &quot;init&quot;, {<br>
    1155                     clickmap:true,<br>
    1156                     trackLinks:true,<br>
    1157                     accurateTrackBounce:true<br>
    1158                     webvisor:true<br>
    1159                 });<br>
    1160                 // END: стандартный отрывок из кода Я.метрики<br>
    1161             }, 100);<br>
    1162         }<br>
    1163     },{passive: true});<br>
    1164     &lt;/script&gt;<br><br>
     1142&lt;script&gt;<br>
     1143let leLoadedJs = false;<br>
     1144window.addEventListener(&#039;scroll&#039;, getExtJs,{passive: true});<br>
     1145window.addEventListener(&#039;touchstart&#039;, getExtJs);<br>
     1146window.addEventListener(&#039;mousemove&#039;, getExtJs);<br>
     1147window.addEventListener(&#039;click&#039;, getExtJs);<br>
     1148window.addEventListener(&#039;keydown&#039;, getExtJs);<br>
     1149setTimeout(getExtJs,200);<br>
     1150function getExtJs(){<br>
     1151    if (leLoadedJs === false) {<br>
     1152        leLoadedJs = true;<br>
     1153        window.removeEventListener(&#039;scroll&#039;, getExtJs, false);<br>
     1154        window.removeEventListener(&#039;touchstart&#039;, getExtJs, false);<br>
     1155        window.removeEventListener(&#039;mousemove&#039;, getExtJs, false);<br>
     1156        window.removeEventListener(&#039;click&#039;, getExtJs, false);<br>
     1157        window.removeEventListener(&#039;keydown&#039;, getExtJs, false);<br>
     1158        setTimeout(function(){<br>
     1159            // START: стандартный отрывок из кода Я.метрики<br>
     1160            (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};<br>
     1161            m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})<br>
     1162            (window, document, &quot;script&quot;, &quot;https://mc.yandex.ru/metrika/tag.js&quot;, &quot;ym&quot;);<br>
     1163            ym(<font color="red">12345678</font>, &quot;init&quot;, {<br>
     1164                id:<font color="red">12345678</font>,<br>
     1165                clickmap:true,<br>
     1166                trackLinks:true,<br>
     1167                accurateTrackBounce:true<br>
     1168            });<br>
     1169            // END: стандартный отрывок из кода Я.метрики<br>
     1170        }, 100);<br>
     1171    }<br>
     1172}<br>
     1173&lt;/script&gt;<br><br>
    11651174</div>
    11661175
     
    11971206    /* WP01: Отложенная загрузка Google Analytics */<br>
    11981207    &lt;script&gt;<br>
    1199     var fired = false;<br>
    1200     window.addEventListener(&#039;scroll&#039;, () =&gt; {<br>
    1201         if (fired === false) {<br>
    1202             fired = true;<br>
    1203             setTimeout(() =&gt; {<br>
    1204                 var GTMObject = document.createElement(&quot;script&quot;);<br>
    1205                 GTMObject.src = &#039;https://www.googletagmanager.com/gtag/js?id=<font color="red">UA-123456789-1</font>&#039;;<br>
    1206                 GTMObject.async = true;<br>
    1207                 document.getElementsByTagName(&#039;head&#039;)[0].appendChild(GTMObject);<br>
    1208                 window.dataLayer = window.dataLayer || [];<br>
    1209                 function gtag(){dataLayer.push(arguments);}<br>
    1210                 gtag(&#039;js&#039;, new Date());<br>
    1211                 gtag(&#039;config&#039;, &#039;<font color="red">UA-123456789-1</font>&#039;);<br>
    1212             }, 100);<br>
    1213         }<br>
    1214     },{passive: true});<br>
    1215     &lt;/script&gt;<br><br>
     1208let leLoadedJs = false;<br>
     1209window.addEventListener(&#039;scroll&#039;, getExtJs,{passive: true});<br>
     1210window.addEventListener(&#039;touchstart&#039;, getExtJs);<br>
     1211window.addEventListener(&#039;mousemove&#039;, getExtJs);<br>
     1212window.addEventListener(&#039;click&#039;, getExtJs);<br>
     1213window.addEventListener(&#039;keydown&#039;, getExtJs);<br>
     1214setTimeout(getExtJs,200);<br>
     1215function getExtJs(){<br>
     1216    if (leLoadedJs === false) {<br>
     1217        leLoadedJs = true;<br>
     1218        window.removeEventListener(&#039;scroll&#039;, getExtJs, false);<br>
     1219        window.removeEventListener(&#039;touchstart&#039;, getExtJs, false);<br>
     1220        window.removeEventListener(&#039;mousemove&#039;, getExtJs, false);<br>
     1221        window.removeEventListener(&#039;click&#039;, getExtJs, false);<br>
     1222        window.removeEventListener(&#039;keydown&#039;, getExtJs, false);<br>
     1223        setTimeout(function() {<br>
     1224            var GTMObject = document.createElement(&quot;script&quot;);<br>
     1225            GTMObject.src = &#039;https://www.googletagmanager.com/gtag/js?id=<font color="red">UA-123456789-1</font>&#039;;<br>
     1226            GTMObject.async = true;<br>
     1227            document.getElementsByTagName(&#039;head&#039;)[0].appendChild(GTMObject);<br>
     1228            window.dataLayer = window.dataLayer || [];<br>
     1229            function gtag(){dataLayer.push(arguments);}<br>
     1230            gtag(&#039;js&#039;, new Date());<br>
     1231            gtag(&#039;config&#039;, &#039;<font color="red">UA-123456789-1</font>&#039;);<br>
     1232        }, 100);<br>
     1233    }<br>
     1234}<br>
     1235&lt;/script&gt;<br><br>
    12161236</div>
    12171237
     
    12221242    /* WP01: Отложенная загрузка внешних скриптов */<br>
    12231243    &lt;script&gt;<br>
    1224     var fired = false;<br>
    1225     window.addEventListener(&#039;scroll&#039;, () =&gt; {<br>
    1226         if (fired === false) {<br>
    1227             fired = true;<br>
    1228             setTimeout(() =&gt; {<br>
     1244let leLoadedJs = false;<br>
     1245window.addEventListener(&#039;scroll&#039;, getExtJs,{passive: true});<br>
     1246window.addEventListener(&#039;touchstart&#039;, getExtJs);<br>
     1247window.addEventListener(&#039;mousemove&#039;, getExtJs);<br>
     1248window.addEventListener(&#039;click&#039;, getExtJs);<br>
     1249window.addEventListener(&#039;keydown&#039;, getExtJs);<br>
     1250setTimeout(getExtJs,200);<br>
     1251function getExtJs(){<br>
     1252    if (leLoadedJs === false) {<br>
     1253        leLoadedJs = true;<br>
     1254        window.removeEventListener(&#039;scroll&#039;, getExtJs, false);<br>
     1255        window.removeEventListener(&#039;touchstart&#039;, getExtJs, false);<br>
     1256        window.removeEventListener(&#039;mousemove&#039;, getExtJs, false);<br>
     1257        window.removeEventListener(&#039;click&#039;, getExtJs, false);<br>
     1258        window.removeEventListener(&#039;keydown&#039;, getExtJs, false);<br>
     1259        setTimeout(function() {<br>
    12291260                // START<br>
    12301261                // код внешних скриптов (всё, что между &lt;script&gt; и &lt;/script&gt;)<br>
    12311262                // END<br>
    1232             }, 100);<br>
    1233         }<br>
    1234     },{passive: true});<br>
    1235     &lt;/script&gt;<br><br>
     1263        }, 100);<br>
     1264    }<br>
     1265}<br>
     1266&lt;/script&gt;<br><br>
    12361267</div>
    12371268
     
    13331364?>
    13341365
    1335 <h3>Ручные внедрения:</h3>
    1336 
    1337 <h4>2. Уменьшите количество ревизий записей, установите интервал автосохранений</h4>
     1366<h3>II. Быстрый бэкап</h3>
     1367<p>Перед ручными внедрениями кода настоятельно рекомендуем сделать резервную копию файлов, которые будут редактироваться</p>
     1368
     1369<?php
     1370/* start new */
     1371$titles = array('Название', 'Расположение', 'Назначение', 'Управление');
     1372   
     1373        $structure = array(
     1374            array(
     1375                "filename" => '.htaccess',
     1376                "path" => '/',
     1377                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     1378                "comment" => 'Файл дополнительной конфигурации веб-сервера',
     1379                "button_text" => 'Скачать'
     1380            ),
     1381            array(
     1382                "filename" => 'wp-config.php',
     1383                "path" => '/',
     1384                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     1385                "comment" => 'Конфигурационный файл WordPress',
     1386                "button_text" => 'Скачать'
     1387               
     1388            ),
     1389            array(
     1390                "filename" => 'footer.php',
     1391                "path" => '/wp-content/themes/'. get_template() . '/',
     1392                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     1393                "comment" => 'Нижняя часть шаблона сайта',
     1394                "button_text" => 'Скачать'
     1395            ),
     1396            array(
     1397                "filename" => 'header.php',
     1398                "path" => '/wp-content/themes/'. get_template() . '/',
     1399                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     1400                "comment" => 'Верхняя часть шаблона сайта',
     1401                "button_text" => 'Скачать'
     1402            ),
     1403            array(
     1404                "filename" => 'functions.php',
     1405                "path" => '/wp-content/themes/'. get_template() . '/',
     1406                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     1407                "comment" => 'Файл темы с пользовательскими функциями',
     1408                "button_text" => 'Скачать'
     1409            )
     1410        );
     1411
     1412    WP01_Table::build_backup_table($titles, $structure);
     1413    /* end new */
     1414?>
     1415
     1416<h3>III. Ручные внедрения</h3>
     1417<p>Произведите установку/правку кода в соответствии с необходимой задачей</p>
     1418
     1419<h4>1. Уменьшите количество ревизий записей, установите интервал автосохранений</h4>
    13381420<div class="collapse collapsed">
    13391421    <div class="collapse-title collapse-toggler">Установите условия</div>
     
    13491431</div>
    13501432
    1351 <h4>3. Активируйте кэширование</h4>
     1433<h4>2. Активируйте кэширование</h4>
    13521434<div class="collapse collapsed">
    13531435    <div class="collapse-title collapse-toggler">Пропишите в файле .htaccess правила</div>
     
    14121494</div>
    14131495
    1414 <h4>4. Сжатие файлов перед отправкой пользователю</h4>
     1496<h4>3. Сжатие файлов перед отправкой пользователю</h4>
    14151497<div class="collapse collapsed">
    14161498    <div class="collapse-title collapse-toggler">Пропишите в файле .htaccess правила</div>
     
    14501532</div>
    14511533
    1452 <h4>5. Используйте свежую версию PHP поддерживаемую WordPress</h4>
     1534<h4>4. Используйте свежую версию PHP поддерживаемую WordPress</h4>
    14531535<div class="collapse collapsed">
    14541536    <div class="collapse-title collapse-toggler">Выполните рекомендации</div>
     
    14891571</div>
    14901572
    1491 <h4>6. Оптимизируйте png/jpg/gif изображения</h4>
     1573<h4>5. Оптимизируйте png/jpg/gif изображения</h4>
    14921574<div class="collapse collapsed">
    14931575    <div class="collapse-title collapse-toggler">Воспользуйтесь online/offline инструментами</div>
     
    15031585</div>
    15041586
    1505 <h4>7. Оптимизируйте SVG изображения</h4>
     1587<h4>6. Оптимизируйте SVG изображения</h4>
    15061588<div class="collapse collapsed">
    15071589    <div class="collapse-title collapse-toggler">Воспользуйтесь online сервисами</div>
     
    15141596</div>
    15151597
    1516 <h4>8. Оптимизируйте файл иконок</h4>
     1598<h4>7. Оптимизируйте файл иконок</h4>
    15171599<div class="collapse collapsed">
    15181600    <div class="collapse-title collapse-toggler">Воспользуйтесь online конструктором</div>
     
    15351617</div>
    15361618
    1537 <h4>9. Предотвратите хотлинки на изображения</h4>
     1619<h4>8. Предотвратите хотлинки на изображения</h4>
    15381620<div class="collapse collapsed">
    15391621    <div class="collapse-title collapse-toggler">Пропишите в файле .htaccess правила</div>
     
    15721654</div>
    15731655
    1574 <h4>10. Настройте показ всего текста во время загрузки веб-шрифтов</h4>
     1656<h4>9. Настройте показ всего текста во время загрузки веб-шрифтов</h4>
    15751657<div class="collapse collapsed">
    15761658    <div class="collapse-title collapse-toggler">Внесите правки в CSS файлы темы</div>
     
    15931675</div>
    15941676
    1595 <h4>11. Настройте предварительную загрузку веб-шрифтов</h4>
     1677<h4>10. Настройте предварительную загрузку веб-шрифтов</h4>
    15961678<div class="collapse collapsed">
    15971679    <div class="collapse-title collapse-toggler">Задайте условия загрузки</div>
     
    16101692</div>
    16111693
    1612 <h4>12. Увеличьте лимит памяти для сценариев</h4>
     1694<h4>11. Увеличьте лимит памяти для сценариев</h4>
    16131695<div class="collapse collapsed">
    16141696    <div class="collapse-title collapse-toggler">Пропишите увеличенные значения</div>
     
    16311713</div>
    16321714
    1633 <h4>13. Создайте DNS резолвинг</h4>
     1715<h4>12. Создайте DNS резолвинг</h4>
    16341716<div class="collapse collapsed">
    16351717    <div class="collapse-title collapse-toggler">Пропишите важные внешние ресурсы</div>
     
    16491731</div>
    16501732
    1651 <h4>14. Отключите загрузку dashicons.min.css во Frontend</h4>
     1733<h4>13. Отключите загрузку dashicons.min.css во Frontend</h4>
    16521734<div class="collapse collapsed">
    16531735    <div class="collapse-title collapse-toggler">Установите код запрета иконок</div>
     
    16771759</div>
    16781760
    1679 <h4>15. Проверьте актуальность Яндекс.Метрика</h4>
     1761<h4>14. Проверьте актуальность Яндекс.Метрика</h4>
    16801762<div class="collapse collapsed">
    16811763    <div class="collapse-title collapse-toggler">Изучите код на асинхронность</div>
     
    16961778</div>
    16971779
    1698 <h4>16. Отключите "агрессивную проверку" обновлений</h4>
     1780<h4>15. Отключите "агрессивную проверку" обновлений</h4>
    16991781<div class="collapse collapsed">
    17001782    <div class="collapse-title collapse-toggler">Используйте код</div>
     
    17491831</div>
    17501832
    1751 <h4>17. Отложите загрузку JivoSite</h4>
     1833<h4>16. Отложите загрузку JivoSite</h4>
    17521834<div class="collapse collapsed">
    17531835    <div class="collapse-title collapse-toggler">Откорректируйте код</div>
     
    18121894</div>
    18131895
    1814 <h4>18. Отложите загрузку ВК виджетов</h4>
     1896<h4>17. Отложите загрузку ВК виджетов</h4>
    18151897<div class="collapse collapsed">
    18161898    <div class="collapse-title collapse-toggler">Используйте код</div>
     
    18511933</div>
    18521934
    1853 <h4>19. Используйте минифицированную версию jQuery</h4>
     1935<h4>18. Используйте минифицированную версию jQuery</h4>
    18541936<div class="collapse collapsed">
    18551937    <div class="collapse-title collapse-toggler">Замените файл</div>
     
    18741956</div>
    18751957
    1876 <h4>20. Примените кэширование переводов</h4>
     1958<h4>19. Примените кэширование переводов</h4>
    18771959<div class="collapse collapsed">
    18781960    <div class="collapse-title collapse-toggler">Внедрите библиотеку</div>
     
    18911973</div>
    18921974
    1893 <h4>21. Ускорьте сайт с WooCommerce</h4>
     1975<h4>20. Ускорьте сайт с WooCommerce</h4>
    18941976<div class="collapse collapsed">
    18951977    <div class="collapse-title collapse-toggler">Отключите неиспользуемые ресурсы</div>
  • wp01/trunk/content/ru/step-4.php

    r2539876 r2704885  
    9898</table>
    9999
    100 <h4>1. Установите плагины</h4>
    101 
    102 <p>Для защиты сайта от внешних угроз и спама необходимо установить ряд плагинов.</p>
     100<h3>I. Плагины для ускорения</h3>
     101<p>Установите плагины соответствующие необходимым задачам</p>
    103102
    104103<?php
     
    648647?>
    649648
    650 <h3>Ручные внедрения:</h3>
    651 
    652 <h4>2. Проверьте наличие уникальные ключей и солей для аутентификации</h4>
     649<h3>II. Быстрый бэкап</h3>
     650<p>Перед ручными внедрениями кода настоятельно рекомендуем сделать резервную копию файлов, которые будут редактироваться</p>
     651
     652<?php
     653/* start new */
     654$titles = array('Название', 'Расположение', 'Назначение', 'Управление');
     655   
     656        $structure = array(
     657            array(
     658                "filename" => '.htaccess',
     659                "path" => '/',
     660                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     661                "comment" => 'Файл дополнительной конфигурации веб-сервера',
     662                "button_text" => 'Скачать'
     663            ),
     664            array(
     665                "filename" => 'wp-config.php',
     666                "path" => '/',
     667                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     668                "comment" => 'Конфигурационный файл WordPress',
     669                "button_text" => 'Скачать'
     670               
     671            ),
     672            array(
     673                "filename" => 'footer.php',
     674                "path" => '/wp-content/themes/'. get_template() . '/',
     675                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     676                "comment" => 'Нижняя часть шаблона сайта',
     677                "button_text" => 'Скачать'
     678            ),
     679            array(
     680                "filename" => 'header.php',
     681                "path" => '/wp-content/themes/'. get_template() . '/',
     682                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     683                "comment" => 'Верхняя часть шаблона сайта',
     684                "button_text" => 'Скачать'
     685            ),
     686            array(
     687                "filename" => 'functions.php',
     688                "path" => '/wp-content/themes/'. get_template() . '/',
     689                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     690                "comment" => 'Файл темы с пользовательскими функциями',
     691                "button_text" => 'Скачать'
     692            )
     693        );
     694
     695    WP01_Table::build_backup_table($titles, $structure);
     696    /* end new */
     697?>
     698
     699<h3>III. Ручные внедрения</h3>
     700<p>Произведите установку/правку кода в соответствии с необходимой задачей</p>
     701
     702<h4>1. Проверьте наличие уникальные ключей и солей для аутентификации</h4>
    653703<div class="collapse collapsed">
    654704    <div class="collapse-title collapse-toggler">Проверьте код</div>
     
    665715</div>
    666716
    667 <h4>3. Обновите CMS, тему, плагины, переводы</h4>
     717<h4>2. Обновите CMS, тему, плагины, переводы</h4>
    668718<div class="collapse collapsed">
    669719    <div class="collapse-title collapse-toggler">Выполните рекомендации</div>
     
    693743</div>
    694744
    695 <h4>4. Проверьте происхождение темы и плагинов</h4>
     745<h4>3. Проверьте происхождение темы и плагинов</h4>
    696746<div class="collapse collapsed">
    697747    <div class="collapse-title collapse-toggler">Выполните рекомендации</div>
     
    713763</div>
    714764
    715 <h4>5. Запретите скачивание сайта Offline браузерам</h4>
     765<h4>4. Запретите скачивание сайта Offline браузерам</h4>
    716766<div class="collapse collapsed">
    717767    <div class="collapse-title collapse-toggler">Дополните robots.txt инструкциями</div>
     
    9691019</div>
    9701020
    971 <h4>6. Перенесите wp-config.php на уровень выше</h4>
     1021<h4>5. Перенесите wp-config.php на уровень выше</h4>
    9721022<div class="collapse collapsed">
    9731023    <div class="collapse-title collapse-toggler">Изучите инструкцию</div>
     
    9891039</div>
    9901040
    991 <h4>7. Используйте взломоустойчивые пароли</h4>
     1041<h4>6. Используйте взломоустойчивые пароли</h4>
    9921042<div class="collapse collapsed">
    9931043    <div class="collapse-title collapse-toggler">Выполните рекомендации</div>
     
    10201070</div>
    10211071
    1022 <h4>8. Удалите неиспользуемые плагины/темы</h4>
     1072<h4>7. Удалите неиспользуемые плагины/темы</h4>
    10231073<div class="collapse collapsed">
    10241074    <div class="collapse-title collapse-toggler">Выполните рекомендации</div>
     
    10431093</div>
    10441094
    1045 <h4>9. Перейдите на поддерживаемую разработчиками PHP версию</h4>
     1095<h4>8. Перейдите на поддерживаемую разработчиками PHP версию</h4>
    10461096<div class="collapse collapsed">
    10471097    <div class="collapse-title collapse-toggler">Выполните рекомендации</div>
     
    10701120</div>
    10711121
    1072 <h4>10. Проверьте файлы сайта облачным антивирусом</h4>
     1122<h4>9. Проверьте файлы сайта облачным антивирусом</h4>
    10731123<div class="collapse collapsed">
    10741124    <div class="collapse-title collapse-toggler">Внедрите антивирусное решение</div>
     
    10891139</div>
    10901140
    1091 <h4>11. Проверьте на утечки (по данным из даркнета) сайты по email</h4>
     1141<h4>10. Проверьте на утечки (по данным из даркнета) сайты по email</h4>
    10921142<div class="collapse collapsed">
    10931143    <div class="collapse-title collapse-toggler">Выполните проверку</div>
     
    11151165</div>
    11161166
    1117 <h4>12. Уменьшите нагрузку на сайт</h4>
     1167<h4>11. Уменьшите нагрузку на сайт</h4>
    11181168<div class="collapse collapsed">
    11191169    <div class="collapse-title collapse-toggler">Пропишите ограничения</div>
     
    11341184</div>
    11351185
    1136 <h4>13. Изучите сайт на наличие скрытых администраторов</h4>
     1186<h4>12. Изучите сайт на наличие скрытых администраторов</h4>
    11371187<div class="collapse collapsed">
    11381188    <div class="collapse-title collapse-toggler">Выполните проверку</div>
     
    11551205</div>
    11561206
    1157 <h4>14. Создайте пользователя для публикации статей</h4>
     1207<h4>13. Создайте пользователя для публикации статей</h4>
    11581208<div class="collapse collapsed">
    11591209    <div class="collapse-title collapse-toggler">Выполните действия</div>
  • wp01/trunk/content/ru/step-5.php

    r2539876 r2704885  
    7272</table>
    7373
    74 <h4>1. Установите плагины </a></h4>
    75 
    76 <p>Для подготовки сайта к SEO необходимо установить ряд плагинов</p>
     74<h3>I. Плагины для ускорения</h3>
     75<p>Установите плагины соответствующие необходимым задачам</p>
     76
    7777<?php
    7878
     
    508508?>
    509509
    510 <h3>Ручные внедрения:</h3>
    511 
    512 <h4>2. Произведите корректировку постоянных ссылок</h4>
     510<h3>II. Быстрый бэкап</h3>
     511<p>Перед ручными внедрениями кода настоятельно рекомендуем сделать резервную копию файлов, которые будут редактироваться</p>
     512
     513<?php
     514/* start new */
     515$titles = array('Название', 'Расположение', 'Назначение', 'Управление');
     516   
     517        $structure = array(
     518            array(
     519                "filename" => '.htaccess',
     520                "path" => '/',
     521                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     522                "comment" => 'Файл дополнительной конфигурации веб-сервера',
     523                "button_text" => 'Скачать'
     524            ),
     525            array(
     526                "filename" => 'wp-config.php',
     527                "path" => '/',
     528                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     529                "comment" => 'Конфигурационный файл WordPress',
     530                "button_text" => 'Скачать'
     531               
     532            ),
     533            array(
     534                "filename" => 'footer.php',
     535                "path" => '/wp-content/themes/'. get_template() . '/',
     536                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     537                "comment" => 'Нижняя часть шаблона сайта',
     538                "button_text" => 'Скачать'
     539            ),
     540            array(
     541                "filename" => 'header.php',
     542                "path" => '/wp-content/themes/'. get_template() . '/',
     543                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     544                "comment" => 'Верхняя часть шаблона сайта',
     545                "button_text" => 'Скачать'
     546            ),
     547            array(
     548                "filename" => 'functions.php',
     549                "path" => '/wp-content/themes/'. get_template() . '/',
     550                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     551                "comment" => 'Файл темы с пользовательскими функциями',
     552                "button_text" => 'Скачать'
     553            )
     554        );
     555
     556    WP01_Table::build_backup_table($titles, $structure);
     557    /* end new */
     558?>
     559
     560<h3>III. Ручные внедрения</h3>
     561<p>Произведите установку/правку кода в соответствии с необходимой задачей</p>
     562
     563<h4>1. Произведите корректировку постоянных ссылок</h4>
    513564<div class="collapse collapsed">
    514565    <div class="collapse-title collapse-toggler">Выполните действия</div>
     
    521572       
    522573
    523 <h4>3. Внедрите корректные инструкции индексации</h4>
     574<h4>2. Внедрите корректные инструкции индексации</h4>
    524575<div class="collapse collapsed">
    525576    <div class="collapse-title collapse-toggler">Посмотреть файл robots.txt</div>
     
    612663</div>
    613664
    614 <h4>4. Проверьте склейку домена с префиксом "www" (для архивных версий CMS)</h4>
     665<h4>3. Проверьте склейку домена с префиксом "www" (для архивных версий CMS)</h4>
    615666<div class="collapse collapsed">
    616667    <div class="collapse-title collapse-toggler">Проанализируйте и внедрите код</div>
  • wp01/trunk/content/ru/step-6.php

    r2539876 r2704885  
    6565</table>
    6666
    67 <h4>1. Установите необходимые плагины</h4>
    68 
    69 <p>Рекомендуем воспользоваться дополнительными инструментами для более удобной работы с сайтом</p>
     67<h3>I. Плагины для ускорения</h3>
     68<p>Установите плагины соответствующие необходимым задачам</p>
     69
    7070<?php
    7171
     
    251251?>
    252252
    253 <h3>Ручные внедрения и сторонние программы:</h3>
    254 
    255 <h4>2. Проанализируйте log – файл</h4>
     253<h3>II. Быстрый бэкап</h3>
     254<p>Перед ручными внедрениями кода настоятельно рекомендуем сделать резервную копию файлов, которые будут редактироваться</p>
     255
     256<?php
     257/* start new */
     258$titles = array('Название', 'Расположение', 'Назначение', 'Управление');
     259   
     260        $structure = array(
     261            array(
     262                "filename" => '.htaccess',
     263                "path" => '/',
     264                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     265                "comment" => 'Файл дополнительной конфигурации веб-сервера',
     266                "button_text" => 'Скачать'
     267            ),
     268            array(
     269                "filename" => 'wp-config.php',
     270                "path" => '/',
     271                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/',
     272                "comment" => 'Конфигурационный файл WordPress',
     273                "button_text" => 'Скачать'
     274               
     275            ),
     276            array(
     277                "filename" => 'footer.php',
     278                "path" => '/wp-content/themes/'. get_template() . '/',
     279                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     280                "comment" => 'Нижняя часть шаблона сайта',
     281                "button_text" => 'Скачать'
     282            ),
     283            array(
     284                "filename" => 'header.php',
     285                "path" => '/wp-content/themes/'. get_template() . '/',
     286                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     287                "comment" => 'Верхняя часть шаблона сайта',
     288                "button_text" => 'Скачать'
     289            ),
     290            array(
     291                "filename" => 'functions.php',
     292                "path" => '/wp-content/themes/'. get_template() . '/',
     293                'fullPath' => $_SERVER['DOCUMENT_ROOT'] . '/wp-content/themes/'. get_template() . '/',
     294                "comment" => 'Файл темы с пользовательскими функциями',
     295                "button_text" => 'Скачать'
     296            )
     297        );
     298
     299    WP01_Table::build_backup_table($titles, $structure);
     300    /* end new */
     301?>
     302
     303<h3>III. Ручные внедрения и сторонние программы</h3>
     304<p>Произведите установку/правку кода в соответствии с необходимой задачей</p>
     305
     306<h4>1. Проанализируйте log – файл</h4>
    256307<div class="collapse collapsed">
    257308    <div class="collapse-title collapse-toggler">Найдите перегрузы в лог файле</div>
  • wp01/trunk/content/ru/step-7.php

    r2457105 r2704885  
    88
    99<div class="card tip step7-card">
    10     <h3>Напишите нам и мы ответим</h3>
     10    <h3>Есть замечания по работе плагина WP01 ?</h3>
    1111    <form action="<?php echo admin_url('admin-ajax.php') ?>" method="GET" class="step7-inputs ajax-mail">
    1212        <div class="step7-short-input form-field form-required term-name-wrap">
  • wp01/trunk/inc/class-wp01-table.php

    r2373841 r2704885  
    77class WP01_Table
    88{
     9   
     10/* start new */
     11
     12    /**
     13     * Print plugins backup table
     14     *
     15     * @param $titles array Titles array
     16     * @param $plugins array Files array
     17     */
     18    public static function build_backup_table($titles, $structure)
     19    {
     20        echo '<table class="wp-list-table widefat plugins">';
     21            self::backup_table_head($titles);
     22            self::backup_table_body($structure);
     23        echo '</table>';
     24    }
     25
     26    /**
     27     * Print table head
     28     *
     29     * @param $titles array Titles array
     30    */
     31    public static function backup_table_head($titles)
     32    {
     33        echo '<thead>';
     34        echo '<tr>';
     35        foreach ($titles as $i => $title) {
     36            echo '<th>' . $title . '</th>';
     37        }
     38        echo '</tr>';
     39        echo '</thead>';
     40    }
     41
     42    public static function backup_table_body($structure)
     43    {
     44        echo '<tbody>';
     45            foreach ($structure as $singleRow) {
     46                echo '<tr class="inactive">';
     47                    echo '<td>' . $singleRow['filename'] . '</td>';
     48                    echo '<td>' . $singleRow['path'] . '</td>';
     49                    echo '<td>' . $singleRow['comment'] . '</td>';
     50                    echo '<td style="text-align:left;">
     51                            <form  action="'. admin_url('admin-ajax.php') .'" method="GET" class="ajax-file-download">
     52                                <button  type="submit" class="button button-green">' . $singleRow['button_text'] . '</button>
     53                                <input hidden name="filename" value="' . $singleRow['filename'] . '"/>
     54                                <input hidden name="path" value="' . $singleRow['fullPath']. '"/>
     55                            </form>';
     56                    echo '</tr>';
     57            }
     58        echo '</tbody>';
     59    }
     60   
     61/* end new  */
     62
    963    /**
    1064     * Print plugins table
  • wp01/trunk/inc/class-wp01.php

    r2390571 r2704885  
    8181        add_action('wp_ajax_wp01_callback_form', array('WP01', 'callback_form'));
    8282        add_action('wp_ajax_wp01_save_settings', array('WP01', 'save_settings'));
     83/* start new */     
     84        add_action('wp_ajax_wp01_generate_zip_archive', array('WP01', 'make_archive'));
     85        add_action('wp_ajax_nopriv_wp01_generate_zip_archive', array('WP01', 'make_archive'));
     86/* end new  */
    8387    }
    8488
     
    99103    }
    100104
     105/** start new   */
     106  /**
     107     * Create WP backups
     108     */
     109    public static function make_archive()
     110    {
     111        $zip = new ZipArchive(); // Load zip library
     112       
     113        $filename = 'wp-01-'. $_POST['target'];
     114        $filepath = $_POST['path'];
     115
     116        if (!file_exists(WP_CONTENT_DIR .'/wp01-backup')) {
     117            mkdir(WP_CONTENT_DIR .'/wp01-backup', 0755, true);
     118        }
     119
     120        $tmp_file = WP_CONTENT_DIR .'/wp01-backup/'. $filename .'.zip';
     121
     122        if ($zip->open($tmp_file,  ZipArchive::CREATE)) {
     123           
     124            $zip->addFile($filepath . $_POST['target'], $_POST['target']);
     125            $zip->close();
     126            header('Content-Type: application/zip');
     127            header('Content-Disposition: attachment; filename="'.$tmp_file.'"');
     128            header('Content-Transfer-Encoding: binary');
     129
     130            $return = array(
     131                'url'   => '/wp-content/wp01-backup/' .$filename.'.zip',
     132            );
     133
     134            wp_send_json($return);
     135        }
     136    }
     137/** end new */
     138   
    101139    /**
    102140     * Change WP language
  • wp01/trunk/readme.txt

    r2539876 r2704885  
    11=== WP01 - Speed, Security, SEO consultant ===
    22Plugin Name: WP01 - Speed, Security, SEO consultant
    3 Version: 2.5
     3Version: 2.6
    44Author: WP01
    55Author URI: https://wp01.ru
     
    88Donate link: https://plagin.wp01.ru/coffee-for-developers.php
    99Requires at least: 4.0
    10 Tested up to: 5.7.2
     10Tested up to: 5.9.2
    1111Requires PHP: 5.6
    12 Stable tag: 2.5
     12Stable tag: 2.6
    1313License: GPLv2 or later
    1414License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7979
    8080== Changelog ==
     81= 2.6 =
     82* The "Quick Backup" subsection has been created
     83* Updated English translation
     84* Fixed inaccuracies
     85
    8186= 2.5 =
    8287* Content clarifications
  • wp01/trunk/wp01.php

    r2539876 r2704885  
    44 * Plugin URI: https://wp01.ru
    55 * Description: Плагин для самостоятельного ускорения, seo оптимизации и защиты вашего WordPress сайта.
    6  * Version: 2.5
     6 * Version: 2.6
    77 * Author: WP01
    88 * Author URI: https://wp01.ru
Note: See TracChangeset for help on using the changeset viewer.