Business Directory Plugin - Version 4.0.2

Version Description

Download this release

Release Info

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

Code changes from version 4.0.1 to 4.0.2

README.TXT CHANGED
@@ -4,8 +4,8 @@ Donate link: http://businessdirectoryplugin.com/premium-modules/
4
  Tags: address book, business directory, chamber of commerce business directory, church directory, company business directory, contact directory, custom business directory, directory, listings directory, local business directory, link directory, member directory, staff directory, directory plugin
5
  Requires at least: 4.1
6
  Tested up to: 4.5
7
- Last Updated: 2016-May-25
8
- Stable tag: tags/4.0.1
9
  License: GPLv2 or later
10
 
11
  Build any kind of local directory, directory of business providers, a Yellow-Pages business directory, Yelp-like review directory and much more!
@@ -130,6 +130,18 @@ If you are having problems please visit [support forum](http://www.businessdirec
130
 
131
  == Changelog ==
132
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  = Version 4.0.1 =
134
  * Fix some PHP warnings and errors
135
  * Fix listings shortcode category support.
4
  Tags: address book, business directory, chamber of commerce business directory, church directory, company business directory, contact directory, custom business directory, directory, listings directory, local business directory, link directory, member directory, staff directory, directory plugin
5
  Requires at least: 4.1
6
  Tested up to: 4.5
7
+ Last Updated: 2016-May-27
8
+ Stable tag: tags/4.0.2
9
  License: GPLv2 or later
10
 
11
  Build any kind of local directory, directory of business providers, a Yellow-Pages business directory, Yelp-like review directory and much more!
130
 
131
  == Changelog ==
132
 
133
+ = Version 4.0.2 =
134
+ * Fixes for themes showing "Untitled" on some directory pages.
135
+ * Fixes for Avada theme.
136
+ * Reduce themes update checking periodicity to 48 hrs.
137
+ * Add missing argument to search form to prevent incorrect search results being returned.
138
+ * Fix to locate a replacement for page.php template for themes that don't have it.
139
+ * Fix random ordering in Featured Listings widget.
140
+ * Fix title filter for modern themes.
141
+ * Fixes for path handling on Windows environments.
142
+ * Fix some PHP warnings resulting from JSON decoding theme files.
143
+ * Do not show a 404 error for empty categories.
144
+
145
  = Version 4.0.1 =
146
  * Fix some PHP warnings and errors
147
  * Fix listings shortcode category support.
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: 4.0.1
7
  * Author: D. Rodenbaugh
8
  * Author URI: http://businessdirectoryplugin.com
9
  * Text Domain: WPBDM
@@ -31,7 +31,7 @@
31
  if( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) )
32
  exit();
33
 
34
- define( 'WPBDP_VERSION', '4.0.1' );
35
 
36
  define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
