Changeset 11535 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-request.php
- Timestamp:
- 02/10/2022 12:41:19 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-request.php
r10200 r11535 19 19 'donate_link' => false, 20 20 'downloaded' => false, 21 'download link'=> false,21 'download_link' => false, 22 22 'homepage' => false, 23 23 'icons' => false, … … 25 25 'rating' => false, 26 26 'ratings' => false, 27 'reviews' => false, 27 'reviews' => false, // NOTE: sub-key of 'sections'. 28 28 'requires' => false, 29 29 'requires_php' => false, … … 38 38 'author_block_rating' => false, 39 39 'language_packs' => false, 40 'versions' => false, 40 41 ); 41 42 … … 46 47 'bare_contributors' => true, 47 48 'downloaded' => true, 48 'download link'=> true,49 'download_link' => true, 49 50 'donate_link' => true, 50 51 'homepage' => true, … … 76 77 'downloaded' => true, 77 78 'description' => true, 78 'download link'=> true,79 'download_link' => true, 79 80 'donate_link' => true, 80 81 'homepage' => true, … … 109 110 'author_block_count' => true, 110 111 'author_block_rating' => true, 112 ); 113 114 // Typo/incorrect field name transforms. 115 static $field_aliases = array( 116 // from => to 117 'downloadlink' => 'download_link', // Incorrectly documented in plugins_api(). 111 118 ); 112 119 … … 160 167 161 168 // In WordPress 4.0+ we request the icons field however we don't use the 162 // description and compatibility fields so we exclu e those by default unless requested.169 // description and compatibility fields so we exclude those by default unless requested. 163 170 if ( ! empty( $this->requested_fields['icons'] ) ) { 164 171 $fields['compatibility'] = false; … … 192 199 } 193 200 } 201 202 // If the field is an aliased field, redirect to the proper field. 203 $field = self::$field_aliases[ $field ] ?? $field; 204 205 // If it's a valid field, include it. 194 206 if ( isset( self::$fields[ $field ] ) ) { 195 207 $requested_fields[ $field ] = (bool) $include;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)