Filter
rpress_reset_store_post_types
On this page
Filters the post types collected by the Reset Restaurant Data tool.
Runs when the reset tool gathers the posts to remove. The default list is fooditem, rpress_log, rpress_payment and rpress_discount. Add a post type to have its posts included in the reset item list.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$post_types | array | Post type slugs to include in the reset. |
Return value#
array. The list of post type slugs.
Example#
function my_reset_store_post_types( $post_types ) {
$post_types[] = 'my_custom_log';
return $post_types;
}
add_filter( 'rpress_reset_store_post_types', 'my_reset_store_post_types' );
Notes#
This tool deletes data. Test any change on a staging site.
Source#
Applied in:
includes/admin/tools/class-rpress-tools-reset-stats.php(line 232), inRPRESS_Tools_Reset_Stats::pre_fetch()
See also#
Was this page helpful?
