Version Description
(2019-10-29) = * Name change and new icon
Download this release
Release Info
Developer | Rustaurius |
Plugin | Business Profile |
Version | 1.2.7 |
Comparing to | |
See all releases |
Code changes from version 1.2.6 to 1.2.7
- business-profile.php +266 -281
- readme.txt +307 -241
business-profile.php
CHANGED
@@ -1,281 +1,266 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Plugin Name: Business Profile
|
4 |
-
* Plugin URI:
|
5 |
-
* Description:
|
6 |
-
* Version: 1.2.
|
7 |
-
* Author:
|
8 |
-
* Author URI:
|
9 |
-
* License:
|
10 |
-
* License URI:
|
11 |
-
*
|
12 |
-
* Text Domain: business-profile
|
13 |
-
* Domain Path: /languages/
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
*
|
42 |
-
*
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
*
|
51 |
-
*
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
*
|
68 |
-
*
|
69 |
-
* @
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
*
|
83 |
-
*
|
84 |
-
* @
|
85 |
-
* @
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
*
|
99 |
-
*
|
100 |
-
* @
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
$this
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
*
|
134 |
-
*
|
135 |
-
* @since
|
136 |
-
* @access
|
137 |
-
* @return void
|
138 |
-
*/
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
*
|
149 |
-
*
|
150 |
-
* @since 0.0.1
|
151 |
-
* @access public
|
152 |
-
* @return void
|
153 |
-
*/
|
154 |
-
|
155 |
-
|
156 |
-
'
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
*
|
187 |
-
*
|
188 |
-
* @
|
189 |
-
* @
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
*
|
204 |
-
*
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
*
|
224 |
-
*
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
* @access public
|
268 |
-
* @static
|
269 |
-
* @return object bpfwpInit A single instance of the main plugin class.
|
270 |
-
*/
|
271 |
-
public static function instance() {
|
272 |
-
static $instance;
|
273 |
-
if ( null === $instance ) {
|
274 |
-
$instance = new self;
|
275 |
-
}
|
276 |
-
return $instance;
|
277 |
-
}
|
278 |
-
}
|
279 |
-
endif;
|
280 |
-
|
281 |
-
$bpfwp_controller = bpfwpInit::instance();
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Five Star Business Profile
|
4 |
+
* Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
|
5 |
+
* Description: Create and display an SEO friendly contact card with schema structured data. Supports a Google Map, opening hours and more.
|
6 |
+
* Version: 1.2.7
|
7 |
+
* Author: Five Star Plugins
|
8 |
+
* Author URI: https://www.fivestarplugins.com
|
9 |
+
* License: GPLv3
|
10 |
+
* License URI:http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*
|
12 |
+
* Text Domain: business-profile
|
13 |
+
* Domain Path: /languages/
|
14 |
+
*/
|
15 |
+
|
16 |
+
defined( 'ABSPATH' ) || exit;
|
17 |
+
|
18 |
+
if ( ! class_exists( 'bpfwpInit', false ) ) :
|
19 |
+
|
20 |
+
class bpfwpInit {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Settings for displaying the contact card currently being handled.
|
24 |
+
*
|
25 |
+
* @since 0.0.1
|
26 |
+
* @access public
|
27 |
+
* @var array
|
28 |
+
*/
|
29 |
+
public $display_settings = array();
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Placeholder for the main settings class instance.
|
33 |
+
*
|
34 |
+
* @since 0.0.1
|
35 |
+
* @access public
|
36 |
+
* @var object bpfwpSettings
|
37 |
+
*/
|
38 |
+
public $settings;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Placeholder for the main CPTs class instance.
|
42 |
+
*
|
43 |
+
* @since 0.0.1
|
44 |
+
* @access public
|
45 |
+
* @var object bpfwpCustomPostTypes
|
46 |
+
*/
|
47 |
+
public $cpts;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Initialize the plugin and register hooks.
|
51 |
+
*
|
52 |
+
* @since 0.0.1
|
53 |
+
* @access public
|
54 |
+
* @return void
|
55 |
+
*/
|
56 |
+
public function __construct() {
|
57 |
+
self::constants();
|
58 |
+
self::includes();
|
59 |
+
self::instantiate();
|
60 |
+
self::wp_hooks();
|
61 |
+
if ( $this->settings->get_setting( 'multiple-locations' ) ) {
|
62 |
+
register_activation_hook( __FILE__, array( $this->cpts, 'flush_rewrite_rules' ) );
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Define plugin constants.
|
68 |
+
*
|
69 |
+
* @since 1.1.0
|
70 |
+
* @access protected
|
71 |
+
* @return void
|
72 |
+
*/
|
73 |
+
protected function constants() {
|
74 |
+
define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
75 |
+
define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
|
76 |
+
define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
|
77 |
+
define( 'BPFWP_VERSION', '1.2.6' );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Include all plugin files.
|
82 |
+
*
|
83 |
+
* @since 1.1.0
|
84 |
+
* @access protected
|
85 |
+
* @return void
|
86 |
+
*/
|
87 |
+
protected function includes() {
|
88 |
+
require_once BPFWP_PLUGIN_DIR . '/includes/class-blocks.php';
|
89 |
+
require_once BPFWP_PLUGIN_DIR . '/includes/class-compatibility.php';
|
90 |
+
require_once BPFWP_PLUGIN_DIR . '/includes/class-custom-post-types.php';
|
91 |
+
require_once BPFWP_PLUGIN_DIR . '/includes/deprecated/class-integrations.php';
|
92 |
+
require_once BPFWP_PLUGIN_DIR . '/includes/class-settings.php';
|
93 |
+
require_once BPFWP_PLUGIN_DIR . '/includes/class-template-loader.php';
|
94 |
+
require_once BPFWP_PLUGIN_DIR . '/includes/template-functions.php';
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Spin up instances of our plugin classes.
|
99 |
+
*
|
100 |
+
* @since 1.1.0
|
101 |
+
* @access protected
|
102 |
+
* @return void
|
103 |
+
*/
|
104 |
+
protected function instantiate() {
|
105 |
+
new bpfwpCompatibility();
|
106 |
+
new bpfwpIntegrations(); // Deprecated in v1.1.
|
107 |
+
$this->settings = new bpfwpSettings();
|
108 |
+
$this->cpts = new bpfwpCustomPostTypes();
|
109 |
+
$this->blocks = new bpfwpBlocks();
|
110 |
+
|
111 |
+
$this->blocks->run();
|
112 |
+
if ( $this->settings->get_setting( 'multiple-locations' ) ) {
|
113 |
+
$this->cpts->run();
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Hook into WordPress.
|
119 |
+
*
|
120 |
+
* @since 1.1.0
|
121 |
+
* @access protected
|
122 |
+
* @return void
|
123 |
+
*/
|
124 |
+
protected function wp_hooks() {
|
125 |
+
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
126 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ) );
|
127 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
|
128 |
+
add_action( 'widgets_init', array( $this, 'register_widgets' ) );
|
129 |
+
add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Load the plugin textdomain for localistion.
|
134 |
+
*
|
135 |
+
* @since 0.0.1
|
136 |
+
* @access public
|
137 |
+
* @return void
|
138 |
+
*/
|
139 |
+
public function load_textdomain() {
|
140 |
+
load_plugin_textdomain(
|
141 |
+
'business-profile',
|
142 |
+
false,
|
143 |
+
plugin_basename( dirname( __FILE__ ) ) . '/languages'
|
144 |
+
);
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Register the front-end CSS styles
|
149 |
+
*
|
150 |
+
* @since 0.0.1
|
151 |
+
* @access public
|
152 |
+
* @return void
|
153 |
+
*/
|
154 |
+
function register_assets() {
|
155 |
+
wp_register_style(
|
156 |
+
'bpfwp-default',
|
157 |
+
BPFWP_PLUGIN_URL . '/assets/css/contact-card.css',
|
158 |
+
null,
|
159 |
+
BPFWP_VERSION
|
160 |
+
);
|
161 |
+
wp_register_script(
|
162 |
+
'bpfwp-map',
|
163 |
+
BPFWP_PLUGIN_URL . '/assets/js/map.js',
|
164 |
+
array( 'jquery' ),
|
165 |
+
BPFWP_VERSION,
|
166 |
+
true
|
167 |
+
);
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Register the widgets
|
172 |
+
*
|
173 |
+
* @since 0.0.1
|
174 |
+
* @access public
|
175 |
+
* @return void
|
176 |
+
*/
|
177 |
+
public function register_widgets() {
|
178 |
+
require_once BPFWP_PLUGIN_DIR . '/includes/class-contact-card-widget.php';
|
179 |
+
register_widget( 'bpfwpContactCardWidget' );
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Enqueue the admin CSS for locations
|
184 |
+
*
|
185 |
+
* @since 1.1
|
186 |
+
* @access public
|
187 |
+
* @global WP_Post $post The current WordPress post object.
|
188 |
+
* @param string $hook_suffix The current admin screen slug.
|
189 |
+
* @return void
|
190 |
+
*/
|
191 |
+
public function enqueue_admin_assets( $hook_suffix ) {
|
192 |
+
|
193 |
+
global $post;
|
194 |
+
|
195 |
+
if ( 'post-new.php' === $hook_suffix || 'post.php' === $hook_suffix ) {
|
196 |
+
if ( $this->settings->get_setting( 'multiple-locations' ) && $this->cpts->location_cpt_slug === $post->post_type ) {
|
197 |
+
wp_enqueue_style( 'bpfwp-admin-location', BPFWP_PLUGIN_URL . '/assets/css/admin.css' );
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Add links to the plugin listing on the installed plugins page
|
204 |
+
*
|
205 |
+
* @since 0.0.1
|
206 |
+
* @access public
|
207 |
+
* @param array $links The current plugin action links.
|
208 |
+
* @param string $plugin The current plugin slug.
|
209 |
+
* @return array $links Modified action links.
|
210 |
+
*/
|
211 |
+
public function plugin_action_links( $links, $plugin ) {
|
212 |
+
if ( BPFWP_PLUGIN_FNAME === $plugin ) {
|
213 |
+
$links['help'] = sprintf( '<a href="http://doc.fivestarplugins.com/plugins/business-profile/" title="%s">%s</a>',
|
214 |
+
__( 'View the help documentation for Business Profile', 'business-profile' ),
|
215 |
+
__( 'Help', 'business-profile' )
|
216 |
+
);
|
217 |
+
}
|
218 |
+
|
219 |
+
return $links;
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* Retrieve the get_theme_supports() value for a feature
|
224 |
+
*
|
225 |
+
* @since 1.1
|
226 |
+
* @access public
|
227 |
+
* @param string $feature A theme support feature to get.
|
228 |
+
* @return bool Whether or not a feature is supported.
|
229 |
+
*/
|
230 |
+
public function get_theme_support( $feature ) {
|
231 |
+
|
232 |
+
$theme_support = get_theme_support( 'business-profile' );
|
233 |
+
|
234 |
+
if ( true === $theme_support ) {
|
235 |
+
return true;
|
236 |
+
} elseif ( false === $theme_support ) {
|
237 |
+
return false;
|
238 |
+
} else {
|
239 |
+
$theme_support = (array) $theme_support;
|
240 |
+
$theme_support = array_shift( $theme_support );
|
241 |
+
return isset( $theme_support[ $feature ] ) && true === $theme_support[ $feature ];
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Return a single instance of the main plugin class.
|
247 |
+
*
|
248 |
+
* Developers and tests may still create multiple instances by spinning
|
249 |
+
* them up directly, but for most uses, this method is preferred.
|
250 |
+
*
|
251 |
+
* @since 1.1.0
|
252 |
+
* @access public
|
253 |
+
* @static
|
254 |
+
* @return object bpfwpInit A single instance of the main plugin class.
|
255 |
+
*/
|
256 |
+
public static function instance() {
|
257 |
+
static $instance;
|
258 |
+
if ( null === $instance ) {
|
259 |
+
$instance = new self;
|
260 |
+
}
|
261 |
+
return $instance;
|
262 |
+
}
|
263 |
+
}
|
264 |
+
endif;
|
265 |
+
|
266 |
+
$bpfwp_controller = bpfwpInit::instance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,241 +1,307 @@
|
|
1 |
-
=== Business Profile ===
|
2 |
-
Contributors:
|
3 |
-
Author URI: https://
|
4 |
-
Plugin URL:
|
5 |
-
Requires at Least: 4.4
|
6 |
-
Tested Up To: 5.
|
7 |
-
Tags: business profile, seo, local seo, schema, address, google map, contact, phone
|
8 |
-
|
9 |
-
License:
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
* Google Map
|
24 |
-
*
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
*
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
*
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
*
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
=
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
*
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
* Fix:
|
160 |
-
|
161 |
-
= 1.
|
162 |
-
* Fix:
|
163 |
-
|
164 |
-
= 1.
|
165 |
-
* Fix:
|
166 |
-
|
167 |
-
= 1.
|
168 |
-
* Fix:
|
169 |
-
|
170 |
-
= 1.
|
171 |
-
* Update
|
172 |
-
|
173 |
-
= 1.
|
174 |
-
*
|
175 |
-
|
176 |
-
= 1.
|
177 |
-
*
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
= 1.
|
193 |
-
|
194 |
-
|
195 |
-
= 1.1
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
= 1.0.
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Business Profile ===
|
2 |
+
Contributors: FiveStarPlugins
|
3 |
+
Author URI: https://www.fivestarplugins.com/
|
4 |
+
Plugin URL: https://www.fivestarplugins.com/plugins/business-profile/
|
5 |
+
Requires at Least: 4.4
|
6 |
+
Tested Up To: 5.2
|
7 |
+
Tags: business profile, seo, local seo, schema, address, google map, contact, phone, contact card, vcard, contact info, business location, business address, business map, business schema, organization schema, corporation schema, contact schema, address schema, location schema, map schema, business structured data, business microdata, address microdata, location structured data, location microdata, contact shortcode, location shortcode, address shortcode, schema shortcode, gutenberg schema, gutenberg address
|
8 |
+
License: GPLv3
|
9 |
+
License URI:http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
+
|
11 |
+
Create and display an SEO friendly contact card with schema structured data. Supports a Google Map, opening hours and more.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
Schema and structured data for your contact page and more! Create a contact card and add your business details to your site with SEO friendly Schema.org markup.
|
16 |
+
|
17 |
+
<strong>Includes Gutenberg schema block for displaying your contact details!</strong> You can also use the handy contact shortcode or widget to add in the structured data to your vcard. These allow you to display the following business contact info on any page:
|
18 |
+
|
19 |
+
* Business name
|
20 |
+
* Address
|
21 |
+
* Phone number
|
22 |
+
* Contact page link or email address
|
23 |
+
* Link to Google Map with directions to your establishment
|
24 |
+
* Google Map showing your location
|
25 |
+
* Opening hours
|
26 |
+
|
27 |
+
Schema.org markup helps search engines like Google discover your address, phone number and opening hours so that they can display them with your listing on Google.
|
28 |
+
|
29 |
+
Choose from a wide array of microdata item types for your business schema, including:
|
30 |
+
|
31 |
+
* Corporation schema
|
32 |
+
* Organization schema
|
33 |
+
* Local Business schema
|
34 |
+
* Restaurant schema
|
35 |
+
* Many more!
|
36 |
+
|
37 |
+
= Google Maps Structured Data =
|
38 |
+
|
39 |
+
The integrated Google Maps features allow you to enhance your location structured data by displaying a business map on your site with full schema support. Your business location, including the business address, will be displayed on a map (with the correct map schema), as well as in text with the correct location microdata.
|
40 |
+
|
41 |
+
= Multiple Locations =
|
42 |
+
|
43 |
+
Business Profile supports multiple locations. This powerful feature works great for businesses that have several offices, for delivery services, for restaurants with multiple locations, etc. Business location schema is added to each entry and you can showcase your details using the Gutenberg schema block, via the location shortcode or with the included widget. For help getting started with this, you can visit:
|
44 |
+
|
45 |
+
http://doc.fivestarplugins.com/plugins/business-profile/user/getting-started/locations
|
46 |
+
|
47 |
+
The multiple location structured data for your business also syncs up with the Five Star Restaurant Reservations to automatically offer a dropdown in your reservation form, so people can pick which location they want to book at. You can choose separate orgnization schema, corportation schema or local business schema for each new location you create, so each schema shortcode and each page's contact info is uniquely optimized with SEO and search results in mind.
|
48 |
+
|
49 |
+
This schema structured data and contact card plugin is one part of our suite of plugins designed to give you the best WordPress business and restaurant experience. Our plugins prove an intuitive and easy-to-use interface that make sure you don't lose out on business to your competitors. For more info:
|
50 |
+
|
51 |
+
* [Restaurant Reservations](https://wordpress.org/plugins/restaurant-reservations/) plugin that lets your customers reserve a table directly on your site.
|
52 |
+
|
53 |
+
* [Restaurant Menu](https://wordpress.org/plugins/food-and-drink-menu/) plugin that lets your customers view your full menu directly on your site.
|
54 |
+
|
55 |
+
= For help and support, please see: =
|
56 |
+
|
57 |
+
* Our FAQ page, here: https://wordpress.org/plugins/business-profile/faq/
|
58 |
+
* Our installation guide, here: https://wordpress.org/plugins/business-profile/installation/
|
59 |
+
* Our documentation and user guide, here: http://doc.fivestarplugins.com/plugins/business-profile/
|
60 |
+
* The Restaurant Menu support forum, here: https://wordpress.org/support/plugin/business-profile/
|
61 |
+
|
62 |
+
= Developers =
|
63 |
+
|
64 |
+
This plugin is packed with templates and hooks so you can extend it as needed. Read the [developer documentation](http://doc.fivestarplugins.com/plugins/business-profile/developer/).
|
65 |
+
|
66 |
+
== Installation ==
|
67 |
+
|
68 |
+
1. Upload the 'business-profile' folder to the '/wp-content/plugins/' directory
|
69 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
70 |
+
|
71 |
+
or
|
72 |
+
|
73 |
+
1. Go to the 'Plugins' menu in WordPress and click 'Add New'
|
74 |
+
2. Search for 'Business Profile' and select 'Install Now'
|
75 |
+
3. Activate the plugin when prompted
|
76 |
+
|
77 |
+
= Getting Started =
|
78 |
+
|
79 |
+
1. To create a business profile with schema structured data:
|
80 |
+
* Click on 'Business Profile' in the WordPress admin sidebar menu. This will bring you to the page where you can create or edit your contact card
|
81 |
+
* Choose a schema type and then file in the company contact info.
|
82 |
+
* Set up a schedule/opening hours for your location.
|
83 |
+
* Click Save Changes and it will automatically save your vcard business info.
|
84 |
+
|
85 |
+
2. Adding your contact card and business profile to a page:
|
86 |
+
* Gutenberg: Add a new block to your page and navigate to the Widgets block section. In there, you'll see a block called Contact Card. Just add that to your page and your address and schema will show on that page.
|
87 |
+
* Shortcode: Add the [contact-card] schema shortcode to any page and your business location and structured data will be added to that page.
|
88 |
+
|
89 |
+
3. To add a map and schema to your business profile:
|
90 |
+
* Go to the settings page and insert your Google Maps API Key.
|
91 |
+
* This will insert your location with Google map schema.
|
92 |
+
|
93 |
+
4. Enable multiple locations, each with unique business structured data.
|
94 |
+
* Go to the settings page and check the box to enable multiple locations.
|
95 |
+
* This will create a new menu item in your WordPress admin called Locations.
|
96 |
+
* Click on Locations to add new and edit existing locations.
|
97 |
+
* Now, each individual address will have its own unique business schema type and custom location structured data.
|
98 |
+
|
99 |
+
5. Customize your location schema and business contact card by making use of the available options, found in the Settings area of the plugin admin.
|
100 |
+
|
101 |
+
For a list of specific features, see the Restaurant Menu description page here: https://wordpress.org/plugins/food-and-drink-menu/.
|
102 |
+
|
103 |
+
For help and support, please see:
|
104 |
+
|
105 |
+
* Our FAQ page, here: https://wordpress.org/plugins/business-profile/faq/
|
106 |
+
* Our documentation and user guide, here: http://doc.fivestarplugins.com/plugins/business-profile/
|
107 |
+
* The Restaurant Menu support forum, here: https://wordpress.org/support/plugin/business-profile/
|
108 |
+
|
109 |
+
|
110 |
+
== Frequently Asked Questions ==
|
111 |
+
|
112 |
+
= Is there a shortcode to print the contact card? =
|
113 |
+
|
114 |
+
Yes, you can use `[contact-card]`. The documentation includes [all of the shortcode attributes](http://doc.themeofthecrop.com/plugins/business-profile/user/faq#shortcode).
|
115 |
+
|
116 |
+
= It asks me for a Google Maps API Key but I don’t know what it is or how to get it. =
|
117 |
+
|
118 |
+
Google now requires that you have your own API key to display a map on your website. The documentation includes a walkthrough to help you [generate a Google Maps API key](http://doc.themeofthecrop.com/plugins/business-profile/user/faq#google-maps-api-key).
|
119 |
+
|
120 |
+
= Google Maps shows my business in the wrong location =
|
121 |
+
|
122 |
+
Unfortunately, in some cases Google is unable to find the right latitude and longitude to match your address.
|
123 |
+
|
124 |
+
In some cases, you may be able to get it to properly locate you by tweaking the address. Sometimes Google just needs a bit of help. Once you’ve got the right coordinates you can go back and restore your original address, and save the form without touching the coordinates again.
|
125 |
+
|
126 |
+
If you’re unable to get Google to recognize your location, the best thing to do is to leave the Google Map out when you print your contact card. You will also want to hide the Get Directions link, because Google will guide your customers to the wrong location.
|
127 |
+
|
128 |
+
There’s not much I can do about this, unfortunately. Even if you were able to manually set the latitude and longitude, Google would still show bad directions, because it uses the address, not the coordinates, for this feature.
|
129 |
+
|
130 |
+
= What’s the Schema Type? =
|
131 |
+
|
132 |
+
This allows you to let search engines like Google know exactly what kind of business you run.
|
133 |
+
|
134 |
+
That way, when someone looks for a real estate agent or a restaurant in your area, they’ll know to include you in their search results.
|
135 |
+
|
136 |
+
You may not find a type that’s a perfect match for your business. Choose the option that’s most appropriate for your business, and fall back to a more generic type, such as Local Business, if you need.
|
137 |
+
|
138 |
+
= More questions =
|
139 |
+
|
140 |
+
You'll find more help in the [User Guide](http://doc.themeofthecrop.com/plugins/business-profile/user/). Developers interested in templates, filters and theme support can view the [Developer Documentation](http://doc.themeofthecrop.com/plugins/business-profile/developer/).
|
141 |
+
|
142 |
+
== Screenshots ==
|
143 |
+
|
144 |
+
1. Display a full contact card on the front-end with the shortcode [contact-card] or use the widget to add it to a sidebar.
|
145 |
+
2. An easy-to-use form lets you add all of the information, locate the correct map coordinates and set up your opening hours.
|
146 |
+
3. Choose what information to display with the widget, or check out the shortcode attributes in the help document included.
|
147 |
+
4. Optional multi-location support to easily display all of your locations.
|
148 |
+
5. Add a contact card to any page or post with the block.
|
149 |
+
|
150 |
+
== Changelog ==
|
151 |
+
|
152 |
+
= 1.2.7 (2019-10-29) =
|
153 |
+
* Name change and new icon
|
154 |
+
|
155 |
+
= 1.2.6 (2019-04-04) =
|
156 |
+
* Fix: Version naming issue. Corrects the 1.2.5 release.
|
157 |
+
|
158 |
+
= 1.2.5 (2019-04-04) =
|
159 |
+
* Fix: error when adding a new location
|
160 |
+
|
161 |
+
= 1.2.4 (2019-03-18) =
|
162 |
+
* Fix: date and time picker error in Chrome in pickadate.js library
|
163 |
+
|
164 |
+
= 1.2.3 (2018-12-14) =
|
165 |
+
* Fix: fatal error in old versions of PHP (< 5.4)
|
166 |
+
|
167 |
+
= 1.2.2 (2018-12-12) =
|
168 |
+
* Fix: contact card block loads in editor without saved location
|
169 |
+
|
170 |
+
= 1.2.1 (2018-12-11) =
|
171 |
+
* Update: .pot file with new translation strings
|
172 |
+
|
173 |
+
= 1.2 (2018-12-11) =
|
174 |
+
* Add: gutenberg block for the contact card
|
175 |
+
|
176 |
+
= 1.1.5 (2018-09-26) =
|
177 |
+
* Fix: Address coordinate lookups need to be https:// and use api key
|
178 |
+
|
179 |
+
= 1.1.4 (2017-04-21) =
|
180 |
+
* Add: business image to comply with Google requirements
|
181 |
+
|
182 |
+
= 1.1.3 (2017-03-21) =
|
183 |
+
* Fix: Fatal error with location schedule metabox
|
184 |
+
|
185 |
+
= 1.1.2 (2017-03-14) =
|
186 |
+
* Fix: Don't display contact card for unpublished locations
|
187 |
+
* Fix: PHP Notice on post editing page (h/t @robneu)
|
188 |
+
* Add: Italian and Swedish translations (h/t @lucspe and Daniel Schwitzkey)
|
189 |
+
* Update: Always instantiate post type class
|
190 |
+
* Update: Give settings table rows class attributes (h/t @lucspe)
|
191 |
+
|
192 |
+
= 1.1.1 (2016-06-28) =
|
193 |
+
* Add field for Google Maps API Key to follow new API guidelines
|
194 |
+
|
195 |
+
= 1.1 (2016-06-20) =
|
196 |
+
* Add: multi-location support
|
197 |
+
* Add: filter to adjust available schema types
|
198 |
+
* Add: templates for contact cards and opening hours
|
199 |
+
* Add: helper functions for templating
|
200 |
+
* Add: add_theme_support() args for disabling scripts, styles and append to content
|
201 |
+
* Update: implement WP coding standards. h/t @robnue
|
202 |
+
|
203 |
+
= 1.0.9 (2016-02-12) =
|
204 |
+
* Fix: compatibility with wp-cli
|
205 |
+
* Fix: allow short weekday names to be translated
|
206 |
+
* Update: "get directions" link now opens in a new window/tab
|
207 |
+
* Update: widget now uses shortcode to print output
|
208 |
+
* Update: remove deprecated sensor attribute from Google Maps api call
|
209 |
+
* Add: make Google Maps objects and options available in global scope
|
210 |
+
* Add: allow map options to be filtered
|
211 |
+
* Add: javascript event triggered when map initialized
|
212 |
+
|
213 |
+
= 1.0.8 (2015-10-01) =
|
214 |
+
* Update: Simple Admin Pages lib to v2.0 (#27)
|
215 |
+
* Fix: line breaks can disrupt get directions link in embedded map (#17)
|
216 |
+
|
217 |
+
= 1.0.7 (2015-10-01) =
|
218 |
+
* Add: show shortcode on business profile page
|
219 |
+
* Add: obfuscate email address if displayed in contact details
|
220 |
+
* Fix: compatibility problems when the Google Maps API is already loaded
|
221 |
+
* New and updated translations: Dutch, Hebrew, Spanish (Colombia), Portugese, Spanish, Czech
|
222 |
+
|
223 |
+
= 1.0.6 (2015-04-03) =
|
224 |
+
* Fix: validation errors with address markup
|
225 |
+
* Fix: validation errors with contactPoint markup
|
226 |
+
|
227 |
+
= 1.0.5 (2014-09-21) =
|
228 |
+
* Fix: restore lost option to show contact info in widget options when Restaurant Reservations is activated
|
229 |
+
|
230 |
+
= 1.0.4 (2014-09-11) =
|
231 |
+
* Fix: contact link/email doesn't get shown.
|
232 |
+
|
233 |
+
= 1.0.3 (2014-09-04) =
|
234 |
+
* Fix: swapped desc/url meta values. h/t @thatryan
|
235 |
+
|
236 |
+
= 1.0.2 (2014-07-16) =
|
237 |
+
* Update Simple Admin Pages library to v2.0.a.7
|
238 |
+
|
239 |
+
= 1.0.1 (2014-07-16) =
|
240 |
+
* Fix character-case error and rename integrations file for better standardization
|
241 |
+
|
242 |
+
= 1.0 (2014-07-16) =
|
243 |
+
* Initial public release on WordPress.org
|
244 |
+
* Add an option to display a link to a booking form if the Restaurant Reservations plugin is active
|
245 |
+
* Fix: skip a scheduling rule if no weekdays are set. h/t @jasonhobbsllc
|
246 |
+
|
247 |
+
= 0.0.1 (2014-05-26) =
|
248 |
+
* Initial release
|
249 |
+
|
250 |
+
== Upgrade Notice ==
|
251 |
+
|
252 |
+
= 1.2.6 =
|
253 |
+
This update fixes a fatal error when adding a new location.
|
254 |
+
|
255 |
+
= 1.2.5 =
|
256 |
+
This update fixes a fatal error when adding a new location.
|
257 |
+
|
258 |
+
= 1.2.4 =
|
259 |
+
This update fixes a bug in the latest version of Chrome with the date and time picker in the scheduler.
|
260 |
+
|
261 |
+
= 1.1.5 =
|
262 |
+
This update fixes the address coordinate lookup, so that coordinates can be set for more reliable Google Map display.
|
263 |
+
|
264 |
+
= 1.1.4 =
|
265 |
+
This update adds a new image setting, which Google now requires for local businesses. You're strongly encouraged to add an image for your business.
|
266 |
+
|
267 |
+
= 1.1.3 =
|
268 |
+
This update fixes a critical bug when trying to add or edit a location's opening hours.
|
269 |
+
|
270 |
+
= 1.1.2 =
|
271 |
+
This minor update fixes a few obscure bugs and prevents the [contact-card] shortcode from displaying an unpublished location. It also adds Italian and Swedish translations.
|
272 |
+
|
273 |
+
= 1.1.1 =
|
274 |
+
This update adds support for a Google Maps API Key. Since June 22, 2016, Google Maps will require all _new_ websites to use an API key in order to display maps. Instructions can be found near the new API Key field in your Business Profile.
|
275 |
+
|
276 |
+
= 1.1 =
|
277 |
+
This major update adds support for multiple locations, refactors the codebase to follow WP coding guidelines, and adds several templates and helper functions for customization.
|
278 |
+
|
279 |
+
= 1.0.9 =
|
280 |
+
This update fixes wp-cli compatibility and adds a number of useful development filters/features for interacting with the map objects.
|
281 |
+
|
282 |
+
= 1.0.8 =
|
283 |
+
This update fixes an error in the Get Directions link that appears inside of embedded maps. I recommend you update as it likely effects a lot of people.
|
284 |
+
|
285 |
+
= 1.0.7 =
|
286 |
+
This update fixes some compatibility problems with third-party plugins or themes, disguises the email address if displayed, and updates a bunch of translations.
|
287 |
+
|
288 |
+
= 1.0.6 =
|
289 |
+
This update fixes validation errors with the address and contact point schema.org markup. It is strongly recommended that you update to improve Google compatibility.
|
290 |
+
|
291 |
+
= 1.0.5 =
|
292 |
+
This minor update fixes a problem in which the option to show or hide the contact details in a widget had disappeared.
|
293 |
+
|
294 |
+
= 1.0.4 =
|
295 |
+
This minor update fixes a problem in which a contact page or email address wouldn't get printed with the contact card.
|
296 |
+
|
297 |
+
= 1.0.3 =
|
298 |
+
This minor update fixes a problem in the Schema.org markup where your business description and URL got mixed up.
|
299 |
+
|
300 |
+
= 1.0.2 =
|
301 |
+
This version updates a library used by the plugin to increase compatibility with the other plugins in my restaurant plugin suite.
|
302 |
+
|
303 |
+
= 1.0.1 =
|
304 |
+
This update fixes a letter-case bug that may effect some installations.
|
305 |
+
|
306 |
+
= 1.0 =
|
307 |
+
This initial public release adds an integration with the Restaurant Reservations plugin. If the plugin is active it will now let you display a link to the booking form.
|