/*************************************************
 * ADD-ON DATA
 *************************************************/
/**
 * Get all add-ons
 *
 * @since 1.2
 * @return array Addons and their data passed in when registered
 * @global array $ctc_add_ons
 */
function ctc_get_add_ons()
{
    global $ctc_add_ons;
    $add_ons = array();
    if (isset($ctc_add_ons)) {
        $add_ons = $ctc_add_ons;
    }
    return apply_filters('ctc_get_add_ons', $add_ons);
}
/**
 * Get single add-on
 *
 // One add-on
 if (1 == $count) {
     // Message to use
     $notice_key = $notice;
     // Get first and only add-on in array
     $first_add_on = array_shift(array_values($add_ons));
     // Add-on data
     $add_on_dir = $first_add_on['plugin_dir'];
     $add_on_names = $first_add_on['name'];
     // single name
     $expiration_data = ctc_edd_license_expiration_data($add_on_dir);
     $expiration_date = $expiration_data['expiration_date'];
     // URLs for add-on overriding default notices during registration
     $renewal_url = ctc_edd_license_renewal_url($add_on_dir);
     $renewal_info_url = ctc_get_add_on($add_on_dir, 'renewal_info_url');
 } else {
     // Message to use
     $notice_key = $notice . '_multiple';
     // Make list of add-on names
     $i = 0;
     $add_on_names = '';
     foreach ($add_ons as $add_on) {
         $i++;
         // Separate with comma or "and"
         if ($i == $count) {
             /* translators: separator between last and second to last add-ons in inactive/expired admin notice (instead of comma) */
             $add_on_names .= _x(' and ', 'license notice', 'church-theme-content');
         } elseif (1 != $i) {
             /* translators: separator between add-on names in inactive/expired admin notice */
             $add_on_names .= _x(', ', 'license notice', 'church-theme-content');
         }