Esempio n. 1
0
 /**
  * Get the admin notices
  *
  * @return array
  */
 public static function getNotices()
 {
     _deprecated_function(__METHOD__, '4.0', 'Tribe__Notices::get');
     return Tribe__Notices::get();
 }
Esempio n. 2
0
 /**
  * Generates html for any notices that have been queued on the current view
  *
  * @category Events
  *
  * @param bool $echo Whether or not to echo the notices html
  *
  * @return void | string
  * @see Tribe__Notices::get()
  **/
 function tribe_the_notices($echo = true)
 {
     $notices = Tribe__Notices::get();
     $html = !empty($notices) ? '<div class="tribe-events-notices"><ul><li>' . implode('</li><li>', $notices) . '</li></ul></div>' : '';
     /**
      * Deprecated the tribe_events_the_notices filter in 4.0 in favor of tribe_the_notices. Remove in 5.0
      */
     $the_notices = apply_filters('tribe_events_the_notices', $html, $notices);
     /**
      * filters the notices HTML
      */
     $the_notices = apply_filters('tribe_the_notices', $html, $notices);
     if ($echo) {
         echo $the_notices;
     } else {
         return $the_notices;
     }
 }