1. Home
  2. ReHub Theme
  3. For developers
  4. Changes in 7.8.2 version

Changes in 7.8.2 version

In 7.8.2 version of theme we changed names of some functions. We were requested to do this according to new rules of Theme’s codding. So, if one of your file which you customized in child theme or grandchild plugin has function

<?php if (rh_is_plugin_active('content-egg/content-egg.php')):?>

You must replace it with

<?php if (defined('\ContentEgg\PLUGIN_PATH')):?>

It’s better to change this in all of your customized files. Alternative will be to add next code to your custom functions plugin

//////////////////////////////////////////////////////////////////
// Check plugin active
//////////////////////////////////////////////////////////////////
function rh_is_plugin_active( $plugin ) {
    return in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) || rh_is_plugin_active_for_network( $plugin );
}
function rh_is_plugin_active_for_network( $plugin ) {
    if ( !is_multisite() )
        return false;
    $plugins = get_site_option( 'active_sitewide_plugins');
    if ( isset($plugins[$plugin]) )
        return true;
    return false;
}

Unfortunately, there is no way to prevent this problem as we can’t use “is_plugin_active” wordpress function according to new rules.