How blacksk81/pizzeriatheme works
Project type and purpose
• This is a WordPress theme (“pizzeriaTheme”) built with Bootstrap 4 for a pizzeria website.
• It bundles the “Advanced Custom Fields” (ACF) plugin and provides reservation functionality, Google Maps integration, and Google reCAPTCHA.
File structure
• Top-level theme files (style.css, functions.php, header.php, footer.php, page-*.php, single.php, index.php).
• Asset directories (css/, js/, images/, webfonts/).
• Template partials under parts/ (hero, form-reserva).
• Custom logic under inc/ (admin-options, database-reservations, logic-reservations, shortcodes).
• Bundled plugin under advanced-custom-fields/.
• Admin UI overrides under admin-parts/.
README insights
• Confirms use of ACF plugin, Bootstrap 4, Google Maps & reCAPTCHA APIs, WP Duplicator zip for full environment.
Components
a. Presentation Layer
• Web Browser (User)
• Theme front-end assets (Bootstrap CSS/JS, theme CSS, scripts.js, lightbox, FontAwesome)
• Template hierarchy (front-page.php, page-*.php, single.php)
• Template partials (parts/hero, parts/form-reserva, sidebar, searchform)
b. Application Layer
• WordPress Core (PHP engine, routing, loop, theme hooks)
• Theme functions (functions.php, inc/shortcodes.php, admin-options.php)
• ACF Plugin (advanced-custom-fields/core controllers, fields, views)
• Custom reservation logic (inc/logic-reservations.php)
• Reservation data access (inc/database-reservations.php)
• Admin UI overrides (admin-parts/theme-settings.php, view-reservation-list.php)
c. Data Layer
• MySQL Database (wp_posts, wp_postmeta for ACF fields, custom reservation tables if any)
d. External Services
• Google Maps API (via front-end JS)
• Google reCAPTCHA API (via contact/reservation form)
• WP Duplicator (deployment artifact)
Relationships and interactions
• Browser → Web server: HTTP(S) requests for pages, assets, AJAX.
• WordPress Core → Theme: theme hooks, template loader, enqueues CSS/JS.
• Theme → ACF Plugin: registers field groups, renders custom fields in admin & front-end.
• Theme → inc/logic-reservations: processes form submissions, calls database-reservations.
• logic-reservations → MySQL: reads/writes reservation records.
• Front-end JS → Google APIs: map display, CAPTCHA validation.
• Admin UI parts → WordPress Dashboard: custom settings page & reservation list.
Architectural patterns and design principles
• Layered architecture: Presentation → Application → Data.
• WP hook system (action/filters) for extensibility.
• MVC-style separation: templates (View), inc/logic (Controller), database scripts (Model).
• Modularization via inc/, parts/, and plugin folder.
Detail
• Every folder as a sub-component: parts/, inc/, advanced-custom-fields/.
• Files: functions.php (enqueue, hooks), logic-reservations.php (business rules), database-reservations.php (SQL queries), advanced-custom-fields/core/controllers/etc.