Labels for form fields and buttons are pre-defined in Cab Grid Pro so that they can be mapped to translations. It is rare that these labels would need to be changed, but in some circumstances it may be necessary – for example, in re-purposing Cab Grid for a distinct use, other than taxi journeys.

With this in mind, Cab Grid Pro v4.2 provides the means to update field labels & buttons displayed in the price calculator interface. However, this is an advanced feature and therefore it is not part of the main admin interface. Rather, it must be done by editing one of the plugin’s PHP files: _settings.php

This has the drawback that updating the plugin will overwrite any changes made manually. It is recommended to keep a backup of the file or its contents so it can be restored when an update is applied. From Cab Grid Pro v4.5.9 this can be overcome using a separate plugin.

How to edit buttons & field labels using WordPress

Note: You must have file editing enabled to achieve this (see )

  1. From the WordPress admin choose Plugins > Editor
  2. From the drop-down menu on the top right of the editor window labelled “Select plugin to edit” choose, “Cab Grid Pro” and click Select (this loads the plugin code for editing)
  3. From the list of plugin files on the left, click “cab-grid-pro/_settings.php” (this loads the code for that file in the editor window)
  4. Enter new values for each of the variables between the quotes. For example:
  5. Click the Update File button once all changes have been made.

When editing the file, comments show the default (original) text for the field in question and where it is used (or it’s purpose) within Cab Grid.

Adding Cab Grid labels to a separate plugin file – Free ‘Defaults’ Add-on Plugin

As mentioned above, the _settings.php file will be overwritten each time the Cab Grid Pro plugin is updated. Any customisations made in the _settings.php file would then be lost and require restoring from a backup. To get around this, an add-on plugin can be used to specify custom labels and values. This extra plugin would not be updated with the main plugin, thus preserving customisations.

We have created a template for this add-on plugin. To use it, it should be downloaded, edited locally, and then uploaded to the WordPress plugins folder.

Tags: , , , , ,

Pin It on Pinterest