Changeset 8978 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-tide-sync.php
- Timestamp:
- 06/20/2019 03:35:14 PM (6 years ago)
- 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 13 13 14 14 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 15 25 wp_schedule_single_event( 16 26 time() + 60, … … 86 96 87 97 $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 ) ) { 89 99 return false; 90 100 }
Note: See TracChangeset
for help on using the changeset viewer.