Skip to content

CRM: Clean up small bits of unused code #43116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 21, 2025
Merged
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
15 changes: 6 additions & 9 deletions projects/plugins/crm/.phan/baseline.php
Original file line number Diff line number Diff line change
@@ -17,9 +17,9 @@
// PhanTypeArraySuspicious : 190+ occurrences
// PhanImpossibleCondition : 180+ occurrences
// PhanPluginUnreachableCode : 170+ occurrences
// PhanTypeMismatchArgument : 160+ occurrences
// PhanTypePossiblyInvalidDimOffset : 160+ occurrences
// PhanTypeMismatchPropertyProbablyReal : 150+ occurrences
// PhanTypeMismatchArgument : 140+ occurrences
// PhanPossiblyUndeclaredVariable : 130+ occurrences
// PhanTypeMismatchReturnProbablyReal : 130+ occurrences
// PhanTypeMismatchDefault : 110+ occurrences
@@ -123,7 +123,7 @@

// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
'admin/activation/welcome-to-jpcrm.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchForeach'],
'admin/activation/welcome-to-jpcrm.php' => ['PhanTypeMismatchForeach'],
'admin/activation/wizard.ajax.php' => ['PhanPluginNeverReturnFunction', 'PhanRedundantCondition', 'PhanSuspiciousValueComparison'],
'admin/company/view.page.php' => ['PhanImpossibleCondition', 'PhanNoopBinaryOperator', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanRedundantCondition', 'PhanSuspiciousValueComparison', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgument', 'PhanTypePossiblyInvalidDimOffset', 'PhanTypeSuspiciousStringExpression'],
'admin/contact/add-file.page.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentNullable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredFunction'],
@@ -161,7 +161,6 @@
'admin/support/main.page.php' => ['PhanPluginDuplicateAdjacentStatement', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullable'],
'admin/system/partials/title.block.php' => ['PhanUndeclaredGlobalVariable'],
'admin/system/system-status.page.php' => ['PhanRedundantCondition', 'PhanTypePossiblyInvalidDimOffset'],
'admin/tags/tag-manager.page.php' => ['PhanTypeMismatchArgument'],
'api/companies.php' => ['PhanParamTooMany', 'PhanPluginSimplifyExpressionBool'],
'api/create_company.php' => ['PhanImpossibleTypeComparisonInGlobalScope', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedundantConditionInGlobalScope'],
'api/create_customer.php' => ['PhanImpossibleTypeComparisonInGlobalScope', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedundantConditionInGlobalScope', 'PhanTypePossiblyInvalidDimOffset'],
@@ -173,12 +172,12 @@
'includes/ZeroBSCRM.API.php' => ['PhanCommentParamWithoutRealParam', 'PhanRedefineFunctionInternal', 'PhanRedundantCondition', 'PhanTypeArraySuspicious', 'PhanTypeMismatchArgumentInternal'],
'includes/ZeroBSCRM.AdminPages.Checks.php' => ['PhanPluginUnreachableCode'],
'includes/ZeroBSCRM.AdminPages.php' => ['PhanDeprecatedFunction', 'PhanImpossibleCondition', 'PhanPluginDuplicateAdjacentStatement', 'PhanPluginRedundantAssignment', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgument', 'PhanTypeSuspiciousEcho', 'PhanUndeclaredVariableDim'],
'includes/ZeroBSCRM.AdminStyling.php' => ['PhanDeprecatedFunction', 'PhanPluginSimplifyExpressionBool', 'PhanTypeMismatchArgument'],
'includes/ZeroBSCRM.AdminStyling.php' => ['PhanDeprecatedFunction', 'PhanPluginSimplifyExpressionBool'],
'includes/ZeroBSCRM.CSVImporter.php' => ['PhanPluginRedundantAssignment', 'PhanPossiblyUndeclaredVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypePossiblyInvalidDimOffset', 'PhanTypeSuspiciousEcho', 'PhanUndeclaredVariableDim'],
'includes/ZeroBSCRM.Core.Extensions.php' => ['PhanRedundantCondition', 'PhanTypePossiblyInvalidDimOffset'],
'includes/ZeroBSCRM.Core.Localisation.php' => ['PhanParamTooFew', 'PhanTypeMismatchArgument'],
'includes/ZeroBSCRM.Core.Menus.Top.php' => ['PhanDeprecatedFunction', 'PhanTypeMismatchArgument', 'PhanTypeVoidArgument'],
'includes/ZeroBSCRM.Core.Menus.WP.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanTypeMismatchArgument', 'PhanUndeclaredClassMethod'],
'includes/ZeroBSCRM.Core.Menus.WP.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanUndeclaredClassMethod'],
'includes/ZeroBSCRM.Core.php' => ['PhanDeprecatedFunction', 'PhanImpossibleCondition', 'PhanPluginDuplicateArrayKey', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginNeverReturnMethod', 'PhanPluginSimplifyExpressionBool', 'PhanPluginUnreachableCode', 'PhanSuspiciousValueComparison', 'PhanTypeArraySuspicious', 'PhanTypeMismatchArgument', 'PhanTypeMismatchDefault', 'PhanTypeMismatchDimAssignment', 'PhanTypeMismatchProperty', 'PhanTypeMismatchPropertyDefault', 'PhanTypeMismatchPropertyProbablyReal', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnProbablyReal', 'PhanTypeMissingReturn', 'PhanTypePossiblyInvalidDimOffset', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredClassMethod', 'PhanUndeclaredTypeProperty', 'PhanUndeclaredTypeReturnType', 'PhanUnextractableAnnotation', 'PhanUnextractableAnnotationSuffix'],
'includes/ZeroBSCRM.CustomerFilters.php' => ['PhanDeprecatedFunction', 'PhanImpossibleCondition', 'PhanPluginNeverReturnFunction', 'PhanRedundantCondition', 'PhanTypeMismatchArgumentInternal'],
'includes/ZeroBSCRM.DAL.Fields.php' => ['PhanPluginMixedKeyNoKey', 'PhanRedefineFunction'],
@@ -217,13 +216,12 @@
'includes/ZeroBSCRM.Jetpack.php' => ['PhanPluginDuplicateConditionalNullCoalescing'],
'includes/ZeroBSCRM.List.Columns.php' => ['PhanPluginMixedKeyNoKey'],
'includes/ZeroBSCRM.List.Tasks.php' => ['PhanRedundantCondition', 'PhanTypeMismatchArgument'],
'includes/ZeroBSCRM.List.Views.php' => ['PhanTypeMismatchArgument'],
'includes/ZeroBSCRM.List.php' => ['PhanPossiblyUndeclaredVariable', 'PhanRedundantCondition', 'PhanTypeArraySuspicious', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal'],
'includes/ZeroBSCRM.Mail.php' => ['PhanImpossibleCondition', 'PhanPluginMixedKeyNoKey', 'PhanPluginRedundantAssignment', 'PhanPluginUnreachableCode', 'PhanRedundantCondition', 'PhanSuspiciousValueComparison', 'PhanTypeMismatchArgumentInternalReal', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredClassCatch', 'PhanUndeclaredClassInstanceof', 'PhanUndeclaredClassMethod', 'PhanUndeclaredClassProperty', 'PhanUndeclaredClassReference', 'PhanUndeclaredVariable', 'PhanUnreferencedUseNormal'],
'includes/ZeroBSCRM.MailTracking.php' => ['PhanTypeArraySuspiciousNullable'],
'includes/ZeroBSCRM.MetaBox.php' => ['PhanTypeConversionFromArray', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypePossiblyInvalidDimOffset', 'PhanTypeSuspiciousStringExpression'],
'includes/ZeroBSCRM.MetaBoxes3.Companies.php' => ['PhanDeprecatedFunction', 'PhanPluginDuplicateAdjacentStatement', 'PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredVariable'],
'includes/ZeroBSCRM.MetaBoxes3.Contacts.php' => ['PhanDeprecatedFunction', 'PhanPluginDuplicateAdjacentStatement', 'PhanPluginSimplifyExpressionBool', 'PhanRedundantCondition', 'PhanTypeArraySuspicious', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredVariable'],
'includes/ZeroBSCRM.MetaBoxes3.Contacts.php' => ['PhanDeprecatedFunction', 'PhanPluginDuplicateAdjacentStatement', 'PhanPluginSimplifyExpressionBool', 'PhanRedundantCondition', 'PhanTypeArraySuspicious', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredVariable'],
'includes/ZeroBSCRM.MetaBoxes3.Forms.php' => ['PhanRedundantCondition', 'PhanTypeMismatchArgument'],
'includes/ZeroBSCRM.MetaBoxes3.Invoices.php' => ['PhanRedundantCondition', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeInvalidRightOperandOfNumericOp', 'PhanTypeMismatchArgument'],
'includes/ZeroBSCRM.MetaBoxes3.Logs.php' => ['PhanImpossibleCondition', 'PhanRedundantCondition', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypePossiblyInvalidDimOffset'],
@@ -244,13 +242,12 @@
'includes/ZeroBSCRM.Social.php' => ['PhanMisspelledAnnotation', 'PhanTypeArraySuspiciousNullable'],
'includes/ZeroBSCRM.TagManager.php' => ['PhanEmptyForeach', 'PhanImpossibleCondition', 'PhanImpossibleTypeComparisonInLoop', 'PhanRedundantCondition', 'PhanTypeMismatchArgumentInternalReal', 'PhanUndeclaredProperty', 'PhanUndeclaredVariable'],
'includes/class-encryption.php' => ['PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredTypeParameter', 'PhanUndeclaredTypeReturnType'],
'includes/class-learn-menu.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanRedundantCondition', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgument', 'PhanTypeMismatchDefault'],
'includes/class-learn-menu.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanRedundantCondition', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchDefault'],
'includes/class-oauth-handler.php' => ['PhanTypeArraySuspicious', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredClassCatch', 'PhanUndeclaredClassMethod', 'PhanUndeclaredTypeReturnType', 'PhanUndeclaredVariable', 'PhanUnreferencedUseNormal'],
'includes/class-package-installer.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredClassMethod'],
'includes/jpcrm-dependency-checker.php' => ['PhanCommentParamWithoutRealParam', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchDefault', 'PhanTypeSuspiciousEcho', 'PhanUndeclaredTypeParameter', 'PhanUndeclaredTypeReturnType'],
'includes/jpcrm-feature-sniffer.php' => ['PhanTypeMismatchDefault', 'PhanUndeclaredTypeParameter'],
'includes/jpcrm-fonts.php' => ['PhanUndeclaredClassMethod', 'PhanUndeclaredTypeParameter'],
'includes/jpcrm-language.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchDefault'],
'includes/jpcrm-learn-menu-legacy-functions.php' => ['PhanDeprecatedFunction'],
'includes/jpcrm-localisation.php' => ['PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDefault', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredTypeParameter', 'PhanUndeclaredTypeReturnType'],
'includes/jpcrm-mail-templating.php' => ['PhanPluginSimplifyExpressionBool', 'PhanTypeExpectedObjectPropAccess'],
6 changes: 0 additions & 6 deletions projects/plugins/crm/admin/user-profile/user-profile.page.php
Original file line number Diff line number Diff line change
@@ -76,9 +76,3 @@ function jpcrm_render_userprofile_page() {
</div>
<?php
}

/*
* As of 7/12/21 unused:
add_action('zbs_your_profile_cal_pro_promo', 'zeroBSCRM_pages_your_profile_promo');
function zeroBSCRM_pages_your_profile_promo(){}
*/
4 changes: 4 additions & 0 deletions projects/plugins/crm/changelog/fix-crm-various_cleanups
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Remove unused legacy code.
31 changes: 7 additions & 24 deletions projects/plugins/crm/includes/ZeroBSCRM.Core.php
Original file line number Diff line number Diff line change
@@ -1239,11 +1239,11 @@ public function includes() {

// } Metaboxes v3.0

// Root classes
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBox.php';
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBoxes3.Logs.php';
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBoxes3.Tags.php';
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBoxes3.ExternalSources.php';
// Root classes
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBox.php';
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBoxes3.Logs.php';
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBoxes3.Tags.php';
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBoxes3.ExternalSources.php';

require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBoxes3.Contacts.php';
require_once ZEROBSCRM_INCLUDE_PATH . 'ZeroBSCRM.MetaBoxes3.Companies.php';
@@ -1393,9 +1393,6 @@ private function init_hooks() {
// Admin init - should condition this per page..
add_action( 'admin_init', array( $this, 'admin_init' ) );

// Add thumbnail support?
add_action( 'after_setup_theme', array( $this, 'setup_environment' ) );

// Extension links
add_filter( 'plugin_action_links_' . plugin_basename( ZBS_ROOTFILE ), array( $this, 'add_action_links' ) );

@@ -1519,10 +1516,6 @@ public function buildOutObjectModels() {
// ====================================================================
}

public function setup_environment() {
// Don't think we need this $this->add_thumbnail_support(); //add thumbnail support
}

public function add_action_links( $links ) {
global $zbs;

@@ -1690,9 +1683,6 @@ public function postSettingsIncludes() {
// } ^^ can probably include this via free extension manager class (longer term tidier?)
// WH addition: this was firing PRE init (you weren't seeing because no PHP warnings...needs to fire after)

// Retrieve settings
// $zbsCRMTempSettings = $zbs->settings->getAll(); use zeroBSCRM_isExtensionInstalled

// } free extensions setup (needs to be post settings)
zeroBSCRM_freeExtensionsInit();

@@ -1758,13 +1748,10 @@ public function init() {
// } As well where extensions put their settings too
add_action( 'admin_menu', array( $this, 'admin_menu' ) );

// } WH MOVED these from being added on init_hooks, to just calling them here, was legacy mess.
// no longer used (now notifyme) add_action('init', array($this,'admin_noticies') ); #} load the admin noticies etc..
// add_action('init', array($this,'include_updater') ); #} load the auto-updater class
$this->include_updater();
// add_action('init', 'zeroBSCRM_wooCommerceRemoveBlock'); #} Admin unlock for ZBS users if WooCommerce installed
// Admin unlock for ZBS users if WooCommerce installed
zeroBSCRM_wooCommerceRemoveBlock();
// add_action('init', array($this, 'post_init_plugins_loaded')); #} Registers stuff that needs settings etc.
// Registers stuff that needs settings etc.
$this->post_init_plugins_loaded();

// run migrations
@@ -1780,10 +1767,6 @@ public function init() {
zeroBSCRM_cojson();
}

// } Brutal override for inv previews
// No longer req. v3.0 + this is delivered via HASH URL
// if (isset($_GET['zbs_invid']) && wp_verify_nonce($_GET['_wpnonce'], 'zbsinvpreview') && is_user_logged_in() && zeroBSCRM_permsInvoices()){ exit(zeroBSCRM_invoice_generateInvoiceHTML((int)sanitize_text_field($_GET['zbs_invid']),false)); }

// } Catch Dashboard + redir (if override mode)
// } but not for wp admin (wptakeovermodeforall)
if ( $this->settings->get( 'wptakeovermode' ) == 1 ) {
4 changes: 0 additions & 4 deletions projects/plugins/crm/includes/ZeroBSCRM.Forms.php
Original file line number Diff line number Diff line change
@@ -58,7 +58,6 @@ function zeroBSCRM_forms_shortcode($atts){

// force enquement
zeroBSCRM_forms_enqueuements();
zeroBSCRM_exposePID();

// return the form html
return zeroBSCRM_forms_build_form_html($atts['id'],$atts['style'],__('CRM Forms: You have not entered a style in your form shortcode','zero-bs-crm'));
@@ -402,9 +401,6 @@ function jpcrm_content_form_html( $formid = -1, $formObject = array() ) {
return $content;
}

// legacy - used elsewhere (extensions?) otherwise safe to remove
function zeroBSCRM_exposePID() {}

/* ======================================================
/ Front end Form Funcs
====================================================== */
19 changes: 0 additions & 19 deletions projects/plugins/crm/includes/ZeroBSCRM.MetaBoxes3.Contacts.php
Original file line number Diff line number Diff line change
@@ -2358,25 +2358,6 @@ public function save_data( $contact_id, $contact ) {
}
}

/* DEPRECATED! */
function zbsCustomer_companyDropdown( $default = '', $companies = array() ) {

echo 'zbsCustomer_companyDropdown is Deprecated!<br />';

foreach ($companies as $co){
echo "\n\t" . '<option value="'. esc_attr( $co['id'] ) .'"';
if ($co['id'] == $default) echo ' selected="selected"';
//echo '>'.$co['meta']['coname'].'</option>';
$coName = '';
if (isset($co) && isset($co['meta']) && isset($co['meta']['coname'])) $coName = $co['meta']['coname'];
# Shouldn't need this? WH attempted fix for caching, not here tho..
if (empty($coName) && isset($co['coname'])) $coName = $co['coname'];
if (empty($coName)) $coName = jpcrm_label_company().' #'.$co['id'];
echo '>'. esc_html( $coName ) .'</option>';
}

}

/* ======================================================
/ "Contacts at Company" Metabox Related Funcs
====================================================== */
80 changes: 36 additions & 44 deletions projects/plugins/crm/includes/jpcrm-language.php
Original file line number Diff line number Diff line change
@@ -1,53 +1,45 @@
<?php
/*!
<?php
/**
* Jetpack CRM
* https://jetpackcrm.com
* V4.0.7
*
* @package automattic/jetpack-crm
*/

defined( 'ZEROBSCRM_PATH' ) || exit( 0 );

// gets 'Contact' (legacy/deprecated)
// Unless this is used in any extensions this can be removed.
function zeroBSCRM_getContactOrCustomer(){ return __('Contact',"zero-bs-crm"); }

// gets company label, backward compatibility:
function zeroBSCRM_getCompanyOrOrg(){
return jpcrm_label_company(false);
}
function zeroBSCRM_getCompanyOrOrgPlural(){
return jpcrm_label_company(true);
}


/**
* Returns global label used to differentiate b2b mode objects (Companies)
* Replaces old functions zeroBSCRM_getCompanyOrOrg and zeroBSCRM_getCompanyOrOrgPlural
* Note, I still prefer this to using a gettext filter (as we do in rebrandr)
*
* @param array $plural return singular or plural
*
* @return string label
*/
function jpcrm_label_company($plural=false){

// retrieve type.
$organisationType = zeroBSCRM_getSetting('coororg');

if (!$plural){

// singular
$s = __('Company',"zero-bs-crm");
if ($organisationType == 'org') $s = __('Organisation',"zero-bs-crm");
if ($organisationType == 'domain') $s = __('Domain',"zero-bs-crm");

} else {

// plural
$s = __('Companies',"zero-bs-crm");
if ($organisationType == 'org') $s = __('Organisations',"zero-bs-crm");
if ($organisationType == 'domain') $s = __('Domains',"zero-bs-crm");

/**
* Returns global label used to differentiate b2b mode objects (Companies)
* Replaces old functions zeroBSCRM_getCompanyOrOrg and zeroBSCRM_getCompanyOrOrgPlural
* Note, I still prefer this to using a gettext filter (as we do in rebrandr)
*
* @param bool $plural return singular or plural.
*
* @return string label
*/
function jpcrm_label_company( $plural = false ) {

// retrieve type.
$organisation_type = zeroBSCRM_getSetting( 'coororg' );

if ( ! $plural ) {

// singular
$s = __( 'Company', 'zero-bs-crm' );
if ( $organisation_type === 'org' ) {
$s = __( 'Organisation', 'zero-bs-crm' );
} elseif ( $organisation_type === 'domain' ) {
$s = __( 'Domain', 'zero-bs-crm' );
}
} else {

// plural
$s = __( 'Companies', 'zero-bs-crm' );
if ( $organisation_type === 'org' ) {
$s = __( 'Organisations', 'zero-bs-crm' );
} elseif ( $organisation_type === 'domain' ) {
$s = __( 'Domains', 'zero-bs-crm' );
}
}

return $s;
1 change: 0 additions & 1 deletion tools/phpcs-excludelist.json
Original file line number Diff line number Diff line change
@@ -178,7 +178,6 @@
"projects/plugins/crm/includes/jpcrm-dependency-checker.php",
"projects/plugins/crm/includes/jpcrm-feature-sniffer.php",
"projects/plugins/crm/includes/jpcrm-fonts.php",
"projects/plugins/crm/includes/jpcrm-language.php",
"projects/plugins/crm/includes/jpcrm-learn-menu-legacy-functions.php",
"projects/plugins/crm/includes/jpcrm-mail-templating.php",
"projects/plugins/crm/includes/jpcrm-segment-conditions.php",