Business Directory Plugin - Version 5.2.2.1

Version Description

Download this release

Release Info

Developer businessdirectoryplugin
Plugin Icon 128x128 Business Directory Plugin
Version 5.2.2.1
Comparing to
See all releases

Code changes from version 5.2.2 to 5.2.2.1

README.TXT CHANGED
@@ -5,8 +5,8 @@ Tags: business directory, directory plugin, company business directory, chamber
5
  Requires at least: 4.3
6
  Requires PHP: 5.6
7
  Tested up to: 4.9
8
- Last Updated: 2018-Jun-8
9
- Stable tag: 5.2.2
10
  License: GPLv2 or later
11
 
12
  Build any kind of local directory, directory of business providers, a Yellow-Pages business directory, Yelp-like review directory and much more!
@@ -143,6 +143,9 @@ If you are having problems please visit [support forum](http://www.businessdirec
143
 
144
  == Changelog ==
145
 
 
 
 
146
  = Version 5.2.2 =
147
  * Validate current query is from BD before trying to modify pagination link.
148
  * Style contact form for better space usage.
5
  Requires at least: 4.3
6
  Requires PHP: 5.6
7
  Tested up to: 4.9
8
+ Last Updated: 2018-Jun-11
9
+ Stable tag: 5.2.2.1
10
  License: GPLv2 or later
11
 
12
  Build any kind of local directory, directory of business providers, a Yellow-Pages business directory, Yelp-like review directory and much more!
143
 
144
  == Changelog ==
145
 
146
+ = Version 5.2.2.1 =
147
+ * Fixed fatal error specific to PHP 5.6.
148
+
149
  = Version 5.2.2 =
150
  * Validate current query is from BD before trying to modify pagination link.
151
  * Style contact form for better space usage.
business-directory-plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Business Directory Plugin
4
  * Plugin URI: https://www.businessdirectoryplugin.com
5
  * Description: Provides the ability to maintain a free or paid business directory on your WordPress powered site.
6
- * Version: 5.2.2
7
  * Author: D. Rodenbaugh
8
  * Author URI: https://businessdirectoryplugin.com
9
  * Text Domain: WPBDM
3
  * Plugin Name: Business Directory Plugin
4
  * Plugin URI: https://www.businessdirectoryplugin.com
5
  * Description: Provides the ability to maintain a free or paid business directory on your WordPress powered site.
6
+ * Version: 5.2.2.1
7
  * Author: D. Rodenbaugh
8
  * Author URI: https://businessdirectoryplugin.com
9
  * Text Domain: WPBDM
includes/class-wpbdp.php CHANGED
@@ -19,7 +19,7 @@ final class WPBDP {
19
  }
20
 
21
  private function setup_constants() {
22
- define( 'WPBDP_VERSION', '5.2.2' );
23
 
24
  define( 'WPBDP_PATH', wp_normalize_path( plugin_dir_path( WPBDP_PLUGIN_FILE ) ) );
25
  define( 'WPBDP_INC', trailingslashit( WPBDP_PATH . 'includes' ) );
19
  }
20
 
21
  private function setup_constants() {
22
+ define( 'WPBDP_VERSION', '5.2.2.1' );
23
 
24
  define( 'WPBDP_PATH', wp_normalize_path( plugin_dir_path( WPBDP_PLUGIN_FILE ) ) );
25
  define( 'WPBDP_INC', trailingslashit( WPBDP_PATH . 'includes' ) );
includes/fields/class-fieldtypes-textarea.php CHANGED
@@ -403,23 +403,24 @@ class WPBDP_FieldTypes_TextArea extends WPBDP_Form_Field_Type {
403
  }
404
 
405
  /**
406
- * @SuppressWarnings(PHPMD.UnusedFormalParameters)
407
  */
408
- public function maybe_hide_excerpt_field( &$fields, $listing, $display ) {
409
  if ( 'excerpt' != $display ) {
410
  return $fields;
411
  }
412
 
413
- $content_field = wpbdp_get_form_fields( array( 'association' => 'content') )[0];
 
414
  $excerpt_override = empty( $content_field ) ? 0 : $content_field->data( 'excerpt_override' );
415
-
416
  if ( ! in_array( $excerpt_override , array( 1, 2 ) ) ) {
417
  return $fields;
418
  }
419
 
420
  foreach ( $fields as $k => $f ) {
421
  if ( 'excerpt' == $f->get_association() ) {
422
- if ( 1 == $excerpt_override || ( 2 == $excerpt_override && empty( $f->value() ) ) ) {
423
  unset( $fields[$k] );
424
  }
425
  }
403
  }
404
 
405
  /**
406
+ *
407
  */
408
+ public function maybe_hide_excerpt_field( &$fields, $listing_id, $display ) {
409
  if ( 'excerpt' != $display ) {
410
  return $fields;
411
  }
412
 
413
+ $content_field = wpbdp_get_form_fields( array( 'association' => 'content') );
414
+ $content_field = empty( $content_field ) ? array() : $content_field[0];
415
  $excerpt_override = empty( $content_field ) ? 0 : $content_field->data( 'excerpt_override' );
416
+
417
  if ( ! in_array( $excerpt_override , array( 1, 2 ) ) ) {
418
  return $fields;
419
  }
420
 
421
  foreach ( $fields as $k => $f ) {
422
  if ( 'excerpt' == $f->get_association() ) {
423
+ if ( 1 == $excerpt_override || ( 2 == $excerpt_override && empty( $f->value( $listing_id ) ) ) ) {
424
  unset( $fields[$k] );
425
  }
426
  }