Changeset 10196
- Timestamp:
- 08/21/2020 05:55:20 AM (6 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes
- Files:
-
- 3 edited
-
class-plugin-favorites.php (modified) (1 diff)
-
class-plugin-self-close.php (modified) (1 diff)
-
class-plugin-self-transfer.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-favorites.php
r9666 r10196 62 62 */ 63 63 public function favorite( $request ) { 64 $location = get_permalink( Plugin_Directory::get_plugin_post( $request['plugin_slug'] ) ); 65 header( "Location: $location" ); 66 67 $result = array( 68 'location' => $location, 69 ); 64 $plugin = Plugin_Directory::get_plugin_post( $request['plugin_slug'] ); 65 $result = [ 66 'location' => wp_get_referer() ?: get_permalink( $plugin ), 67 ]; 68 header( 'Location: ' . $result['location'] ); 70 69 71 70 if ( ! isset( $request['favorite'] ) && ! isset( $request['unfavorite'] ) ) { -
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. -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-self-transfer.php
r10126 r10196 66 66 */ 67 67 public function self_transfer( $request ) { 68 $plugin = Plugin_Directory::get_plugin_post( $request['plugin_slug'] ); 69 $location = get_permalink( $plugin ) . 'advanced/'; 70 header( "Location: $location" ); 68 $plugin = Plugin_Directory::get_plugin_post( $request['plugin_slug'] ); 71 69 $result = [ 72 'location' => $location,70 'location' => wp_get_referer() ?: get_permalink( $plugin ), 73 71 'transferred' => false, 74 72 ]; 73 header( 'Location: ' . $result['location'] ); 75 74 76 75 // New owner must also have commit rights.
Note: See TracChangeset
for help on using the changeset viewer.