Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jeremy Groot
/
stellervista-Intranet
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0376f63e
authored
2023-07-26 11:59:12 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update_fax
Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent
d917e542
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
wp-content/themes/understrap-child/functions.php
wp-content/themes/understrap-child/functions.php
View file @
0376f63
...
...
@@ -218,3 +218,53 @@ function format_phone_string( $phoneNumber ) {
return
$phoneNumber
;
}
function
wpa_91930
()
{
// if query var is not present just return
if
(
!
isset
(
$_REQUEST
[
'my_listener'
]
)
||
'update_fax'
!=
$_REQUEST
[
'my_listener'
]
){
return
;
}
else
{
echo
"Started<br>"
;
$users
=
get_users
(
array
(
'fields'
=>
array
(
'ID'
)
)
);
foreach
(
$users
as
$user
){
$department_branch
=
get_user_meta
(
$user
->
ID
,
'department_branch'
,
true
);
switch
(
$department_branch
){
case
"Cranbrook Branch"
:
update_user_meta
(
$user
->
ID
,
'phone_number_12'
,
'250 426 7370'
);
break
;
case
"Commercial Department"
:
update_user_meta
(
$user
->
ID
,
'phone_number_12'
,
'250 426 0879'
);
break
;
case
"Elkford Branch"
:
update_user_meta
(
$user
->
ID
,
'phone_number_12'
,
'250 865 7537'
);
break
;
case
"Sparwood Branch"
:
update_user_meta
(
$user
->
ID
,
'phone_number_12'
,
'250 425 0047'
);
break
;
case
"Fernie Branch"
:
update_user_meta
(
$user
->
ID
,
'phone_number_12'
,
'250 423 9223'
);
break
;
case
"Castlegar Branch"
:
update_user_meta
(
$user
->
ID
,
'phone_number_12'
,
'250 365 2913'
);
break
;
case
"Slocan Valley Branch"
:
update_user_meta
(
$user
->
ID
,
'phone_number_12'
,
'250 226 7351'
);
break
;
case
"Greenwood Branch"
:
update_user_meta
(
$user
->
ID
,
'phone_number_12'
,
'250 445 9902'
);
break
;
default
:
echo
"No department_branch set.<br>"
;
break
;
}
}
echo
"Completed<br>"
;
exit
;
}
}
add_action
(
'init'
,
'wpa_91930'
);
...
...
Please
register
or
sign in
to post a comment