If your theme is a child theme no update will override the functions.php of the child theme, only of the parent theme.
If you use the theme not as a child theme the next updates will override the functions.php and your changes will be deleted. So here a plugin is the safest way.
To create this plugin please create a file with the name ‘scb-change-cellphone-icon.php’ with this code:
<?php
/**
* Plugin Name: Speed Contact Bar: Cellphone to Phone
* Description: Changes the icon for the cellphone number into the icon for the phone number
* Version: 1.0
* Author: Martin Stehle
* Author URI: https://stehle-internet.de/
*/
function scb_change_cellphone_icon ( $list_items ) {
// Looks for the filename of the cellphone icon in each items
for ( $i = 0; $i < count( $list_items ); $i++ ) {
if ( false === strpos( $list_items[ $i ], 'images/cellphone_' ) ) {
continue;
}
$list_items[ $i ] = preg_replace(
'/images\/cellphone_/',
'images/phone_',
$list_items[ $i ]
);
break;
}
// Returns the list
return $list_items;
}
// Let the function work
add_filter( 'speed_contact_bar_data', 'scb_change_cellphone_icon' );
Then
- upload the file to your server in the folder ‘/wp-content/plugins/’
- go to the backend of your site
- go to the Plugins page
- look for the plugin ‘Speed Contact Bar: Cellphone to Phone’
- and activate it.
That’s all.