diff --git wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php
index 280b7fb..d83cfe1 100644
|
|
|
class Controls {
|
| 145 | 145 | // WordPress.org runs trunk, this keeps the highest version selectable as trunk |
| 146 | 146 | $versions[5] = preg_replace( '!-\d{4,}$!', '', $wp_version ); |
| 147 | 147 | |
| 148 | | $found = false; |
| 149 | | foreach( $versions as $version ) { |
| 150 | | if ( isset( $all_versions[ $version ] ) && in_array( $tested_up_to, $all_versions[ $version ] ) ) { |
| 151 | | $tested_up_to = $version; |
| 152 | | $found = true; |
| 153 | | break; |
| 154 | | } |
| 155 | | } |
| 156 | 148 | // If the version specified isn't going to display, insert it into the list. |
| 157 | | if ( ! $found ) { |
| 158 | | $versions[4] = $tested_up_to; |
| 159 | | ksort( $versions ); |
| 160 | | } |
| | 149 | if (!in_array($tested_up_to, $versions)) { |
| | 150 | $versions[4] = $tested_up_to; |
| | 151 | ksort($versions); |
| | 152 | } |
| 161 | 153 | |
| 162 | 154 | return compact( 'versions', 'tested_up_to' ); |
| 163 | 155 | } |