Making WordPress.org


Ignore:
Timestamp:
05/23/2023 06:16:42 AM (3 years ago)
Author:
dd32
Message:

Theme Directory: Allow the Commercial/Community options to be set.

Changes:

  • The no-js fallback form is removed, as it wasn't operational.
  • The capability check was removed from the API response, as the API is cached and cannot be used for that purpose.
  • The capability check is now performed client-side, based on a new currentUser field matching against the themes authorship.
  • The capability check is fixed to allow theme authors to self-edit.

See r12338.

File:
1 edited

Legend:

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

    r12560 r12600  
    6969        'external_repository_url' => false,
    7070        'external_support_url' => false,
    71         'can_configure_categorization_options' => false,
    7271        'upload_date'        => false,
    7372    );
     
    476475            $defaults['external_repository_url'] = true;
    477476            $defaults['external_support_url'] = true;
    478             $defaults['can_configure_categorization_options'] = true;
    479477        }
    480478
     
    547545            $defaults['external_repository_url'] = true;
    548546            $defaults['external_support_url'] = true;
    549             $defaults['can_configure_categorization_options'] = true;
    550547        }
    551548
     
    932929        }
    933930
    934         if ( $this->fields['can_configure_categorization_options'] ) {
    935             $phil->can_configure_categorization_options = current_user_can( 'theme_configure_categorization_options', $theme );
    936         }
    937 
    938931        if ( class_exists( 'GlotPress_Translate_Bridge' ) ) {
    939932            $glotpress_project = "wp-themes/{$phil->slug}";
Note: See TracChangeset for help on using the changeset viewer.