37
  define( 'WPBDP_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
@@ -1038,7 +1038,7 @@ class WPBDP_Plugin {
1038
 
1039
  }
1040
 
1041
- public function set_view_title( $title = false ) {
1042
  global $wp_query;
1043
 
1044
  if ( empty( $wp_query->wpbdp_view ) || ! is_array( $title ) )
@@ -1047,7 +1047,7 @@ class WPBDP_Plugin {
1047
  $current_view = $this->dispatcher->current_view_object();
1048
 
1049
  if ( ! $current_view )
1050
- return true;
1051
 
1052
  if ( $view_title = $current_view->get_title() )
1053
  $title['title'] = $view_title;
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: 4.0.2
7
  * Author: D. Rodenbaugh
8
  * Author URI: http://businessdirectoryplugin.com
9
  * Text Domain: WPBDM
31
  if( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) )
32
  exit();
33
 
34
+ define( 'WPBDP_VERSION', '4.0.2' );
35
 
36
  define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
37
  define( 'WPBDP_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
1038
 
1039
  }
1040
 
1041
+ public function set_view_title( $title ) {
1042
  global $wp_query;
1043
 
1044
  if ( empty( $wp_query->wpbdp_view ) || ! is_array( $title ) )
1047
  $current_view = $this->dispatcher->current_view_object();
1048
 
1049
  if ( ! $current_view )
1050
+ return $title;
1051
 
1052
  if ( $view_title = $current_view->get_title() )
1053
  $title['title'] = $view_title;
core/class-dispatcher.php CHANGED
@@ -78,7 +78,7 @@ class WPBDP__Dispatcher {
78
 
79
  foreach ( $this->get_view_locations() as $dir ) {
80
  foreach ( $filenames as $f ) {
81
- $path = WPBDP_FS::join( $dir, $f );
82
 
83
  if ( ! file_exists( $path ) )
84
  continue;
78
 
79
  foreach ( $this->get_view_locations() as $dir ) {
80
  foreach ( $filenames as $f ) {
81
+ $path = wp_normalize_path( WPBDP_FS::join( $dir, $f ) );
82
 
83
  if ( ! file_exists( $path ) )
84
  continue;
core/class-query-integration.php CHANGED
@@ -78,7 +78,7 @@ class WPBDP__Query_Integration {
78
  if ( ! $wp_query->wpbdp_our_query )
79
  return;
80
 
81
- if ( ( 'show_listing' == $wp_query->wpbdp_view || $wp_query->wpbdp_is_category ) && empty( $wp_query->posts ) )
82
  $wp_query->is_404 = true;
83
  }
84
 
78
  if ( ! $wp_query->wpbdp_our_query )
79
  return;
80
 
81
+ if ( 'show_listing' == $wp_query->wpbdp_view && empty( $wp_query->posts ) )
82
  $wp_query->is_404 = true;
83
  }
84
 
core/class-wordpress-template-integration.php CHANGED
@@ -5,6 +5,7 @@
5
  class WPBDP__WordPress_Template_Integration {
6
 
7
  private $wp_head_done = false;
 
8
  private $original_post_title = '';
9
 
10
 
@@ -18,7 +19,6 @@ class WPBDP__WordPress_Template_Integration {
18
  public function template_include( $template ) {
19
  global $wp_query;
20
 
21
- // if ( ! $wp_query->wpbdp_our_query )
22
  if ( ! $wp_query->wpbdp_our_query )
23
  return $template;
24
 
@@ -26,14 +26,17 @@ class WPBDP__WordPress_Template_Integration {
26
  return get_404_template();
27
 
28
  global $post;
29
- if ( ! isset( $post ) || ! $post instanceof WP_Post )
30
  return $template;
31
 
32
  add_filter( 'document_title_parts', array( $this, 'modify_global_post_title' ), 1000 );
33
  add_filter( 'wp_title', array( $this, 'modify_global_post_title' ), 1000 );
34
  add_action( 'loop_start', array( $this, 'setup_post_hooks' ) );
35
 
36
- return locate_template( 'page.php' );
 
 
 
37
  }
38
 
39
  public function setup_post_hooks( $query ) {
@@ -42,6 +45,7 @@ class WPBDP__WordPress_Template_Integration {
42
 
43
  add_action( 'the_post', array( $this, 'spoof_post' ) );
44
  remove_filter( 'the_content', 'wpautop' );
 
45
  add_filter( 'the_content', array( $this, 'display_view_in_content' ), 5 );
46
  remove_action( 'loop_start', array( $this, 'setup_post_hooks' ) );
47
  }
@@ -51,27 +55,51 @@ class WPBDP__WordPress_Template_Integration {
51
  remove_action( 'the_post', array( $this, 'spoof_post' ) );
52
  }
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  public function display_view_in_content( $content = '' ) {
 
 
 
 
 
55
  remove_filter( 'the_content', array( $this, 'display_view_in_content' ), 5 );
56
  // add_filter( 'the_content', 'wpautop' );
57
  $this->restore_things();
58
 
59
  $html = wpbdp_current_view_output();
60
 
61
- // if ( $view = wpbdp_current_view_output() )
62
- // $html = $view->render();
63
- // else
64
- // $html = '';
65
-
66
  if ( ! is_404() )
67
  $this->end_query();
68
 
 
 
69
  return $html;
70
  }
71
 
72
  public function modify_global_post_title( $title = '' ) {
73
  global $post;
74
 
 
 
 
75
  // Set the title to an empty string (but record the original)
76
  $this->original_post_title = $post->post_title;
77
  $post->post_title = '';
@@ -142,8 +170,10 @@ class WPBDP__WordPress_Template_Integration {
142
 
143
  // FIXME: we need a better way to handle this, since it might be that a shortcode is being used and not something
144
  // really dispatched through BD.
145
- if ( $wp_query->wpbdp_view )
146
  $classes[] = 'business-directory';
 
 
147
 
148
  return $classes;
149
  }
5
  class WPBDP__WordPress_Template_Integration {
6
 
7
  private $wp_head_done = false;
8
+ private $displayed = false;
9
  private $original_post_title = '';
10
 
11
 
19
  public function template_include( $template ) {
20
  global $wp_query;
21
 
 
22
  if ( ! $wp_query->wpbdp_our_query )
23
  return $template;
24
 
26
  return get_404_template();
27
 
28
  global $post;
29
+ if ( empty( $wp_query->wpbdp_view ) && ( ! isset( $post ) || ! $post instanceof WP_Post ) )
30
  return $template;
31
 
32
  add_filter( 'document_title_parts', array( $this, 'modify_global_post_title' ), 1000 );
33
  add_filter( 'wp_title', array( $this, 'modify_global_post_title' ), 1000 );
34
  add_action( 'loop_start', array( $this, 'setup_post_hooks' ) );
35
 
36
+ if ( $page_template = locate_template( 'page.php' ) )
37
+ $template = locate_template( 'page.php' );
38
+
39
+ return $template;
40
  }
41
 
42
  public function setup_post_hooks( $query ) {
45
 
46
  add_action( 'the_post', array( $this, 'spoof_post' ) );
47
  remove_filter( 'the_content', 'wpautop' );
48
+ // add_filter( 'the_excerpt', array( $this, 'display_view_in_excerpt' ), 5 );
49
  add_filter( 'the_content', array( $this, 'display_view_in_content' ), 5 );
50
  remove_action( 'loop_start', array( $this, 'setup_post_hooks' ) );
51
  }
55
  remove_action( 'the_post', array( $this, 'spoof_post' ) );
56
  }
57
 
58
+ public function display_view_in_excerpt( $excerpt = '' ) {
59
+ if ( $this->displayed ) {
60
+ remove_filter( 'the_excerpt', array( $this, 'display_view_in_excerpt' ), 5 );
61
+ return '';
62
+ }
63
+
64
+ remove_filter( 'the_excerpt', array( $this, 'display_view_in_excerpt' ), 5 );
65
+ $this->restore_things();
66
+
67
+ $html = wpbdp_current_view_output();
68
+
69
+ if ( ! is_404() )
70
+ $this->end_query();
71
+
72
+ $this->displayed = true;
73
+
74
+ return $html;
75
+ }
76
+
77
  public function display_view_in_content( $content = '' ) {
78
+ if ( $this->displayed ) {
79
+ remove_filter( 'the_content', array( $this, 'display_view_in_content' ), 5 );
80
+ return '';
81
+ }
82
+
83
  remove_filter( 'the_content', array( $this, 'display_view_in_content' ), 5 );
84
  // add_filter( 'the_content', 'wpautop' );
85
  $this->restore_things();
86
 
87
  $html = wpbdp_current_view_output();
88
 
 
 
 
 
 
89
  if ( ! is_404() )
90
  $this->end_query();
91
 
92
+ $this->displayed = true;
93
+
94
  return $html;
95
  }
96
 
97
  public function modify_global_post_title( $title = '' ) {
98
  global $post;
99
 
100
+ if ( ! $post )
101
+ return $title;
102
+
103
  // Set the title to an empty string (but record the original)
104
  $this->original_post_title = $post->post_title;
105
  $post->post_title = '';
170
 
171
  // FIXME: we need a better way to handle this, since it might be that a shortcode is being used and not something
172
  // really dispatched through BD.
173
+ if ( $wp_query->wpbdp_view ) {
174
  $classes[] = 'business-directory';
175
+ $classes[] = 'wpbdp-view-' . $wp_query->wpbdp_view;
176
+ }
177
 
178
  return $classes;
179
  }
core/css/wpbdp.css CHANGED
@@ -814,3 +814,19 @@ body.business-directory #TB_secondLine {
814
  }
815
 
816
  /* }} */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
814
  }
815
 
816
  /* }} */
817
+
818
+ /*
819
+ * {{ Some compat fixes for themes.
820
+ */
821
+
822
+ .single-wpbdp_listing header.entry-header,
823
+ .wpbdp-view-show_category header.entry-header,
824
+ .wpbdp-view-show_tag header.entry-header,
825
+ .wpbdp-view-search header.entry-header,
826
+ .wpbdp-view-submit_listing header.entry-header {
827
+ display: none;
828
+ }
829
+
830
+ /*
831
+ * }}
832
+ */
core/css/wpbdp.min.css CHANGED
@@ -1 +1 @@
1
- form#wpbdmsearchform{padding:12px 0;text-align:center}form#wpbdmsearchform input{display:inline}form#wpbdmsearchform .wpbdmsearchbutton{margin-top:5px}form#wpbdmsearchform a.advanced-search-link{font-size:70%;display:block}#wpbdp-search-form{padding-left:10px}#wpbdp-search-form .wpbdp-search-filter{margin-bottom:10px;clear:both}#wpbdp-search-form .wpbdp-search-filter>.wpbdp-search-field-label{display:block;width:40%;float:left}#wpbdp-search-form .wpbdp-search-filter>div.field{display:block;width:60%;margin-left:40%;padding-left:5px}#wpbdp-search-form .wpbdp-search-filter>div.field>input[type="text"]{width:90%}#wpbdp-search-form .wpbdp-search-filter>div.field>select{width:90%}#wpbdp-search-form input[type="submit"]{width:100px;float:none;margin:auto}.cf:before,.cf:after{content:" ";display:table}.cf:after{clear:both}.cf{*zoom:1}.wpbdp-pagination{margin:25px 0 0 0}.wpbdp-pagination .next{float:right}.listing-actions form{margin:0;padding:0;display:inline}.listing-actions input{margin:0}.listing-actions input.delete-listing{margin-left:5px;margin-right:30px;color:#f00 !important}.listing-actions a.button{padding:5px 10px;font-size:11px;text-decoration:none;background-color:#e6e6e6;color:#7c7c7c;background-repeat:repeat-x;background-image:-moz-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-ms-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-webkit-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-o-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:linear-gradient(top,#f4f4f4,#e6e6e6);border:1px solid #d2d2d2;border-radius:3px;box-shadow:0 1px 2px rgba(64,64,64,0.1);margin-right:3px}.listing-actions a.button:hover{color:#5e5e5e;background-color:#ebebeb;background-repeat:repeat-x;background-image:-moz-linear-gradient(top,#f9f9f9,#ebebeb);background-image:-ms-linear-gradient(top,#f9f9f9,#ebebeb);background-image:-webkit-linear-gradient(top,#f9f9f9,#ebebeb);background-image:-o-linear-gradient(top,#f9f9f9,#ebebeb);background-image:linear-gradient(top,#f9f9f9,#ebebeb)}.listing-actions a.delete-listing{margin-left:20px;color:red}.wpbdp-listing .listing-details .field-value{margin-bottom:10px;width:100%;float:none}.wpbdmsingledetails .singledetailsview .field-value{margin-bottom:10px}.field-value label{color:#444;font-weight:bold}.wpbdp-listing-excerpt{padding:10px;border-bottom:dotted 1px #ddd}.wpbdp-listing-excerpt.odd{background:#eee}.wpbdp-listing-excerpt.sticky{background:#fff0cf;border-bottom:solid 1px #b37800}.wpbdp-listing-excerpt .listing-thumbnail{float:right;margin:0 10px 0 0}.wpbdp-listing-excerpt .listing-actions{margin-top:15px}.wpbdp-listing-single .listing-actions{margin-bottom:25px}.wpbdp-listing-single .stickytag{float:right;margin-top:-68px}.wpbdp-listing-single .stickytag img{border:0;box-shadow:none;background:transparent}.wpbdp-listing-single .listing-title{padding:2px 8px;background:#efefef;border:dotted 1px #ddd;margin-bottom:7px}.wpbdp-listing-single .listing-title h2{clear:none;margin:0}.wpbdp-listing-single .main-image{float:right;margin-left:10px;padding:5px}.wpbdp-listing-single .main-image a{position:relative !important}.wpbdp-listing-single .main-image img{border:solid 1px #333}.wpbdp-listing-single .extra-images{margin-top:10px;clear:both}.wpbdp-listing-single .extra-images ul{margin:0 auto;width:100%}.wpbdp-listing-single .extra-images ul li{list-style-type:none;display:inline;margin-left:5px}.wpbdp-listing-single .extra-images ul li img{display:inline;vertical-align:top;margin:0 auto;max-width:150px;border:solid 1px #333}.wpbdp-listing .social-fields{margin:20px 0}.wpbdp-listing .social-field{margin:5px 0;height:20px;vertical-align:middle}.social-field.facebook .fb-like>span{overflow:visible !important;width:450px !important;vertical-align:top !important}@media screen and (max-width:500px){.social-field.facebook .fb-like>span{width:100% !important}}.wpbdp-listing-contact-form{margin-top:20px;border-top:dotted 1px #ddd;padding-top:20px;padding-left:10px}.wpbdp-listing-contact-form .send-message-button{margin-left:-10px}.wpbdp-listing-contact-form h3{margin-left:-10px}.wpbdp-listing-contact-form textarea{width:98% !important}.wpbdp-listing .comments{margin-top:20px}.wpbdp-bar{background:#f7f7f7;margin:10px 0 20px 0;padding:5px 10px}.wpbdp-bar .wpbdp-main-links{float:left}.wpbdp-bar .wpbdp-main-links #wpbdp-bar-view-listings-button,.wpbdp-bar .wpbdp-main-links #wpbdp-bar-show-directory-button{margin-right:5px}.wpbdp-bar .wpbdp-search-form{margin:0;padding:0 !important;margin-left:50%}.wpbdp-main-links a{margin-right:15px}.wpbdp-bar .left{float:left;text-align:center}.wpbdp-bar .right{width:300px;float:right}.wpbdp-listings-sort-options{font-size:90%;margin:5px 0;text-align:right}.wpbdp-listings-sort-options .current{font-weight:bold}.wpbdp-page-main_page #wpbdp-categories{clear:both;margin-bottom:20px}ul.wpbdp-categories{margin:0 0 10px 15px;padding:0 10px}ul.wpbdp-categories>li{width:50%;float:left;margin:0}@media screen and (max-width:704px){ul.wpbdp-categories>li{float:none;width:initial}}@media screen and (max-width:500px){ul.wpbdp-categories{font-size:90%}ul.wpbdp-categories ul.children li.cat-item{margin-left:10px;padding:0}}.wpbdp-submit-page h3{margin-bottom:10px}.wpbdp-submit-page .wpbdmp{margin:0}.wpbdp-submit-page legend{font-size:85%;margin-bottom:20px}.wpbdp-submit-page .wpbdp-form-field{margin-bottom:8px}.wpbdp-submit-page .wpbdp-form-field .wpbdmcheckboxclass checkbox{margin-left:0}.wpbdp-submit-page .wpbdp-form-field.required .wpbdp-form-field-label:after{content:' *';font-size:80%}.wpbdp-submit-page .wpbdp-form-field-type-textarea textarea{width:90%;min-height:50px}.wpbdp-submit-page .wpbdp-form-field-association-content textarea{min-height:80px}.wpbdp-form-field .field-description{font-size:90%;color:#696969;float:right}.wpbdp-form-field span.sublabel{font-size:90%;margin-left:10px;margin-right:10px}.wpbdp-form-field.image a.delete{margin-left:10px}ul.validation-errors{margin:15px 0 15px 0}ul.validation-errors li{color:red;margin:3px 0;list-style-position:inside}.wpbdp-submit-page.step-fees h4{background:#ddd;color:#333;padding:10px;margin-bottom:5px}.wpbdp-submit-page.step-images #image-upload-form{margin:15px 10px}.wpbdp-submit-page.step-images .wpbdp-image{float:left;border-bottom:dotted 1px #efefef;margin-right:10px;margin-bottom:10px;vertical-align:top}.wpbdp-submit-page.step-images .wpbdp-image img{vertical-align:top;text-align:center;max-width:150px;height:auto}.wpbdp-submit-page.step-images .wpbdp-image-draggable-highlight{width:160px;height:160px;margin:0 10px;background:red;float:left}.wpbdp-submit-page.step-images .area-and-conditions #image-upload-dnd-area{float:left;width:72%}.wpbdp-submit-page.step-images .area-and-conditions #image-upload-conditions{float:right;width:25%;color:#666}.wpbdp-submit-page.step-images .area-and-conditions #image-upload-conditions dl{margin:0}.wpbdp-submit-page.step-images #image-upload-form-no-js{width:0;height:0;overflow:hidden;visibility:hidden}.wpbdp-submit-page.step-images .wpbdp-image .delete-image{color:red}.wpbdp-submit-page .upgrade-to-featured-option{border:solid 1px #666;padding:5px 10px;margin:25px 0 25px 0;font-size:90%}.wpbdp-msg{font-size:85%;padding:.6em;border:solid 1px #e6db55;color:#555;margin:5px 0;background:#fffbcc;border-radius:3px}.wpbdp-msg.error{background-color:#ffebe8;border-color:#C00}.wpbdp-submit-page table.fee-options{width:100%}.wpbdp-submit-page table.fee-options th,.wpbdp-submit-page table.fee-options td{text-align:center}.wpbdp-submit-page table.fee-options .fee-selection{width:5%}.wpbdp-submit-page table.fee-options tr.fee-option td.fee-label{font-weight:bold}.wpbdp-submit-page table.fee-options td.fee-description{font-size:90%;color:#666}#wpbdp-renewal-page .do-not-renew-listing{margin:40px 0;border:solid 1px #eee;font-size:95%}#wpbdp-renewal-page .do-not-renew-listing .header{background:#bc0b0b;color:#fff;text-align:center;font-weight:bold;padding:2px 0}#wpbdp-renewal-page .do-not-renew-listing input[type="submit"]{color:#900000}.wpbdp-recaptcha-error{color:red}#wpbdp-delete-listing-page form.confirm-form{margin-top:30px}#wpbdp-delete-listing-page input.delete-listing-confirm{margin-left:20px;color:#c00}#googlewallet-buy img{border:0;box-shadow:none}.wpbdp-checkout input[type="image"]{padding:0;border:0;box-shadow:none;width:auto}table#wpbdp-manage-recurring th.listing-title,table#wpbdp-manage-recurring td.listing-title{min-width:200px}table#wpbdp-manage-recurring a.cancel-subscription{color:red}#wpbdp-manage-recurring-cancel dl dd{margin-left:10px}.wpbdp-cc-form{padding:0;width:90%}.wpbdp-cc-form h4{margin:0}.wpbdp-cc-field input{width:auto}.wpbdp-cc-field label{display:block;font-weight:bold;text-align:right;padding-right:10px}#wpbdp-billing-information .billing-info-section h4{margin-bottom:5px}#wpbdp-billing-information .billing-info-section table{margin:10px 0 0 20px}#wpbdp-billing-information .form-buttons{margin:15px 0}.wpbdp-show-on-mobile{display:none}@media screen and (max-width:500px){.wpbdp-show-on-mobile{display:inline !important}.wpbdp-hide-on-mobile{display:none}.wpbdp-bar .wpbdp-main-links{display:block;float:none;text-align:center}.wpbdp-bar .wpbdp-main-links #wpbdp-bar-submit-listing-button{margin-bottom:5px;display:inline-block}.wpbdp-bar .wpbdp-main-links #wpbdp-bar-view-listings-button{display:inline-block;float:left;margin-right:20px}.wpbdp-bar .wpbdp-main-links input[type="button"]{display:block;margin-bottom:2px}.wpbdp-bar form.wpbdp-search-form{display:block;margin-left:0;margin-top:10px}.wpbdp-bar form.wpbdp-search-form #intextbox{margin-bottom:5px;padding:4px}.wpbdp-bar form.wpbdp-search-form input[type="text"]{padding:4px 0;margin:0 0 2px 0}.wpbdp-listings-sort-options{font-size:90%}.wpbdp-listing.wpbdp-listing{font-size:90%}.wpbdp-listing.wpbdp-listing-excerpt .field-value>label{display:block}.wpbdp-listing.wpbdp-listing-excerpt .listing-thumbnail{padding:5px}.wpbdp-listing .listing-actions input{font-size:85%}.wpbdp-listing .listing-actions input.back-to-dir{float:right}.wpbdp-listing.wpbdp-listing-single .main-image{display:block;float:none;padding:0;margin:0 0 10px 0;text-align:center;max-width:90%}.wpbdp-listing.wpbdp-listing-single .field-value>label{display:block}.wpbdp-submit-page.step-images #image-upload-dnd-area{font-size:90%;float:none !important;width:100% !important}.wpbdp-submit-page.step-images .dnd-area-inside-error{margin-top:30px}.wpbdp-submit-page.step-images #image-upload-conditions{width:100% !important;float:none !important;font-size:90%}.wpbdp-submit-page.step-images #image-upload-conditions dl{margin:0;padding:0}.wpbdp-submit-page.step-images #image-upload-conditions dl dt{margin:0;margin-right:5px;padding:0;float:left}.wpbdp-submit-page.step-images #image-upload-conditions dl dd{margin:0;padding:0;display:block}.wpbdp-submit-page.step-images .wpbdp-image img{max-width:50%}.wpbdp-listings-sort-options.wpbdp-show-on-mobile{margin-bottom:10px}}body.business-directory #TB_ImageOff .screen-reader-text,body.business-directory #TB_closeWindowButton .screen-reader-text{visibility:hidden}body.business-directory #TB_next{float:right}body.business-directory #TB_prev{float:left}body.business-directory #TB_caption{float:none !important}body.business-directory #TB_closeWindow{padding:0;height:0}body.business-directory #TB_closeWindow .screen-reader-text{display:none}body.business-directory #TB_secondLine{text-align:center}.wpbdp-form-row label{display:block}.wpbdp-form-row.wpbdp-form-textfield input[type="text"]{width:400px}
1
+ form#wpbdmsearchform{padding:12px 0;text-align:center}form#wpbdmsearchform input{display:inline}form#wpbdmsearchform .wpbdmsearchbutton{margin-top:5px}form#wpbdmsearchform a.advanced-search-link{font-size:70%;display:block}#wpbdp-search-form{padding-left:10px}#wpbdp-search-form .wpbdp-search-filter{margin-bottom:10px;clear:both}#wpbdp-search-form .wpbdp-search-filter>.wpbdp-search-field-label{display:block;width:40%;float:left}#wpbdp-search-form .wpbdp-search-filter>div.field{display:block;width:60%;margin-left:40%;padding-left:5px}#wpbdp-search-form .wpbdp-search-filter>div.field>input[type="text"]{width:90%}#wpbdp-search-form .wpbdp-search-filter>div.field>select{width:90%}#wpbdp-search-form input[type="submit"]{width:100px;float:none;margin:auto}.cf:before,.cf:after{content:" ";display:table}.cf:after{clear:both}.cf{*zoom:1}.wpbdp-pagination{margin:25px 0 0 0}.wpbdp-pagination .next{float:right}.listing-actions form{margin:0;padding:0;display:inline}.listing-actions input{margin:0}.listing-actions input.delete-listing{margin-left:5px;margin-right:30px;color:#f00 !important}.listing-actions a.button{padding:5px 10px;font-size:11px;text-decoration:none;background-color:#e6e6e6;color:#7c7c7c;background-repeat:repeat-x;background-image:-moz-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-ms-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-webkit-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:-o-linear-gradient(top,#f4f4f4,#e6e6e6);background-image:linear-gradient(top,#f4f4f4,#e6e6e6);border:1px solid #d2d2d2;border-radius:3px;box-shadow:0 1px 2px rgba(64,64,64,0.1);margin-right:3px}.listing-actions a.button:hover{color:#5e5e5e;background-color:#ebebeb;background-repeat:repeat-x;background-image:-moz-linear-gradient(top,#f9f9f9,#ebebeb);background-image:-ms-linear-gradient(top,#f9f9f9,#ebebeb);background-image:-webkit-linear-gradient(top,#f9f9f9,#ebebeb);background-image:-o-linear-gradient(top,#f9f9f9,#ebebeb);background-image:linear-gradient(top,#f9f9f9,#ebebeb)}.listing-actions a.delete-listing{margin-left:20px;color:red}.wpbdp-listing .listing-details .field-value{margin-bottom:10px;width:100%;float:none}.wpbdmsingledetails .singledetailsview .field-value{margin-bottom:10px}.field-value label{color:#444;font-weight:bold}.wpbdp-listing-excerpt{padding:10px;border-bottom:dotted 1px #ddd}.wpbdp-listing-excerpt.odd{background:#eee}.wpbdp-listing-excerpt.sticky{background:#fff0cf;border-bottom:solid 1px #b37800}.wpbdp-listing-excerpt .listing-thumbnail{float:right;margin:0 10px 0 0}.wpbdp-listing-excerpt .listing-actions{margin-top:15px}.wpbdp-listing-single .listing-actions{margin-bottom:25px}.wpbdp-listing-single .stickytag{float:right;margin-top:-68px}.wpbdp-listing-single .stickytag img{border:0;box-shadow:none;background:transparent}.wpbdp-listing-single .listing-title{padding:2px 8px;background:#efefef;border:dotted 1px #ddd;margin-bottom:7px}.wpbdp-listing-single .listing-title h2{clear:none;margin:0}.wpbdp-listing-single .main-image{float:right;margin-left:10px;padding:5px}.wpbdp-listing-single .main-image a{position:relative !important}.wpbdp-listing-single .main-image img{border:solid 1px #333}.wpbdp-listing-single .extra-images{margin-top:10px;clear:both}.wpbdp-listing-single .extra-images ul{margin:0 auto;width:100%}.wpbdp-listing-single .extra-images ul li{list-style-type:none;display:inline;margin-left:5px}.wpbdp-listing-single .extra-images ul li img{display:inline;vertical-align:top;margin:0 auto;max-width:150px;border:solid 1px #333}.wpbdp-listing .social-fields{margin:20px 0}.wpbdp-listing .social-field{margin:5px 0;height:20px;vertical-align:middle}.social-field.facebook .fb-like>span{overflow:visible !important;width:450px !important;vertical-align:top !important}@media screen and (max-width:500px){.social-field.facebook .fb-like>span{width:100% !important}}.wpbdp-listing-contact-form{margin-top:20px;border-top:dotted 1px #ddd;padding-top:20px;padding-left:10px}.wpbdp-listing-contact-form .send-message-button{margin-left:-10px}.wpbdp-listing-contact-form h3{margin-left:-10px}.wpbdp-listing-contact-form textarea{width:98% !important}.wpbdp-listing .comments{margin-top:20px}.wpbdp-bar{background:#f7f7f7;margin:10px 0 20px 0;padding:5px 10px}.wpbdp-bar .wpbdp-main-links{float:left}.wpbdp-bar .wpbdp-main-links #wpbdp-bar-view-listings-button,.wpbdp-bar .wpbdp-main-links #wpbdp-bar-show-directory-button{margin-right:5px}.wpbdp-bar .wpbdp-search-form{margin:0;padding:0 !important;margin-left:50%}.wpbdp-main-links a{margin-right:15px}.wpbdp-bar .left{float:left;text-align:center}.wpbdp-bar .right{width:300px;float:right}.wpbdp-listings-sort-options{font-size:90%;margin:5px 0;text-align:right}.wpbdp-listings-sort-options .current{font-weight:bold}.wpbdp-page-main_page #wpbdp-categories{clear:both;margin-bottom:20px}ul.wpbdp-categories{margin:0 0 10px 15px;padding:0 10px}ul.wpbdp-categories>li{width:50%;float:left;margin:0}@media screen and (max-width:704px){ul.wpbdp-categories>li{float:none;width:initial}}@media screen and (max-width:500px){ul.wpbdp-categories{font-size:90%}ul.wpbdp-categories ul.children li.cat-item{margin-left:10px;padding:0}}.wpbdp-submit-page h3{margin-bottom:10px}.wpbdp-submit-page .wpbdmp{margin:0}.wpbdp-submit-page legend{font-size:85%;margin-bottom:20px}.wpbdp-submit-page .wpbdp-form-field{margin-bottom:8px}.wpbdp-submit-page .wpbdp-form-field .wpbdmcheckboxclass checkbox{margin-left:0}.wpbdp-submit-page .wpbdp-form-field.required .wpbdp-form-field-label:after{content:' *';font-size:80%}.wpbdp-submit-page .wpbdp-form-field-type-textarea textarea{width:90%;min-height:50px}.wpbdp-submit-page .wpbdp-form-field-association-content textarea{min-height:80px}.wpbdp-form-field .field-description{font-size:90%;color:#696969;float:right}.wpbdp-form-field span.sublabel{font-size:90%;margin-left:10px;margin-right:10px}.wpbdp-form-field.image a.delete{margin-left:10px}ul.validation-errors{margin:15px 0 15px 0}ul.validation-errors li{color:red;margin:3px 0;list-style-position:inside}.wpbdp-submit-page.step-fees h4{background:#ddd;color:#333;padding:10px;margin-bottom:5px}.wpbdp-submit-page.step-images #image-upload-form{margin:15px 10px}.wpbdp-submit-page.step-images .wpbdp-image{float:left;border-bottom:dotted 1px #efefef;margin-right:10px;margin-bottom:10px;vertical-align:top}.wpbdp-submit-page.step-images .wpbdp-image img{vertical-align:top;text-align:center;max-width:150px;height:auto}.wpbdp-submit-page.step-images .wpbdp-image-draggable-highlight{width:160px;height:160px;margin:0 10px;background:red;float:left}.wpbdp-submit-page.step-images .area-and-conditions #image-upload-dnd-area{float:left;width:72%}.wpbdp-submit-page.step-images .area-and-conditions #image-upload-conditions{float:right;width:25%;color:#666}.wpbdp-submit-page.step-images .area-and-conditions #image-upload-conditions dl{margin:0}.wpbdp-submit-page.step-images #image-upload-form-no-js{width:0;height:0;overflow:hidden;visibility:hidden}.wpbdp-submit-page.step-images .wpbdp-image .delete-image{color:red}.wpbdp-submit-page .upgrade-to-featured-option{border:solid 1px #666;padding:5px 10px;margin:25px 0 25px 0;font-size:90%}.wpbdp-msg{font-size:85%;padding:.6em;border:solid 1px #e6db55;color:#555;margin:5px 0;background:#fffbcc;border-radius:3px}.wpbdp-msg.error{background-color:#ffebe8;border-color:#C00}.wpbdp-submit-page table.fee-options{width:100%}.wpbdp-submit-page table.fee-options th,.wpbdp-submit-page table.fee-options td{text-align:center}.wpbdp-submit-page table.fee-options .fee-selection{width:5%}.wpbdp-submit-page table.fee-options tr.fee-option td.fee-label{font-weight:bold}.wpbdp-submit-page table.fee-options td.fee-description{font-size:90%;color:#666}#wpbdp-renewal-page .do-not-renew-listing{margin:40px 0;border:solid 1px #eee;font-size:95%}#wpbdp-renewal-page .do-not-renew-listing .header{background:#bc0b0b;color:#fff;text-align:center;font-weight:bold;padding:2px 0}#wpbdp-renewal-page .do-not-renew-listing input[type="submit"]{color:#900000}.wpbdp-recaptcha-error{color:red}#wpbdp-delete-listing-page form.confirm-form{margin-top:30px}#wpbdp-delete-listing-page input.delete-listing-confirm{margin-left:20px;color:#c00}#googlewallet-buy img{border:0;box-shadow:none}.wpbdp-checkout input[type="image"]{padding:0;border:0;box-shadow:none;width:auto}table#wpbdp-manage-recurring th.listing-title,table#wpbdp-manage-recurring td.listing-title{min-width:200px}table#wpbdp-manage-recurring a.cancel-subscription{color:red}#wpbdp-manage-recurring-cancel dl dd{margin-left:10px}.wpbdp-cc-form{padding:0;width:90%}.wpbdp-cc-form h4{margin:0}.wpbdp-cc-field input{width:auto}.wpbdp-cc-field label{display:block;font-weight:bold;text-align:right;padding-right:10px}#wpbdp-billing-information .billing-info-section h4{margin-bottom:5px}#wpbdp-billing-information .billing-info-section table{margin:10px 0 0 20px}#wpbdp-billing-information .form-buttons{margin:15px 0}.wpbdp-show-on-mobile{display:none}@media screen and (max-width:500px){.wpbdp-show-on-mobile{display:inline !important}.wpbdp-hide-on-mobile{display:none}.wpbdp-bar .wpbdp-main-links{display:block;float:none;text-align:center}.wpbdp-bar .wpbdp-main-links #wpbdp-bar-submit-listing-button{margin-bottom:5px;display:inline-block}.wpbdp-bar .wpbdp-main-links #wpbdp-bar-view-listings-button{display:inline-block;float:left;margin-right:20px}.wpbdp-bar .wpbdp-main-links input[type="button"]{display:block;margin-bottom:2px}.wpbdp-bar form.wpbdp-search-form{display:block;margin-left:0;margin-top:10px}.wpbdp-bar form.wpbdp-search-form #intextbox{margin-bottom:5px;padding:4px}.wpbdp-bar form.wpbdp-search-form input[type="text"]{padding:4px 0;margin:0 0 2px 0}.wpbdp-listings-sort-options{font-size:90%}.wpbdp-listing.wpbdp-listing{font-size:90%}.wpbdp-listing.wpbdp-listing-excerpt .field-value>label{display:block}.wpbdp-listing.wpbdp-listing-excerpt .listing-thumbnail{padding:5px}.wpbdp-listing .listing-actions input{font-size:85%}.wpbdp-listing .listing-actions input.back-to-dir{float:right}.wpbdp-listing.wpbdp-listing-single .main-image{display:block;float:none;padding:0;margin:0 0 10px 0;text-align:center;max-width:90%}.wpbdp-listing.wpbdp-listing-single .field-value>label{display:block}.wpbdp-submit-page.step-images #image-upload-dnd-area{font-size:90%;float:none !important;width:100% !important}.wpbdp-submit-page.step-images .dnd-area-inside-error{margin-top:30px}.wpbdp-submit-page.step-images #image-upload-conditions{width:100% !important;float:none !important;font-size:90%}.wpbdp-submit-page.step-images #image-upload-conditions dl{margin:0;padding:0}.wpbdp-submit-page.step-images #image-upload-conditions dl dt{margin:0;margin-right:5px;padding:0;float:left}.wpbdp-submit-page.step-images #image-upload-conditions dl dd{margin:0;padding:0;display:block}.wpbdp-submit-page.step-images .wpbdp-image img{max-width:50%}.wpbdp-listings-sort-options.wpbdp-show-on-mobile{margin-bottom:10px}}body.business-directory #TB_ImageOff .screen-reader-text,body.business-directory #TB_closeWindowButton .screen-reader-text{visibility:hidden}body.business-directory #TB_next{float:right}body.business-directory #TB_prev{float:left}body.business-directory #TB_caption{float:none !important}body.business-directory #TB_closeWindow{padding:0;height:0}body.business-directory #TB_closeWindow .screen-reader-text{display:none}body.business-directory #TB_secondLine{text-align:center}.wpbdp-form-row label{display:block}.wpbdp-form-row.wpbdp-form-textfield input[type="text"]{width:400px}.single-wpbdp_listing header.entry-header,.wpbdp-view-show_category header.entry-header,.wpbdp-view-show_tag header.entry-header,.wpbdp-view-search header.entry-header,.wpbdp-view-submit_listing header.entry-header{display:none}
core/fieldtypes/class-fieldtypes-textarea.php CHANGED
@@ -126,7 +126,10 @@ class WPBDP_FieldTypes_TextArea extends WPBDP_Form_Field_Type {
126
  global $post;
127
  // Try to protect us from sortcodes messing things for us.
128
  $current_post = $post;
129
- $value = do_shortcode( shortcode_unautop( wpautop( $value ) ) );
 
 
 
130
  $post = $current_post;
131
  } else {
132
  $value = wpautop( $value );
126
  global $post;
127
  // Try to protect us from sortcodes messing things for us.
128
  $current_post = $post;
129
+ // TODO: With #1530 this no longer seems to be necessary or it can lead to problems. Review for a
130
+ // future release.
131
+ // $value = do_shortcode( shortcode_unautop( wpautop( $value ) ) );
132
+ $value = wpautop( $value );
133
  $post = $current_post;
134
  } else {
135
  $value = wpautop( $value );
core/helpers/class-fs.php CHANGED
@@ -135,10 +135,12 @@ final class WPBDP_FS {
135
 
136
  $res = '';
137
  foreach ( $args as $a ) {
138
- $a = trim( $a, $sep );
139
- $res .= $sep . $a;
140
  }
141
 
 
 
142
  return $res;
143
  }
144
 
135
 
136
  $res = '';
137
  foreach ( $args as $a ) {
138
+ $a = rtrim( $a, $sep );
139
+ $res .= $a . $sep;
140
  }
141
 
142
+ $res = substr( $res, 0, -1 );
143
+
144
  return $res;
145
  }
146
 
core/helpers/class-themes-updater.php CHANGED
@@ -67,7 +67,7 @@ class WPBDP_Themes_Updater {
67
  'checked' => time() );
68
  }
69
 
70
- set_transient( 'wpbdp-themes-updates', $data, 60 * 60 * 24 * 7 ); // Make this available a full week.
71
  $this->data = $data;
72
  }
73
 
67
  'checked' => time() );
68
  }
69
 
70
+ set_transient( 'wpbdp-themes-updates', $data, 60 * 60 * 24 * 2 ); // Make this available for 48 hours.
71
  $this->data = $data;
72
  }
73
 
core/installer.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class WPBDP_Installer {
4
 
5
- const DB_VERSION = '11';
6
 
7
  private $installed_version = null;
8
 
@@ -171,7 +171,7 @@ class WPBDP_Installer {
171
  if ( get_option( 'wpbdp-manual-upgrade-pending', false ) )
172
  return;
173
 
174
- $upgrade_routines = array( '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '3.1', '3.2', '3.4', '3.5', '3.6', '3.7', '3.9', '4.0', '5', '6', '7', '8', '11' );
175
 
176
  foreach ( $upgrade_routines as $v ) {
177
  if ( version_compare( $this->installed_version, $v ) < 0 ) {
@@ -900,6 +900,10 @@ class WPBDP_Installer {
900
  update_option( 'wpbdp-active-theme', 'no_theme' );
901
  }
902
 
 
 
 
 
903
  // public function upgrade_to_12() {
904
  // global $wpdb;
905
  //
2
 
3
  class WPBDP_Installer {
4
 
5
+ const DB_VERSION = '12';
6
 
7
  private $installed_version = null;
8
 
171
  if ( get_option( 'wpbdp-manual-upgrade-pending', false ) )
172
  return;
173
 
174
+ $upgrade_routines = array( '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '3.1', '3.2', '3.4', '3.5', '3.6', '3.7', '3.9', '4.0', '5', '6', '7', '8', '11', '12' );
175
 
176
  foreach ( $upgrade_routines as $v ) {
177
  if ( version_compare( $this->installed_version, $v ) < 0 ) {
900
  update_option( 'wpbdp-active-theme', 'no_theme' );
901
  }
902
 
903
+ public function upgrade_to_12() {
904
+ delete_transient( 'wpbdp-themes-updates' );
905
+ }
906
+
907
  // public function upgrade_to_12() {
908
  // global $wpdb;
909
  //
core/themes.php CHANGED
@@ -63,8 +63,8 @@ class WPBDP_Themes {
63
 
64
  function enqueue_theme_scripts() {
65
  $theme = $this->get_active_theme_data();
66
- $css = $theme->assets->css;
67
- $js = $theme->assets->js;
68
 
69
  foreach ( $css as $c ) {
70
  wp_enqueue_style( $theme->id . '-' . $this->_normalize_asset_name( $c ),
@@ -244,7 +244,7 @@ class WPBDP_Themes {
244
  $key = ( ! $key ) ? 'tag' : $key;
245
 
246
  $missing = array();
247
- $suggested_fields = $this->get_active_theme_data( 'suggested_fields' );
248
  $current_fields_tags = $wpdb->get_col( "SELECT tag FROM {$wpdb->prefix}wpbdp_form_fields" );
249
 
250
  $missing_tags = array_diff( $suggested_fields, $current_fields_tags );
63
 
64
  function enqueue_theme_scripts() {
65
  $theme = $this->get_active_theme_data();
66
+ $css = array_filter( (array) $theme->assets->css );
67
+ $js = array_filter( (array) $theme->assets->js );
68
 
69
  foreach ( $css as $c ) {
70
  wp_enqueue_style( $theme->id . '-' . $this->_normalize_asset_name( $c ),
244
  $key = ( ! $key ) ? 'tag' : $key;
245
 
246
  $missing = array();
247
+ $suggested_fields = array_filter( (array) $this->get_active_theme_data( 'suggested_fields' ) );
248
  $current_fields_tags = $wpdb->get_col( "SELECT tag FROM {$wpdb->prefix}wpbdp_form_fields" );
249
 
250
  $missing_tags = array_diff( $suggested_fields, $current_fields_tags );
core/views/show_listing.php CHANGED
@@ -15,7 +15,6 @@ class WPBDP__Views__Show_Listing extends WPBDP_NView {
15
  $html = wpbdp_render_listing( null, 'single', false, true );
16
 
17
  return $html;
18
- // return 'HI THERE';
19
  }
20
 
21
  }
15
  $html = wpbdp_render_listing( null, 'single', false, true );
16
 
17
  return $html;
 
18
  }
19
 
20
  }
core/widget-featured-listings.php CHANGED
@@ -38,7 +38,7 @@ class WPBDP_FeaturedListingsWidget extends WPBDP_Listings_Widget {
38
  "SELECT DISTINCT {$wpdb->posts}.ID FROM {$wpdb->posts} JOIN {$wpdb->postmeta} pm ON pm.post_id = {$wpdb->posts}.ID
39
  JOIN {$wpdb->prefix}wpbdp_listing_fees lf ON lf.listing_id = {$wpdb->posts}.ID
40
  WHERE {$wpdb->posts}.post_status = %s AND {$wpdb->posts}.post_type = %s AND ( lf.sticky = 1 OR ( pm.meta_key = %s AND pm.meta_value = %s ) )
41
- ORDER BY " . ( ( isset( $instance['random_order'] ) && $instance['random_order'] ) ? 'RAND' : $wpdb->posts . '.post_date' ) .
42
  " LIMIT %d",
43
  'publish', WPBDP_POST_TYPE, '_wpbdp[sticky]', 'sticky', $instance['number_of_listings'] );
44
  $featured = $wpdb->get_col( $q );
38
  "SELECT DISTINCT {$wpdb->posts}.ID FROM {$wpdb->posts} JOIN {$wpdb->postmeta} pm ON pm.post_id = {$wpdb->posts}.ID
39
  JOIN {$wpdb->prefix}wpbdp_listing_fees lf ON lf.listing_id = {$wpdb->posts}.ID
40
  WHERE {$wpdb->posts}.post_status = %s AND {$wpdb->posts}.post_type = %s AND ( lf.sticky = 1 OR ( pm.meta_key = %s AND pm.meta_value = %s ) )
41
+ ORDER BY " . ( ( isset( $instance['random_order'] ) && $instance['random_order'] ) ? 'RAND()' : $wpdb->posts . '.post_date' ) .
42
  " LIMIT %d",
43
  'publish', WPBDP_POST_TYPE, '_wpbdp[sticky]', 'sticky', $instance['number_of_listings'] );
44
  $featured = $wpdb->get_col( $q );
templates/search-form.tpl.php CHANGED
@@ -7,8 +7,8 @@
7
 
8
  <?php if ( ! wpbdp_rewrite_on() ): ?>
9
  <input type="hidden" name="page_id" value="<?php echo wpbdp_get_page_id(); ?>" />
10
- <input type="hidden" name="wpbdp_view" value="search" />
11
  <?php endif; ?>
 
12
 
13
  <?php echo $fields; ?>
14
  <?php do_action('wpbdp_after_search_fields'); ?>
7
 
8
  <?php if ( ! wpbdp_rewrite_on() ): ?>
9
  <input type="hidden" name="page_id" value="<?php echo wpbdp_get_page_id(); ?>" />
 
10
  <?php endif; ?>
11
+ <input type="hidden" name="wpbdp_view" value="search" />
12
 
13
  <?php echo $fields; ?>
14
  <?php do_action('wpbdp_after_search_fields'); ?>