Giter VIP home page Giter VIP logo

business-profile's Introduction

=== Business Profile ===
Contributors: NateWr, fatmedia
Author URI: https://github.com/NateWr
Plugin URL: http://themeofthecrop.com
Requires at Least: 4.4
Tested Up To: 5.1
Tags: business profile, seo, local seo, schema, address, google map, contact, phone
Stable tag: 1.2.6
License: GPLv2 or later
Donate link: http://themeofthecrop.com

Display your business's contact details with seo-friendly Schema.org markup. Supports a Google Map, opening hours and more.

== Description ==

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:

* Business name
* Address
* Phone number
* Contact page link or email address
* Link to Google Map with directions to your establishment
* Google Map showing your location
* Opening hours

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.

Supports [multi-location businesses](http://doc.themeofthecrop.com/plugins/business-profile/user/getting-started/locations) with a custom Locations post type.

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).

= How to use =

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.

= Developers =

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.

== Installation ==

1. Unzip `business-profile.zip`
2. Upload the contents of `business-profile.zip` to the `/wp-content/plugins/` directory
3. Activate the plugin through the 'Plugins' menu in WordPress
4. Go to the Business Profile page in your admin menu. You will find it near the bottom.

== Frequently Asked Questions ==

= Is there a shortcode to print the contact card? =

Yes, you can use `[contact-card]`. The documentation includes [all of the shortcode attributes](http://doc.themeofthecrop.com/plugins/business-profile/user/faq#shortcode).

= It asks me for a Google Maps API Key but I don’t know what it is or how to get it. =

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).

= Google Maps shows my business in the wrong location =

Unfortunately, in some cases Google is unable to find the right latitude and longitude to match your address.

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.

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.

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.

= What’s the Schema Type? =

This allows you to let search engines like Google know exactly what kind of business you run.

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.

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.

= More questions =

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/).

== Screenshots ==

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.
2. An easy-to-use form lets you add all of the information, locate the correct map coordinates and set up your opening hours.
3. Choose what information to display with the widget, or check out the shortcode attributes in the help document included.
4. Optional multi-location support to easily display all of your locations.
5. Add a contact card to any page or post with the block.

== Changelog ==

= 1.2.6 (2019-04-04) =
* Fix: Version naming issue. Corrects the 1.2.5 release.

= 1.2.5 (2019-04-04) =
* Fix: error when adding a new location

= 1.2.4 (2019-03-18) =
* Fix: date and time picker error in Chrome in pickadate.js library

= 1.2.3 (2018-12-14) =
* Fix: fatal error in old versions of PHP (< 5.4)

= 1.2.2 (2018-12-12) =
* Fix: contact card block loads in editor without saved location

= 1.2.1 (2018-12-11) =
* Update: .pot file with new translation strings

= 1.2 (2018-12-11) =
* Add: gutenberg block for the contact card

= 1.1.5 (2018-09-26) =
* Fix: Address coordinate lookups need to be https:// and use api key

= 1.1.4 (2017-04-21) =
* Add: business image to comply with Google requirements

= 1.1.3 (2017-03-21) =
* Fix: Fatal error with location schedule metabox

= 1.1.2 (2017-03-14) =
* Fix: Don't display contact card for unpublished locations
* Fix: PHP Notice on post editing page (h/t @robneu)
* Add: Italian and Swedish translations (h/t @lucspe and Daniel Schwitzkey)
* Update: Always instantiate post type class
* Update: Give settings table rows class attributes (h/t @lucspe)

= 1.1.1 (2016-06-28) =
* Add field for Google Maps API Key to follow new API guidelines

= 1.1 (2016-06-20) =
* Add: multi-location support
* Add: filter to adjust available schema types
* Add: templates for contact cards and opening hours
* Add: helper functions for templating
* Add: add_theme_support() args for disabling scripts, styles and append to content
* Update: implement WP coding standards. h/t @robnue

