Skip to content
Docs
Get RestroPress

Action

rpress_fooditem_editor_top

Updated
On this page

Fires at the top of the menu item editor, before any section is rendered.

Runs inside the rp-fooditem-editor container of the Menu Item Data meta box, before the core sections. Output banners or notices that apply to the whole editor.

Parameters#

ParameterTypeDescription
$postWP_PostThe menu item being edited.

Example#

function my_fooditem_editor_notice( $post ) {
	if ( 'draft' === $post->post_status ) {
		echo '<p class="description">' . esc_html__( 'Save the item to publish it to the menu.', 'my-plugin' ) . '</p>';
	}
}
add_action( 'rpress_fooditem_editor_top', 'my_fooditem_editor_notice', 10, 1 );

Source#

Fired from:

  • includes/admin/fooditems/views/html-fooditem-data-panel.php (line 13)

See also#

Was this page helpful?