Changeset 14501
- Timestamp:
- 07/31/2025 03:41:53 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/plugin-update-helpers.php
r14500 r14501 16 16 * This function acts as a filter on the update that's presented to the site. 17 17 * 18 * @param object $plugin_info The plugin update details .19 * @param object $plugin_details The plugin details .18 * @param object $plugin_info The plugin update details, returned to the client. 19 * @param object $plugin_details The plugin details, from WordPress.org database. 20 20 * @param string $installed_version The currently installed version of the plugin. 21 21 * @param string $wp_version The WordPress version. Empty if not a WordPress client. Excludes `-alpha` type suffixes. … … 36 36 * @see https://meta.trac.wordpress.org/ticket/8009 37 37 * 38 * @param object $plugin_info The plugin update details .39 * @param object $plugin_details The plugin details .38 * @param object $plugin_info The plugin update details, returned to the client. 39 * @param object $plugin_details The plugin details, from WordPress.org database. 40 40 * @param string $installed_version The currently installed version of the plugin. 41 41 * @return object The updated plugin update details. 42 42 */ 43 43 function phased_rollout( $plugin_info, $plugin_details, $installed_version ) { 44 $strategy = $plugin_ info->meta->rollout['strategy'] ?? false;44 $strategy = $plugin_details->meta->rollout['strategy'] ?? false; 45 45 46 46 // If no strategy is set, or it's immediate, return the plugin info unchanged. … … 50 50 51 51 // Calculate the number of hours since the plugin was released. 52 $hours_since_release = ( time() - ( $plugin_details->meta->release_time ?? '') ) / 3600 /* HOUR_IN_SECONDS */;52 $hours_since_release = ( time() - ( $plugin_details->meta->release_time ?? 0 ) ) / 3600 /* HOUR_IN_SECONDS */; 53 53 54 54 // If more than 5 days have passed, always assume the update is available. … … 62 62 $hours_since_release <= 24 63 63 ) { 64 $plugin_info->disable_autoupdate s= true;64 $plugin_info->disable_autoupdate = true; 65 65 } 66 66
Note: See TracChangeset
for help on using the changeset viewer.