Making WordPress.org

Changeset 14502


Ignore:
Timestamp:
07/31/2025 03:44:30 AM (11 months ago)
Author:
dd32
Message:

Plugin Directory: Provide the Releaes Strategy (and ancilliary metadata) to the plugins update check code.

See #8009.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-api-update-updater.php

    r14496 r14502  
    8181        $requires_plugins = get_post_meta( $post->ID, 'requires_plugins', true );
    8282        $meta             = array(
    83             'release_time' => strtotime( $post->version_date ?: $post->post_modified ),
     83            'release_time'    => strtotime( $post->version_date ?: $post->post_modified ),
     84            'last_version'    => $post->last_version ?? '',
     85            'last_stable_tag' => $post->last_stable_tag ?? '',
    8486        );
    8587
     
    102104        ) {
    103105            $meta['release_time'] = max( $release['confirmations'] );
     106        }
     107
     108        // Add phased rollout strategy data if needed.
     109        if ( $release && ! empty( $release['rollout_strategy'] ) ) {
     110            $meta['rollout'] = array(
     111                'strategy' => $release['rollout_strategy'],
     112            );
    104113        }
    105114
Note: See TracChangeset for help on using the changeset viewer.