Version Description
Download this release
Release Info
Developer | businessdirectoryplugin |
Plugin | Business Directory Plugin |
Version | 3.6.4 |
Comparing to | |
See all releases |
Code changes from version 3.6.3 to 3.6.4
- README.TXT +10 -4
- business-directory-plugin.php +2 -2
- core/api.php +1 -1
- core/class-csv-import.php +1 -1
- core/class-settings.php +0 -6
- core/css/wpbdp.css +1 -1
- core/css/wpbdp.min.css +1 -1
- core/installer.php +140 -4
- core/utils.php +13 -0
README.TXT
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Contributors: businessdirectoryplugin
|
3 |
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.
|
6 |
-
Tested up to: 4.
|
7 |
-
Last Updated: 2015-Apr-
|
8 |
-
Stable tag: tags/3.6.
|
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,12 @@ If you are having problems please visit [support forum](http://www.businessdirec
|
|
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
|
2 |
Contributors: businessdirectoryplugin
|
3 |
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.8
|
6 |
+
Tested up to: 4.2
|
7 |
+
Last Updated: 2015-Apr-20
|
8 |
+
Stable tag: tags/3.6.4
|
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.4 =
|
117 |
+
* Include an str_getcsv() alternative for setups running PHP < 5.2.
|
118 |
+
* Fix PHP warning appearing when using the directory without a main page defined.
|
119 |
+
* Minor CSS fix for image display on mobile devices.
|
120 |
+
* Add support for WP 4.2 split terms.
|
121 |
+
|
122 |
= Version 3.6.3 =
|
123 |
* Fixed bug where a post in draft mode was not displaying due to BD
|
124 |
* Fixed broken link in admin area for editing renewal emails
|
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.
|
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.
|
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.4
|
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.4' );
|
34 |
|
35 |
define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
|
36 |
define( 'WPBDP_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
|
core/api.php
CHANGED
@@ -43,7 +43,7 @@ function wpbdp_get_page_id($name='main', $unique=true) {
|
|
43 |
}
|
44 |
|
45 |
if ( ! $page_ids )
|
46 |
-
return false;
|
47 |
|
48 |
if ( ! is_array( $page_ids ) )
|
49 |
$page_ids = array( $page_ids );
|
43 |
}
|
44 |
|
45 |
if ( ! $page_ids )
|
46 |
+
return $unique ? false : array();
|
47 |
|
48 |
if ( ! is_array( $page_ids ) )
|
49 |
$page_ids = array( $page_ids );
|
core/class-csv-import.php
CHANGED
@@ -259,7 +259,7 @@ class WPBDP_CSV_Import {
|
|
259 |
private function read_header() {
|
260 |
$file = new SplFileObject( $this->csv_file );
|
261 |
|
262 |
-
$this->set_header( str_getcsv( $file->current() ) );
|
263 |
$file->next();
|
264 |
$this->current_line = $file->key();
|
265 |
$file = null;
|
259 |
private function read_header() {
|
260 |
$file = new SplFileObject( $this->csv_file );
|
261 |
|
262 |
+
$this->set_header( str_getcsv( $file->current(), $this->settings['csv-file-separator'] ) );
|
263 |
$file->next();
|
264 |
$this->current_line = $file->key();
|
265 |
$file = null;
|
core/class-settings.php
CHANGED
@@ -652,12 +652,6 @@ EOF;
|
|
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;
|
652 |
return trim(str_replace(' ', '', $newvalue));
|
653 |
}
|
654 |
|
|
|
|
|
|
|
|
|
|
|
|
|
655 |
public function setup_ajax_compat_mode( $setting, $newvalue, $oldvalue = null ) {
|
656 |
if ( $newvalue == $oldvalue )
|
657 |
return;
|
core/css/wpbdp.css
CHANGED
@@ -648,7 +648,7 @@ table#wpbdp-manage-recurring a.cancel-subscription {
|
|
648 |
}
|
649 |
|
650 |
.wpbdp-listing.wpbdp-listing-excerpt .listing-thumbnail {
|
651 |
-
width: 40
|
652 |
padding: 5px;
|
653 |
}
|
654 |
|
648 |
}
|
649 |
|
650 |
.wpbdp-listing.wpbdp-listing-excerpt .listing-thumbnail {
|
651 |
+
/*width: 40%;*/
|
652 |
padding: 5px;
|
653 |
}
|
654 |
|
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>div.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:red}.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{float:left;margin-right:10px}.social-field.facebook .fb-like span{overflow:visible !important;width:450px !important;margin-right:-375px}.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;height:100%}.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-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}}@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-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 .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}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}.wpbdp-hide-on-mobile{display:none}.wpbdp-bar .wpbdp-main-links{display:block}.wpbdp-bar .wpbdp-main-links input[type="button"]{display:block;margin-bottom:2px}.wpbdp-bar form.wpbdp-search-form{width:49%;display:block}.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{
|
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>div.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:red}.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{float:left;margin-right:10px}.social-field.facebook .fb-like span{overflow:visible !important;width:450px !important;margin-right:-375px}.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;height:100%}.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-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}}@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-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 .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}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}.wpbdp-hide-on-mobile{display:none}.wpbdp-bar .wpbdp-main-links{display:block}.wpbdp-bar .wpbdp-main-links input[type="button"]{display:block;margin-bottom:2px}.wpbdp-bar form.wpbdp-search-form{width:49%;display:block}.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}}
|
core/installer.php
CHANGED
@@ -2,13 +2,15 @@
|
|
2 |
|
3 |
class WPBDP_Installer {
|
4 |
|
5 |
-
const DB_VERSION = '
|
6 |
|
7 |
private $installed_version = null;
|
8 |
|
9 |
|
10 |
public function __construct() {
|
11 |
$this->installed_version = get_option( 'wpbdp-db-version', get_option( 'wpbusdirman_db_version', null ) );
|
|
|
|
|
12 |
}
|
13 |
|
14 |
public function install() {
|
@@ -146,7 +148,7 @@ class WPBDP_Installer {
|
|
146 |
if ( get_option( 'wpbdp-manual-upgrade-pending', false ) )
|
147 |
return;
|
148 |
|
149 |
-
$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' );
|
150 |
|
151 |
foreach ( $upgrade_routines as $v ) {
|
152 |
if ( version_compare( $this->installed_version, $v ) < 0 ) {
|
@@ -693,10 +695,144 @@ class WPBDP_Installer {
|
|
693 |
update_option( WPBDP_Settings::PREFIX . 'user-notifications', array( 'listing-published' ) );
|
694 |
}
|
695 |
delete_option( WPBDP_Settings::PREFIX . 'send-email-confirmation' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
}
|
698 |
|
699 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
700 |
|
701 |
class WPBDP_Installer_Manual_Upgrade {
|
702 |
|
@@ -704,7 +840,7 @@ class WPBDP_Installer_Manual_Upgrade {
|
|
704 |
private $callback;
|
705 |
|
706 |
public function __construct( &$installer, $callback ) {
|
707 |
-
add_action( 'admin_notices', array( &$this, 'upgrade_required_notice' ) );
|
708 |
add_action( 'admin_menu', array( &$this, 'add_upgrade_page' ) );
|
709 |
add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
|
710 |
add_action( 'wp_ajax_wpbdp-manual-upgrade', array( &$this, 'handle_ajax' ) );
|
2 |
|
3 |
class WPBDP_Installer {
|
4 |
|
5 |
+
const DB_VERSION = '5';
|
6 |
|
7 |
private $installed_version = null;
|
8 |
|
9 |
|
10 |
public function __construct() {
|
11 |
$this->installed_version = get_option( 'wpbdp-db-version', get_option( 'wpbusdirman_db_version', null ) );
|
12 |
+
|
13 |
+
add_action( 'split_shared_term', array( &$this, 'handle_term_split' ), 10, 4 );
|
14 |
}
|
15 |
|
16 |
public function install() {
|
148 |
if ( get_option( 'wpbdp-manual-upgrade-pending', false ) )
|
149 |
return;
|
150 |
|
151 |
+
$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' );
|
152 |
|
153 |
foreach ( $upgrade_routines as $v ) {
|
154 |
if ( version_compare( $this->installed_version, $v ) < 0 ) {
|
695 |
update_option( WPBDP_Settings::PREFIX . 'user-notifications', array( 'listing-published' ) );
|
696 |
}
|
697 |
delete_option( WPBDP_Settings::PREFIX . 'send-email-confirmation' );
|
698 |
+
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* This upgrade routine takes care of the term splitting feature that is going to be introduced in WP 4.2.
|
702 |
+
* @since 3.6.4
|
703 |
+
*/
|
704 |
+
public function upgrade_to_5() {
|
705 |
+
global $wp_version;
|
706 |
+
|
707 |
+
if ( ! function_exists( 'wp_get_split_term' ) )
|
708 |
+
return;
|
709 |
+
|
710 |
+
$terms = $this->gather_pre_split_term_ids();
|
711 |
+
foreach ( $terms as $term_id )
|
712 |
+
$this->process_term_split( $term_id );
|
713 |
+
}
|
714 |
+
|
715 |
+
/**
|
716 |
+
* @since 3.6.4
|
717 |
+
*/
|
718 |
+
private function gather_pre_split_term_ids() {
|
719 |
+
global $wpdb;
|
720 |
+
|
721 |
+
$res = array();
|
722 |
+
|
723 |
+
// Fees.
|
724 |
+
$fees = $wpdb->get_col( "SELECT categories FROM {$wpdb->prefix}wpbdp_fees" );
|
725 |
+
foreach ( $fees as $f ) {
|
726 |
+
$data = unserialize( $f );
|
727 |
+
|
728 |
+
if ( isset( $data['all'] ) && $data['all'] )
|
729 |
+
continue;
|
730 |
+
|
731 |
+
if ( ! empty( $data['categories'] ) )
|
732 |
+
$res = array_merge( $res, $data['categories'] );
|
733 |
+
|
734 |
+
}
|
735 |
+
|
736 |
+
// Listing fees.
|
737 |
+
if ( $fee_ids = $wpdb->get_col( "SELECT DISTINCT category_id FROM {$wpdb->prefix}wpbdp_listing_fees" ) ) {
|
738 |
+
$res = array_merge( $res, $fee_ids );
|
739 |
+
}
|
740 |
+
|
741 |
+
// Payments.
|
742 |
+
$payments_terms = $wpdb->get_col(
|
743 |
+
$wpdb->prepare( "SELECT DISTINCT rel_id_1 FROM {$wpdb->prefix}wpbdp_payments_items WHERE ( item_type = %s OR item_type = %s )",
|
744 |
+
'fee',
|
745 |
+
'recurring_fee' )
|
746 |
+
);
|
747 |
+
$res = array_merge( $res, $payments_terms );
|
748 |
+
|
749 |
+
// Category images.
|
750 |
+
$imgs = get_option( 'wpbdp[category_images]', false );
|
751 |
+
if ( $imgs && is_array( $imgs ) ) {
|
752 |
+
if ( !empty ( $imgs['images'] ) )
|
753 |
+
$res = array_merge( $res, array_keys( $imgs['images'] ) );
|
754 |
+
|
755 |
+
if ( ! empty( $imgs['temp'] ) )
|
756 |
+
$res = array_merge( $res, array_keys( $imgs['temp'] ) );
|
757 |
+
}
|
758 |
+
|
759 |
+
return array_map( 'intval', array_unique( $res ) );
|
760 |
+
}
|
761 |
|
762 |
+
/**
|
763 |
+
* Use this function to update BD references of a pre-split term ID to use the new term ID.
|
764 |
+
* @since 3.6.4
|
765 |
+
*/
|
766 |
+
public function process_term_split( $old_id = 0 ) {
|
767 |
+
global $wpdb;
|
768 |
+
|
769 |
+
if ( ! $old_id )
|
770 |
+
return;
|
771 |
+
|
772 |
+
$new_id = wp_get_split_term( $old_id, WPBDP_CATEGORY_TAX );
|
773 |
+
if ( ! $new_id )
|
774 |
+
return;
|
775 |
+
|
776 |
+
// Fees.
|
777 |
+
$fees = $wpdb->get_results( "SELECT id, categories FROM {$wpdb->prefix}wpbdp_fees" );
|
778 |
+
foreach ( $fees as &$f ) {
|
779 |
+
$categories = unserialize( $f->categories );
|
780 |
+
|
781 |
+
if ( ( isset( $categories['all'] ) && $categories['all'] ) || empty( $categories['categories'] ) )
|
782 |
+
continue;
|
783 |
+
|
784 |
+
$index = array_search( $old_id, $categories['categories'] );
|
785 |
+
|
786 |
+
if ( $index === false )
|
787 |
+
continue;
|
788 |
+
|
789 |
+
$categories['categories'][ $index ] = $new_id;
|
790 |
+
$wpdb->update( $wpdb->prefix . 'wpbdp_fees',
|
791 |
+
array( 'categories' => serialize( $categories ) ),
|
792 |
+
array( 'id' => $f->id ) );
|
793 |
+
}
|
794 |
+
|
795 |
+
// Listing fees.
|
796 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}wpbdp_listing_fees SET category_id = %d WHERE category_id = %d",
|
797 |
+
$new_id,
|
798 |
+
$old_id ) );
|
799 |
+
|
800 |
+
// Payments.
|
801 |
+
$wpdb->query(
|
802 |
+
$wpdb->prepare( "UPDATE {$wpdb->prefix}wpbdp_payments_items SET rel_id_1 = %d WHERE ( rel_id_1 = %d AND ( item_type = %s OR item_type = %s ) )",
|
803 |
+
$new_id,
|
804 |
+
$old_id,
|
805 |
+
'fee',
|
806 |
+
'recurring_fee' )
|
807 |
+
);
|
808 |
+
|
809 |
+
// Category images.
|
810 |
+
$imgs = get_option( 'wpbdp[category_images]', false );
|
811 |
+
if ( empty( $imgs ) || ! is_array( $imgs ) )
|
812 |
+
return;
|
813 |
+
|
814 |
+
if ( ! empty( $imgs['images'] ) && isset( $imgs['images'][ $old_id ] ) ) {
|
815 |
+
$imgs['images'][ $new_id ] = $imgs['images'][ $old_id ];
|
816 |
+
unset( $imgs['images'][ $old_id ] );
|
817 |
+
}
|
818 |
+
|
819 |
+
if ( ! empty( $imgs['temp'] ) && isset( $imgs['temp'][ $old_id ] ) ) {
|
820 |
+
$imgs['temp'][ $new_id ] = $imgs['temp'][ $old_id ];
|
821 |
+
unset( $imgs['temp'][ $old_id ] );
|
822 |
+
}
|
823 |
+
|
824 |
+
update_option( 'wpbdp[category_images]', $imgs );
|
825 |
}
|
826 |
|
827 |
+
public function handle_term_split( $old_id, $new_id, $tt_id, $tax ) {
|
828 |
+
if ( WPBDP_CATEGORY_TAX != $tax )
|
829 |
+
return;
|
830 |
+
|
831 |
+
$this->process_term_split( $old_id );
|
832 |
+
}
|
833 |
+
|
834 |
+
}
|
835 |
+
|
836 |
|
837 |
class WPBDP_Installer_Manual_Upgrade {
|
838 |
|
840 |
private $callback;
|
841 |
|
842 |
public function __construct( &$installer, $callback ) {
|
843 |
+
add_action( 'admin_notices', array( &$this, 'upgrade_required_notice' ) );
|
844 |
add_action( 'admin_menu', array( &$this, 'add_upgrade_page' ) );
|
845 |
add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
|
846 |
add_action( 'wp_ajax_wpbdp-manual-upgrade', array( &$this, 'handle_ajax' ) );
|
core/utils.php
CHANGED
@@ -564,4 +564,17 @@ class WPBDP_NoopObject {
|
|
564 |
|
565 |
}
|
566 |
|
|
|
|
|
|
|
|
|
|
|
|
|
567 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
564 |
|
565 |
}
|
566 |
|
567 |
+
// For compat with PHP < 5.3
|
568 |
+
if ( ! function_exists( 'str_getcsv' ) ) {
|
569 |
+
function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = "\\" ) {
|
570 |
+
$f = tmpfile();
|
571 |
+
fwrite( $f, $input );
|
572 |
+
fseek( $f, 0 );
|
573 |
|
574 |
+
$res = fgetcsv( $f, 0, $delimiter, $enclosure );
|
575 |
+
|
576 |
+
fclose( $f );
|
577 |
+
|
578 |
+
return $res;
|
579 |
+
}
|
580 |
+
}
|