Changeset 42243 for branches/4.9/src/wp-admin/includes/plugin.php
- Timestamp:
- 11/27/2017 02:59:27 AM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-admin/includes/plugin.php
r41819 r42243 195 195 $dir = dirname( $plugin_file ); 196 196 197 $data = get_plugin_data( $plugin_file );198 $label = isset( $data['Version'] )199 ? sanitize_key( 'files_' . $plugin . '-' . $data['Version'] )200 : sanitize_key( 'files_' . $plugin );201 $transient_key = substr( $label, 0, 29 ) . md5( $label );202 203 $plugin_files = get_transient( $transient_key );204 if ( false !== $plugin_files ) {205 return $plugin_files;206 }207 208 197 $plugin_files = array( plugin_basename( $plugin_file ) ); 209 198 … … 225 214 $plugin_files = array_values( array_unique( $plugin_files ) ); 226 215 } 227 228 set_transient( $transient_key, $plugin_files, HOUR_IN_SECONDS );229 216 230 217 return $plugin_files;
Note: See TracChangeset
for help on using the changeset viewer.