Changeset 3897
- Timestamp:
- 09/01/2016 01:53:28 AM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
-
cli/class-import.php (modified) (1 diff)
-
readme/class-parser.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r3896 r3897 24 24 'requires', 25 25 'donate_link', 26 'license', 27 'license_uri', 26 28 'upgrade_notice', 27 29 'contributors', -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php
r3827 r3897 51 51 */ 52 52 public $short_description = ''; 53 54 /** 55 * @var string 56 */ 57 public $license = ''; 58 59 /** 60 * @var string 61 */ 62 public $license_uri = ''; 53 63 54 64 /** … … 112 122 'donate link' => 'donate_link', 113 123 'stable tag' => 'stable_tag', 124 'license' => 'license', 125 'license uri' => 'license_uri', 114 126 ); 115 127 … … 210 222 if ( ! empty( $headers['donate_link'] ) ) { 211 223 $this->donate_link = $headers['donate_link']; 224 } 225 if ( ! empty( $headers['license'] ) ) { 226 // Handle the many cases of "License: GPLv2 - http://..." 227 if ( empty( $headers['license_uri'] ) && preg_match( '!(https?://\S+)!i', $headers['license'], $url ) ) { 228 $headers['license_uri'] = $url[1]; 229 $headers['license'] = trim( str_replace( $url[1], '', $headers['license'] ), " -*\t\n\r\n" ); 230 } 231 $this->license = $headers['license']; 232 } 233 if ( ! empty( $headers['license_uri'] ) ) { 234 $this->license_uri = $headers['license_uri']; 212 235 } 213 236
Note: See TracChangeset
for help on using the changeset viewer.