| @@ -50,14 +50,14 @@ | ||
| 50 | 50 | </a> |
| 51 | 51 | <?php if(function_exists('run_wdk_messages_chat') && function_exists('wdk_dash_url')):?> |
| 52 | 52 | <?php |
| 53 | 53 | global $Winter_MVC_wdk_messages_chat; |
| 54 | - $Winter_MVC_wdk_messages_chat->model('messageschat_m'); | |
| 55 | - $total_new_message = $Winter_MVC_wdk_messages_chat->messageschat_m->total_relationship_user(get_current_user_id(), array('chat_is_readed IS NULL'=>NULL)); | |
| 54 | + $this->WMVC->model('messages_m'); | |
| 55 | + $total_new_message = $this->WMVC->messages_m->total_unread(); | |
| 56 | 56 | if($total_new_message): |
| 57 | 57 | ?> |
| 58 | 58 | <a href="<?php echo esc_url(wdk_dash_url('dash_page=messages&function=chat'));?>" |
| 59 | - title="<?php echo esc_html__('New messages', 'wpdirectorykit');?>" class="count_messages"> | |
| 59 | + title="<?php echo esc_attr__('New messages', 'wpdirectorykit');?>" class="count_messages"> | |
| 60 | 60 | <?php echo esc_html($total_new_message);?> |
| 61 | 61 | </a> |
| 62 | 62 | <?php endif;?> |
| 63 | 63 | <?php endif;?> |