Making WordPress.org


Ignore:
Timestamp:
06/04/2019 07:02:56 AM (7 years ago)
Author:
dd32
Message:

Theme Directory: Add the requires and requires_php to the Theme objects.

Missed in [8895].
Props flixos90 for initial work, dd32.
See #3718.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php

    r8273 r8913  
    6161                'photon_screenshots' => false,
    6262                'active_installs'    => false,
     63                'requires'           => false,
     64                'requires_php'       => false,
    6365        );
    6466
     
    369371                        $defaults['reviews_url'] = true;
    370372                        $defaults['parent'] = true;
     373                        $defaults['requires'] = true;
     374                        $defaults['requires_php'] = true;
    371375                }
    372376
     
    788792                }
    789793
     794                if ( $this->fields['requires'] ) {
     795                        $phil->requires = wporg_themes_get_version_meta( $theme->ID, '_requires', $phil->version );
     796                }
     797
     798                if ( $this->fields['requires_php'] ) {
     799                        $phil->requires_php = wporg_themes_get_version_meta( $theme->ID, '_requires_php', $phil->version );
     800                }
     801
    790802                if ( class_exists( 'GlotPress_Translate_Bridge' ) ) {
    791803                        $glotpress_project = "wp-themes/{$phil->slug}";
Note: See TracChangeset for help on using the changeset viewer.