From: Steve Sutton Date: Wed, 22 Feb 2017 16:37:05 +0000 (-0500) Subject: Update phone numbers to use the phone filter from main plugin. X-Git-Tag: v1.6.10^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=e702d6faa0fe4984f1d2e03a3bfa378d4cab8925;p=WP-Plugins%2Fglm-member-db-events.git Update phone numbers to use the phone filter from main plugin. This will format the phone numbers to be the same across our plugins. Applies a filter to format the number from a management setting. Dot, Dash or US --- diff --git a/index.php b/index.php index a63a1d8..80926c4 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database Events * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 1.6.9 + * Version: 1.6.10 * Author: Chuck Scott * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -20,7 +20,7 @@ * @package glmMembersDatabaseEventsAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.6.9 + * @version 1.6.10 */ /* @@ -38,7 +38,7 @@ * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.9'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.10'); define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.1'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/front/events/list.php b/models/front/events/list.php index 27284eb..16da235 100644 --- a/models/front/events/list.php +++ b/models/front/events/list.php @@ -485,7 +485,7 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction // check for phone, url or email to output $contactInfo = array(); if ( $event['contact_phone'] ) { - $contactInfo[] = $event['contact_phone']; + $contactInfo[] = apply_filters( 'glm_associate_phone_filter', $event['contact_phone'] ); } if ( $event['contact_email'] ) { $contactInfo[] = $event['contact_email']; diff --git a/views/front/events/detail.html b/views/front/events/detail.html index 26f679f..05dfcb7 100644 --- a/views/front/events/detail.html +++ b/views/front/events/detail.html @@ -75,7 +75,7 @@ {if $event.locations.address} {$event.locations.address}
{/if} {if $event.locations.city.name}{$event.locations.city.name}{/if}{if $event.locations.state.value}, {$event.locations.state.value} {/if} {if $event.locations.zip} {$event.locations.zip} {/if} - {if $event.locations.phone} {$event.locations.phone} {/if} + {if $event.locations.phone} {apply_filters('glm_associate_phone_filter', $event.locations.phone)} {/if} {elseif $event.use_member_location.value || $event.other_ref_dest}
@@ -83,7 +83,7 @@ {if $event.member.addr1} {$event.member.addr1}
{/if} {if $event.member.city}{$event.member.city}{/if}{if $event.member.state.value}, {$event.member.state.value}{/if} {if $event.member.zip} {$event.member.zip} {/if} - {if $event.member.phone} {$event.member.phone} {/if} + {if $event.member.phone} {apply_filters('glm_associate_phone_filter', $event.member.phone)} {/if}
{/if} {/if} @@ -101,7 +101,12 @@ {if $event.url}{$event.url}
{/if} {if $event.contact_name}Contact: {$event.contact_name}
{/if} {if $event.contact_email}Email: {$event.contact_email}
{/if} - {if $event.contact_phone}Phone: {$event.contact_phone}
{/if} + {if $event.contact_phone} + + Phone: + {apply_filters('glm_associate_phone_filter', $event.contact_phone)} +
+ {/if} {if $event.file1}
File: {if $event.file1_descr}{$event.file1_descr}{else}{$event.file1}{/if} @@ -138,8 +143,8 @@ // Replace the phone separation character with whatever is set in the management {if $settings.phone_infix} - var processedPhone = $('.glm-event-detail-contact-phone .glm-field-value').text().trim().replace(/[^a-zA-Z0-9 ]/g, '{$settings.phone_infix}'); - $('.glm-event-detail-contact-phone .glm-field-value').text(processedPhone); + //var processedPhone = $('.glm-event-detail-contact-phone .glm-field-value').text().trim().replace(/[^a-zA-Z0-9 ]/g, '{$settings.phone_infix}'); + //$('.glm-event-detail-contact-phone .glm-field-value').text(processedPhone); {/if} });