Skip to content

Commit

Permalink
Simplify the table generation, install and activate code
Browse files Browse the repository at this point in the history
- retrieve most information we need from our `$plugins` array rather than pass it through URL or $_POST
- properly sanitize and validate received information from URL or $_POST
- leverage the use of the WP_filesystem API
- show an appropriate error message if user tries to activate an already active plugin
- deprecate the `TGMPA_List_Table::_get_plugin_data_from_name()` method which is no longer needed as we have access to the `TGM_Plugin_Activation::_get_plugin_data_from_name()` method
- Fix unauthorized issue on bulk installs when not using direct file access caused by #227
- Only prepare some variables and update recently activated plugins option when we actually need to

Also:
- abstract the regexes which are used a number of times to class constants
- combine multiple `isset()`'s if used within the same if statement
- don't nest what doesn't need nesting
- unset loop variables if the function doesn't return straight after
  • Loading branch information
jrfnl committed Apr 28, 2015
1 parent a562437 commit 1b1f55b
Showing 1 changed file with 233 additions and 307 deletions.
Loading

0 comments on commit 1b1f55b

Please sign in to comment.