Changeset 9702 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
- Timestamp:
- 04/06/2020 06:55:34 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r9699 r9702 826 826 827 827 /** 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 /** 828 843 * Returns the reasons for closing or disabling a plugin. 829 844 *
Note: See TracChangeset
for help on using the changeset viewer.