PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 15.1
Jetpack – WP Security, Backup, Speed, & Growth v15.1
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / modules / custom-post-types / nova.php

nova.php in Jetpack – WP Security, Backup, Speed, & Growth 15.1, at modules/custom-post-types/nova.php

780 lines 21.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 /**
3 * Manage restaurant menus from your WordPress site,
4 * via a new "nova" CPT.
5 *
6 * Put the following code in your theme's Food Menu Page Template to customize the markup of the menu.
7 *
8 * if ( class_exists( 'Nova_Restaurant' ) ) {
9 * Nova_Restaurant::init( array(
10 * 'menu_tag' => 'section',
11 * 'menu_class' => 'menu-items',
12 * 'menu_header_tag' => 'header',
13 * 'menu_header_class' => 'menu-group-header',
14 * 'menu_title_tag' => 'h1',
15 * 'menu_title_class' => 'menu-group-title',
16 * 'menu_description_tag' => 'div',
17 * 'menu_description_class' => 'menu-group-description',
18 * ) );
19 * }
20 *
21 * @todo
22 * - Bulk/Quick edit response of Menu Item rows is broken.
23 * - Drag and Drop reordering.
24 *
25 * @package automattic/jetpack
26 */
27
28 if ( ! class_exists( '\Nova_Restaurant' ) ) {
29
30 /**
31 * Create the new Nova CPT.
32 */
33 class Nova_Restaurant {
34 const MENU_ITEM_POST_TYPE = 'nova_menu_item';
35 const MENU_ITEM_LABEL_TAX = 'nova_menu_item_label';
36 const MENU_TAX = 'nova_menu';
37
38 /**
39 * Store an instance of the new class
40 *
41 * @var Automattic\Jetpack\Classic_Theme_Helper\Nova_Restaurant
42 */
43 protected $new_instance;
44
45 /**
46 * Version number used when enqueuing all resources (css and js).
47 *
48 * @deprecated 14.3 Moved to Classic Theme Helper package.
49 *
50 * @var string
51 */
52 public $version = '20210303';
53
54 /**
55 * Default markup for the menu items.
56 *
57 * @deprecated 14.3 Moved to Classic Theme Helper package.
58 *
59 * @var array
60 */
61 protected $default_menu_item_loop_markup = array(
62 'menu_tag' => 'section',
63 'menu_class' => 'menu-items',
64 'menu_header_tag' => 'header',
65 'menu_header_class' => 'menu-group-header',
66 'menu_title_tag' => 'h1',
67 'menu_title_class' => 'menu-group-title',
68 'menu_description_tag' => 'div',
69 'menu_description_class' => 'menu-group-description',
70 );
71
72 /**
73 * Array of markup for the menu items.
74 *
75 * @deprecated 14.3 Moved to Classic Theme Helper package.
76 *
77 * @var array
78 */
79 protected $menu_item_loop_markup = array();
80
81 /**
82 * Last term ID of a loop of menu items.
83 *
84 * @deprecated 14.3 Moved to Classic Theme Helper package.
85 *
86 * @var bool|int
87 */
88 protected $menu_item_loop_last_term_id = false;
89
90 /**
91 * Current term ID of a loop of menu items.
92 *
93 * @deprecated 14.3 Moved to Classic Theme Helper package.
94 *
95 * @var bool|int
96 */
97 protected $menu_item_loop_current_term = false;
98
99 /**
100 * Initialize class.
101 *
102 * @deprecated 14.3 Moved to Classic Theme Helper package.
103 *
104 * @param array $menu_item_loop_markup Array of markup for the menu items.
105 *
106 * @return Automattic\Jetpack\Classic_Theme_Helper\Nova_Restaurant
107 */
108 public static function init( $menu_item_loop_markup = array() ) {
109 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
110 return Automattic\Jetpack\Classic_Theme_Helper\Nova_Restaurant::init( $menu_item_loop_markup );
111 }
112
113 /**
114 * Constructor.
115 * Hook into WordPress to create CPT and utilities if needed.
116 */
117 public function __construct() {
118 $this->new_instance = new Automattic\Jetpack\Classic_Theme_Helper\Nova_Restaurant();
119 }
120
121 /**
122 * Forward all method calls to the Nova_Restaurant class.
123 *
124 * @param string $name The name of the method.
125 * @param array $arguments The arguments to pass to the method.
126 *
127 * @throws Exception If the method is not found.
128 */
129 public function __call( $name, $arguments ) {
130 if ( method_exists( $this->new_instance, $name ) ) {
131 return call_user_func_array( array( $this->new_instance, $name ), $arguments );
132 } else {
133 // Handle cases where the method is not found
134 throw new Exception( sprintf( 'Undefined method: %s', esc_html( $name ) ) );
135 }
136 }
137
138 /**
139 * Forward all static method calls to the Nova_Restaurant class.
140 *
141 * @param string $name The name of the method.
142 * @param array $arguments The arguments to pass to the method.
143 *
144 * @throws Exception If the method is not found.
145 */
146 public static function __callStatic( $name, $arguments ) {
147 if ( method_exists( Automattic\Jetpack\Classic_Theme_Helper\Nova_Restaurant::class, $name ) ) {
148 return call_user_func_array( array( Automattic\Jetpack\Classic_Theme_Helper\Nova_Restaurant::class, $name ), $arguments );
149 } else {
150 // Handle cases where the method is not found
151 throw new Exception( sprintf( 'Undefined static method: %s', esc_html( $name ) ) );
152 }
153 }
154
155 /**
156 * Should this Custom Post Type be made available?
157 *
158 * @deprecated 14.3 Moved to Classic Theme Helper package.
159 *
160 * @return bool
161 */
162 public function site_supports_nova() {
163 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
164 return $this->new_instance->site_supports_nova();
165 }
166
167 /* Setup */
168
169 /**
170 * Register Taxonomies and Post Type
171 *
172 * @deprecated 14.3 Moved to Classic Theme Helper package.
173 */
174 public function register_taxonomies() {
175 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
176 $this->new_instance->register_taxonomies();
177 }
178
179 /**
180 * Register our Post Type.
181 *
182 * @deprecated 14.3 Moved to Classic Theme Helper package.
183 */
184 public function register_post_types() {
185 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
186 $this->new_instance->register_post_types();
187 }
188
189 /**
190 * Update messages for the Menu Item admin.
191 *
192 * @deprecated 14.3 Moved to Classic Theme Helper package.
193 *
194 * @param array $messages Existing post update messages.
195 *
196 * @return array $messages Updated post update messages.
197 */
198 public function updated_messages( $messages ) {
199 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
200 return $this->new_instance->updated_messages( $messages );
201 }
202
203 /**
204 * Nova styles and scripts.
205 *
206 * @deprecated 14.3 Moved to Classic Theme Helper package.
207 *
208 * @param string $hook Page hook.
209 *
210 * @return void
211 */
212 public function enqueue_nova_styles( $hook ) {
213 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
214 $this->new_instance->enqueue_nova_styles( $hook );
215 }
216
217 /**
218 * Change ‘Enter Title Here’ text for the Menu Item.
219 *
220 * @deprecated 14.3 Moved to Classic Theme Helper package.
221 *
222 * @param string $title Default title placeholder text.
223 *
224 * @return string
225 */
226 public function change_default_title( $title ) {
227 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
228 return $this->new_instance->change_default_title( $title );
229 }
230
231 /**
232 * Add to Dashboard At A Glance
233 *
234 * @deprecated 14.3 Moved to Classic Theme Helper package.
235 *
236 * @return void
237 */
238 public function add_to_dashboard() {
239 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
240 $this->new_instance->add_to_dashboard();
241 }
242
243 /**
244 * If the WP query for our menu items.
245 *
246 * @deprecated 14.3 Moved to Classic Theme Helper package.
247 *
248 * @param WP_Query $query WP Query.
249 *
250 * @return bool
251 */
252 public function is_menu_item_query( $query ) {
253 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
254 return $this->new_instance->is_menu_item_query( $query );
255 }
256
257 /**
258 * Custom sort the menu item queries by menu order.
259 *
260 * @deprecated 14.3 Moved to Classic Theme Helper package.
261 *
262 * @param WP_Query $query WP Query.
263 *
264 * @return void
265 */
266 public function sort_menu_item_queries_by_menu_order( $query ) {
267 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
268 $this->new_instance->sort_menu_item_queries_by_menu_order( $query );
269 }
270
271 /**
272 * Custom sort the menu item queries by menu taxonomies.
273 *
274 * @deprecated 14.3 Moved to Classic Theme Helper package.
275 *
276 * @param WP_Post[] $posts Array of post objects.
277 * @param WP_Query $query The WP_Query instance.
278 *
279 * @return WP_Post[]
280 */
281 public function sort_menu_item_queries_by_menu_taxonomy( $posts, $query ) {
282 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
283 return $this->new_instance->sort_menu_item_queries_by_menu_taxonomy( $posts, $query );
284 }
285
286 /**
287 * Add new "Add many items" submenu, custom colunmns, and custom bulk actions.
288 *
289 * @deprecated 14.3 Moved to Classic Theme Helper package.
290 *
291 * @return void
292 */
293 public function add_admin_menus() {
294 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
295 $this->new_instance->add_admin_menus();
296 }
297
298 /**
299 * Custom Nova Icon CSS
300 *
301 * @deprecated 14.3 Moved to Classic Theme Helper package.
302 *
303 * @return void
304 */
305 public function set_custom_font_icon() {
306 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
307 $this->new_instance->set_custom_font_icon();
308 }
309
310 /**
311 * Load Nova menu management tools on the CPT admin screen.
312 *
313 * @deprecated 14.3 Moved to Classic Theme Helper package.
314 *
315 * @return void
316 */
317 public function current_screen_load() {
318 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
319 $this->new_instance->current_screen_load();
320 }
321
322 /* Edit Items List */
323
324 /**
325 * Display a notice in wp-admin after items have been changed.
326 *
327 * @deprecated 14.3 Moved to Classic Theme Helper package.
328 *
329 * @return void
330 */
331 public function admin_notices() {
332 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
333 $this->new_instance->admin_notices();
334 }
335
336 /**
337 * Do not allow sorting by title.
338 *
339 * @deprecated 14.3 Moved to Classic Theme Helper package.
340 *
341 * @param array $columns An array of sortable columns.
342 *
343 * @return array $columns.
344 */
345 public function no_title_sorting( $columns ) {
346 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
347 return $this->new_instance->no_title_sorting( $columns );
348 }
349
350 /**
351 * Set up custom columns for our Nova menu.
352 *
353 * @deprecated 14.3 Moved to Classic Theme Helper package.
354 *
355 * @return void
356 */
357 public function setup_menu_item_columns() {
358 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
359 $this->new_instance->setup_menu_item_columns();
360 }
361
362 /**
363 * Add custom columns to the Nova menu item list.
364 *
365 * @deprecated 14.3 Moved to Classic Theme Helper package.
366 *
367 * @param array $columns An array of columns.
368 *
369 * @return array $columns.
370 */
371 public function menu_item_columns( $columns ) {
372 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
373 return $this->new_instance->menu_item_columns( $columns );
374 }
375
376 /**
377 * Display custom data in each new custom column we created.
378 *
379 * @deprecated 14.3 Moved to Classic Theme Helper package.
380 *
381 * @param string $column The name of the column to display.
382 * @param int $post_id The current post ID.
383 *
384 * @return void
385 */
386 public function menu_item_column_callback( $column, $post_id ) {
387 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
388 $this->new_instance->menu_item_column_callback( $column, $post_id );
389 }
390
391 /**
392 * Get menu item by post ID.
393 *
394 * @deprecated 14.3 Moved to Classic Theme Helper package.
395 *
396 * @param int $post_id Post ID.
397 *
398 * @return bool|WP_Term
399 */
400 public function get_menu_by_post_id( $post_id = null ) {
401 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
402 return $this->new_instance->get_menu_by_post_id( $post_id );
403 }
404
405 /**
406 * Fires on a menu edit page. We might have drag-n-drop reordered
407 *
408 * @deprecated 14.3 Moved to Classic Theme Helper package.
409 */
410 public function maybe_reorder_menu_items() {
411 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
412 $this->new_instance->maybe_reorder_menu_items();
413 }
414
415 /**
416 * Handle changes to menu items.
417 * (process actions, update data, enqueue necessary scripts).
418 *
419 * @deprecated 14.3 Moved to Classic Theme Helper package.
420 *
421 * @return void
422 */
423 public function edit_menu_items_page_load() {
424 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
425 $this->new_instance->edit_menu_items_page_load();
426 }
427
428 /**
429 * Process actions to move menu items around.
430 *
431 * @deprecated 14.3 Moved to Classic Theme Helper package.
432 *
433 * @return void
434 */
435 public function handle_menu_item_actions() {
436 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
437 $this->new_instance->handle_menu_item_actions();
438 }
439
440 /**
441 * Add menu title rows to the list table
442 *
443 * @deprecated 14.3 Moved to Classic Theme Helper package.
444 *
445 * @param WP_Post $post The Post object.
446 *
447 * @return void
448 */
449 public function show_menu_titles_in_menu_item_list( $post ) {
450 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
451 $this->new_instance->show_menu_titles_in_menu_item_list( $post );
452 }
453
454 /* Edit Many Items */
455
456 /**
457 * Handle form submissions that aim to add many menu items at once.
458 * (process posted data and enqueue necessary script).
459 *
460 * @deprecated 14.3 Moved to Classic Theme Helper package.
461 *
462 * @return void
463 */
464 public function add_many_new_items_page_load() {
465 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
466 $this->new_instance->add_many_new_items_page_load();
467 }
468
469 /**
470 * Enqueue script to create many items at once.
471 *
472 * @deprecated 14.3 Moved to Classic Theme Helper package.
473 *
474 * @return void
475 */
476 public function enqueue_many_items_scripts() {
477 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
478 $this->new_instance->enqueue_many_items_scripts();
479 }
480
481 /**
482 * Process form request to create many items at once.
483 *
484 * @deprecated 14.3 Moved to Classic Theme Helper package.
485 *
486 * @return void
487 */
488 public function process_form_request() {
489 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
490 $this->new_instance->process_form_request();
491 }
492
493 /**
494 * Admin page contents for adding many menu items at once.
495 *
496 * @deprecated 14.3 Moved to Classic Theme Helper package.
497 *
498 * @return void
499 */
500 public function add_many_new_items_page() {
501 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
502 $this->new_instance->add_many_new_items_page();
503 }
504
505 /* Edit One Item */
506
507 /**
508 * Create admin meta box to save price for a menu item,
509 * and add script to add extra checkboxes to the UI.
510 *
511 * @deprecated 14.3 Moved to Classic Theme Helper package.
512 *
513 * @return void
514 */
515 public function register_menu_item_meta_boxes() {
516 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
517 $this->new_instance->register_menu_item_meta_boxes();
518 }
519
520 /**
521 * Meta box to edit the price of a menu item.
522 *
523 * @deprecated 14.3 Moved to Classic Theme Helper package.
524 *
525 * @param WP_Post $post The post object.
526 *
527 * @return void
528 */
529 public function menu_item_price_meta_box( $post ) {
530 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
531 $this->new_instance->menu_item_price_meta_box( $post );
532 }
533
534 /**
535 * Save the price of a menu item.
536 *
537 * @deprecated 14.3 Moved to Classic Theme Helper package.
538 *
539 * @param int $post_id Post ID.
540 */
541 public function add_post_meta( $post_id ) {
542 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
543 $this->new_instance->add_post_meta( $post_id );
544 }
545
546 /* Data */
547
548 /**
549 * Get ordered array of menu items.
550 *
551 * @deprecated 14.3 Moved to Classic Theme Helper package.
552 *
553 * @param array $args Optional argumments.
554 *
555 * @return array
556 */
557 public function get_menus( $args = array() ) {
558 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
559 return $this->new_instance->get_menus( $args );
560 }
561
562 /**
563 * Get first menu taxonomy "leaf".
564 *
565 * @deprecated 14.3 Moved to Classic Theme Helper package.
566 *
567 * @param int $post_id Post ID.
568 *
569 * @return bool|WP_Term|WP_Error|null
570 */
571 public function get_menu_item_menu_leaf( $post_id ) {
572 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
573 return $this->new_instance->get_menu_item_menu_leaf( $post_id );
574 }
575
576 /**
577 * Get a list of the labels linked to a menu item.
578 *
579 * @deprecated 14.3 Moved to Classic Theme Helper package.
580 *
581 * @param int $post_id Post ID.
582 *
583 * @return void
584 */
585 public function list_labels( $post_id = 0 ) {
586 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
587 $this->new_instance->list_labels( $post_id );
588 }
589
590 /**
591 * Get a list of the labels linked to a menu item, with links to manage them.
592 *
593 * @deprecated 14.3 Moved to Classic Theme Helper package.
594 *
595 * @param int $post_id Post ID.
596 *
597 * @return void
598 */
599 public function list_admin_labels( $post_id = 0 ) {
600 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
601 $this->new_instance->list_admin_labels( $post_id );
602 }
603
604 /**
605 * Update post meta with the price defined in meta box.
606 *
607 * @deprecated 14.3 Moved to Classic Theme Helper package.
608 *
609 * @param int $post_id Post ID.
610 * @param string $price Price.
611 *
612 * @return int|bool
613 */
614 public function set_price( $post_id = 0, $price = '' ) {
615 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
616 return $this->new_instance->set_price( $post_id, $price );
617 }
618
619 /**
620 * Get the price of a menu item.
621 *
622 * @deprecated 14.3 Moved to Classic Theme Helper package.
623 *
624 * @param int $post_id Post ID.
625 *
626 * @return bool|string
627 */
628 public function get_price( $post_id = 0 ) {
629 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
630 return $this->new_instance->get_price( $post_id );
631 }
632
633 /**
634 * Echo the price of a menu item.
635 *
636 * @deprecated 14.3 Moved to Classic Theme Helper package.
637 *
638 * @param int $post_id Post ID.
639 *
640 * @return void
641 */
642 public function display_price( $post_id = 0 ) {
643 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
644 $this->new_instance->display_price( $post_id );
645 }
646
647 /* Menu Item Loop Markup */
648
649 /**
650 * Get markup for a menu item.
651 * Note: Does not support nested loops.
652 *
653 * @deprecated 14.3 Moved to Classic Theme Helper package.
654 *
655 * @param null|string $field The field to get the value for.
656 *
657 * @return array
658 */
659 public function get_menu_item_loop_markup( $field = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
660 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
661 return $this->new_instance->get_menu_item_loop_markup( $field );
662 }
663
664 /**
665 * Sets up the loop markup.
666 * Attached to the 'template_include' *filter*,
667 * which fires only during a real blog view (not in admin, feeds, etc.)
668 *
669 * @deprecated 14.3 Moved to Classic Theme Helper package.
670 *
671 * @param string $template Template File.
672 *
673 * @return string Template File. VERY Important.
674 */
675 public function setup_menu_item_loop_markup__in_filter( $template ) {
676 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
677 return $this->new_instance->setup_menu_item_loop_markup__in_filter( $template );
678 }
679
680 /**
681 * If the Query is a Menu Item Query, start outputing the Menu Item Loop Marku
682 * Attached to the 'loop_start' action.
683 *
684 * @deprecated 14.3 Moved to Classic Theme Helper package.
685 *
686 * @param WP_Query $query Post query.
687 *
688 * @return void
689 */
690 public function start_menu_item_loop( $query ) {
691 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
692 $this->new_instance->start_menu_item_loop( $query );
693 }
694
695 /**
696 * Outputs the Menu Item Loop Marku
697 * Attached to the 'the_post' action.
698 *
699 * @deprecated 14.3 Moved to Classic Theme Helper package.
700 *
701 * @param WP_Post $post Post object.
702 *
703 * @return void
704 */
705 public function menu_item_loop_each_post( $post ) {
706 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
707 $this->new_instance->menu_item_loop_each_post( $post );
708 }
709
710 /**
711 * If the Query is a Menu Item Query, stop outputing the Menu Item Loop Marku
712 * Attached to the 'loop_end' action.
713 *
714 * @deprecated 14.3 Moved to Classic Theme Helper package.
715 *
716 * @param WP_Query $query Post query.
717 *
718 * @return void
719 */
720 public function stop_menu_item_loop( $query ) {
721 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
722 $this->new_instance->stop_menu_item_loop( $query );
723 }
724
725 /**
726 * Outputs the Menu Group Header
727 *
728 * @deprecated 14.3 Moved to Classic Theme Helper package.
729 *
730 * @return void
731 */
732 public function menu_item_loop_header() {
733 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
734 $this->new_instance->menu_item_loop_header();
735 }
736
737 /**
738 * Outputs a Menu Item Markup element opening tag
739 *
740 * @deprecated 14.3 Moved to Classic Theme Helper package.
741 *
742 * @param string $field - Menu Item Markup settings field.
743 *
744 * @return void
745 */
746 public function menu_item_loop_open_element( $field ) {
747 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
748 $this->new_instance->menu_item_loop_open_element( $field );
749 }
750
751 /**
752 * Outputs a Menu Item Markup element closing tag
753 *
754 * @deprecated 14.3 Moved to Classic Theme Helper package.
755 *
756 * @param string $field - Menu Item Markup settings field.
757 *
758 * @return void
759 */
760 public function menu_item_loop_close_element( $field ) {
761 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
762 $this->new_instance->menu_item_loop_close_element( $field );
763 }
764
765 /**
766 * Returns a Menu Item Markup element's class attribute.
767 *
768 * @deprecated 14.3 Moved to Classic Theme Helper package.
769 *
770 * @param string $class Class name.
771 *
772 * @return string HTML class attribute with leading whitespace.
773 */
774 public function menu_item_loop_class( $class ) {
775 _deprecated_function( __FUNCTION__, 'jetpack-14.3' );
776 return $this->new_instance->menu_item_loop_class( $class );
777 }
778 }
779 }
780