is_network_plugin example


    public function handle_error( array $error ) {

        $extension = $this->get_extension_for_error( $error );

        if ( ! $extension || $this->is_network_plugin( $extension ) ) {
            return new WP_Error( 'invalid_source', __( 'Error not caused by a plugin or theme.' ) );
        }

        if ( ! $this->is_active() ) {
            if ( ! is_protected_endpoint() ) {
                return new WP_Error( 'non_protected_endpoint', __( 'Error occurred on a non-protected endpoint.' ) );
            }

            if ( ! function_exists( 'wp_generate_password' ) ) {
                require_once ABSPATH . WPINC . '/pluggable.php';
            }

            
Home | Imprint | This part of the site doesn't use cookies.