Changeset 10196 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-self-close.php
- Timestamp:
- 08/21/2020 05:55:20 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-self-close.php
r9702 r10196 57 57 */ 58 58 public function self_close( $request ) { 59 $plugin = Plugin_Directory::get_plugin_post( $request['plugin_slug'] ); 60 $location = get_permalink( $plugin ); 61 header( "Location: $location" ); 62 59 $plugin = Plugin_Directory::get_plugin_post( $request['plugin_slug'] ); 63 60 $result = [ 64 'location' => $location,61 'location' => wp_get_referer() ?: get_permalink( $plugin ), 65 62 ]; 63 header( 'Location: ' . $result['location'] ); 66 64 67 65 // Close the plugin.
Note: See TracChangeset
for help on using the changeset viewer.