PHP Class Nova_Restaurant, jetpack

Bulk/Quick edit response of Menu Item rows is broken. Drag and Drop reordering.
Exibir arquivo Open project: automattic/jetpack Class Usage Examples

Public Properties

Property Type Description
$version

Protected Properties

Property Type Description
$default_menu_item_loop_markup
$menu_item_loop_current_term
$menu_item_loop_last_term_id
$menu_item_loop_markup

Public Methods

Method Description
__construct ( )
add_admin_menus ( ) Add Many Items
add_many_new_items_page ( )
add_many_new_items_page_load ( ) * Edit Many Items
add_post_meta ( $post_id )
add_to_dashboard ( ) Add to Dashboard At A Glance
admin_notices ( ) * Edit Items List
change_default_title ( $title ) Change ‘Enter Title Here’ text for the Menu Item.
current_screen_load ( )
display_price ( $post_id )
edit_menu_items_page_load ( )
enqueue_many_items_scripts ( )
enqueue_nova_styles ( $hook ) Nova Styles and Scripts
get_menu_by_post_id ( $post_id = null )
get_menu_item_loop_markup ( $field = null ) * Does not support nested loops
get_menu_item_menu_leaf ( $post_id )
get_menus ( $args = [] ) * Data
get_price ( $post_id )
handle_menu_item_actions ( )
init ( $menu_item_loop_markup = [] )
is_menu_item_query ( $query ) Query
list_admin_labels ( $post_id )
list_labels ( $post_id )
maybe_reorder_menu_items ( ) Fires on a menu edit page. We might have drag-n-drop reordered
menu_item_column_callback ( $column, $post_id )
menu_item_columns ( $columns )
menu_item_loop_class ( string $class ) : string Returns a Menu Item Markup element's class attribute.
menu_item_loop_close_element ( string $field ) Outputs a Menu Item Markup element closing tag
menu_item_loop_each_post ( $post ) Outputs the Menu Item Loop Marku Attached to the 'the_post' action.
menu_item_loop_header ( ) Outputs the Menu Group Header
menu_item_loop_open_element ( string $field ) Outputs a Menu Item Markup element opening tag
menu_item_price_meta_box ( $post, $meta_box )
no_title_sorting ( $columns )
process_form_request ( )
register_menu_item_meta_boxes ( ) * Edit One Item
register_post_types ( )
register_taxonomies ( ) Register Taxonomies and Post Type
set_custom_font_icon ( ) Custom Nova Icon CSS
set_price ( $post_id, $price = '' )
setup_menu_item_columns ( )
setup_menu_item_loop_markup__in_filter ( $template ) : string Sets up the loop markup.
show_menu_titles_in_menu_item_list ( $post ) * Add menu title rows to the list table
site_supports_nova ( ) Should this Custom Post Type be made available?
sort_menu_item_queries_by_menu_order ( $query )
sort_menu_item_queries_by_menu_taxonomy ( $posts, $query )
start_menu_item_loop ( $query ) If the Query is a Menu Item Query, start outputing the Menu Item Loop Marku Attached to the 'loop_start' action.
stop_menu_item_loop ( $query ) If the Query is a Menu Item Query, stop outputing the Menu Item Loop Marku Attached to the 'loop_end' action.
updated_messages ( $messages ) Update messages for the Menu Item admin.

Method Details

__construct() public method

public __construct ( )

add_admin_menus() public method

Add Many Items
public add_admin_menus ( )

add_many_new_items_page() public method

add_many_new_items_page_load() public method

* Edit Many Items

add_post_meta() public method

public add_post_meta ( $post_id )

add_to_dashboard() public method

Add to Dashboard At A Glance
public add_to_dashboard ( )

admin_notices() public method

* Edit Items List
public admin_notices ( )

change_default_title() public method

Change ‘Enter Title Here’ text for the Menu Item.
public change_default_title ( $title )

current_screen_load() public method

public current_screen_load ( )

display_price() public method

public display_price ( $post_id )

