- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
How to Create Reusable Components for WordPress, Using PHP
If you are developing your own theme or plugin, it is useful to structure anything that is displayed on the front-end as a component.
In this video, I will explain a useful architecture that can be used to develop PHP based components. This architecture is very useful for developing any custom component, such as buttons, post grids, or anything else.
You will learn about:
- A proper file and folder structure for your code
- Using object oriented programming practices to create modular code
- Separate logic from templates
- Using modern bundles to bundle your assets (JavaScript and CSS)
00:00 Start
00:29 Prerequisites
01:52 Plugin Setup
03:49 OOP & Autoloading Setup
11:19 The Plugin Main Class
15:27 Autoloading Explained
17:47 The Component Class
31:21 Example Component Class
35:37 The Component Template
37:37 Implementing Components
42:53 Bundling Assets with ESBuild
47:16 Enqueueing Assets
50:26 Conclusion
This video is aimed at plugin and theme developers. You can read the article here: https://makeitwork.press/reusable-components-wordpress/
The code is also available on Github:
https://github.com/makeitworkpress/wp-php-components-example
Check me out at:
https://makeitwork.press
Follow me on social media:
Twitter: https://twitter.com/makeitworkpress/
LinkedIn: https://www.linkedin.com/company/make-it-workpress/
Github: https://github.com/makeitworkpress/
My videos may contain affiliate links to fund the time spent on creating, testing and, reviewing. This won't cost you anything extra, but brings me some extra bread to the table.
Видео How to Create Reusable Components for WordPress, Using PHP канала Make it WorkPress
In this video, I will explain a useful architecture that can be used to develop PHP based components. This architecture is very useful for developing any custom component, such as buttons, post grids, or anything else.
You will learn about:
- A proper file and folder structure for your code
- Using object oriented programming practices to create modular code
- Separate logic from templates
- Using modern bundles to bundle your assets (JavaScript and CSS)
00:00 Start
00:29 Prerequisites
01:52 Plugin Setup
03:49 OOP & Autoloading Setup
11:19 The Plugin Main Class
15:27 Autoloading Explained
17:47 The Component Class
31:21 Example Component Class
35:37 The Component Template
37:37 Implementing Components
42:53 Bundling Assets with ESBuild
47:16 Enqueueing Assets
50:26 Conclusion
This video is aimed at plugin and theme developers. You can read the article here: https://makeitwork.press/reusable-components-wordpress/
The code is also available on Github:
https://github.com/makeitworkpress/wp-php-components-example
Check me out at:
https://makeitwork.press
Follow me on social media:
Twitter: https://twitter.com/makeitworkpress/
LinkedIn: https://www.linkedin.com/company/make-it-workpress/
Github: https://github.com/makeitworkpress/
My videos may contain affiliate links to fund the time spent on creating, testing and, reviewing. This won't cost you anything extra, but brings me some extra bread to the table.
Видео How to Create Reusable Components for WordPress, Using PHP канала Make it WorkPress
Комментарии отсутствуют
Информация о видео
20 июля 2022 г. 17:14:30
00:51:19
Другие видео канала




















