• Resolved stardeuche

    (@stardeuche)


    Hi,

    I work with a map field and i have got a problem with api keys. how add my api keys for run google map in the field map of carbon fields

    with the old version, the map field working well.

    i try to put my api key in a directory of carbon fields plugin (core/field/Map_field.php). this manipulation worked but it seems to me not compatible with a future plugin update.

    how put our api key google map for the fields map of carbon fields ?

    thanks so lot

    https://ww.wp.xz.cn/plugins/carbon-fields/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author htmlBurger

    (@htmlburger)

    Hi @dewy,

    We have added a new filter called “carbon_map_api_key”, which allows you to define your Google Maps API key. For example:

    add_filter( 'carbon_map_api_key', 'crb_google_maps_api_key' );
    function crb_google_maps_api_key() {
        return ''; // Your API Key goes here
    }

    This change will take place in the next version of Carbon Fields. In the meantime, feel free to download and use the latest release from https://github.com/htmlburger/carbon-fields.

    Thread Starter stardeuche

    (@stardeuche)

    hi

    ok i’m downloading the plugin from your link above this post and it’s works.

    with this filter it’s more clean. thanks so lot

    the plugin in the github it’s not same thing of the repository wordpress plugin ?

    thanks for your help

    Plugin Author htmlBurger

    (@htmlburger)

    It’s the same plugin, however, we update the WordPress plugin when we have new major version(i.e. once every few months).

    You can get the latest version of the plugin from GitHub.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘api key for google map’ is closed to new replies.