Skip to content
Docs
Get RestroPress

Filter

rpress_fooditem_reports_prepare_items_args

Updated
On this page

Filters the WP_Query arguments of the menu items report table.

Runs just before the menu items report table queries the fooditem post type for the current page. The arguments already contain paging, ordering by title, sales or earnings, and an optional add-on group tax query. suppress_filters is set to true in the defaults.

Parameters#

ParameterTypeDescription
$argsarrayWP_Query arguments.
$report_tableRPRESS_Fooditem_Reports_TableThe report table instance running the query.

Return value#

array. The WP_Query arguments.

Example#

function my_menu_report_args( $args, $report_table ) {
	$args['post_status'] = array( 'publish', 'private' );
	return $args;
}
add_filter( 'rpress_fooditem_reports_prepare_items_args', 'my_menu_report_args', 10, 2 );

Source#

Applied in:

  • includes/admin/reporting/class-fooditem-reports-table.php (line 223), in RPRESS_Fooditem_Reports_Table::query()

See also#

Was this page helpful?