File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -986,23 +986,11 @@ public function get( $args, $assoc_args ) {
986986 'version ' => $ plugin_data ['Version ' ],
987987 'description ' => wordwrap ( $ plugin_data ['Description ' ] ),
988988 'status ' => $ this ->get_status ( $ file ),
989- 'requires_wp ' => '' ,
990- 'requires_php ' => '' ,
991- 'requires_plugins ' => '' ,
989+ 'requires_wp ' => ! empty ( $ plugin_data [ ' RequiresWP ' ] ) ? $ plugin_data [ ' RequiresWP ' ] : '' ,
990+ 'requires_php ' => ! empty ( $ plugin_data [ ' RequiresPHP ' ] ) ? $ plugin_data [ ' RequiresPHP ' ] : '' ,
991+ 'requires_plugins ' => ! empty ( $ plugin_data [ ' RequiresPlugins ' ] ) ? $ plugin_data [ ' RequiresPlugins ' ] : '' ,
992992 ];
993993
994- $ require_fields = [
995- 'requires_wp ' => 'RequiresWP ' ,
996- 'requires_php ' => 'RequiresPHP ' ,
997- 'requires_plugins ' => 'RequiresPlugins ' ,
998- ];
999-
1000- foreach ( $ require_fields as $ field_key => $ data_key ) {
1001- if ( isset ( $ plugin_data [ $ data_key ] ) && ! empty ( $ plugin_data [ $ data_key ] ) ) {
1002- $ plugin_obj ->{$ field_key } = $ plugin_data [ $ data_key ];
1003- }
1004- }
1005-
1006994 if ( empty ( $ assoc_args ['fields ' ] ) ) {
1007995 $ assoc_args ['fields ' ] = $ default_fields ;
1008996 }
You can’t perform that action at this time.
0 commit comments