= 1.0.9 (2016-02-12) =
* Fix: compatibility with wp-cli
* Fix: allow short weekday names to be translated
* Update: "get directions" link now opens in a new window/tab
* Update: widget now uses shortcode to print output
* Update: remove deprecated sensor attribute from Google Maps api call
* Add: make Google Maps objects and options available in global scope
* Add: allow map options to be filtered
* Add: javascript event triggered when map initialized

= 1.0.8 (2015-10-01) =
* Update: Simple Admin Pages lib to v2.0 (#27)
* Fix: line breaks can disrupt get directions link in embedded map (#17)

= 1.0.7 (2015-10-01) =
* Add: show shortcode on business profile page
* Add: obfuscate email address if displayed in contact details
* Fix: compatibility problems when the Google Maps API is already loaded
* New and updated translations: Dutch, Hebrew, Spanish (Colombia), Portugese, Spanish, Czech

= 1.0.6 (2015-04-03) =
* Fix: validation errors with address markup
* Fix: validation errors with contactPoint markup

= 1.0.5 (2014-09-21) =
* Fix: restore lost option to show contact info in widget options when Restaurant Reservations is activated

= 1.0.4 (2014-09-11) =
* Fix: contact link/email doesn't get shown.

= 1.0.3 (2014-09-04) =
* Fix: swapped desc/url meta values. h/t @thatryan

= 1.0.2 (2014-07-16) =
* Update Simple Admin Pages library to v2.0.a.7

= 1.0.1 (2014-07-16) =
* Fix character-case error and rename integrations file for better standardization

= 1.0 (2014-07-16) =
* Initial public release on WordPress.org
* Add an option to display a link to a booking form if the Restaurant Reservations plugin is active
* Fix: skip a scheduling rule if no weekdays are set. h/t @jasonhobbsllc

= 0.0.1 (2014-05-26) =
* Initial release

== Upgrade Notice ==

= 1.2.6 =
This update fixes a fatal error when adding a new location.

= 1.2.5 =
This update fixes a fatal error when adding a new location.

= 1.2.4 =
This update fixes a bug in the latest version of Chrome with the date and time picker in the scheduler.

= 1.1.5 =
This update fixes the address coordinate lookup, so that coordinates can be set for more reliable Google Map display.

= 1.1.4 =
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.

= 1.1.3 =
This update fixes a critical bug when trying to add or edit a location's opening hours.

= 1.1.2 =
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.

= 1.1.1 =
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.

= 1.1 =
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.

= 1.0.9 =
This update fixes wp-cli compatibility and adds a number of useful development filters/features for interacting with the map objects.

= 1.0.8 =
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.

= 1.0.7 =
This update fixes some compatibility problems with third-party plugins or themes, disguises the email address if displayed, and updates a bunch of translations.

= 1.0.6 =
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.

= 1.0.5 =
This minor update fixes a problem in which the option to show or hide the contact details in a widget had disappeared.

= 1.0.4 =
This minor update fixes a problem in which a contact page or email address wouldn't get printed with the contact card.

= 1.0.3 =
This minor update fixes a problem in the Schema.org markup where your business description and URL got mixed up.

= 1.0.2 =
This version updates a library used by the plugin to increase compatibility with the other plugins in my restaurant plugin suite.

= 1.0.1 =
This update fixes a letter-case bug that may effect some installations.

= 1.0 =
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.

business-profile's People

Contributors

calle-bokedal avatar callebokedal avatar lucspe avatar marioy47 avatar natewr avatar robneu avatar thatryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

business-profile's Issues

Showing PIN instead of Address in Map

Had a client that not want the default view of the Google map, as the address was already displayed above the map - they instead wanted the PIN that would open to the address when clicked.

Like the one below
pin1

and then when the PIN is clicked shows the address
pin2-open

I got the functionality needed with MapPress - https://wordpress.org/plugins/mappress-google-maps-for-wordpress/

Was wondering if the map component can be manipulated in Business Profile as it currently stands.

Callback Help

Hey there, This is awesome thanks. I am trying to extend it a bit to add a formatted phone number option so I can output it as a tel: href to activate calling. I have it (mostly) working, added a setting, and added getter to the template-functions, but when I output the data I am getting an error call_user_func() expects parameter 1 to be a valid callback and am not sure I follow how the callback part is supposed to work... Any input?

Thanks!

Allow non-administrators to manage Business Profile

On my customers websites I usually give them a slightly lower that full administrator role permissions. This is so that I can protect some sensible areas where they could introduce problems.

Problem is I need to allow them to manage business-profile details but that seems to be accessible only by administrators.

Is there any way I can customize this?

Switch over to JSON-LD

I'm considering making the jump to the JSON-LD format. It's what Google recommends, it will reduce the burden of tying the output to the schema, and prevent the situation where we're loading lots of rich markup objects on a single page just because we want to display the details in multiple places. It will also make it easier to inject data (like menus) into the overall entry.

The goal is to:

  • Load a JSON-LD entry in the header on the homepage. (Should it interact with Yoast's JSON-LD entry?)
  • Load a JSON-LD entry for a location in the header of each location single page.
  • Keep the DOM structure the same, just removing the attributes specific to the schema.org entry, so that no CSS changes are required.
  • Keep the old template functions around so that existing custom templates that use those functions will continue to work seamlessly.
  • Add a setting to keep the old format in case these measures still break anyone's custom templates or entries.

@robneu do you have any thoughts on this?

Allow text to be passed to brief opening hours

Allow the opening_hours_brief argument to accept a string for display instead of trying to generate it's own, so that users can opt for a more human-readable format, like "12-6pm Mon-Fri".

  • Allow function to accept string and output the string
  • Test this in the shortcode
  • Add text field to widget
  • Add option to location editing pages

Multiple Locations

Do you have any plans to add support for multiple locations? Would you be interested in a pull request to add them?

Enqueue Google Maps api script so that conflicts can be managed better

Right now the plugin injects the Google Maps API script after the page is loaded. This improves page load speed a little bit, but the cost is that it's very difficult to manage conflicts.

If another plugin enqueues the Google Maps api as well, this can cause conflicts, for example with Modern Tribe's Events Calendar plugin. So they need to be able to dequeue the API script without disabling the map view in our plugin.

This presents a bit of an issue around how the maps are loaded. We are passing an initialize callback to the API as a query var, so that our maps spin up as soon as the API is loaded. If we continue to use this technique, dequeuing the API call will also disable our maps.

On the other hand, if we don't use the callback technique, we'll need to implement some kind of listener that checks when the API is loaded. I'm not super happy about that. It just seems like a lot of hassle. It might be worth diving into the Google Maps API to see if they emit any kind of loaded event we can listen to.

WordPress Coding Standards

This is a pretty minor detail, but the plugin triggers a number of warnings and errors when running the WordPress PHP_CodeSniffer sniffs. If this is something you'd like to leave as-is, no big deal.

If you'd like to make the plugin more compliant, we could work on getting things updated as part of the process of building out the multiple locations feature. I'd be happy to either work the fixes in through my feature PRs or do them all in one shot with a WPCS pull request.

Filter out some key words

All the text can be translated, but a lot of English speakers are just not familiar with how to use translations. Some of the key phrases, like "Get Directions" and "Opening Hours" should be filtered for easy modification.

Add/Edit locations

The add/edit interface for location posts should support post meta in the format described in the locations standard.

  • Remove unnecessary components from the add/edit page
  • Convert scheduler.js from Simple Admin Pages for use as post meta for opening hours
  • Convert address.js from Simple Admin Pages for use as post meta for business address (lat/lon lookup)
  • Support all the rest of the post meta required

Previous discussion in #6.

Define custom post type for multiple locations

Multiple locations will be defined in a location custom post type that follows the (work-in-progress) standard as closely as possible. The custom post types should be "activated" through a toggle in the main profile settings page. When activated, menu items for Locations and Add Locations will appear under the Business Profile link.

  • Set up code architecture for Custom Post Type
  • Add toggle to settings page to "enable" custom post type
  • Add menu items to Business Profile tab

Previous discussion can be found in #6.

Enter map coordinates manually

Google drops the ball for quite a few addresses, not locating them correctly. Perhaps next to the coordinate "View" button there should be an "Edit" button to enter them manually.

Add more specific business types?

Someone recently asked me if it's possible to add a more specific business type such as InsuranceAgency. A method for doing it via a filter didn't jump out at me and I was wondering if you'd be willing to add these sub-types in to the default options array.

If so, I'll gather up a list of all of them and set up a PR. I can also add some filters to make it easier for developers to add new sub-types if they're added to the spec before we have a chance to include them.

WordPress.org install doesn't include translation files

Hi,

I was looking to have the plugin translated to Portuguese and Im seeing that it already has translation files for that, although those files aren't included when installing the plugin from wordpress.org.

Anything can be done about this?

Cheers.

non-object PHP notice error

Being output in WP 4.5.2 & BP 1.1
Notice: Trying to get property of non-object in /srv/www/allwater/htdocs/wp-content/plugins/business-profile/business-profile.php on line 207

Support add_theme_support for controlling automated integration

Arguments:

  • disable_styles - Whether or not to load frontend stylesheets. Default: false
  • disable_scripts - Whether or not to load frontend scripts. Default: false
  • disable_append_to_content - Whether or not to automatically append a contact card to the_content in location single.php. Default: false

Refactor restaurant reservations integration

The addition of the booking link should be handled by the Restaurant Reservations plugin rather than Business Profile.

NateWr/restaurant-reservations#58

The way it's handled now in BP makes it hard to have a generic function available to call, because it's nested in a class. Implement in the reservations plugin then deprecate this technique.

Google's Rich Snippets testing tool doesn't recognize the display address

It looks like the display address is not being recognized by Google's Rich Snippets tool. The address gets recognized when show_address is set to false. In this case, the plugin prints the address into the content attribute on a meta tag.

I think this is because only the content attribute supports a single-string address. A full schema object wants a fully-specified PostalAddress.

The template tag should be refactored to always print the address into the content attribute of a meta tag. Then we can remove the schema markup from the display markup if it's printed.

"Get Directions" Link to include option to open in new window/tab.

Currently the Google Map "Get directions" link opens in a new window/tab within the browser.

However this is not the case for the "Get Directions" links in:

  1. Contact Card Widget.
  2. Selected Contact Page.

Solution:
An option to have the links open in a new window/tab would be nice.

Short weekday names are not i18n-ready

Woops. The days of the week are defined for the schema output format here. But then they're re-used for the display output in brief opening hours here.

The display output names need to be translate-able, but the schema output needs to remain fixed in order to validate.

google map

Hello,
our store is enlisted in google maps, but providing an address in site does not match the map. Can I manually set the coordinates? or how can I match the google list?

URL Encoding Problem for Map

Hi again :)

So noticed an issue when clicking on 'get directions' from inside of the map content box, it fails to get directions because the URL parameter, in my case, has a <br> in it. Works find where the address link is printed via PHP, but the

encodeURIComponent( data.address )

Is not removing the break tag. I am trying to figure out how to strip and clean it for the address, but thought I would post it for you to see also.

Make Location Metabox More Extensible?

I have a custom plugin that adds an alternative phone to the default settings screen on Business Profile and at a quick glance I didn't see any way to easily add the same data to individual locations.

I think all that would be needed is an extra do_action within the meta box itself and the callback used for saving the extra meta as well.

It's also possible that I've just missed it entirely or that you prefer people register their own custom meta boxes rather than expand on the existing ones.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.