| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * WP Reset |
| 5 | 5 | * https://wpreset.com/ |
| 6 | - * (c) WebFactory Ltd, 2017-2019 | |
| 6 | + * (c) WebFactory Ltd, 2017-2023 | |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | |
| 10 | 10 | // include only file |
| @@ -29,11 +29,8 @@ | ||
| 29 | 29 | * |
| 30 | 30 | * [--reactivate-plugins] |
| 31 | 31 | * : Reactivate all currently active plugins after reset. |
| 32 | 32 | * |
| 33 | - * [--reactivate-webhooks] | |
| 34 | - * : Reactivate WP Webhooks plugin after reset. | |
| 35 | - * | |
| 36 | 33 | * [--deactivate-wp-reset] |
| 37 | 34 | * : Deactivate WP Reset plugin after reset. By default it will stay active after reset. |
| 38 | 35 | * |
| 39 | 36 | * [--yes] |
| @@ -63,11 +60,8 @@ | ||
| 63 | 60 | } |
| 64 | 61 | if (!empty($assoc_args['reactivate-plugins'])) { |
| 65 | 62 | $params['reactivate_plugins'] = true; |
| 66 | 63 | } |
| 67 | - if (!empty($assoc_args['reactivate-webhooks'])) { | |
| 68 | - $params['reactivate_webhooks'] = true; | |
| 69 | - } | |
| 70 | 64 | |
| 71 | 65 | $result = $wp_reset->do_reinstall($params); |
| 72 | 66 | if (is_wp_error($result)) { |
| 73 | 67 | WP_CLI::error($result->get_error_message); |
| @@ -238,9 +232,9 @@ | ||
| 238 | 232 | $tmp['name'] = $ss['name']; |
| 239 | 233 | } else { |
| 240 | 234 | $tmp['name'] = 'n/a'; |
| 241 | 235 | } |
| 242 | - $tmp['created'] = date(get_option('date_format'), strtotime($ss['timestamp'])) . ' @ ' . date(get_option('time_format'), strtotime($ss['timestamp'])); | |
| 236 | + $tmp['created'] = gmdate(get_option('date_format'), strtotime($ss['timestamp'])) . ' @ ' . gmdate(get_option('time_format'), strtotime($ss['timestamp'])); | |
| 243 | 237 | $tmp['info'] = $ss['tbl_core'] . ' standard & '; |
| 244 | 238 | if ($ss['tbl_custom']) { |
| 245 | 239 | $tmp['info'] .= $ss['tbl_custom'] . ' custom table' . ($ss['tbl_custom'] == 1 ? '' : 's'); |
| 246 | 240 | } else { |
| @@ -245,9 +239,9 @@ | ||
| 245 | 239 | $tmp['info'] .= $ss['tbl_custom'] . ' custom table' . ($ss['tbl_custom'] == 1 ? '' : 's'); |
| 246 | 240 | } else { |
| 247 | 241 | $tmp['info'] .= 'no custom tables'; |
| 248 | 242 | } |
| 249 | - $tmp['info'] .= ' totaling ' . $wp_reset->format_size($ss['tbl_size']) . ' in ' . number_format($ss['tbl_rows']) . ' rows'; | |
| 243 | + $tmp['info'] .= ' totaling ' . WP_Reset_Utility::format_size($ss['tbl_size']) . ' in ' . number_format($ss['tbl_rows']) . ' rows'; | |
| 250 | 244 | |
| 251 | 245 | $table[] = $tmp; |
| 252 | 246 | } // foreach |
| 253 | 247 | WP_CLI\Utils\format_items('table', $table, array('id', 'name', 'created', 'info')); |