Astra_Notices::sort_notices( array $notice_1, array $notice_2 )
Sort the notices based on the given priority of the notice.
Description
This function is called from usort()
Parameters
- $notice_1
-
(array) (Required) First notice.
- $notice_2
-
(array) (Required) Second Notice.
Return
(array)
Source
File: inc/lib/astra-notices/class-astra-notices.php
public function sort_notices( $notice_1, $notice_2 ) { if ( ! isset( $notice_1['priority'] ) ) { $notice_1['priority'] = 10; } if ( ! isset( $notice_2['priority'] ) ) { $notice_2['priority'] = 10; } return $notice_1['priority'] - $notice_2['priority']; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.5.2 | Introduced. |