Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions projects/plugins/crm/admin/settings/general.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@
if ( isset( $_POST['wpzbscrm_clicktocall'] ) && ! empty( $_POST['wpzbscrm_clicktocall'] ) ) {
$updatedSettings['clicktocall'] = 1;
}
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saving the General settings no longer touches clicktocalltype, so existing installs may keep an obsolete clicktocalltype value in the DB indefinitely. Consider explicitly resetting it to 1 (or deleting/unsetting it) during this settings save to keep persisted settings consistent with the new behavior.

Suggested change
}
}
// Reset legacy click-to-call type to the default to avoid persisting obsolete values.
$updatedSettings['clicktocalltype'] = 1;

Copilot uses AI. Check for mistakes.
$updatedSettings['clicktocalltype'] = 1;
if ( isset( $_POST['wpzbscrm_clicktocalltype'] ) && ! empty( $_POST['wpzbscrm_clicktocalltype'] ) ) {
$updatedSettings['clicktocalltype'] = (int) sanitize_text_field( $_POST['wpzbscrm_clicktocalltype'] );
}
$updatedSettings['objnav'] = 0;
if ( isset( $_POST['wpzbscrm_objnav'] ) && ! empty( $_POST['wpzbscrm_objnav'] ) ) {
$updatedSettings['objnav'] = 1;
Expand Down Expand Up @@ -434,26 +430,6 @@
</tr>


<tr>
<td class="wfieldname"><label for="wpzbscrm_clicktocalltype"><?php esc_html_e( 'Click 2 Call link type', 'zero-bs-crm' ); ?>:</label><br /><?php esc_html_e( 'Use Skype or Standard Click to Call?', 'zero-bs-crm' ); ?></td>
<td style="width:540px">
<select class="winput form-control" name="wpzbscrm_clicktocalltype" id="wpzbscrm_clicktocalltype">
<option value="1"
<?php
if ( isset( $settings['clicktocalltype'] ) && $settings['clicktocalltype'] == '1' ) {
echo ' selected="selected"';}
?>
>Click to Call (tel:)</option>
<option value="2"
<?php
if ( isset( $settings['clicktocalltype'] ) && $settings['clicktocalltype'] == '2' ) {
echo ' selected="selected"';}
?>
>Skype Call (callto:)</option>
</select>
</td>
</tr>

<tr>
<td class="wfieldname"><label for="wpzbscrm_objnav"><?php esc_html_e( 'Use Navigation Mode', 'zero-bs-crm' ); ?>:</label><br /><?php esc_html_e( 'Shows Previous & Next buttons on each contact and company, allowing quick navigation through your list.', 'zero-bs-crm' ); ?></td>
<td style="width:540px"><input type="checkbox" class="winput form-control" name="wpzbscrm_objnav" id="wpzbscrm_objnav" value="1"
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/crm/changelog/remove-skype-click2call-option
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: removed

Click 2 Call: Remove discontinued Skype (callto:) option
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog entry should end with a period to match the repository changelog entry guidelines.

Suggested change
Click 2 Call: Remove discontinued Skype (callto:) option
Click 2 Call: Remove discontinued Skype (callto:) option.

Copilot uses AI. Check for mistakes.
10 changes: 1 addition & 9 deletions projects/plugins/crm/includes/ZeroBSCRM.DAL3.Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7316,15 +7316,7 @@ function zeroBSCRM_db2_deleteGeneric( $id = -1, $tableKey = '' ) {

// this has a js equivilent in global.js: zeroBSCRMJS_telURLFromNo
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment has a spelling issue ("equivilent" → "equivalent") and references a non-existent file name ("global.js"). Since the JS function lives in js/ZeroBSCRM.admin.global.js, update the comment to avoid misleading future maintenance.

Suggested change
// this has a js equivilent in global.js: zeroBSCRMJS_telURLFromNo
// This has a JS equivalent in js/ZeroBSCRM.admin.global.js: zeroBSCRMJS_telURLFromNo

Copilot uses AI. Check for mistakes.
function zeroBSCRM_clickToCallPrefix() {

$click2CallType = zeroBSCRM_getSetting( 'clicktocalltype' );

if ( $click2CallType == 1 ) {
return 'tel:';
}
if ( $click2CallType == 2 ) {
return 'callto:';
}
return 'tel:';
}

function zeroBS_getCurrentUserUsername() {
Expand Down
1 change: 0 additions & 1 deletion projects/plugins/crm/includes/ZeroBSCRM.Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ public function drawView() {
var zbsObjectEditLinkPrefixCustomer = '<?php echo jpcrm_esc_link( 'edit', -1, 'zerobs_customer', true ); ?>';
var zbsObjectViewLinkPrefixCompany = '<?php echo jpcrm_esc_link( 'view', -1, 'zerobs_company', true ); ?>';
var zbsListViewLink = '<?php echo jpcrm_esc_link( $this->listViewSlug ); ?>';
var zbsClick2CallType = parseInt('<?php echo esc_html( zeroBSCRM_getSetting( 'clicktocalltype' ) ); ?>');
var zbsEditViewLangLabels = {

'today': '<?php echo esc_html( zeroBSCRM_slashOut( __( 'Today', 'zero-bs-crm' ) ) ); ?>',
Expand Down
1 change: 0 additions & 1 deletion projects/plugins/crm/includes/ZeroBSCRM.Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ public function drawEditViewHTML() {
var zbsListViewLink = '<?php echo jpcrm_esc_link( $this->listViewSlug ); ?>';


var zbsClick2CallType = parseInt('<?php echo esc_html( zeroBSCRM_getSetting( 'clicktocalltype' ) ); ?>');
var zbsEditViewLangLabels = {

'today': '<?php echo esc_html( zeroBSCRM_slashOut( __( 'Today', 'zero-bs-crm' ) ) ); ?>',
Expand Down
1 change: 0 additions & 1 deletion projects/plugins/crm/includes/ZeroBSCRM.List.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,6 @@ public function drawListView() {
}

?>';
var zbsClick2CallType = parseInt('<?php echo esc_url( zeroBSCRM_getSetting( 'clicktocalltype' ) ); ?>');

<?php
$jpcrm_listview_lang_labels = array();
Expand Down
1 change: 0 additions & 1 deletion projects/plugins/crm/includes/ZeroBSCRM.TagManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ public function drawTagView() {
var zbsObjectEditLinkPrefixCustomer = '<?php echo jpcrm_esc_link( 'edit', -1, 'zerobs_customer', true ); ?>';
var zbsObjectViewLinkPrefixCompany = '<?php echo jpcrm_esc_link( 'view', -1, 'zerobs_company', true ); ?>';
var zbsListViewLink = '<?php echo jpcrm_esc_link( $this->listViewSlug ); ?>';
var zbsClick2CallType = parseInt('<?php echo esc_html( zeroBSCRM_getSetting( 'clicktocalltype' ) ); ?>');
var zbsEditViewLangLabels = {

'today': '<?php echo esc_html( zeroBSCRM_slashOut( __( 'Today', 'zero-bs-crm' ) ) ); ?>',
Expand Down
7 changes: 0 additions & 7 deletions projects/plugins/crm/js/ZeroBSCRM.admin.global.js
Original file line number Diff line number Diff line change
Expand Up @@ -1597,13 +1597,6 @@ function zeroBSCRMJS_telLinkFromNo( telno, internalHTML, extraClasses ) {
* @param telno
*/
function zeroBSCRMJS_telURLFromNo( telno ) {
if ( typeof window.zbsClick2CallType !== 'undefined' ) {
// eslint-disable-next-line eqeqeq
if ( window.zbsClick2CallType == 2 ) {
return 'callto:' + telno;
}
}

return 'tel:' + telno;
}

Expand Down
Loading