llms_maybe_hide_notifications( $priority )
Contents
Source Source
File: includes/llms-notifications.php
function llms_maybe_hide_notifications( $priority ) {
if ( ! is_admin() ) {
return 0;
}
$current_screen = get_current_screen();
if ( ! isset( $current_screen->post_type ) ) {
return $priority;
}
// Check if we're on the main WP admin dashboard.
if ( 'dashboard' === $current_screen->id ) {
return $priority;
}
if ( llms_is_block_editor() ) {
return 0;
}
if (
strpos( $current_screen->post_type, 'llms_' ) !== 0 &&
strpos( $current_screen->base, 'lifterlms' ) !== 0 &&
! in_array( $current_screen->post_type, array( 'course', 'lesson' ), true )
) {
return 0;
}
return $priority;
}
Expand full source code Collapse full source code View on GitHub