Code Duplication    Length = 9-14 lines in 3 locations

admin_pages/registrations/Registrations_Admin_Page.core.php 1 location

@@ 939-947 (lines=9) @@
936
        } else {
937
            $fc_items['blank'] = array('class' => 'blank', 'desc' => '');
938
        }
939
        if (EE_Registry::instance()->CAP->current_user_can(
940
            'ee_read_global_messages',
941
            'view_filtered_messages'
942
        )) {
943
            $related_for_icon = EEH_MSG_Template::get_message_action_icon('see_notifications_for');
944
            if (isset($related_for_icon['css_class']) && isset($related_for_icon['label'])) {
945
                $fc_items['view_related_messages'] = array(
946
                    'class' => $related_for_icon['css_class'],
947
                    'desc'  => $related_for_icon['label'],
948
                );
949
            }
950
        }

admin_pages/transactions/Transactions_Admin_Page.core.php 1 location

@@ 499-512 (lines=14) @@
496
        EE_Registry::instance()->load_helper('MSG_Template');
497
        $items = array();
498
499
        if (EE_Registry::instance()->CAP->current_user_can(
500
            'ee_read_global_messages',
501
            'view_filtered_messages'
502
        )) {
503
            $related_for_icon = EEH_MSG_Template::get_message_action_icon('see_notifications_for');
504
            if (is_array($related_for_icon)
505
                && isset($related_for_icon['css_class'], $related_for_icon['label'])
506
            ) {
507
                $items['view_related_messages'] = array(
508
                    'class' => $related_for_icon['css_class'],
509
                    'desc'  => $related_for_icon['label'],
510
                );
511
            }
512
        }
513
514
        $items = apply_filters(
515
            'FHEE__Transactions_Admin_Page___transaction_legend_items__items',

caffeinated/admin/extend/events/Extend_Events_Admin_Page.core.php 1 location

@@ 477-485 (lines=9) @@
474
                'desc'  => esc_html__('Event Reports', 'event_espresso'),
475
            );
476
        }
477
        if (EE_Registry::instance()->CAP->current_user_can('ee_read_global_messages', 'view_filtered_messages')) {
478
            $related_for_icon = EEH_MSG_Template::get_message_action_icon('see_notifications_for');
479
            if (isset($related_for_icon['css_class']) && isset($related_for_icon['label'])) {
480
                $items['view_related_messages'] = array(
481
                    'class' => $related_for_icon['css_class'],
482
                    'desc'  => $related_for_icon['label'],
483
                );
484
            }
485
        }
486
        return $items;
487
    }
488