Untitled
if (customCategoryOne) { custom_term = get_term_by('name', customCategoryOne, 'insight-category'); // phpcs:ignore WordPressVIPMinimum.Functions.CheckReturnValue.DirectFunctionCall category_link = esc_url(get_term_link(custom_term)); } else { // phpcs:ignore WordPressVIPMinimum.Functions.CheckReturnValue.DirectFunctionCall category_link = esc_url(get_term_link($primary)); } i have used category_link variable there i m getting below error i have used a phpcs ignore to resolve that but it is still showing this belwo error what can we do for this get_term_link's return type must be checked before calling esc_url using that value (WordPressVIPMinimum.Functions.CheckReturnValue.DirectFunctionCall)
Leave a Comment