Making WordPress.org

Changeset 14462


Ignore:
Timestamp:
06/11/2025 01:34:24 AM (14 months ago)
Author:
dd32
Message:

Theme Directory: Enable support for the Internal Notes plugin.

See https://github.com/wordpress/wporg-internal-notes/

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory
Files:
2 edited

Legend:

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

    r14438 r14462  
    284284                if ( 'themedropbox' !== $author && function_exists( 'bump_stats_extra' ) ) {
    285285                        bump_stats_extra( 'themes', 'upload_by_svn' );
     286                }
     287
     288                // Run in the context of the author.
     289                if ( $this->author ) {
     290                        set_current_user( $this->author->id );
    286291                }
    287292
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r14321 r14462  
    130130                        ),
    131131                        'description' => __( 'A package', 'wporg-themes' ),
    132                         'supports'    => array( 'title', 'editor', 'author', 'custom-fields', 'page-attributes' ),
     132                        'supports'    => array( 'title', 'editor', 'author', 'custom-fields', 'page-attributes', 'wporg-internal-notes', 'wporg-log-notes' ),
    133133                        'taxonomies'  => array( 'category', 'post_tag', 'type' ),
    134134                        'public'      => true,
     
    16041604        return (bool) $themes;
    16051605}
     1606
     1607/**
     1608 * Log metadata changes to internal notes.
     1609 *
     1610 * @param array $meta_keys The meta keys to log.
     1611 * @return array
     1612 */
     1613function wporg_themes_log_version_changes( $meta_keys ) {
     1614        $meta_keys[] = '_live_version';
     1615        $meta_keys[] = 'external_support_url';
     1616        $meta_keys[] = 'external_repository_url';
     1617
     1618        return $meta_keys;
     1619}
     1620add_filter( 'wporg_internal_notes_logging_allowed_postmeta_keys', 'wporg_themes_log_version_changes' );
Note: See TracChangeset for help on using the changeset viewer.