|
@@ 147-153 (lines=7) @@
|
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
// Reuse our own suffix, if any. |
| 147 |
|
if ( is_readable( $vendorPath . '/autoload_packages.php' ) ) { |
| 148 |
|
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents |
| 149 |
|
$content = file_get_contents( $vendorPath . '/autoload_packages.php' ); |
| 150 |
|
if ( preg_match( '/^namespace Automattic\\\\Jetpack\\\\Autoloader\\\\jp([^;\s]+);/m', $content, $match ) ) { |
| 151 |
|
return $match[1]; |
| 152 |
|
} |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
// Reuse Composer's suffix, if any. |
| 156 |
|
if ( is_readable( $vendorPath . '/autoload.php' ) ) { |
|
@@ 156-162 (lines=7) @@
|
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
// Reuse Composer's suffix, if any. |
| 156 |
|
if ( is_readable( $vendorPath . '/autoload.php' ) ) { |
| 157 |
|
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents |
| 158 |
|
$content = file_get_contents( $vendorPath . '/autoload.php' ); |
| 159 |
|
if ( preg_match( '{ComposerAutoloaderInit([^:\s]+)::}', $content, $match ) ) { |
| 160 |
|
return $match[1]; |
| 161 |
|
} |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
// Generate a random suffix. |
| 165 |
|
return md5( uniqid( '', true ) ); |