Support » Plugin: GD bbPress Attachments » undefined function d4p_bbpress_version()

  • Resolved graphicgeek


    I installed the plugin, and it seems to work on the front end, but I cannot access the settings. When I go to the settings page I get this:

    Fatal error: Call to undefined function d4p_bbpress_version() in …/wp-content/plugins/gd-bbpress-attachments/code/shared.php on line 24

    I’ve tried deleting and reinstalling, but no luck.
    Any ideas?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The same happen to me. Anyone have another alternative?

    I am experiencing the exact same issue and suspect it may have to do with WordPress 3.5? Just a hunch.

    Add this code to an empty line in the file gd-bbpress-attachments/code/shared.php

    if (!function_exists('d4p_bbpress_version')) {
         * Get version of the bbPress.
         * @param string $ret what version format to return: code or version
         * @return mixed version value
        function d4p_bbpress_version($ret = 'code') {
            if (function_exists('bbpress')) {
                $bbp = bbpress();
            } else {
                global $bbp;
            if (isset($bbp->version)) {
                if ($ret == 'code') {
                    return substr(str_replace('.', '', $bbp->version), 0, 2);
                } else {
                    return $bbp->version;
            return null;


    thanks ThemeCatcher

    now its working….

    I’ve added the code above to the /code/share.php file, but now I receive the following error:
    “Fatal error: Call to undefined function d4p_bbpress_get_user_roles() in …/wp-content/plugins/gd-bbpress-attachments/code/admin.php on line 128.”

    I’m still not able to get into the settings page. Is there a way to fix this?

    I’m getting the same error as the user above. Please help us out? I’d like to use this plugin.


    Thanks. I was having the same problem and your code saved the day!


    Thanks for the quick fix, it works for me!

    I too now get the fatal error PHP Fatal error: Call to undefined function bbp_get_dynamic_roles() in …/wp-content/plugins/gd-bbpress-attachments/code/shared.php on line 57

    and the reason is the function bbp_get_dynamic_roles() is missing from the GD bbPress Attachments plugin..

    Any Help will be highly appreciated.

    Plugin Author Milan Petrovic


    Fixed all now. Sorry for the problem.

    Thank you, Milan! I just updated the plugin on my site, I appreciate it!

    Thank you Milan, the new update has fixed the problem!

    Thanks @milan it worked 🙂

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘undefined function d4p_bbpress_version()’ is closed to new replies.