wpfoodmanager / wp-food-manager

WP Food Manager is fully responsive and mobile friendly food menu display plugin for restaurant, cafes, bars, coffee house, fast food. It is a standalone WordPress plugin which allows you to easily create food item with name, description, Excerpt (used as short description), image and price.
https://wpfoodmanager.com
GNU General Public License v3.0
5 stars 2 forks source link

Function must be in related file #567

Open ritakikani opened 2 months ago

ritakikani commented 2 months ago

In previous code(version), there is all action-hook and filter-hooks are in 1 file only either it's admin related or front-end related, but from now adminpanel related hooks must be in related file only.

ex.

add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'), 10); above hook is related to admin-side so do not write this hook in wpfm-restaurant-manager-action-hooks.php but this must be in wpfm-restaurant-manager-admin.php

ex. add_action('add_meta_boxes', array($this, 'add_meta_boxes')); above hook is related to write-panel, so it must be inside wpfm-restaurant-manager-writepanels.php file not in wpfm-restaurant-manager-action-hooks.php.

ritakikani commented 1 week ago

These files should be in else condition

image

ritakikani commented 1 week ago

Why this code used ?

image

ritakikani commented 1 week ago

Need indentation :

image

ritakikani commented 1 week ago

Need to change variable name :

image

ritakikani commented 1 week ago

This action should be in forms.php file construct function, and the function also should be there in forms.php file.

image

ritakikani commented 1 week ago

These 3 action should in cache-helper.php

image

ritakikani commented 1 week ago

These all should be in cache-helpers.php class

image

ritakikani commented 1 week ago

These must be in post-types.php file.

image

image

ritakikani commented 1 week ago

These should be in ajax.php file

image

ritakikani commented 1 week ago

According to me, these action is not used anywhere, so please check if not used then remove it.

image