Making WordPress.org

Changeset 5572


Ignore:
Timestamp:
06/15/2017 01:12:31 PM (7 years ago)
Author:
Otto42
Message:

Theme Directory: Remove theme from previewer on move to draft. Fixes #2475, props @SergeyBiryukov

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/admin-edit.php

    r2455 r5572  
    232232}
    233233add_filter( 'admin_action_reinstate', 'wporg_themes_reinstate_theme' );
     234
     235/**
     236 * Remove themes from wp-themes.com upon theme status moving to draft.
     237 *
     238 * @param WP_Post $post
     239 */
     240function wporg_themes_remove_draft_themes_from_wpthemescom( $post ) {
     241    if ( 'repopackage' === $post->post_type ) {
     242        wporg_themes_remove_wpthemescom( $post->post_name );
     243    }
     244}
     245add_action( 'publish_to_draft', 'wporg_themes_remove_draft_themes_from_wpthemescom' );
    234246
    235247/**
Note: See TracChangeset for help on using the changeset viewer.