Skip to content
Snippets Groups Projects
Commit 235c360c authored by Erick Hitter's avatar Erick Hitter
Browse files

Don't use a foreach

It's more lines of code and harder to decifer. But that was a fun exercise.
parent ce2b5be7
No related branches found
No related tags found
No related merge requests found
......@@ -71,8 +71,6 @@ class Main {
private static function capture_vars() {
$vars = (object) array_fill_keys( array( 'user_id', 'action', 'post_type', 'posts', 'tax_input', 'post_author', 'comment_status', 'ping_status', 'post_status', 'post_sticky', 'post_format', ), null );
// TODO: replace with foreach and switch
$vars->user_id = get_current_user_id();
if ( isset( $_REQUEST['delete_all'] ) ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment