Business Directory Plugin - Version 3.6.3

Version Description

Download this release

Release Info

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

Code changes from version 3.6.2.2 to 3.6.3

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.7
6
  Tested up to: 4.1.1
7
- Last Updated: 2015-Apr-9
8
- Stable tag: tags/3.6.2.2
9
  License: GPLv2 or later
10
 
11
  Build local directories, business provider listings, Yellow-Pages directories, Yelp-like review sections and much more!
@@ -113,6 +113,10 @@ If you are having problems please visit [support forum](http://www.businessdirec
113
 
114
  == Changelog ==
115
 
 
 
 
 
116
  = Version 3.6.2.2 =
117
  * Added EDD updater class change to bring class up to 1.6
118
 
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.7
6
  Tested up to: 4.1.1
7
+ Last Updated: 2015-Apr-10
8
+ Stable tag: tags/3.6.3
9
  License: GPLv2 or later
10
 
11
  Build local directories, business provider listings, Yellow-Pages directories, Yelp-like review sections and much more!
113
 
114
  == Changelog ==
115
 
116
+ = Version 3.6.3 =
117
+ * Fixed bug where a post in draft mode was not displaying due to BD
118
+ * Fixed broken link in admin area for editing renewal emails
119
+
120
  = Version 3.6.2.2 =
121
  * Added EDD updater class change to bring class up to 1.6
122
 
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.2.2
7
  * Author: D. Rodenbaugh
8
  * Author URI: http://businessdirectoryplugin.com
9
  * License: GPLv2 or any later version
@@ -30,7 +30,7 @@
30
  if( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) )
31
  exit();
32
 
33
- define( 'WPBDP_VERSION', '3.6.2.2' );
34
 
35
  define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
36
  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.3
7
  * Author: D. Rodenbaugh
8
  * Author URI: http://businessdirectoryplugin.com
9
  * License: GPLv2 or any later version
30
  if( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) )
31
  exit();
32
 
33
+ define( 'WPBDP_VERSION', '3.6.3' );
34
 
35
  define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
36
  define( 'WPBDP_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
core/class-listings-api.php CHANGED
@@ -94,7 +94,7 @@ class WPBDP_Listings_API {
94
 
95
  $post = get_post( $id );
96
 
97
- if ( WPBDP_POST_TYPE != $post->post_type )
98
  return $shortlink;
99
 
100
  return $this->_post_link( $shortlink, $post );
@@ -116,6 +116,9 @@ class WPBDP_Listings_API {
116
  }
117
 
118
  public function _preview_post_link( $url, $post ) {
 
 
 
119
  if ( wpbdp_rewrite_on() )
120
  $url = remove_query_arg( array( 'post_type', 'p' ), $url );
121
 
94
 
95
  $post = get_post( $id );
96
 
97
+ if ( WPBDP_POST_TYPE != get_post_type( $post ) || ! wpbdp_get_page_id( 'main' ) )
98
  return $shortlink;
99
 
100
  return $this->_post_link( $shortlink, $post );
116
  }
117
 
118
  public function _preview_post_link( $url, $post ) {
119
+ if ( WPBDP_POST_TYPE != get_post_type( $post ) || ! wpbdp_get_page_id( 'main' ) )
120
+ return $url ;
121
+
122
  if ( wpbdp_rewrite_on() )
123
  $url = remove_query_arg( array( 'post_type', 'p' ), $url );
124
 
core/class-settings.php CHANGED
@@ -408,11 +408,12 @@ EOF;
408
  'link' => _x( 'Checkout URL link', 'admin settings', 'WPBDM' ) ) )
409
  );
410
 
 
411
  $s = $this->add_section( $g,
412
  'email-renewal-reminders',
413
  _x( 'Renewal Reminders', 'admin settings', 'WPBDM' ),
414
  str_replace( '<a>',
415
- '<a href="' . admin_url( 'admin.php?page=wpbdp_admin_settings&groupid=listings#listings/renewals' ) . '">',
416
  _x( 'This section refers only to the text of the renewal/expiration notices. You can also <a>configure when the e-mails are sent</a>.', 'admin settings', 'WPBDM' ) ) );
