Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Utils_Alerts::get_alerts()
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Return Return
(array)
Source Source
File: classes/Utils/Alerts.php
public static function get_alerts() { static $alert_list; if ( ! isset( $alert_list ) ) { $alert_list = apply_filters( 'pum_alert_list', array() ); } $alerts = array(); foreach ( $alert_list as $alert ) { // Ignore dismissed alerts. if ( self::has_dismissed_alert( $alert['code'] ) ) { continue; } $alerts[] = wp_parse_args( $alert, array( 'code' => 'default', 'priority' => 10, 'message' => '', 'type' => 'info', 'html' => '', 'dismissible' => true, 'global' => false, ) ); } // Sort alerts by priority, highest to lowest. $alerts = PUM_Utils_Array::sort( $alerts, 'priority', true ); return $alerts; }
Expand full source code Collapse full source code View on Trac