Advertisement
tribulant

wpml_has_emails_in_queue

Mar 11th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. if (!function_exists('wpml_has_emails_in_queue')) {
  2.     function wpml_has_emails_in_queue() {
  3.         if (class_exists('wpMail')) {
  4.             if ($wpMail = new wpMail()) {
  5.                 global $Queue;
  6.                 $queue_count = $Queue -> count();
  7.                
  8.                 if (!empty($queue_count) && $queue_count > 0) {
  9.                     return true;
  10.                 }
  11.             }
  12.         }
  13.        
  14.         return false;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement