Skip to content

Commit

Permalink
Changed address formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
justinh-rahb committed Oct 3, 2024
1 parent a72f1d9 commit ba22d2c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [0.2.5]

### Changed

- **Address Formatting**: Updated the address formatting in the office cards to display the city, state, and ZIP code on separate lines for improved readability.

## [0.2.4]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion bridge-directory/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: justinh-rahb
Tags: real estate, bridge, brokerage, api
Requires at least: 5.0
Tested up to: 6.6.2
Stable tag: 0.2.4
Stable tag: 0.2.5
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down
9 changes: 7 additions & 2 deletions bridge-directory/assets/js/bridge-directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@
parts.push(`<p><a href="mailto:${office.OfficeEmail}">${office.OfficeEmail}</a></p>`);
}

// Address (always shown)
parts.push(`<p>${office.OfficeAddress1} ${office.OfficeAddress2}, ${office.OfficeCity}, ${office.OfficeStateOrProvince} ${office.OfficePostalCode}</p>`);
// Format the address with separate lines
let address = `<p>${office.OfficeAddress1}</p>`;
if (office.OfficeAddress2) {
address += `<p>${office.OfficeAddress2}</p>`;
}
address += `<p>${office.OfficeCity}, ${office.OfficeStateOrProvince} ${office.OfficePostalCode}</p>`;
parts.push(address);

// Correct the URL if it doesn't start with http:// or https://
if (office.SocialMediaWebsiteUrlOrId) {
Expand Down
2 changes: 1 addition & 1 deletion bridge-directory/bridge-directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Bridge API Directory
* Plugin URI: https://github.com/RAHB-REALTORS-Association/Bridge-Directory-WP
* Description: Displays a searchable directory of offices using the Bridge Interactive API.
* Version: 0.2.4
* Version: 0.2.5
* Author: Cornerstone Association of REALTORS
* Author URI: https://www.cornerstone.inc
* License: GPL-2.0
Expand Down
2 changes: 1 addition & 1 deletion bridge-directory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge-directory",
"version": "0.2.4",
"version": "0.2.5",
"description": "A WordPress plugin that displays a searchable directory of offices using the Bridge Interactive API.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit ba22d2c

Please sign in to comment.