Skip to:
Content
Pages
Categories
Search
Top
Bottom

functions.php

Viewing 4 replies - 1 through 4 (of 4 total)

  • chrishajer
    Participant

    @chrishajer

    I don’t think there is:

    https://bbpress.org/forums/topic/admin-panels-like-wp

    I think most people create a single plugin and drop all their miscellaneous functions in there:

    https://bbpress.org/forums/topic/show-me-all-your-mini-plugin-functions


    Ben L.
    Member

    @nightgunner5

    Actually, it’s exactly the same (at least in 1.0) as WordPress’s functions.php. Same name, same everything.


    Derek Herman
    Member

    @valendesigns

    So it’s only available in 1.0 huh, that sucks cause I think the forum is still using 0.9 something.

    The way I’m doing it now is creating a plugin like chrishajer mentioned but it just seems odd to me as a prolific WP user. Unfortunately I’m not sure the forum can be upgraded since the Envato devs had to integrate it with a RoR app and hacked the core. Hopefully they can upgrade it cause the theme I’m working on is crazy complex and I had to add a lot of extra functions to my plugin to make the theme work based on the design. I just think some of the code I wrote is probably included in the 1.0 core.


    _ck_
    Participant

    @_ck_

    You can emulate the functions.php in theme directories quite easily in 0.9

    Put this into a regular plugin and I suggest naming it _functions.php with a leading underscore so you don’t even have to activate it. Install it and then when a functions.php is found inside the currently active theme, it will be loaded with the regular plugins. Since it’s so tiny, if you have a collection of mini-plugins you can just put it in there instead.

    <?php
    /*
    Plugin Name: functions.php
    */
    $template_functions_include = bb_get_active_theme_directory() . 'functions.php';
    if ( file_exists( $template_functions_include ) ) { require_once( $template_functions_include ); }
    ?>

    In theory you might even be able to put that code into the header.php inside of the templates if you are making a theme you want to distribute for 0.9

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar