Making WordPress.org


Ignore:
Timestamp:
04/06/2020 06:55:34 AM (6 years ago)
Author:
dd32
Message:

Plugin Directory: Introduce a 'Transfer This Plugin' form to reassign ownership of a plugin to another committer.

This does not remove the old owners commit rights, only transfers the ownership of it. The committer may choose to remove their commit rights afterwards.

Fixes #5131.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php

    r9699 r9702  
    826826
    827827    /**
     828     * Generates a link to self-transfer a plugin..
     829     *
     830     * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
     831     * @return string URL to toggle status.
     832     */
     833    public static function get_self_transfer_link( $post = null ) {
     834        $post = get_post( $post );
     835
     836        return add_query_arg(
     837            array( '_wpnonce' => wp_create_nonce( 'wp_rest' ) ),
     838            home_url( 'wp-json/plugins/v1/plugin/' . $post->post_name . '/self-transfer' )
     839        );
     840    }
     841
     842    /**
    828843     * Returns the reasons for closing or disabling a plugin.
    829844     *
Note: See TracChangeset for help on using the changeset viewer.