417
 
418
  $this->add_setting( $s,
@@ -651,6 +652,12 @@ EOF;
651
  return trim(str_replace(' ', '', $newvalue));
652
  }
653
 
 
 
 
 
 
 
654
  public function setup_ajax_compat_mode( $setting, $newvalue, $oldvalue = null ) {
655
  if ( $newvalue == $oldvalue )
656
  return;
@@ -1242,13 +1249,7 @@ EOF;
1242
  public function register_in_admin() {
1243
  foreach ($this->groups as $group) {
1244
  foreach ($group->sections as $section) {
1245
- $callback = create_function('', 'echo "<a name=\"' . $section->slug . '\"></a>";');
1246
-
1247
- if ($section->help_text) {
1248
- $t = addslashes( $section->help_text );
1249
- $callback = create_function( '', 'echo \'<p class="description">' . $t . '</p>\';' );
1250
- }
1251
-
1252
  add_settings_section($section->slug, $section->name, $callback, $group->wpslug);
1253
 
1254
  foreach ($section->settings as $setting) {
@@ -1268,6 +1269,21 @@ EOF;
1268
  }
1269
  }
1270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1271
  public static function _validate_setting($name, $newvalue=null, $oldvalue=null) {
1272
  $api = wpbdp_settings_api();
1273
  $setting = $api->settings[$name];
@@ -1391,5 +1407,6 @@ EOF;
1391
  delete_option('wpbusdirman_settings_config');
1392
  }
1393
  }
 
1394
  }
1395
 
408
  'link' => _x( 'Checkout URL link', 'admin settings', 'WPBDM' ) ) )
409
  );
410
 
411
+ $url = admin_url( 'admin.php?page=wpbdp_admin_settings&groupid=listings' ) . '#listings/renewals';
412
  $s = $this->add_section( $g,
413
  'email-renewal-reminders',
414
  _x( 'Renewal Reminders', 'admin settings', 'WPBDM' ),
415
  str_replace( '<a>',
416
+ '<a href="' . esc_url( $url ) . '">',
417
  _x( 'This section refers only to the text of the renewal/expiration notices. You can also <a>configure when the e-mails are sent</a>.', 'admin settings', 'WPBDM' ) ) );
418
 
419
  $this->add_setting( $s,
652
  return trim(str_replace(' ', '', $newvalue));
653
  }
654
 
655
+ public function _print_help_text( $s ) {
656
+ $section = $s;
657
+ wpbdp_debug_e( $section );
658
+ echo 'HI THERE';
659
+ }
660
+
661
  public function setup_ajax_compat_mode( $setting, $newvalue, $oldvalue = null ) {
662
  if ( $newvalue == $oldvalue )
663
  return;
1249
  public function register_in_admin() {
1250
  foreach ($this->groups as $group) {
1251
  foreach ($group->sections as $section) {
1252
+ $callback = create_function( '', 'WPBDP_Settings::_section_cb("' . $group->slug . '", "' . $section->slug . '");' );
 
 
 
 
 
 
1253
  add_settings_section($section->slug, $section->name, $callback, $group->wpslug);
1254
 
1255
  foreach ($section->settings as $setting) {
1269
  }
1270
  }
1271
 
1272
+ public static function _section_cb( $g, $s ) {
1273
+ $api = wpbdp_settings_api();
1274
+
1275
+ $group = $api->groups[ $g ];
1276
+ $section = $group->sections[ $s ];
1277
+
1278
+ echo '<a name="' . $section->slug . '"></a>';
1279
+
1280
+ if ( $section->help_text ) {
1281
+ echo '<p class="description">';
1282
+ echo stripslashes( $section->help_text );
1283
+ echo '</p>';
1284
+ }
1285
+ }
1286
+
1287
  public static function _validate_setting($name, $newvalue=null, $oldvalue=null) {
1288
  $api = wpbdp_settings_api();
1289
  $setting = $api->settings[$name];
1407
  delete_option('wpbusdirman_settings_config');
1408
  }
1409
  }
1410
+
1411
  }
1412