Business Profile - Version 1.2.7

Version Description

(2019-10-29) = * Name change and new icon

Download this release

Release Info

Developer Rustaurius
Plugin Icon 128x128 Business Profile
Version 1.2.7
Comparing to
See all releases

Code changes from version 1.2.6 to 1.2.7

Files changed (2) hide show
  1. business-profile.php +266 -281
  2. readme.txt +307 -241
business-profile.php CHANGED
@@ -1,281 +1,266 @@
1
- <?php
2
- /**
3
- * Plugin Name: Business Profile
4
- * Plugin URI: http://themeofthecrop.com
5
- * Description: Contact information, Google Maps and opening hours made easy for businesses.
6
- * Version: 1.2.6
7
- * Author: Theme of the Crop
8
- * Author URI: http://themeofthecrop.com
9
- * License: GNU General Public License v2.0 or later
10
- * License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
- *
12
- * Text Domain: business-profile
13
- * Domain Path: /languages/
14
- *
15
- * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
16
- * General Public License as published by the Free Software Foundation; either version 2 of the License,
17
- * or (at your option) any later version.
18
- *
19
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
20
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21
- *
22
- * You should have received a copy of the GNU General Public License along with this program; if not, write
23
- * to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
- *
25
- * @package BusinessProfile
26
- * @copyright Copyright (c) 2016, Theme of the Crop
27
- * @license GPL-2.0+
28
- * @since 0.0.1
29
- */
30
-
31
- defined( 'ABSPATH' ) || exit;
32
-
33
- if ( ! class_exists( 'bpfwpInit', false ) ) :
34
-
35
- class bpfwpInit {
36
-
37
- /**
38
- * Settings for displaying the contact card currently being handled.
39
- *
40
- * @since 0.0.1
41
- * @access public
42
- * @var array
43
- */
44
- public $display_settings = array();
45
-
46
- /**
47
- * Placeholder for the main settings class instance.
48
- *
49
- * @since 0.0.1
50
- * @access public
51
- * @var object bpfwpSettings
52
- */
53
- public $settings;
54
-
55
- /**
56
- * Placeholder for the main CPTs class instance.
57
- *
58
- * @since 0.0.1
59
- * @access public
60
- * @var object bpfwpCustomPostTypes
61
- */
62
- public $cpts;
63
-
64
- /**
65
- * Initialize the plugin and register hooks.
66
- *
67
- * @since 0.0.1
68
- * @access public
69
- * @return void
70
- */
71
- public function __construct() {
72
- self::constants();
73
- self::includes();
74
- self::instantiate();
75
- self::wp_hooks();
76
- if ( $this->settings->get_setting( 'multiple-locations' ) ) {
77
- register_activation_hook( __FILE__, array( $this->cpts, 'flush_rewrite_rules' ) );
78
- }
79
- }
80
-
81
- /**
82
- * Define plugin constants.
83
- *
84
- * @since 1.1.0
85
- * @access protected
86
- * @return void
87
- */
88
- protected function constants() {
89
- define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
90
- define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
91
- define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
92
- define( 'BPFWP_VERSION', '1.2.6' );
93
- }
94
-
95
- /**
96
- * Include all plugin files.
97
- *
98
- * @since 1.1.0
99
- * @access protected
100
- * @return void
101
- */
102
- protected function includes() {
103
- require_once BPFWP_PLUGIN_DIR . '/includes/class-blocks.php';
104
- require_once BPFWP_PLUGIN_DIR . '/includes/class-compatibility.php';
105
- require_once BPFWP_PLUGIN_DIR . '/includes/class-custom-post-types.php';
106
- require_once BPFWP_PLUGIN_DIR . '/includes/deprecated/class-integrations.php';
107
- require_once BPFWP_PLUGIN_DIR . '/includes/class-settings.php';
108
- require_once BPFWP_PLUGIN_DIR . '/includes/class-template-loader.php';
109
- require_once BPFWP_PLUGIN_DIR . '/includes/template-functions.php';
110
- }
111
-
112
- /**
113
- * Spin up instances of our plugin classes.
114
- *
115
- * @since 1.1.0
116
- * @access protected
117
- * @return void
118
- */
119
- protected function instantiate() {
120
- new bpfwpCompatibility();
121
- new bpfwpIntegrations(); // Deprecated in v1.1.
122
- $this->settings = new bpfwpSettings();
123
- $this->cpts = new bpfwpCustomPostTypes();
124
- $this->blocks = new bpfwpBlocks();
125
-
126
- $this->blocks->run();
127
- if ( $this->settings->get_setting( 'multiple-locations' ) ) {
128
- $this->cpts->run();
129
- }
130
- }
131
-
132
- /**
133
- * Hook into WordPress.
134
- *
135
- * @since 1.1.0
136
- * @access protected
137
- * @return void
138
- */
139
- protected function wp_hooks() {
140
- add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
141
- add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ) );
142
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
143
- add_action( 'widgets_init', array( $this, 'register_widgets' ) );
144
- add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
145
- }
146
-
147
- /**
148
- * Load the plugin textdomain for localistion.
149
- *
150
- * @since 0.0.1
151
- * @access public
152
- * @return void
153
- */
154
- public function load_textdomain() {
155
- load_plugin_textdomain(
156
- 'business-profile',
157
- false,
158
- plugin_basename( dirname( __FILE__ ) ) . '/languages'
159
- );
160
- }
161
-
162
- /**
163
- * Register the front-end CSS styles
164
- *
165
- * @since 0.0.1
166
- * @access public
167
- * @return void
168
- */
169
- function register_assets() {
170
- wp_register_style(
171
- 'bpfwp-default',
172
- BPFWP_PLUGIN_URL . '/assets/css/contact-card.css',
173
- null,
174
- BPFWP_VERSION
175
- );
176
- wp_register_script(
177
- 'bpfwp-map',
178
- BPFWP_PLUGIN_URL . '/assets/js/map.js',
179
- array( 'jquery' ),
180
- BPFWP_VERSION,
181
- true
182
- );
183
- }
184
-
185
- /**
186
- * Register the widgets
187
- *
188
- * @since 0.0.1
189
- * @access public
190
- * @return void
191
- */
192
- public function register_widgets() {
193
- require_once BPFWP_PLUGIN_DIR . '/includes/class-contact-card-widget.php';
194
- register_widget( 'bpfwpContactCardWidget' );
195
- }
196
-
197
- /**
198
- * Enqueue the admin CSS for locations
199
- *
200
- * @since 1.1
201
- * @access public
202
- * @global WP_Post $post The current WordPress post object.
203
- * @param string $hook_suffix The current admin screen slug.
204
- * @return void
205
- */
206
- public function enqueue_admin_assets( $hook_suffix ) {
207
-
208
- global $post;
209
-
210
- if ( 'post-new.php' === $hook_suffix || 'post.php' === $hook_suffix ) {
211
- if ( $this->settings->get_setting( 'multiple-locations' ) && $this->cpts->location_cpt_slug === $post->post_type ) {
212
- wp_enqueue_style( 'bpfwp-admin-location', BPFWP_PLUGIN_URL . '/assets/css/admin.css' );
213
- }
214
- }
215
- }
216
-
217
- /**
218
- * Add links to the plugin listing on the installed plugins page
219
- *
220
- * @since 0.0.1
221
- * @access public
222
- * @param array $links The current plugin action links.
223
- * @param string $plugin The current plugin slug.
224
- * @return array $links Modified action links.
225
- */
226
- public function plugin_action_links( $links, $plugin ) {
227
- if ( BPFWP_PLUGIN_FNAME === $plugin ) {
228
- $links['help'] = sprintf( '<a href="http://doc.themeofthecrop.com/plugins/business-profile/" title="%s">%s</a>',
229
- __( 'View the help documentation for Business Profile', 'business-profile' ),
230
- __( 'Help', 'business-profile' )
231
- );
232
- }
233
-
234
- return $links;
235
- }
236
-
237
- /**
238
- * Retrieve the get_theme_supports() value for a feature
239
- *
240
- * @since 1.1
241
- * @access public
242
- * @param string $feature A theme support feature to get.
243
- * @return bool Whether or not a feature is supported.
244
- */
245
- public function get_theme_support( $feature ) {
246
-
247
- $theme_support = get_theme_support( 'business-profile' );
248
-
249
- if ( true === $theme_support ) {
250
- return true;
251
- } elseif ( false === $theme_support ) {
252
- return false;
253
- } else {
254
- $theme_support = (array) $theme_support;
255
- $theme_support = array_shift( $theme_support );
256
- return isset( $theme_support[ $feature ] ) && true === $theme_support[ $feature ];
257
- }
258
- }
259
-
260
- /**
261
- * Return a single instance of the main plugin class.
262
- *
263
- * Developers and tests may still create multiple instances by spinning
264
- * them up directly, but for most uses, this method is preferred.
265
- *
266
- * @since 1.1.0
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: NateWr, fatmedia
3
- Author URI: https://github.com/NateWr
4
- Plugin URL: http://themeofthecrop.com
5
- Requires at Least: 4.4
6
- Tested Up To: 5.1
7
- Tags: business profile, seo, local seo, schema, address, google map, contact, phone
8
- Stable tag: 1.2.6
9
- License: GPLv2 or later
10
- Donate link: http://themeofthecrop.com
11
-
12
- Display your business's contact details with seo-friendly Schema.org markup. Supports a Google Map, opening hours and more.
13
-
14
- == Description ==
15
-
16
- Add your business contact details to your site with seo-friendly Schema.org markup. This plugin adds a Contact Card block for the Gutenberg editor, a widget and a `[contact-card]` shortcode. You can use these to display the following on any page:
17
-
18
- * Business name
19
- * Address
20
- * Phone number
21
- * Contact page link or email address
22
- * Link to Google Map with directions to your establishment
23
- * Google Map showing your location
24
- * Opening hours
25
-
26
- 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.
27
-
28
- Supports [multi-location businesses](http://doc.themeofthecrop.com/plugins/business-profile/user/getting-started/locations) with a custom Locations post type.
29
-
30
- This plugin is part of a suite of plugins for restaurants. [Take online reservations](https://themeofthecrop.com/plugins/restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Business%20Profile) and build [responsive online menus](https://themeofthecrop.com/plugins/food-and-drink-menu/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Business%20Profile) at [Theme of the Crop](https://themeofthecrop.com/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Business%20Profile).
31
-
32
- = How to use =
33
-
34
- View the [help guide](http://doc.themeofthecrop.com/plugins/business-profile/?utm_source=Plugin&utm_medium=Plugin%Description&utm_campaign=Business%20Profile) to learn how to set up and display your Business Profile.
35
-
36
- = Developers =
37
-
38
- This plugin is packed with templates and hooks so you can extend it as needed. Read the [developer documentation](http://doc.themeofthecrop.com/plugins/business-profile/developer/). Development takes place on [GitHub](https://github.com/NateWr/business-profile/), so fork it up.
39
-
40
- == Installation ==
41
-
42
- 1. Unzip `business-profile.zip`
43
- 2. Upload the contents of `business-profile.zip` to the `/wp-content/plugins/` directory
44
- 3. Activate the plugin through the 'Plugins' menu in WordPress
45
- 4. Go to the Business Profile page in your admin menu. You will find it near the bottom.
46
-
47
- == Frequently Asked Questions ==
48
-
49
- = Is there a shortcode to print the contact card? =
50
-
51
- Yes, you can use `[contact-card]`. The documentation includes [all of the shortcode attributes](http://doc.themeofthecrop.com/plugins/business-profile/user/faq#shortcode).
52
-
53
- = It asks me for a Google Maps API Key but I don’t know what it is or how to get it. =
54
-
55
- 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).
56
-
57
- = Google Maps shows my business in the wrong location =
58
-
59
- Unfortunately, in some cases Google is unable to find the right latitude and longitude to match your address.
60
-
61
- 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.
62
-
63
- 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.
64
-
65
- 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.
66
-
67
- = What’s the Schema Type? =
68
-
69
- This allows you to let search engines like Google know exactly what kind of business you run.
70
-
71
- 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.
72
-
73
- 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.
74
-
75
- = More questions =
76
-
77
- 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/).
78
-
79
- == Screenshots ==
80
-
81
- 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.
82
- 2. An easy-to-use form lets you add all of the information, locate the correct map coordinates and set up your opening hours.
83
- 3. Choose what information to display with the widget, or check out the shortcode attributes in the help document included.
84
- 4. Optional multi-location support to easily display all of your locations.
85
- 5. Add a contact card to any page or post with the block.
86
-
87
- == Changelog ==
88
-
89
- = 1.2.6 (2019-04-04) =
90
- * Fix: Version naming issue. Corrects the 1.2.5 release.
91
-
92
- = 1.2.5 (2019-04-04) =
93
- * Fix: error when adding a new location
94
-
95
- = 1.2.4 (2019-03-18) =
96
- * Fix: date and time picker error in Chrome in pickadate.js library
97
-
98
- = 1.2.3 (2018-12-14) =
99
- * Fix: fatal error in old versions of PHP (< 5.4)
100
-
101
- = 1.2.2 (2018-12-12) =
102
- * Fix: contact card block loads in editor without saved location
103
-
104
- = 1.2.1 (2018-12-11) =
105
- * Update: .pot file with new translation strings
106
-
107
- = 1.2 (2018-12-11) =
108
- * Add: gutenberg block for the contact card
109
-
110
- = 1.1.5 (2018-09-26) =
111
- * Fix: Address coordinate lookups need to be https:// and use api key
112
-
113
- = 1.1.4 (2017-04-21) =
114
- * Add: business image to comply with Google requirements
115
-
116
- = 1.1.3 (2017-03-21) =
117
- * Fix: Fatal error with location schedule metabox
118
-
119
- = 1.1.2 (2017-03-14) =
120
- * Fix: Don't display contact card for unpublished locations
121
- * Fix: PHP Notice on post editing page (h/t @robneu)
122
- * Add: Italian and Swedish translations (h/t @lucspe and Daniel Schwitzkey)
123
- * Update: Always instantiate post type class
124
- * Update: Give settings table rows class attributes (h/t @lucspe)
125
-
126
- = 1.1.1 (2016-06-28) =
127
- * Add field for Google Maps API Key to follow new API guidelines
128
-
129
- = 1.1 (2016-06-20) =
130
- * Add: multi-location support
131
- * Add: filter to adjust available schema types
132
- * Add: templates for contact cards and opening hours
133
- * Add: helper functions for templating
134
- * Add: add_theme_support() args for disabling scripts, styles and append to content
135
- * Update: implement WP coding standards. h/t @robnue
136
-
137
- = 1.0.9 (2016-02-12) =
138
- * Fix: compatibility with wp-cli
139
- * Fix: allow short weekday names to be translated
140
- * Update: "get directions" link now opens in a new window/tab
141
- * Update: widget now uses shortcode to print output
142
- * Update: remove deprecated sensor attribute from Google Maps api call
143
- * Add: make Google Maps objects and options available in global scope
144
- * Add: allow map options to be filtered
145
- * Add: javascript event triggered when map initialized
146
-
147
- = 1.0.8 (2015-10-01) =
148
- * Update: Simple Admin Pages lib to v2.0 (#27)
149
- * Fix: line breaks can disrupt get directions link in embedded map (#17)
150
-
151
- = 1.0.7 (2015-10-01) =
152
- * Add: show shortcode on business profile page
153
- * Add: obfuscate email address if displayed in contact details
154
- * Fix: compatibility problems when the Google Maps API is already loaded
155
- * New and updated translations: Dutch, Hebrew, Spanish (Colombia), Portugese, Spanish, Czech
156
-
157
- = 1.0.6 (2015-04-03) =
158
- * Fix: validation errors with address markup
159
- * Fix: validation errors with contactPoint markup
160
-
161
- = 1.0.5 (2014-09-21) =
162
- * Fix: restore lost option to show contact info in widget options when Restaurant Reservations is activated
163
-
164
- = 1.0.4 (2014-09-11) =
165
- * Fix: contact link/email doesn't get shown.
166
-
167
- = 1.0.3 (2014-09-04) =
168
- * Fix: swapped desc/url meta values. h/t @thatryan
169
-
170
- = 1.0.2 (2014-07-16) =
171
- * Update Simple Admin Pages library to v2.0.a.7
172
-
173
- = 1.0.1 (2014-07-16) =
174
- * Fix character-case error and rename integrations file for better standardization
175
-
176
- = 1.0 (2014-07-16) =
177
- * Initial public release on WordPress.org
178
- * Add an option to display a link to a booking form if the Restaurant Reservations plugin is active
179
- * Fix: skip a scheduling rule if no weekdays are set. h/t @jasonhobbsllc
180
-
181
- = 0.0.1 (2014-05-26) =
182
- * Initial release
183
-
184
- == Upgrade Notice ==
185
-
186
- = 1.2.6 =
187
- This update fixes a fatal error when adding a new location.
188
-
189
- = 1.2.5 =
190
- This update fixes a fatal error when adding a new location.
191
-
192
- = 1.2.4 =
193
- This update fixes a bug in the latest version of Chrome with the date and time picker in the scheduler.
194
-
195
- = 1.1.5 =
196
- This update fixes the address coordinate lookup, so that coordinates can be set for more reliable Google Map display.
197
-
198
- = 1.1.4 =
199
- 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.
200
-
201
- = 1.1.3 =
202
- This update fixes a critical bug when trying to add or edit a location's opening hours.
203
-
204
- = 1.1.2 =
205
- 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.
206
-
207
- = 1.1.1 =
208
- 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.
209
-
210
- = 1.1 =
211
- 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.
212
-
213
- = 1.0.9 =
214
- This update fixes wp-cli compatibility and adds a number of useful development filters/features for interacting with the map objects.
215
-
216
- = 1.0.8 =
217
- 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.
218
-
219
- = 1.0.7 =
220
- This update fixes some compatibility problems with third-party plugins or themes, disguises the email address if displayed, and updates a bunch of translations.
221
-
222
- = 1.0.6 =
223
- 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.
224
-
225
- = 1.0.5 =
226
- This minor update fixes a problem in which the option to show or hide the contact details in a widget had disappeared.
227
-
228
- = 1.0.4 =
229
- This minor update fixes a problem in which a contact page or email address wouldn't get printed with the contact card.
230
-
231
- = 1.0.3 =
232
- This minor update fixes a problem in the Schema.org markup where your business description and URL got mixed up.
233
-
234
- = 1.0.2 =
235
- This version updates a library used by the plugin to increase compatibility with the other plugins in my restaurant plugin suite.
236
-
237
- = 1.0.1 =
238
- This update fixes a letter-case bug that may effect some installations.
239
-
240
- = 1.0 =
241
- 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.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.