Making WordPress.org


Ignore:
Timestamp:
06/20/2019 03:35:14 PM (6 years ago)
Author:
dd32
Message:

Plugin Directory: Tide Sync: Only support plugins who use versioned versions, ie. no stable tag: trunk.

See #4309.

File:
1 edited

Legend:

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

    r8977 r8978  
    1313
    1414    public static function sync_data( $plugin_slug ) {
     15        $plugin = Plugin_Directory::get_plugin_post( $plugin_slug );
     16        if ( ! $plugin ) {
     17            return false;
     18        }
     19
     20        // Tide only supports plugins that are versioned right now.
     21        if ( ! $plugin->stable_tag || 'trunk' == $plugin->stable_tag ) {
     22            return false;
     23        }
     24
    1525        wp_schedule_single_event(
    1626            time() + 60,
     
    8696
    8797        $request = wp_safe_remote_get( $url_endpoint );
    88         if ( ! $request || is_wp_error( $request ) ) {
     98        if ( ! $request || is_wp_error( $request ) || 200 !== wp_remote_retrieve_response_code( $request ) ) {
    8999            return false;
    90100        }
Note: See TracChangeset for help on using the changeset viewer.