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/theme-directory.php

    r12521 r12600  
    165165    }
    166166
    167     register_taxonomy( 'theme_business_model', 'repopackage', array(
    168         'hierarchical'      => true, /* for tax_input[] handling on post saves. */
    169         'query_var'         => 'theme_business_model',
    170         'rewrite'           => false,
    171         'labels'            => array(
    172             'name' => __( 'Business Model', 'wporg-themes' ),
    173         ),
    174         'public'            => true,
    175         'show_ui'           => true,
    176         'show_admin_column' => false,
    177         'capabilities'      => array(
    178             'assign_terms' => 'assign_categories',
    179         ),
    180     ) );
     167    register_taxonomy( 'theme_business_model', 'repopackage', array(
     168        'hierarchical'      => true, /* for tax_input[] handling on post saves. */
     169        'query_var'         => 'theme_business_model',
     170        'rewrite'           => false,
     171        'labels'            => array(
     172            'name' => __( 'Business Model', 'wporg-themes' ),
     173        ),
     174        'public'            => true,
     175        'show_ui'           => true,
     176        'show_admin_column' => false,
     177        'capabilities'      => array(
     178            'assign_terms' => 'assign_categories',
     179        ),
     180    ) );
    181181
    182182    // Add the browse/* views
     
    904904        'is_community' => true,
    905905        'external_repository_url' => true,
    906         'can_configure_categorization_options' => true,
    907906    );
    908907
     
    950949            'is_community' => true,
    951950            'external_repository_url' => true,
    952             'can_configure_categorization_model_options' => true,
    953951        )
    954952    ) );
Note: See TracChangeset for help on using the changeset viewer.