edit_menu_items_page_load() public method

enqueue_many_items_scripts() public method

enqueue_nova_styles() public method

Nova Styles and Scripts
public enqueue_nova_styles ( $hook )

get_menu_by_post_id() public method

public get_menu_by_post_id ( $post_id = null )

get_menu_item_loop_markup() public method

* Does not support nested loops
public get_menu_item_loop_markup ( $field = null )

get_menu_item_menu_leaf() public method

public get_menu_item_menu_leaf ( $post_id )

get_menus() public method

* Data
public get_menus ( $args = [] )

get_price() public method

public get_price ( $post_id )

handle_menu_item_actions() public method

init() static public method

static public init ( $menu_item_loop_markup = [] )

is_menu_item_query() public method

Query
public is_menu_item_query ( $query )

list_admin_labels() public method

public list_admin_labels ( $post_id )

list_labels() public method

public list_labels ( $post_id )

maybe_reorder_menu_items() public method

Fires on a menu edit page. We might have drag-n-drop reordered

menu_item_column_callback() public method

public menu_item_column_callback ( $column, $post_id )

menu_item_columns() public method

public menu_item_columns ( $columns )

menu_item_loop_class() public method

Returns a Menu Item Markup element's class attribute.
public menu_item_loop_class ( string $class ) : string
$class string Class name.
return string HTML class attribute with leading whitespace.

menu_item_loop_close_element() public method

Outputs a Menu Item Markup element closing tag
public menu_item_loop_close_element ( string $field )
$field string - Menu Item Markup settings field

menu_item_loop_each_post() public method

Outputs the Menu Item Loop Marku Attached to the 'the_post' action.
public menu_item_loop_each_post ( $post )

menu_item_loop_header() public method

Outputs the Menu Group Header

menu_item_loop_open_element() public method

Outputs a Menu Item Markup element opening tag
public menu_item_loop_open_element ( string $field )
$field string - Menu Item Markup settings field.

menu_item_price_meta_box() public method

public menu_item_price_meta_box ( $post, $meta_box )

no_title_sorting() public method

public no_title_sorting ( $columns )

process_form_request() public method

register_menu_item_meta_boxes() public method

* Edit One Item

register_post_types() public method

public register_post_types ( )

register_taxonomies() public method

Register Taxonomies and Post Type
public register_taxonomies ( )

set_custom_font_icon() public method

Custom Nova Icon CSS

set_price() public method

public set_price ( $post_id, $price = '' )

setup_menu_item_columns() public method

setup_menu_item_loop_markup__in_filter() public method

Attached to the 'template_include' *filter*, which fires only during a real blog view (not in admin, feeds, etc.)
public setup_menu_item_loop_markup__in_filter ( $template ) : string
return string Template File. VERY Important.

show_menu_titles_in_menu_item_list() public method

* Add menu title rows to the list table

site_supports_nova() public method

Should this Custom Post Type be made available?
public site_supports_nova ( )

sort_menu_item_queries_by_menu_order() public method

sort_menu_item_queries_by_menu_taxonomy() public method

public sort_menu_item_queries_by_menu_taxonomy ( $posts, $query )

start_menu_item_loop() public method

If the Query is a Menu Item Query, start outputing the Menu Item Loop Marku Attached to the 'loop_start' action.
public start_menu_item_loop ( $query )

stop_menu_item_loop() public method

If the Query is a Menu Item Query, stop outputing the Menu Item Loop Marku Attached to the 'loop_end' action.
public stop_menu_item_loop ( $query )

updated_messages() public method

Update messages for the Menu Item admin.
public updated_messages ( $messages )

Property Details

$default_menu_item_loop_markup protected_oe property

protected $default_menu_item_loop_markup

$menu_item_loop_current_term protected_oe property

protected $menu_item_loop_current_term

$menu_item_loop_last_term_id protected_oe property

protected $menu_item_loop_last_term_id

$menu_item_loop_markup protected_oe property

protected $menu_item_loop_markup

$version public_oe property

public $version