Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit ec87f9d

Browse files
authored
Merge pull request #29 from shinsenter/develop
Updated vulnerable dependency
2 parents cc1953b + cb849fe commit ec87f9d

File tree

10 files changed

+174
-67
lines changed

10 files changed

+174
-67
lines changed

README.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ Lazy loading content on web page can help reduce resource contention and improve
103103

104104
== Changelog ==
105105

106-
1.1.10+3 Bug fixes and improvements
106+
1.1.10+4 Removed external resources
107+
108+
1.1.10 Bug fixes and improvements
107109

108110
1.1.9 Fixed wrong encoding when using mb_detect_encoding() function
109111

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.10+3
1+
1.1.10+4

_dist_/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ fi
3232
cd $plugin_dir
3333

3434
svn rm trunk/* --force
35-
rsync -aHxW --delete --exclude-from=$base_dir/_dist_/blacklist.txt $base_dir/ $plugin_dir/trunk/
36-
mv trunk/defer-wordpress.php $plugin_dir/trunk/$plugin_name.php
35+
rsync -aHxW --delete --exclude-from=$base_dir/_dist_/blacklist.txt $base_dir/ trunk/
36+
mv trunk/defer-wordpress.php trunk/$plugin_name.php
3737

3838
svn add trunk/* --force
3939
svn stat

admin/class-defer-js-admin.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -93,28 +93,6 @@ public function register_menu_plugin_options($links)
9393

9494
public function options_page()
9595
{
96-
if (!defined('DEFER_JS_SPONSORS_HTML')) {
97-
if (class_exists('shinsenter\DeferCache')) {
98-
$cache = new \shinsenter\DeferCache(DEFER_JS_CACHE_DIR, 1);
99-
$html = $cache->get('sponsors' . DEFER_JS_CACHE_SUFFIX);
100-
101-
if (empty($html)) {
102-
$html = @file_get_contents(DEFER_JS_SPONSORS . '?t=' . time());
103-
$cache->put('sponsors' . DEFER_JS_CACHE_SUFFIX, $html, DEFER_JS_CACHE_EXP);
104-
}
105-
106-
define('DEFER_JS_SPONSORS_HTML', $html);
107-
} else {
108-
if (!file_exists(DEFER_JS_CACHE_DIR) || time() - filectime(DEFER_JS_CACHE_DIR) >= DEFER_JS_CACHE_EXP) {
109-
$source = @file_get_contents(DEFER_JS_SPONSORS . '?t=' . time());
110-
$template = "<?php define('DEFER_JS_SPONSORS_HTML', base64_decode('%s'));";
111-
@file_put_contents(DEFER_JS_CACHE_DIR . '/sponsors.php', sprintf($template, base64_encode($source)));
112-
}
113-
114-
@include_once DEFER_JS_CACHE_DIR . '/sponsors.php';
115-
}
116-
}
117-
11896
if (!empty($_REQUEST['reset-settings'])) {
11997
$reset_settings = $this->reset_settings();
12098
}
@@ -170,7 +148,6 @@ public function enqueue_scripts()
170148
* class.
171149
*/
172150

173-
wp_enqueue_script('defer.js', 'https://cdn.jsdelivr.net/npm/@shinsenter/defer.js/dist/defer.min.js', array(), $this->version, false);
174151
wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/defer-js-admin.js', array(), $this->version, false);
175152
}
176153

admin/partials/defer-js-admin-display.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@
381381
</div>
382382
</div>
383383

384+
<?php /*
384385
<div class="postbox">
385386
<h2>Add defer.js library</h2>
386387
<div class="inside">
@@ -404,7 +405,7 @@
404405
</fieldset>
405406
</td>
406407
</tr>
407-
<!--
408+
408409
<tr class="top">
409410
<th>
410411
<label for="deferjs_default_defer_time">Defer timeout</label>
@@ -420,7 +421,6 @@
420421
</fieldset>
421422
</td>
422423
</tr>
423-
-->
424424
</tbody>
425425
</table>
426426
@@ -430,6 +430,7 @@
430430
</p>
431431
</div>
432432
</div>
433+
*/ ?>
433434
</form>
434435
</div>
435436

@@ -473,9 +474,5 @@
473474
<p>From Vietnam 🇻🇳 with love.</p>
474475
</div>
475476
</div>
476-
477-
<?php if (defined('DEFER_JS_SPONSORS_HTML')) {
478-
echo DEFER_JS_SPONSORS_HTML;
479-
} ?>
480477
</div>
481478
</div>

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
},
1111
"require": {
1212
"php": ">=5.6",
13-
"symfony/http-foundation": "3.3.18",
14-
"shinsenter/defer.php": "^1.0"
13+
"symfony/http-foundation": "3.4.36",
14+
"shinsenter/defer.php": "^1.0.0"
1515
},
1616
"config": {
1717
"preferred-install": "dist",

composer.lock

Lines changed: 127 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)