Business Directory Plugin - Version 3.6.8

Version Description

Download this release

Release Info

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

Code changes from version 3.6.7 to 3.6.8

README.TXT CHANGED
@@ -4,8 +4,8 @@ Donate link: http://businessdirectoryplugin.com/premium-modules/
4
  Tags: wordpress directory,wordpress directory plugin, wordpress directory theme,wordpress business directory,business directory,classified ads,classifieds,directory plugin,business directory plugin,directory widget,church directory,address book,address,member directory,members directory,city portal,city portal plugin,city guide plugin,city guide
5
  Requires at least: 3.9
6
  Tested up to: 4.2.2
7
- Last Updated: 2015-Jul-7
8
- Stable tag: tags/3.6.6
9
  License: GPLv2 or later
10
 
11
  Build local directories, business provider listings, Yellow-Pages directories, Yelp-like review sections and much more!
@@ -21,7 +21,7 @@ Business Directory Plugin allows you to build local directories, business provid
21
  = Features =
22
  * Fully customizable form fields
23
  * Accept payment for listings OR have free listings
24
- * Full support for recurring payments (PayPal, Wallet, Stripe)
25
  * Allow for featured/sticky listings for an upgrade fee
26
  * Create multiple fee plans, which can be assigned to categories for posting
27
  * Built in CSV import and export
@@ -114,6 +114,9 @@ If you are having problems please visit [support forum](http://www.businessdirec
114
 
115
  == Changelog ==
116
 
 
 
 
117
  = Version 3.6.6 =
118
  * Added full French translation
119
  * Added full Polish translation
4
  Tags: wordpress directory,wordpress directory plugin, wordpress directory theme,wordpress business directory,business directory,classified ads,classifieds,directory plugin,business directory plugin,directory widget,church directory,address book,address,member directory,members directory,city portal,city portal plugin,city guide plugin,city guide
5
  Requires at least: 3.9
6
  Tested up to: 4.2.2
7
+ Last Updated: 2015-Jul-13
8
+ Stable tag: tags/3.6.7
9
  License: GPLv2 or later
10
 
11
  Build local directories, business provider listings, Yellow-Pages directories, Yelp-like review sections and much more!
21
  = Features =
22
  * Fully customizable form fields
23
  * Accept payment for listings OR have free listings
24
+ * Full support for recurring payments (PayPal, Authorize.net, Stripe)
25
  * Allow for featured/sticky listings for an upgrade fee
26
  * Create multiple fee plans, which can be assigned to categories for posting
27
  * Built in CSV import and export
114
 
115
  == Changelog ==
116
 
117
+ = Version 3.6.7 =
118
+ * Removed namespace support from new reCAPTCHA library to support PHP 5.2 and 5.3
119
+
120
  = Version 3.6.6 =
121
  * Added full French translation
122
  * Added full Polish translation
business-directory-plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Business Directory Plugin
4
  * Plugin URI: http://www.businessdirectoryplugin.com
5
  * Description: Provides the ability to maintain a free or paid business directory on your WordPress powered site.
6
- * Version: 3.6.6
7
  * Author: D. Rodenbaugh
8
  * Author URI: http://businessdirectoryplugin.com
9
  * License: GPLv2 or any later version
@@ -29,7 +29,7 @@
29
  if( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) )
30
  exit();
31
 
32
- define( 'WPBDP_VERSION', '3.6.6' );
33
 
34
  define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
35
  define( 'WPBDP_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
3
  * Plugin Name: Business Directory Plugin
4
  * Plugin URI: http://www.businessdirectoryplugin.com
5
  * Description: Provides the ability to maintain a free or paid business directory on your WordPress powered site.
6
+ * Version: 3.6.7
7
  * Author: D. Rodenbaugh
8
  * Author URI: http://businessdirectoryplugin.com
9
  * License: GPLv2 or any later version
29
  if( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) )
30
  exit();
31
 
32
+ define( 'WPBDP_VERSION', '3.6.7' );
33
 
34
  define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
