I see this is being discussed again … in relation to a post by Robert V.
To review what I said previously see here:
https://simple-press.com/support-forum/sp5-general-topics/wp-undefined-function-error/
Like Robert, I too just notice this error today on the forum admin profiles page.
Fatal error: Call to undefined function is_plugin_active() in /home/XXXXX/public_html/XXXX/wp-content/plugins/simple-press/admin/panel-profiles/forms/spa-profiles-options-form.php on line 71
However, if I insert
include_once(ABSPATH.’wp-admin/includes/plugin.php’);
into sp-load-admin.php
I don’t get the error.
I was on this profile admin page because I was trying to set the profile display mode to use buddypress the buddypress member profile. I was puzzled because I had done a virgin in stall of wp/sp/buddypress to see if I got the is_plugin_active error and I did not. Therefore I thought something was wrong with my normal installation.
However, now I think that in fact is_plugin_active is not visible to simple-press. If I insert the function is_plugin_active into a random simple press file that is not subject to if/then conditions, I get the error.
I think the reason you/I were not getting the error on test installations was because you/I weren’t using mode = 3 …. i.e. for buddypress/mingle profiles.
you can test whether is_plugin_active is visible regardless of the mode by inserting
echo is_plugin_active(‘buddypress/bp-loader.php’);
above
if (($mode == 3 && !is_plugin_active(‘buddypress/bp-loader.php’)) || ($mode == 6 && !is_plugin_active(‘mingle/mingle.php’))) {
$mode = 1;
}
in the file:
sp-api/sp-api-common-display.php
(I think you’ll get the error.)
I also did not get the error on the virgin install initially because I had no forums posts and thus not user profile link would be displayed and therefore the offending function would not be called.
Finally, it further seems that is_plugin_active is not supposed to be visible. Perhaps wp increased security recently?
https://codex.wordpress.org/Function_Reference/is_plugin_active
“NOTE: defined in wp-admin/includes/plugin.php, so this is only available from within the admin pages, and any references to this function must be hooked to admin_init or a later action. If you want to use this function from within a template, you will need to manually require plugin.php, an example is below. “