Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I override a single .php file, namely bbp-common-functions.php?

  • How do I override bbp-common-functions.php so that I can safely upgrade bbPress without losing my one change?

    Here is the original:

    // array of time period chunks
    $chunks = array(
        array( 60 * 60 * 24 * 365 , __( 'year',   'bbpress' ), __( 'years',   'bbpress' ) ),
        array( 60 * 60 * 24 * 30 ,  __( 'month',  'bbpress' ), __( 'months',  'bbpress' ) ),
        array( 60 * 60 * 24 * 7,    __( 'week',   'bbpress' ), __( 'weeks',   'bbpress' ) ),
        array( 60 * 60 * 24 ,       __( 'day',    'bbpress' ), __( 'days',    'bbpress' ) ),
        array( 60 * 60 ,            __( 'hour',   'bbpress' ), __( 'hours',   'bbpress' ) ),
        array( 60 ,                 __( 'minute', 'bbpress' ), __( 'minutes', 'bbpress' ) ),
        array( 1,                   __( 'second', 'bbpress' ), __( 'seconds', 'bbpress' ) )
        );
    

    Here is what I want:

    // array of time period chunks
    $chunks = array(
        array( 60 * 60 * 24 * 365 , __( 'y',   'bbpress' ), __( 'y',   'bbpress' ) ),
        array( 60 * 60 * 24 * 30 ,  __( 'm',  'bbpress' ), __( 'm',  'bbpress' ) ),
        array( 60 * 60 * 24 * 7,    __( 'w',   'bbpress' ), __( 'w',   'bbpress' ) ),
        array( 60 * 60 * 24 ,       __( 'd',    'bbpress' ), __( 'd',    'bbpress' ) ),
        array( 60 * 60 ,            __( 'h',   'bbpress' ), __( 'h',   'bbpress' ) ),
        array( 60 ,                 __( 'min', 'bbpress' ), __( 'min', 'bbpress' ) ),
        array( 1,                   __( 's', 'bbpress' ), __( 's', 'bbpress' ) )
        );
    

    I’m trying to make the forums support mobile, and the long words ruin my tables.

    I want to be able to upgrade bbPress without losing this change. What can I do?

Viewing 1 replies (of 1 total)
  • It’s been 24 hours, so I’m gonna bump. From what I know about past experience, I’m allowed to do that.

    Maybe I haven’t been clear about my question– I’m looking for the best way to edit theme files and keep my changes after an update. Should be common knowledge, but the new documentation layout is confusing. I can’t find anything on theme compatibility or WordPress themes taking over bbPress template files…

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.