Version Description
- 13.07.2021 = Fixed: Plugin not replacing credits.
Download this release
Release Info
Developer | giucu91 |
Plugin | Remove Footer Credit |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- readme.txt +4 -1
- remove-footer-credit.php +16 -6
- sections/settings.php +1 -1
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wpchill, silkalns
|
|
3 |
Tags: footer, credit, change, modify, replace, remove, link, HTML, text, remove footer credit
|
4 |
Requires at least: 5.2
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 1.0.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv3 or later
|
9 |
|
@@ -32,6 +32,9 @@ This plugin has very minimal options to keep things simple and easier to use. Yo
|
|
32 |
|
33 |
== Changelog ==
|
34 |
|
|
|
|
|
|
|
35 |
= 1.0.7 - 05.07.2021 =
|
36 |
Changed: Updated security fixes for XSS
|
37 |
|
3 |
Tags: footer, credit, change, modify, replace, remove, link, HTML, text, remove footer credit
|
4 |
Requires at least: 5.2
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 1.0.8
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv3 or later
|
9 |
|
32 |
|
33 |
== Changelog ==
|
34 |
|
35 |
+
= 1.0.8 - 13.07.2021 =
|
36 |
+
Fixed: Plugin not replacing credits.
|
37 |
+
|
38 |
= 1.0.7 - 05.07.2021 =
|
39 |
Changed: Updated security fixes for XSS
|
40 |
|
remove-footer-credit.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Remove Footer Credit
|
4 |
* Description: A simple plugin to remove footer credits
|
5 |
-
* Version: 1.0.
|
6 |
* Author: WPChill
|
7 |
* Author URI: https://wpchill.com
|
8 |
* Requires: 5.2 or higher
|
@@ -155,8 +155,8 @@ class RFC_Plugin {
|
|
155 |
|
156 |
$_POST = stripslashes_deep( $_POST );
|
157 |
|
158 |
-
$find =
|
159 |
-
$replace =
|
160 |
|
161 |
$data = array(
|
162 |
'find' => explode( "\n", str_replace( "\r", "", $find ) ),
|
@@ -210,12 +210,22 @@ function jabrfc_ob_call( $buffer ) { // $buffer contains entire page
|
|
210 |
$i = 0;
|
211 |
foreach ( $data['find'] as &$value ) {
|
212 |
|
213 |
-
$value =
|
214 |
-
$replace =
|
215 |
|
216 |
$buffer = str_replace( $value, ( array_key_exists( $i, $data['replace'] ) ? $replace : '' ), $buffer );
|
217 |
$i ++;
|
218 |
}
|
219 |
}
|
220 |
-
return $buffer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
}
|
2 |
/**
|
3 |
* Plugin Name: Remove Footer Credit
|
4 |
* Description: A simple plugin to remove footer credits
|
5 |
+
* Version: 1.0.8
|
6 |
* Author: WPChill
|
7 |
* Author URI: https://wpchill.com
|
8 |
* Requires: 5.2 or higher
|
155 |
|
156 |
$_POST = stripslashes_deep( $_POST );
|
157 |
|
158 |
+
$find = jabrfc_kses( $_POST['find'] );
|
159 |
+
$replace = jabrfc_kses( $_POST['replace'] );
|
160 |
|
161 |
$data = array(
|
162 |
'find' => explode( "\n", str_replace( "\r", "", $find ) ),
|
210 |
$i = 0;
|
211 |
foreach ( $data['find'] as &$value ) {
|
212 |
|
213 |
+
$value = html_entity_decode( jabrfc_kses( $value ) );
|
214 |
+
$replace = html_entity_decode( jabrfc_kses( $data['replace'][ $i ] ) );
|
215 |
|
216 |
$buffer = str_replace( $value, ( array_key_exists( $i, $data['replace'] ) ? $replace : '' ), $buffer );
|
217 |
$i ++;
|
218 |
}
|
219 |
}
|
220 |
+
return $buffer . $value;
|
221 |
+
}
|
222 |
+
|
223 |
+
function jabrfc_kses( $string ){
|
224 |
+
$allowed_protocols = wp_allowed_protocols();
|
225 |
+
|
226 |
+
$string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) );
|
227 |
+
$string = wp_kses_normalize_entities( $string );
|
228 |
+
$string = wp_kses_hook( $string, $allowed_html, $allowed_protocols );
|
229 |
+
|
230 |
+
return $string;
|
231 |
}
|
sections/settings.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
<?php $linkbackPostId = ""; if ($this->options['linkbackPostId']) $linkbackPostId = $this->options['linkbackPostId']; ?>
|
6 |
|
7 |
<h3><?php echo esc_html__('Step 1: Enter text/HTML to remove (one per line)','remove-footer-credit'); ?></h3>
|
8 |
-
<p><textarea name="find" id="find" class="small-text code" rows="6" style="width: 100%;"><?php if ($this->options['find']) echo
|
9 |
<h3><?php echo esc_html__('Step 2: Enter your own footer credit (one per line)','remove-footer-credit'); ?></h3>
|
10 |
<?php wp_editor( $replace, 'replace', $settings = array('quicktags' => true, 'wpautop' => false,'editor_height' => '100', 'teeny' => false) ); ?>
|
11 |
<h3><?php echo esc_html__('Step 3: Please support my work and spread the word (optional)','remove-footer-credit'); ?></h3>
|
5 |
<?php $linkbackPostId = ""; if ($this->options['linkbackPostId']) $linkbackPostId = $this->options['linkbackPostId']; ?>
|
6 |
|
7 |
<h3><?php echo esc_html__('Step 1: Enter text/HTML to remove (one per line)','remove-footer-credit'); ?></h3>
|
8 |
+
<p><textarea name="find" id="find" class="small-text code" rows="6" style="width: 100%;"><?php if ($this->options['find']) echo html_entity_decode(implode("\n",$this->options['find'])); ?></textarea></p>
|
9 |
<h3><?php echo esc_html__('Step 2: Enter your own footer credit (one per line)','remove-footer-credit'); ?></h3>
|
10 |
<?php wp_editor( $replace, 'replace', $settings = array('quicktags' => true, 'wpautop' => false,'editor_height' => '100', 'teeny' => false) ); ?>
|
11 |
<h3><?php echo esc_html__('Step 3: Please support my work and spread the word (optional)','remove-footer-credit'); ?></h3>
|