Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/09/2019 07:27:30 AM (5 years ago)
Author:
johnjamesjacoby
Message:

Upgrades: Link to pending upgrades, if there are any.

This commit modifies the "Upgrade Forums" page by adding Statuses to filter by, specifically for pending upgrades. This allows bbPress to link directly to the upgrades that need doing, rather than the generic page itself.

Along with this commit are accompanying styling tweaks and helper functions to make this functionality possible.

Fixes #3244.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/update.php

    r6897 r6926  
    551551    $pending = bbp_get_pending_upgrades();
    552552
     553    // Look for this upgrade ID
     554    $index = array_search( $upgrade_id, $pending, true );
     555
    553556    // Maybe remove upgrade ID from pending array
    554     if ( isset( $pending[ $upgrade_id ] ) ) {
    555         unset( $pending[ $upgrade_id ] );
     557    if ( false !== $index ) {
     558        unset( $pending[ $index ] );
    556559    }
    557560
Note: See TracChangeset for help on using the changeset viewer.