PHP Fatal error: Call to undefined function is_plugin_active_for_network() #14

Closed
saas786 opened this Issue Apr 11, 2013 · 1 comment

Comments

2 participants
@saas786

saas786 commented Apr 11, 2013

Hi Frank,
I just installed your and got error (title), so I looked at the code and found its a valid function but it doesn't load every, so in order to make it work you need to make it like

http://codex.wordpress.org/Function_Reference/is_plugin_active_for_network

[code]

if (!function_exists('is_plugin_active_for_network'))
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
// Makes sure the plugin is defined before trying to use it
if (is_multisite() && is_plugin_active_for_network(plugin_basename(FILE)))
add_action('admin_bar_menu', array($this, 'remove_network_comment_items'), 500);
[/code]

I tried to send merge request but I dont' know how to send the pull request :(, been learning recenlty but no luck yet.

@bueltge

This comment has been minimized.

Show comment
Hide comment
@bueltge

bueltge Apr 11, 2013

Owner

Oh yes, very often I had this problem and here I had it forgotton.
I will fix this now.
Thanks for issue.

Owner

bueltge commented Apr 11, 2013

Oh yes, very often I had this problem and here I had it forgotton.
I will fix this now.
Thanks for issue.

@bueltge bueltge closed this in 353cfd0 Apr 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment