Skip to content

Commit e141e28

Browse files
committed
update documentation
1 parent c9d71e9 commit e141e28

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

documentation/content/docs/development.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Route callbacks are functions defined as controller methods. Controller files ar
4444

4545
## How to add new page to admin panel
4646

47-
* Create a new file in `js/src/pages/{your-page-slug}.jsx` directory.
48-
* Add a new route in `js/src/routes.jsx` file.
49-
* Import the new page component and register it in `js/src/routes.jsx` file.
47+
* Create a new file in `src/admin/pages/{your-page-slug}.jsx` directory.
48+
* Add a new route in `src/admin/routes.jsx` file.
49+
* Import the new page component and register it in `src/admin/routes.jsx` file.
5050
* Add a new menu item in `includes/Admin/Menu.php` file by copying the existing menu item and changing the name, slug, component etc based on the new page.
5151
* If it needs to store any data in database then add a new model in `includes/Models/{YourCustomModel}.php` file. And migration file in `/database/migrations` directory.
5252
* If it needs to manipulate data in database then add a new controller in `includes/Controllers/{YourCustomController}/Actions.php` file.
@@ -55,9 +55,9 @@ Route callbacks are functions defined as controller methods. Controller files ar
5555

5656
## How to add new component
5757

58-
* Create a new file in `js/src/components/{your-component-name}/` directory.
59-
* Use the component in `js/src/pages/{your-page-slug}.jsx` file.
60-
* ShadcnUI components are located in `js/src/components/ui` directory.
58+
* Create a new file in `src/admin/components/{your-component-name}/` directory.
59+
* Use the component in `src/admin/pages/{your-page-slug}.jsx` file.
60+
* ShadcnUI components are located in `src/admin/components/ui` directory.
6161

6262
## Pass data from backend to frontend as javascript object.
6363
* If you want to pass data from backend to frontend as javascript object then add key value pari in `/includes/Frontend/Frontend.php` file in `get_data` method. This data will be available in frontend as `wordpressPluginBoilerplate` object or which is defined in `const OBJ_NAME` variable in `Frontend.php` file.

0 commit comments

Comments
 (0)