Lines:
1 to 85 of 85
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Manage restaurant menus from your WordPress site, * via a new "nova" CPT. * * Put the following code in your theme's Food Menu Page Template to customize the markup of the menu. * * if ( class_exists( 'Nova_Restaurant' ) ) { * Nova_Restaurant::init( array( * 'menu_tag' => 'section', * 'menu_class' => 'menu-items', * 'menu_header_tag' => 'header', * 'menu_header_class' => 'menu-group-header', * 'menu_title_tag' => 'h1', * 'menu_title_class' => 'menu-group-title', * 'menu_description_tag' => 'div', * 'menu_description_class' => 'menu-group-description', * ) ); * } * * @todo * - Bulk/Quick edit response of Menu Item rows is broken. * - Drag and Drop reordering. * * @package automattic/jetpack */ use Automattic\Jetpack\Assets; /* class Nova_Restaurant */ /* function Nova_Restaurant::init() – */ /* function Nova_Restaurant::__construct() – */ /* function Nova_Restaurant::site_supports_nova() – Should this Custom Post Type be made available? */ /* function Nova_Restaurant::register_taxonomies() – Register Taxonomies and Post Type */ /* function Nova_Restaurant::register_post_types() – */ /* function Nova_Restaurant::updated_messages() – Update messages for the Menu Item admin. */ /* function Nova_Restaurant::enqueue_nova_styles() – Nova Styles and Scripts */ /* function Nova_Restaurant::change_default_title() – Change ‘Enter Title Here’ text for the Menu Item. */ /* function Nova_Restaurant::add_to_dashboard() – Add to Dashboard At A Glance */ /* function Nova_Restaurant::is_menu_item_query() – Query */ /* function Nova_Restaurant::sort_menu_item_queries_by_menu_order() – */ /* function Nova_Restaurant::sort_menu_item_queries_by_menu_taxonomy() – */ /* function Nova_Restaurant::add_admin_menus() – Add Many Items */ /* function Nova_Restaurant::set_custom_font_icon() – Custom Nova Icon CSS */ /* function Nova_Restaurant::current_screen_load() – */ /* function Nova_Restaurant::admin_notices() – */ /* function Nova_Restaurant::no_title_sorting() – */ /* function Nova_Restaurant::setup_menu_item_columns() – */ /* function Nova_Restaurant::menu_item_columns() – */ /* function Nova_Restaurant::menu_item_column_callback() – */ /* function Nova_Restaurant::get_menu_by_post_id() – */ /* function Nova_Restaurant::maybe_reorder_menu_items() – Fires on a menu edit page. We might have drag-n-drop reordered */ /* function Nova_Restaurant::edit_menu_items_page_load() – */ /* function Nova_Restaurant::handle_menu_item_actions() – */ /* function Nova_Restaurant::show_menu_titles_in_menu_item_list() – */ /* function Nova_Restaurant::add_many_new_items_page_load() – */ /* function Nova_Restaurant::enqueue_many_items_scripts() – */ /* function Nova_Restaurant::process_form_request() – */ /* function Nova_Restaurant::add_many_new_items_page() – */ /* function Nova_Restaurant::register_menu_item_meta_boxes() – */ /* function Nova_Restaurant::menu_item_price_meta_box() – */ /* function Nova_Restaurant::add_post_meta() – */ /* function Nova_Restaurant::get_menus() – */ /* function Nova_Restaurant::get_menu_item_menu_leaf() – */ /* function Nova_Restaurant::list_labels() – */ /* function Nova_Restaurant::list_admin_labels() – */ /* function Nova_Restaurant::set_price() – */ /* function Nova_Restaurant::get_price() – */ /* function Nova_Restaurant::display_price() – */ /* function Nova_Restaurant::get_menu_item_loop_markup() – */ /* function Nova_Restaurant::setup_menu_item_loop_markup__in_filter() – Sets up the loop markup. */ /* function Nova_Restaurant::start_menu_item_loop() – If the Query is a Menu Item Query, start outputing the Menu Item Loop Marku Attached to the ‘loop_start’ action. */ /* function Nova_Restaurant::menu_item_loop_each_post() – Outputs the Menu Item Loop Marku Attached to the ‘the_post’ action. */ /* function Nova_Restaurant::stop_menu_item_loop() – If the Query is a Menu Item Query, stop outputing the Menu Item Loop Marku Attached to the ‘loop_end’ action. */ /* function Nova_Restaurant::menu_item_loop_header() – Outputs the Menu Group Header */ /* function Nova_Restaurant::menu_item_loop_open_element() – Outputs a Menu Item Markup element opening tag */ /* function Nova_Restaurant::menu_item_loop_close_element() – Outputs a Menu Item Markup element closing tag */ /* function Nova_Restaurant::menu_item_loop_class() – Returns a Menu Item Markup element’s class attribute. */ add_action( 'init', array( 'Nova_Restaurant', 'init' ) );