Version Description
Download this release
Release Info
Developer | businessdirectoryplugin |
Plugin | Business Directory Plugin |
Version | 3.5.6 |
Comparing to | |
See all releases |
Code changes from version 3.5.5 to 3.5.6
- README.TXT +5 -2
- business-directory-plugin.php +40 -19
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
|
7 |
-
Last Updated: 2015-
|
8 |
-
Stable tag: tags/3.5.
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Build local directories, business provider listings, Yellow-Pages directories, Yelp-like review sections and much more!
|
@@ -111,6 +111,9 @@ If you are having problems please visit [support forum](http://www.businessdirec
|
|
111 |
|
112 |
|
113 |
== Changelog ==
|
|
|
|
|
|
|
114 |
= Version 3.5.5 =
|
115 |
* Fixed activation bug.
|
116 |
* Claim Listings added.
|
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
|
7 |
+
Last Updated: 2015-Feb-17
|
8 |
+
Stable tag: tags/3.5.6
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Build local directories, business provider listings, Yellow-Pages directories, Yelp-like review sections and much more!
|
111 |
|
112 |
|
113 |
== Changelog ==
|
114 |
+
= Version 3.5.6 =
|
115 |
+
* Emergency Yoast SEO patch to fix issue with metadesc() API change (1.7.2 and higher in Yoast)
|
116 |
+
|
117 |
= Version 3.5.5 =
|
118 |
* Fixed activation bug.
|
119 |
* Claim Listings added.
|
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.5.
|
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.5.
|
34 |
|
35 |
define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
|
36 |
define( 'WPBDP_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
|
@@ -1016,13 +1016,21 @@ class WPBDP_Plugin {
|
|
1016 |
$this->_do_wpseo = defined( 'WPSEO_VERSION' ) ? true : false;
|
1017 |
|
1018 |
if ( $this->_do_wpseo ) {
|
1019 |
-
|
|
|
|
|
|
|
|
|
|
|
1020 |
|
1021 |
remove_filter( 'wp_title', array( $this, '_meta_title' ), 10, 3 );
|
1022 |
add_filter( 'wp_title', array( $this, '_meta_title' ), 16, 3 );
|
1023 |
|
1024 |
-
|
1025 |
-
|
|
|
|
|
|
|
1026 |
add_action( 'wp_head', array( $this, '_meta_keywords' ) );
|
1027 |
}
|
1028 |
|
@@ -1118,6 +1126,13 @@ class WPBDP_Plugin {
|
|
1118 |
|
1119 |
// TODO: it'd be nice to move workarounds outside this class.
|
1120 |
public function _meta_title( $title = '', $sep = '»', $seplocation = 'right' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1121 |
$action = $this->controller->get_current_action();
|
1122 |
|
1123 |
switch ($action) {
|
@@ -1154,8 +1169,6 @@ class WPBDP_Plugin {
|
|
1154 |
$term = get_term_by('slug', get_query_var('tag'), WPBDP_TAGS_TAX);
|
1155 |
|
1156 |
if ( $this->_do_wpseo ) {
|
1157 |
-
global $wpseo_front;
|
1158 |
-
|
1159 |
if ( method_exists( 'WPSEO_Taxonomy_Meta', 'get_term_meta' ) ) {
|
1160 |
$title = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'title' );
|
1161 |
} else {
|
@@ -1165,7 +1178,8 @@ class WPBDP_Plugin {
|
|
1165 |
if ( !empty( $title ) )
|
1166 |
return wpseo_replace_vars( $title, (array) $term );
|
1167 |
|
1168 |
-
|
|
|
1169 |
}
|
1170 |
|
1171 |
return sprintf( _x( 'Listings tagged: %s', 'title', 'WPBDM' ), $term->name ) . ' ' . $sep . ' ' . $title;
|
@@ -1177,8 +1191,6 @@ class WPBDP_Plugin {
|
|
1177 |
if (!$term && get_query_var('category_id')) $term = get_term_by('id', get_query_var('category_id'), WPBDP_CATEGORY_TAX);
|
1178 |
|
1179 |
if ( $this->_do_wpseo ) {
|
1180 |
-
global $wpseo_front;
|
1181 |
-
|
1182 |
if ( method_exists( 'WPSEO_Taxonomy_Meta', 'get_term_meta' ) ) {
|
1183 |
$title = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'title' );
|
1184 |
} else {
|
@@ -1188,7 +1200,8 @@ class WPBDP_Plugin {
|
|
1188 |
if ( !empty( $title ) )
|
1189 |
return wpseo_replace_vars( $title, (array) $term );
|
1190 |
|
1191 |
-
|
|
|
1192 |
}
|
1193 |
|
1194 |
return $term->name . ' ' . $sep . ' ' . $title;
|
@@ -1199,8 +1212,6 @@ class WPBDP_Plugin {
|
|
1199 |
$listing_id = get_query_var('listing') ? wpbdp_get_post_by_slug(get_query_var('listing'))->ID : wpbdp_getv($_GET, 'id', get_query_var('id'));
|
1200 |
|
1201 |
if ( $this->_do_wpseo ) {
|
1202 |
-
global $wpseo_front;
|
1203 |
-
|
1204 |
$title = $wpseo_front->get_content_title( get_post( $listing_id ) );
|
1205 |
$title = esc_html( strip_tags( stripslashes( apply_filters( 'wpseo_title', $title ) ) ) );
|
1206 |
|
@@ -1224,7 +1235,12 @@ class WPBDP_Plugin {
|
|
1224 |
}
|
1225 |
|
1226 |
public function _meta_keywords() {
|
1227 |
-
|
|
|
|
|
|
|
|
|
|
|
1228 |
|
1229 |
$current_action = $this->controller->get_current_action();
|
1230 |
|
@@ -1237,8 +1253,10 @@ class WPBDP_Plugin {
|
|
1237 |
$prev_post = $post;
|
1238 |
$post = get_post( $listing_id );
|
1239 |
|
1240 |
-
$wpseo_front
|
1241 |
-
|
|
|
|
|
1242 |
|
1243 |
$post = $prev_post;
|
1244 |
|
@@ -1256,7 +1274,8 @@ class WPBDP_Plugin {
|
|
1256 |
$metadesc = method_exists( 'WPSEO_Taxonomy_Meta', 'get_term_meta' ) ?
|
1257 |
WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'desc' ) :
|
1258 |
wpseo_get_term_meta( $term, $term->taxonomy, 'desc' );
|
1259 |
-
|
|
|
1260 |
$metadesc = wpseo_replace_vars( $wpseo_front->options['metadesc-tax-' . $term->taxonomy], (array) $term );
|
1261 |
|
1262 |
if ( $metadesc )
|
@@ -1266,8 +1285,10 @@ class WPBDP_Plugin {
|
|
1266 |
break;
|
1267 |
|
1268 |
case 'main':
|
1269 |
-
$wpseo_front
|
1270 |
-
|
|
|
|
|
1271 |
|
1272 |
break;
|
1273 |
|
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.5.6
|
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.5.6' );
|
34 |
|
35 |
define( 'WPBDP_PATH', plugin_dir_path( __FILE__ ) );
|
36 |
define( 'WPBDP_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
|
1016 |
$this->_do_wpseo = defined( 'WPSEO_VERSION' ) ? true : false;
|
1017 |
|
1018 |
if ( $this->_do_wpseo ) {
|
1019 |
+
$wpseo_front = null;
|
1020 |
+
|
1021 |
+
if ( isset( $GLOBALS['wpseo_front'] ) )
|
1022 |
+
$wpseo_front = $GLOBALS['wpseo_front'];
|
1023 |
+
elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) )
|
1024 |
+
$wpseo_front = WPSEO_Frontend::get_instance();
|
1025 |
|
1026 |
remove_filter( 'wp_title', array( $this, '_meta_title' ), 10, 3 );
|
1027 |
add_filter( 'wp_title', array( $this, '_meta_title' ), 16, 3 );
|
1028 |
|
1029 |
+
if ( is_object( $wpseo_front ) ) {
|
1030 |
+
remove_filter( 'wp_title', array( &$wpseo_front, 'title' ), 15, 3 );
|
1031 |
+
remove_action( 'wp_head', array( &$wpseo_front, 'head' ), 1, 1 );
|
1032 |
+
}
|
1033 |
+
|
1034 |
add_action( 'wp_head', array( $this, '_meta_keywords' ) );
|
1035 |
}
|
1036 |
|
1126 |
|
1127 |
// TODO: it'd be nice to move workarounds outside this class.
|
1128 |
public function _meta_title( $title = '', $sep = '»', $seplocation = 'right' ) {
|
1129 |
+
$wpseo_front = null;
|
1130 |
+
|
1131 |
+
if ( isset( $GLOBALS['wpseo_front'] ) )
|
1132 |
+
$wpseo_front = $GLOBALS['wpseo_front'];
|
1133 |
+
elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) )
|
1134 |
+
$wpseo_front = WPSEO_Frontend::get_instance();
|
1135 |
+
|
1136 |
$action = $this->controller->get_current_action();
|
1137 |
|
1138 |
switch ($action) {
|
1169 |
$term = get_term_by('slug', get_query_var('tag'), WPBDP_TAGS_TAX);
|
1170 |
|
1171 |
if ( $this->_do_wpseo ) {
|
|
|
|
|
1172 |
if ( method_exists( 'WPSEO_Taxonomy_Meta', 'get_term_meta' ) ) {
|
1173 |
$title = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'title' );
|
1174 |
} else {
|
1178 |
if ( !empty( $title ) )
|
1179 |
return wpseo_replace_vars( $title, (array) $term );
|
1180 |
|
1181 |
+
if ( is_object( $wpseo_front ) )
|
1182 |
+
return $wpseo_front->get_title_from_options( 'title-tax-' . $term->taxonomy, $term );
|
1183 |
}
|
1184 |
|
1185 |
return sprintf( _x( 'Listings tagged: %s', 'title', 'WPBDM' ), $term->name ) . ' ' . $sep . ' ' . $title;
|
1191 |
if (!$term && get_query_var('category_id')) $term = get_term_by('id', get_query_var('category_id'), WPBDP_CATEGORY_TAX);
|
1192 |
|
1193 |
if ( $this->_do_wpseo ) {
|
|
|
|
|
1194 |
if ( method_exists( 'WPSEO_Taxonomy_Meta', 'get_term_meta' ) ) {
|
1195 |
$title = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'title' );
|
1196 |
} else {
|
1200 |
if ( !empty( $title ) )
|
1201 |
return wpseo_replace_vars( $title, (array) $term );
|
1202 |
|
1203 |
+
if ( is_object( $wpseo_front ) )
|
1204 |
+
return $wpseo_front->get_title_from_options( 'title-tax-' . $term->taxonomy, $term );
|
1205 |
}
|
1206 |
|
1207 |
return $term->name . ' ' . $sep . ' ' . $title;
|
1212 |
$listing_id = get_query_var('listing') ? wpbdp_get_post_by_slug(get_query_var('listing'))->ID : wpbdp_getv($_GET, 'id', get_query_var('id'));
|
1213 |
|
1214 |
if ( $this->_do_wpseo ) {
|
|
|
|
|
1215 |
$title = $wpseo_front->get_content_title( get_post( $listing_id ) );
|
1216 |
$title = esc_html( strip_tags( stripslashes( apply_filters( 'wpseo_title', $title ) ) ) );
|
1217 |
|
1235 |
}
|
1236 |
|
1237 |
public function _meta_keywords() {
|
1238 |
+
$wpseo_front = null;
|
1239 |
+
|
1240 |
+
if ( isset( $GLOBALS['wpseo_front'] ) )
|
1241 |
+
$wpseo_front = $GLOBALS['wpseo_front'];
|
1242 |
+
elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) )
|
1243 |
+
$wpseo_front = WPSEO_Frontend::get_instance();
|
1244 |
|
1245 |
$current_action = $this->controller->get_current_action();
|
1246 |
|
1253 |
$prev_post = $post;
|
1254 |
$post = get_post( $listing_id );
|
1255 |
|
1256 |
+
if ( is_object( $wpseo_front ) ) {
|
1257 |
+
$wpseo_front->metadesc();
|
1258 |
+
$wpseo_front->metakeywords();
|
1259 |
+
}
|
1260 |
|
1261 |
$post = $prev_post;
|
1262 |
|
1274 |
$metadesc = method_exists( 'WPSEO_Taxonomy_Meta', 'get_term_meta' ) ?
|
1275 |
WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'desc' ) :
|
1276 |
wpseo_get_term_meta( $term, $term->taxonomy, 'desc' );
|
1277 |
+
|
1278 |
+
if ( !$metadesc && is_object( $wpseo_front ) && isset( $wpseo_front->options['metadesc-tax-' . $term->taxonomy] ) )
|
1279 |
$metadesc = wpseo_replace_vars( $wpseo_front->options['metadesc-tax-' . $term->taxonomy], (array) $term );
|
1280 |
|
1281 |
if ( $metadesc )
|
1285 |
break;
|
1286 |
|
1287 |
case 'main':
|
1288 |
+
if ( is_object( $wpseo_front ) ) {
|
1289 |
+
$wpseo_front->metadesc();
|
1290 |
+
$wpseo_front->metakeywords();
|
1291 |
+
}
|
1292 |
|
1293 |
break;
|
1294 |
|