Changeset 12933 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
- Timestamp:
- 10/06/2023 02:09:21 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r12931 r12933 794 794 array( '_wpnonce' => wp_create_nonce( 'wp_rest' ) ), 795 795 home_url( 'wp-json/plugins/v1/plugin/' . $post->post_name . '/self-transfer' ) 796 ); 797 } 798 799 /** 800 * Generates a link to toggle the Live Preview button. 801 * 802 * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. 803 * @return string URL to toggle status. 804 */ 805 public static function get_self_toggle_preview_link( $post = null ) { 806 $post = get_post( $post ); 807 808 return add_query_arg( 809 array( '_wpnonce' => wp_create_nonce( 'wp_rest' ) ), 810 home_url( 'wp-json/plugins/v1/plugin/' . $post->post_name . '/self-toggle-preview' ) 796 811 ); 797 812 }
Note: See TracChangeset
for help on using the changeset viewer.