Making WordPress.org

Ticket #5362: 5362.diff

File 5362.diff, 1.0 KB (added by dingo_d, 4 years ago)

Added patch for the new repopackage post status

  • wordpress.org/public_html/wp-content/plugins/theme-directory/admin-edit.php

    diff --git a/wordpress.org/public_html/wp-content/plugins/theme-directory/admin-edit.php b/wordpress.org/public_html/wp-content/plugins/theme-directory/admin-edit.php
    index 074c6d5d9..fa12b31e6 100644
    a b function wporg_themes_post_status() { 
    4343                'exclude_from_search' => true,
    4444                'label_count'         => _n_noop( 'Suspended <span class="count">(%s)</span>', 'Suspended <span class="count">(%s)</span>', 'wporg-themes' ),
    4545        ) );
     46
     47        // Themes can be "delisted" to hide them from search, but allow them to be uploaded.
     48        register_post_status( 'delist', array(
     49                'label'               => __( 'Delisted', 'wporg-themes' ),
     50                'protected'           => true,
     51                'exclude_from_search' => true,
     52                'label_count'         => _n_noop( 'Delisted <span class="count">(%s)</span>', 'Delisted <span class="count">(%s)</span>', 'wporg-themes' ),
     53        ) );
    4654}
    4755add_action( 'init', 'wporg_themes_post_status' );
    4856