Plugin Directory

Changeset 3332415


Ignore:
Timestamp:
07/22/2025 04:26:14 PM (8 months ago)
Author:
engagebay
Message:

fix admin notice

Location:
engagebay-gravity-forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • engagebay-gravity-forms/tags/3.1.6/engagebay-gravityforms.php

    r3332407 r3332415  
    1616$activated_plugins = apply_filters('active_plugins', get_option('active_plugins'));
    1717
    18 if (!in_array('gravityforms/gravityforms.php', $activated_plugins, true)) {
     18if (!in_array('gravityforms/gravityforms.php', apply_filters('active_plugins', get_option('active_plugins')), true)) {
    1919    if (is_admin()) {
    20         wp_admin_notice('EngageBay Gravity Forms Activation Error: Install / Activate Gravity Forms plugin');
    21         return;
     20        add_action('admin_notices', function () {
     21            echo '<div class="notice notice-error"><p><strong>EngageBay Gravity Forms Addon</strong> requires the <strong>Gravity Forms</strong> plugin to be installed and activated.</p></div>';
     22        });
    2223    }
     24    return;
    2325}
    2426
  • engagebay-gravity-forms/trunk/engagebay-gravityforms.php

    r3332407 r3332415  
    1616$activated_plugins = apply_filters('active_plugins', get_option('active_plugins'));
    1717
    18 if (!in_array('gravityforms/gravityforms.php', $activated_plugins, true)) {
     18if (!in_array('gravityforms/gravityforms.php', apply_filters('active_plugins', get_option('active_plugins')), true)) {
    1919    if (is_admin()) {
    20         wp_admin_notice('EngageBay Gravity Forms Activation Error: Install / Activate Gravity Forms plugin');
    21         return;
     20        add_action('admin_notices', function () {
     21            echo '<div class="notice notice-error"><p><strong>EngageBay Gravity Forms Addon</strong> requires the <strong>Gravity Forms</strong> plugin to be installed and activated.</p></div>';
     22        });
    2223    }
     24    return;
    2325}
    2426
Note: See TracChangeset for help on using the changeset viewer.