Version Description
- 2018-05-01
- Fix link checker.
- Add default parameter 'book_id' to function 'gwolle_gb_addon_get_total_entries'.
Download this release
Release Info
Developer | mpol |
Plugin | Gwolle Guestbook |
Version | 2.5.1 |
Comparing to | |
See all releases |
Code changes from version 2.5.0 to 2.5.1
- frontend/css/gwolle-gb-frontend.css +3 -0
- frontend/gb-form-posthandling.php +5 -4
- frontend/gb-form.php +8 -6
- frontend/gb-total.php +6 -2
- gwolle-gb.php +2 -2
- readme.txt +6 -1
frontend/css/gwolle-gb-frontend.css
CHANGED
@@ -206,6 +206,9 @@ body .gwolle-gb-content a {
|
|
206 |
#gwolle_gb .gb-entry .gb-entry-content {
|
207 |
padding-left: 10px;
|
208 |
}
|
|
|
|
|
|
|
209 |
|
210 |
|
211 |
/* Metabox */
|
206 |
#gwolle_gb .gb-entry .gb-entry-content {
|
207 |
padding-left: 10px;
|
208 |
}
|
209 |
+
#gwolle_gb .gb-entry .gb-entry-content img {
|
210 |
+
max-width: 100%;
|
211 |
+
}
|
212 |
|
213 |
|
214 |
/* Metabox */
|
frontend/gb-form-posthandling.php
CHANGED
@@ -363,16 +363,17 @@ function gwolle_gb_frontend_posthandling() {
|
|
363 |
|
364 |
/* Scan with Link Checker. */
|
365 |
$marked_by_linkchecker = false;
|
366 |
-
$
|
367 |
if ( get_option( 'gwolle_gb-linkchecker', 'true') == 'true' ) {
|
368 |
$words = explode( " ", $entry->get_content() );
|
369 |
foreach ( $words as $word ) {
|
370 |
-
|
|
|
371 |
// Match
|
372 |
-
$
|
373 |
}
|
374 |
}
|
375 |
-
if ( $
|
376 |
$entry->set_isspam( true );
|
377 |
$marked_by_linkchecker = true;
|
378 |
if (get_option( 'gwolle_gb-refuse-spam', 'false') == 'true') {
|
363 |
|
364 |
/* Scan with Link Checker. */
|
365 |
$marked_by_linkchecker = false;
|
366 |
+
$counter_for_linkchecker = 0;
|
367 |
if ( get_option( 'gwolle_gb-linkchecker', 'true') == 'true' ) {
|
368 |
$words = explode( " ", $entry->get_content() );
|
369 |
foreach ( $words as $word ) {
|
370 |
+
$pattern = '/(http|https)\:\/\/?/';
|
371 |
+
if ( preg_match( $pattern, $word, $matches ) ) {
|
372 |
// Match
|
373 |
+
$counter_for_linkchecker++;
|
374 |
}
|
375 |
}
|
376 |
+
if ( $counter_for_linkchecker > 1 ) {
|
377 |
$entry->set_isspam( true );
|
378 |
$marked_by_linkchecker = true;
|
379 |
if (get_option( 'gwolle_gb-refuse-spam', 'false') == 'true') {
|
frontend/gb-form.php
CHANGED
@@ -281,9 +281,10 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
|
|
281 |
$honeypot_value = get_option( 'gwolle_gb-honeypot_value', 15 );
|
282 |
$output .= '
|
283 |
<div class="' . $field_name . '" style="display:none;">
|
284 |
-
<div class="label"
|
285 |
-
<label for="' . $
|
286 |
-
|
|
|
287 |
<div class="input">
|
288 |
<input value="' . $honeypot_value . '" type="text" name="' . $field_name . '" id="' . $field_name . '" placeholder="" />
|
289 |
<input value="" type="text" name="' . $field_name2 . '" id="' . $field_name2 . '" placeholder="" />
|
@@ -299,9 +300,10 @@ function gwolle_gb_frontend_write( $shortcode_atts, $shortcode ) {
|
|
299 |
$random = rand( 100, 100000 );
|
300 |
$output .= '
|
301 |
<div class="' . $field_name . '" style="display:none;">
|
302 |
-
<div class="label"
|
303 |
-
<label for="' . $
|
304 |
-
|
|
|
305 |
<div class="input">
|
306 |
<input value="' . $random . '" type="text" name="' . $field_name . '" id="' . $field_name . '" placeholder="" />
|
307 |
<input value="' . $random . '" type="text" name="' . $field_name2 . '" id="' . $field_name2 . '" placeholder="" />
|
281 |
$honeypot_value = get_option( 'gwolle_gb-honeypot_value', 15 );
|
282 |
$output .= '
|
283 |
<div class="' . $field_name . '" style="display:none;">
|
284 |
+
<div class="label">
|
285 |
+
<label for="' . $field_name . '" class="text-primary">' . esc_html__('Do not touch this', 'gwolle-gb') . ':</label>
|
286 |
+
<label for="' . $field_name2 . '" class="text-primary">' . esc_html__('Do not touch this', 'gwolle-gb') . ':</label>
|
287 |
+
</div>
|
288 |
<div class="input">
|
289 |
<input value="' . $honeypot_value . '" type="text" name="' . $field_name . '" id="' . $field_name . '" placeholder="" />
|
290 |
<input value="" type="text" name="' . $field_name2 . '" id="' . $field_name2 . '" placeholder="" />
|
300 |
$random = rand( 100, 100000 );
|
301 |
$output .= '
|
302 |
<div class="' . $field_name . '" style="display:none;">
|
303 |
+
<div class="label">
|
304 |
+
<label for="' . $field_name . '" class="text-primary">' . esc_html__('Do not touch this', 'gwolle-gb') . ':</label>
|
305 |
+
<label for="' . $field_name2 . '" class="text-primary">' . esc_html__('Do not touch this', 'gwolle-gb') . ':</label>
|
306 |
+
</div>
|
307 |
<div class="input">
|
308 |
<input value="' . $random . '" type="text" name="' . $field_name . '" id="' . $field_name . '" placeholder="" />
|
309 |
<input value="' . $random . '" type="text" name="' . $field_name2 . '" id="' . $field_name2 . '" placeholder="" />
|
frontend/gb-total.php
CHANGED
@@ -11,15 +11,19 @@ if ( strpos($_SERVER['PHP_SELF'], basename(__FILE__) )) {
|
|
11 |
|
12 |
|
13 |
/*
|
14 |
-
* Display the total number of entries.
|
15 |
*
|
16 |
* @param string $html html content of the filter.
|
17 |
-
* @param array $args the parameters of the query for visible entries
|
18 |
* @return string $html new html content of the filter.
|
19 |
*
|
20 |
* @since 2.3.2
|
21 |
*/
|
22 |
function gwolle_gb_addon_get_total_entries( $html, $args ) {
|
|
|
|
|
|
|
|
|
23 |
$key = 'gwolle_gb_frontend_pagination_book_' . $args['book_id'];
|
24 |
$entries_total = get_transient( $key );
|
25 |
if ( false === $entries_total ) {
|
11 |
|
12 |
|
13 |
/*
|
14 |
+
* Display the total number of entries in a book.
|
15 |
*
|
16 |
* @param string $html html content of the filter.
|
17 |
+
* @param array $args the parameters of the query for visible entries. Defaults to 'book_id' = 1.
|
18 |
* @return string $html new html content of the filter.
|
19 |
*
|
20 |
* @since 2.3.2
|
21 |
*/
|
22 |
function gwolle_gb_addon_get_total_entries( $html, $args ) {
|
23 |
+
if ( ! isset($args['book_id']) ) {
|
24 |
+
$args['book_id'] = 1; // default
|
25 |
+
}
|
26 |
+
|
27 |
$key = 'gwolle_gb_frontend_pagination_book_' . $args['book_id'];
|
28 |
$entries_total = get_transient( $key );
|
29 |
if ( false === $entries_total ) {
|
gwolle-gb.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Gwolle Guestbook
|
4 |
Plugin URI: http://zenoweb.nl
|
5 |
Description: Gwolle Guestbook is not just another guestbook for WordPress. The goal is to provide an easy and slim way to integrate a guestbook into your WordPress powered site. Don't use your 'comment' section the wrong way - install Gwolle Guestbook and have a real guestbook.
|
6 |
-
Version: 2.5.
|
7 |
Author: Marcel Pol
|
8 |
Author URI: http://zenoweb.nl
|
9 |
License: GPLv2 or later
|
@@ -32,7 +32,7 @@ Domain Path: /lang/
|
|
32 |
|
33 |
|
34 |
// Plugin Version
|
35 |
-
define('GWOLLE_GB_VER', '2.5.
|
36 |
|
37 |
|
38 |
/*
|
3 |
Plugin Name: Gwolle Guestbook
|
4 |
Plugin URI: http://zenoweb.nl
|
5 |
Description: Gwolle Guestbook is not just another guestbook for WordPress. The goal is to provide an easy and slim way to integrate a guestbook into your WordPress powered site. Don't use your 'comment' section the wrong way - install Gwolle Guestbook and have a real guestbook.
|
6 |
+
Version: 2.5.1
|
7 |
Author: Marcel Pol
|
8 |
Author URI: http://zenoweb.nl
|
9 |
License: GPLv2 or later
|
32 |
|
33 |
|
34 |
// Plugin Version
|
35 |
+
define('GWOLLE_GB_VER', '2.5.1');
|
36 |
|
37 |
|
38 |
/*
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Gwolle, mpol
|
|
3 |
Tags: guestbook, guest book, livre d'or, Gästebuch, review
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 2.5.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
|
@@ -405,6 +405,11 @@ But if you don't use standard comments, you can just as easily use the comment s
|
|
405 |
|
406 |
== Changelog ==
|
407 |
|
|
|
|
|
|
|
|
|
|
|
408 |
= 2.5.0 =
|
409 |
* 2018-04-13
|
410 |
* Improve custom quiz question.
|
3 |
Tags: guestbook, guest book, livre d'or, Gästebuch, review
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 2.5.1
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
|
405 |
|
406 |
== Changelog ==
|
407 |
|
408 |
+
= 2.5.1 =
|
409 |
+
* 2018-05-01
|
410 |
+
* Fix link checker.
|
411 |
+
* Add default parameter 'book_id' to function 'gwolle_gb_addon_get_total_entries'.
|
412 |
+
|
413 |
= 2.5.0 =
|
414 |
* 2018-04-13
|
415 |
* Improve custom quiz question.
|