35
  define( 'WPBDP_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
core/class-recaptcha.php CHANGED
@@ -69,14 +69,19 @@ class WPBDP_reCAPTCHA {
69
  if ( ! $_REQUEST['g-recaptcha-response'] )
70
  return false;
71
 
72
- if ( ! class_exists( 'ReCaptcha\ReCaptcha' ) )
73
- require( WPBDP_PATH . 'vendors/recaptcha/autoload.php' );
74
-
75
- $recaptcha = new \ReCaptcha\ReCaptcha( $this->private_key );
76
- $res = $recaptcha->verify( $_REQUEST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR'] );
77
-
78
- if ( $res->isSuccess() )
79
- return true;
 
 
 
 
 
80
 
81
  $error_msg = _x( 'The reCAPTCHA wasn\'t entered correctly.', 'recaptcha', 'WPBDM' );
82
  return false;
69
  if ( ! $_REQUEST['g-recaptcha-response'] )
70
  return false;
71
 
72
+ $url = 'https://www.google.com/recaptcha/api/siteverify';
73
+ $res = wp_remote_post( $url,
74
+ array( 'body' => array( 'secret' => $this->private_key,
75
+ 'response' => $_REQUEST['g-recaptcha-response'],
76
+ 'remoteip' => $_SERVER['REMOTE_ADDR'] ) )
77
+ );
78
+
79
+ if ( ! is_wp_error( $res ) ) {
80
+ $js = json_decode( $res['body'] );
81
+
82
+ if ( $js && isset( $js->success ) && $js->success )
83
+ return true;
84
+ }
85
 
86
  $error_msg = _x( 'The reCAPTCHA wasn\'t entered correctly.', 'recaptcha', 'WPBDM' );
87
  return false;
core/views.php CHANGED
@@ -8,6 +8,8 @@ if (!class_exists('WPBDP_DirectoryController')) {
8
  class WPBDP_DirectoryController {
9
 
10
  public $action = null;
 
 
11
 
12
  public function __construct() {
13
  add_action( 'wp', array( $this, '_handle_action'), 10, 1 );
@@ -49,6 +51,10 @@ class WPBDP_DirectoryController {
49
  return $this->action;
50
  }
51
 
 
 
 
 
52
  public function dispatch() {
53
  switch ($this->action) {
54
  case 'showlisting':
@@ -185,6 +191,9 @@ class WPBDP_DirectoryController {
185
  $category_id = $category_id ? $category_id : intval(get_query_var('category_id'));
186
  $category_id = is_array( $category_id ) && 1 == count( $category_id ) ? $category_id[0] : $category_id;
187
 
 
 
 
188
  $listings_api = wpbdp_listings_api();
189
 
190
  query_posts(array(
@@ -502,4 +511,12 @@ class WPBDP_DirectoryController {
502
 
503
  }
504
 
 
 
 
 
505
  }
 
 
 
 
8
  class WPBDP_DirectoryController {
9
 
10
  public $action = null;
11
+ private $current_category = 0;
12
+
13
 
14
  public function __construct() {
15
  add_action( 'wp', array( $this, '_handle_action'), 10, 1 );
51
  return $this->action;
52
  }
53
 
54
+ public function current_category_id() {
55
+ return $this->current_category;
56
+ }
57
+
58
  public function dispatch() {
59
  switch ($this->action) {
60
  case 'showlisting':
191
  $category_id = $category_id ? $category_id : intval(get_query_var('category_id'));
192
  $category_id = is_array( $category_id ) && 1 == count( $category_id ) ? $category_id[0] : $category_id;
193
 
194
+ if ( ! $in_listings_shortcode )
195
+ $this->current_category = $category_id;
196
+
197
  $listings_api = wpbdp_listings_api();
198
 
199
  query_posts(array(
511
 
512
  }
513
 
514
+
515
+ function wpbdp_current_category_id() {
516
+ global $wpbdp;
517
+ return $wpbdp->controller->current_category_id();
518
  }
519
+
520
+ }
521
+
522
+