diff --git a/.htaccess b/.htaccess index e2bbc23..77e1e87 100644 --- a/.htaccess +++ b/.htaccess @@ -1,18 +1,10 @@ -DirectoryIndex index.php index.html -Options -Indexes -Options -MultiViews - +# BEGIN WordPress + RewriteEngine On - -# 0) Serve existing files/directories as-is -RewriteCond %{REQUEST_FILENAME} -f [OR] -RewriteCond %{REQUEST_FILENAME} -d -RewriteRule ^ - [L] - -# 1) Internal map: /page or /page/ -> /page.php (if such PHP file exists) -RewriteCond %{REQUEST_FILENAME}.php -f -RewriteRule ^(.+?)/?$ $1.php [L] - -# 2) Optional: strip trailing slash for non-directories (keeps .php links working) +RewriteBase / +RewriteRule ^index\.php$ - [L] +RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.+)/$ $1 [R=301,L] +RewriteRule . /index.php [L] + +# END WordPress diff --git a/admin_credentials.txt b/admin_credentials.txt new file mode 100644 index 0000000..a5e6b23 --- /dev/null +++ b/admin_credentials.txt @@ -0,0 +1,4 @@ +WordPress Admin Credentials: +URL: https://nazar-kebap-website-febe.dev.flatlogic.app/wp-admin +Username: admin +Password: SnGlSaQ9VNSqHB4u diff --git a/assets/vm-shot-2026-01-26T11-35-05-786Z.jpg b/assets/vm-shot-2026-01-26T11-35-05-786Z.jpg new file mode 100644 index 0000000..e9aa560 Binary files /dev/null and b/assets/vm-shot-2026-01-26T11-35-05-786Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T11-35-21-768Z.jpg b/assets/vm-shot-2026-01-26T11-35-21-768Z.jpg new file mode 100644 index 0000000..b08d88a Binary files /dev/null and b/assets/vm-shot-2026-01-26T11-35-21-768Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T11-35-30-801Z.jpg b/assets/vm-shot-2026-01-26T11-35-30-801Z.jpg new file mode 100644 index 0000000..b08d88a Binary files /dev/null and b/assets/vm-shot-2026-01-26T11-35-30-801Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T11-39-15-260Z.jpg b/assets/vm-shot-2026-01-26T11-39-15-260Z.jpg new file mode 100644 index 0000000..b08d88a Binary files /dev/null and b/assets/vm-shot-2026-01-26T11-39-15-260Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T11-54-24-787Z.jpg b/assets/vm-shot-2026-01-26T11-54-24-787Z.jpg new file mode 100644 index 0000000..54c0d09 Binary files /dev/null and b/assets/vm-shot-2026-01-26T11-54-24-787Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T11-54-38-389Z.jpg b/assets/vm-shot-2026-01-26T11-54-38-389Z.jpg new file mode 100644 index 0000000..b08d88a Binary files /dev/null and b/assets/vm-shot-2026-01-26T11-54-38-389Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T11-56-16-929Z.jpg b/assets/vm-shot-2026-01-26T11-56-16-929Z.jpg new file mode 100644 index 0000000..b08d88a Binary files /dev/null and b/assets/vm-shot-2026-01-26T11-56-16-929Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T13-33-13-586Z.jpg b/assets/vm-shot-2026-01-26T13-33-13-586Z.jpg new file mode 100644 index 0000000..d4da4ed Binary files /dev/null and b/assets/vm-shot-2026-01-26T13-33-13-586Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T13-41-42-697Z.jpg b/assets/vm-shot-2026-01-26T13-41-42-697Z.jpg new file mode 100644 index 0000000..4907d12 Binary files /dev/null and b/assets/vm-shot-2026-01-26T13-41-42-697Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T13-43-33-368Z.jpg b/assets/vm-shot-2026-01-26T13-43-33-368Z.jpg new file mode 100644 index 0000000..04a2163 Binary files /dev/null and b/assets/vm-shot-2026-01-26T13-43-33-368Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T14-46-07-412Z.jpg b/assets/vm-shot-2026-01-26T14-46-07-412Z.jpg new file mode 100644 index 0000000..384a225 Binary files /dev/null and b/assets/vm-shot-2026-01-26T14-46-07-412Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T14-58-14-516Z.jpg b/assets/vm-shot-2026-01-26T14-58-14-516Z.jpg new file mode 100644 index 0000000..384a225 Binary files /dev/null and b/assets/vm-shot-2026-01-26T14-58-14-516Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T14-58-25-621Z.jpg b/assets/vm-shot-2026-01-26T14-58-25-621Z.jpg new file mode 100644 index 0000000..384a225 Binary files /dev/null and b/assets/vm-shot-2026-01-26T14-58-25-621Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T14-58-42-937Z.jpg b/assets/vm-shot-2026-01-26T14-58-42-937Z.jpg new file mode 100644 index 0000000..384a225 Binary files /dev/null and b/assets/vm-shot-2026-01-26T14-58-42-937Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T15-04-37-249Z.jpg b/assets/vm-shot-2026-01-26T15-04-37-249Z.jpg new file mode 100644 index 0000000..54c0d09 Binary files /dev/null and b/assets/vm-shot-2026-01-26T15-04-37-249Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T15-04-49-828Z.jpg b/assets/vm-shot-2026-01-26T15-04-49-828Z.jpg new file mode 100644 index 0000000..b08d88a Binary files /dev/null and b/assets/vm-shot-2026-01-26T15-04-49-828Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T15-20-42-350Z.jpg b/assets/vm-shot-2026-01-26T15-20-42-350Z.jpg new file mode 100644 index 0000000..1cd6971 Binary files /dev/null and b/assets/vm-shot-2026-01-26T15-20-42-350Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T15-20-58-875Z.jpg b/assets/vm-shot-2026-01-26T15-20-58-875Z.jpg new file mode 100644 index 0000000..04a2163 Binary files /dev/null and b/assets/vm-shot-2026-01-26T15-20-58-875Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T15-21-19-157Z.jpg b/assets/vm-shot-2026-01-26T15-21-19-157Z.jpg new file mode 100644 index 0000000..5d5414a Binary files /dev/null and b/assets/vm-shot-2026-01-26T15-21-19-157Z.jpg differ diff --git a/assets/vm-shot-2026-01-26T15-21-45-883Z.jpg b/assets/vm-shot-2026-01-26T15-21-45-883Z.jpg new file mode 100644 index 0000000..1281974 Binary files /dev/null and b/assets/vm-shot-2026-01-26T15-21-45-883Z.jpg differ diff --git a/assets/vm-shot-2026-01-27T08-23-41-822Z.jpg b/assets/vm-shot-2026-01-27T08-23-41-822Z.jpg new file mode 100644 index 0000000..1cd6971 Binary files /dev/null and b/assets/vm-shot-2026-01-27T08-23-41-822Z.jpg differ diff --git a/assets/vm-shot-2026-01-27T08-23-57-939Z.jpg b/assets/vm-shot-2026-01-27T08-23-57-939Z.jpg new file mode 100644 index 0000000..1281974 Binary files /dev/null and b/assets/vm-shot-2026-01-27T08-23-57-939Z.jpg differ diff --git a/assets/vm-shot-2026-01-27T08-24-19-323Z.jpg b/assets/vm-shot-2026-01-27T08-24-19-323Z.jpg new file mode 100644 index 0000000..735e176 Binary files /dev/null and b/assets/vm-shot-2026-01-27T08-24-19-323Z.jpg differ diff --git a/assets/vm-shot-2026-01-27T08-24-32-288Z.jpg b/assets/vm-shot-2026-01-27T08-24-32-288Z.jpg new file mode 100644 index 0000000..99857ca Binary files /dev/null and b/assets/vm-shot-2026-01-27T08-24-32-288Z.jpg differ diff --git a/wp-config.php b/wp-config.php index df7ef13..9121680 100644 --- a/wp-config.php +++ b/wp-config.php @@ -1,117 +1,127 @@ -0=J/OSQlm/f#+mgv4`!W]?U(Bi&qcB2 Wd7JkZ]9Leg2%1/;NfU'); -define('NONCE_KEY', 'M&12QrpFOl5F1s:x9x#mNGl;3uh}??TGLL!-]+w&:^@D?mMUj)=T&xJ=*U6_b*fw'); -define('AUTH_SALT', '>|-,ma+[0z@U,GCS%!1oA43A-S561p7IQCUTe%!OT+>(*]j,WhQ @*rI;A@N[80E'); -define('SECURE_AUTH_SALT', 'E]9M8Aj5)2abS-_+7m9z4wi{A[!r1dG>AMS qk$&~B %P1p'); - -/**#@-*/ - -/** - * WordPress database table prefix. - * - * You can have multiple installations in one database if you give each - * a unique prefix. Only numbers, letters, and underscores please! - * - * At the installation time, database tables are created with the specified prefix. - * Changing this value after WordPress is installed will make your site think - * it has not been installed. - * - * @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#table-prefix - */ -$table_prefix = 'wp_'; - -/** - * For developers: WordPress debugging mode. - * - * Change this to true to enable the display of notices during development. - * It is strongly recommended that plugin and theme developers use WP_DEBUG - * in their development environments. - * - * For information on other constants that can be used for debugging, - * visit the documentation. - * - * @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/ - */ -define( 'WP_DEBUG', false ); - -/* Add any custom values between this line and the "stop editing" line. */ - - - - -/* That's all, stop editing! Happy publishing. */ - -/** Absolute path to the WordPress directory. */ -if ( ! defined( 'ABSPATH' ) ) { - define( 'ABSPATH', __DIR__ . '/' ); -} - -/** Sets up WordPress vars and included files. */ -require_once ABSPATH . 'wp-settings.php'; +0=J/OSQlm/f#+mgv4`!W]?U(Bi&qcB2 Wd7JkZ]9Leg2%1/;NfU'); +define('NONCE_KEY', 'M&12QrpFOl5F1s:x9x#mNGl;3uh}??TGLL!-]+w&:^@D?mMUj)=T&xJ=*U6_b*fw'); +define('AUTH_SALT', '>|-,ma+[0z@U,GCS%!1oA43A-S561p7IQCUTe%!OT+>(*]j,WhQ @*rI;A@N[80E'); +define('SECURE_AUTH_SALT', 'E]9M8Aj5)2abS-_+7m9z4wi{A[!r1dG>AMS qk$&~B %P1p'); + +/**#@-*/ + +/** + * WordPress database table prefix. + * + * You can have multiple installations in one database if you give each + * a unique prefix. Only numbers, letters, and underscores please! + * + * At the installation time, database tables are created with the specified prefix. + * Changing this value after WordPress is installed will make your site think + * it has not been installed. + * + * @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#table-prefix + */ +$table_prefix = 'wp_'; + +/** + * For developers: WordPress debugging mode. + * + * Change this to true to enable the display of notices during development. + * It is strongly recommended that plugin and theme developers use WP_DEBUG + * in their development environments. + * + * For information on other constants that can be used for debugging, + * visit the documentation. + * + * @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/ + */ +define( 'WP_DEBUG', false ); + +/* Add any custom values between this line and the "stop editing" line. */ + + + + +/* That's all, stop editing! Happy publishing. */ + +/** Absolute path to the WordPress directory. */ +if ( ! defined( 'ABSPATH' ) ) { + define( 'ABSPATH', __DIR__ . '/' ); +} + +/** Sets up WordPress vars and included files. */ +require_once ABSPATH . 'wp-settings.php'; diff --git a/wp-content/plugins/fl-project-parameter/fl-project-parameter.php b/wp-content/plugins/fl-project-parameter/fl-project-parameter.php new file mode 100644 index 0000000..591ca05 --- /dev/null +++ b/wp-content/plugins/fl-project-parameter/fl-project-parameter.php @@ -0,0 +1,63 @@ + :where(:not(.alignleft):not(.alignright):not(.alignfull)), +body.nazar-site .wp-block-group.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { + max-width: 1180px; +} + +body.nazar-site header.wp-block-template-part, +body.nazar-site footer.wp-block-template-part { + background: rgba(18, 15, 13, 0.94); + color: var(--nazar-text); +} + +body.nazar-site header.wp-block-template-part a, +body.nazar-site footer.wp-block-template-part a, +body.nazar-site .wp-block-navigation .wp-block-navigation-item__content { + color: var(--nazar-text); +} + +body.nazar-site .wp-block-site-title a, +body.nazar-site .wp-block-site-title { + color: var(--nazar-text); + font-weight: 700; + letter-spacing: 0.02em; +} + +body.nazar-site .wp-element-button, +body.nazar-site .wp-block-button__link { + background: linear-gradient(135deg, var(--nazar-primary), #e7b357); + color: #1b120d; + border-radius: 999px; + padding: 0.95rem 1.45rem; + font-weight: 700; + box-shadow: 0 12px 30px rgba(200, 141, 43, 0.25); + border: none; +} + +body.nazar-site .wp-block-button.is-style-outline .wp-block-button__link, +body.nazar-site .nazar-button-secondary { + background: transparent; + color: var(--nazar-text); + border: 1px solid rgba(255,255,255,0.25); + box-shadow: none; +} + +.nazar-hero { + position: relative; + overflow: hidden; + margin-top: 0; + padding: clamp(3rem, 4vw, 5rem); + border-radius: 36px; + background: + radial-gradient(circle at top left, rgba(231,179,87,0.22), transparent 25%), + radial-gradient(circle at bottom right, rgba(159,47,29,0.35), transparent 30%), + linear-gradient(135deg, #18110f 0%, #2a1b14 55%, #0f0d0c 100%); + color: var(--nazar-text); + box-shadow: var(--nazar-shadow); +} + +.nazar-hero::after { + content: ""; + position: absolute; + inset: 0; + background: linear-gradient(90deg, rgba(255,255,255,0.06), transparent 30%); + pointer-events: none; +} + +.nazar-eyebrow { + display: inline-flex; + gap: 0.5rem; + align-items: center; + padding: 0.45rem 0.85rem; + border-radius: 999px; + background: rgba(255,255,255,0.08); + color: #ffe3ad; + font-size: 0.92rem; + margin-bottom: 1rem; +} + +.nazar-hero h1, +.nazar-section-dark h2, +.nazar-page-hero h1 { + font-size: clamp(2.6rem, 6vw, 5.2rem); + line-height: 0.96; + margin-bottom: 1rem; +} + +.nazar-lead { + font-size: 1.15rem; + color: rgba(245, 238, 231, 0.9); + max-width: 42rem; +} + +.nazar-info-grid, +.nazar-card-grid, +.nazar-review-grid, +.nazar-menu-grid, +.nazar-contact-grid { + display: grid; + gap: 1.35rem; +} + +.nazar-info-grid { + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + margin-top: 2rem; +} + +.nazar-card-grid, +.nazar-review-grid, +.nazar-menu-grid, +.nazar-contact-grid { + grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); +} + +.nazar-card, +.nazar-info-card, +.nazar-review, +.nazar-menu-card, +.nazar-contact-card, +.nazar-form-wrap { + background: #fff; + border: 1px solid rgba(36,27,22,0.08); + border-radius: var(--nazar-radius); + padding: 1.5rem; + box-shadow: 0 16px 40px rgba(53, 33, 22, 0.08); +} + +.nazar-hero .nazar-info-card { + background: rgba(255,255,255,0.08); + border-color: rgba(255,255,255,0.14); + color: var(--nazar-text); + box-shadow: none; +} + +.nazar-card h3, +.nazar-menu-card h3, +.nazar-contact-card h3, +.nazar-review strong, +.nazar-info-card strong { + margin-top: 0; + margin-bottom: 0.35rem; + display: block; +} + +.nazar-section { + padding: clamp(2.5rem, 3vw, 4rem) 0; +} + +.nazar-section-dark { + padding: clamp(2.5rem, 3vw, 4rem); + border-radius: 32px; + background: linear-gradient(135deg, #1d1613, #34231d); + color: var(--nazar-text); + box-shadow: var(--nazar-shadow); +} + +.nazar-section-dark p, +.nazar-section-dark li { + color: rgba(245,238,231,0.88); +} + +.nazar-kicker { + color: var(--nazar-secondary); + text-transform: uppercase; + letter-spacing: 0.11em; + font-size: 0.85rem; + font-weight: 700; + margin-bottom: 0.4rem; +} + +.nazar-review { + position: relative; +} + +.nazar-review::before { + content: "★"; + position: absolute; + top: 1rem; + right: 1rem; + color: var(--nazar-primary); + font-size: 1.2rem; +} + +.nazar-form-wrap { + background: linear-gradient(180deg, #fff, #fff7ef); +} + +.nazar-reservation-form label { + display: grid; + gap: 0.45rem; + margin-bottom: 1rem; +} + +.nazar-form-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 1rem; +} + +.nazar-reservation-form input, +.nazar-reservation-form select, +.nazar-reservation-form textarea { + width: 100%; + border-radius: 16px; + border: 1px solid rgba(36,27,22,0.12); + background: rgba(255,255,255,0.94); + padding: 0.9rem 1rem; + font: inherit; +} + +.nazar-form-note { + color: #6c5b4e; + font-size: 0.95rem; +} + +.nazar-alert { + padding: 1rem 1.15rem; + border-radius: 16px; + margin-bottom: 1rem; +} + +.nazar-alert-success { + background: #edf9ee; + color: #215f25; + border: 1px solid #b8e0ba; +} + +.nazar-alert-error { + background: #fff0ee; + color: #8f2b1f; + border: 1px solid #f0c0b9; +} + +.nazar-mini-list { + list-style: none; + padding: 0; + margin: 0; + display: grid; + gap: 0.75rem; +} + +.nazar-mini-list li { + display: flex; + justify-content: space-between; + gap: 1rem; + padding-bottom: 0.75rem; + border-bottom: 1px solid rgba(36,27,22,0.08); +} + +.nazar-mini-list li:last-child { + border-bottom: none; + padding-bottom: 0; +} + +.nazar-page-hero { + padding: 2.25rem 0 0.75rem; +} + +.nazar-page-hero h1 { + font-size: clamp(2.3rem, 5vw, 4.2rem); + margin-bottom: 0.6rem; +} + +.nazar-inline-actions { + display: flex; + flex-wrap: wrap; + gap: 0.9rem; + margin-top: 1.3rem; +} + +.nazar-note { + color: #6c5b4e; + font-size: 0.95rem; +} + +.nazar-legal { + background: #fff; + padding: 2rem; + border-radius: 24px; + box-shadow: 0 12px 30px rgba(53,33,22,0.07); +} + +@media (max-width: 781px) { + .nazar-hero, + .nazar-section-dark { + border-radius: 24px; + padding: 2rem; + } + + body.nazar-site .wp-element-button, + body.nazar-site .wp-block-button__link { + width: 100%; + justify-content: center; + text-align: center; + } +} + +.nazar-availability-note { + margin: 0 0 1rem; + color: #6c5b4e; + font-size: 0.95rem; +} + +.nazar-reservation-form select[disabled] { + opacity: 0.7; + cursor: not-allowed; +} + +body.nazar-site header.wp-block-template-part { + position: sticky; + top: 0; + z-index: 50; + backdrop-filter: blur(18px); + box-shadow: 0 10px 32px rgba(0,0,0,0.18); +} + +body.nazar-site .wp-block-navigation { + gap: 1.1rem; +} + +body.nazar-site .wp-block-navigation .wp-block-navigation-item__content { + padding: 0.35rem 0.15rem; + font-weight: 600; + position: relative; +} + +body.nazar-site .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after, +body.nazar-site .wp-block-navigation .wp-block-navigation-item__content:hover::after { + content: ""; + position: absolute; + left: 0; + right: 0; + bottom: -0.25rem; + height: 2px; + background: linear-gradient(90deg, var(--nazar-primary), #f2cb7a); +} + +.nazar-page-hero { + margin-bottom: 1.5rem; + padding: clamp(2rem, 3vw, 3rem); + border-radius: 28px; + background: linear-gradient(135deg, rgba(200,141,43,0.12), rgba(159,47,29,0.08) 60%, rgba(255,255,255,0.85)); + border: 1px solid rgba(36,27,22,0.08); + box-shadow: 0 20px 50px rgba(53, 33, 22, 0.08); +} + +.nazar-page-hero h1 { + margin-bottom: 0.75rem; +} + +.nazar-stat-grid, +.nazar-process-grid, +.nazar-feature-split { + display: grid; + gap: 1rem; +} + +.nazar-stat-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} + +.nazar-stat-card, +.nazar-process-step { + border-radius: 22px; + padding: 1.2rem; + border: 1px solid rgba(255,255,255,0.12); + background: rgba(255,255,255,0.08); +} + +.nazar-stat-card strong, +.nazar-process-step strong { + display: block; + font-size: 1.1rem; + margin-bottom: 0.25rem; +} + +.nazar-process-grid { + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); +} + +.nazar-process-step { + background: #fff; + border: 1px solid rgba(36,27,22,0.08); + box-shadow: 0 16px 40px rgba(53, 33, 22, 0.08); +} + +.nazar-process-step strong { + width: 2.1rem; + height: 2.1rem; + border-radius: 999px; + display: inline-grid; + place-items: center; + background: linear-gradient(135deg, var(--nazar-primary), #f2cb7a); + color: #1b120d; +} + +.nazar-feature-split { + grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); +} + +.nazar-cta-band { + border-radius: 28px; + background: linear-gradient(135deg, rgba(159,47,29,0.08), rgba(200,141,43,0.16)); + border: 1px solid rgba(36,27,22,0.08); + box-shadow: 0 16px 40px rgba(53, 33, 22, 0.08); + padding: clamp(2rem, 3vw, 3rem); +} + +.nazar-menu-grid-wide { + grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); +} + +.nazar-inline-actions { + display: flex; + flex-wrap: wrap; + gap: 0.75rem; + margin-top: 1rem; +} + +.nazar-legal { + background: #fff; + border-radius: 24px; + border: 1px solid rgba(36,27,22,0.08); + padding: 1.5rem; + box-shadow: 0 16px 40px rgba(53, 33, 22, 0.08); +} + +.nazar-availability-note { + margin: 0.25rem 0 1rem; + color: #6c5b4e; + font-size: 0.95rem; +} + +@media (max-width: 781px) { + .nazar-stat-grid { + grid-template-columns: 1fr; + } + + .nazar-hero, + .nazar-page-hero, + .nazar-section-dark, + .nazar-cta-band { + border-radius: 24px; + } +} diff --git a/wp-content/plugins/nazar-kebap-mvp/nazar-kebap-mvp.php b/wp-content/plugins/nazar-kebap-mvp/nazar-kebap-mvp.php new file mode 100644 index 0000000..1b977c9 --- /dev/null +++ b/wp-content/plugins/nazar-kebap-mvp/nazar-kebap-mvp.php @@ -0,0 +1,686 @@ + [ + 'name' => 'Reservierungen', + 'singular_name' => 'Reservierung', + 'menu_name' => 'Reservierungen', + 'add_new_item' => 'Neue Reservierung', + 'edit_item' => 'Reservierung bearbeiten', + 'view_item' => 'Reservierung ansehen', + 'search_items' => 'Reservierungen suchen', + ], + 'public' => false, + 'show_ui' => true, + 'show_in_menu' => true, + 'menu_icon' => 'dashicons-calendar-alt', + 'supports' => ['title'], + 'map_meta_cap' => true, + ]); + } + + public function register_shortcodes() { + add_shortcode('nazar_reservation_form', [$this, 'reservation_form_shortcode']); + } + + public function enqueue_assets() { + $plugin_url = plugin_dir_url(__FILE__); + $plugin_path = plugin_dir_path(__FILE__); + + wp_enqueue_style( + 'nazar-kebap-mvp', + $plugin_url . 'assets/site.css', + [], + filemtime($plugin_path . 'assets/site.css') + ); + + wp_enqueue_script( + 'nazar-kebap-reservations', + $plugin_url . 'assets/reservation.js', + [], + filemtime($plugin_path . 'assets/reservation.js'), + true + ); + + wp_localize_script('nazar-kebap-reservations', 'nazarReservationData', [ + 'ajaxUrl' => admin_url('admin-ajax.php'), + 'nonce' => wp_create_nonce(self::AVAILABILITY_NONCE), + 'messages' => [ + 'chooseDateAndParty' => 'Bitte wählen Sie zuerst Datum und Personenzahl.', + 'loading' => 'Verfügbare Uhrzeiten werden geladen …', + 'empty' => 'Für diese Auswahl ist aktuell keine freie Uhrzeit verfügbar.', + 'error' => 'Die verfügbaren Uhrzeiten konnten gerade nicht geladen werden. Bitte versuchen Sie es erneut.', + ], + ]); + } + + public function body_classes($classes) { + $classes[] = 'nazar-site'; + return $classes; + } + + public function reservation_form_shortcode() { + $status = isset($_GET['reservation']) ? sanitize_key(wp_unslash($_GET['reservation'])) : ''; + $messages = [ + 'success' => 'Danke! Ihre Reservierungsanfrage wurde erfolgreich übermittelt. Sie erhalten in Kürze eine Bestätigung per E-Mail mit allen Buchungsdetails.', + 'error' => 'Bitte prüfen Sie Ihre Eingaben. Alle Pflichtfelder müssen ausgefüllt sein.', + 'conflict' => 'Diese Uhrzeit ist leider nicht mehr verfügbar. Bitte wählen Sie eine andere freie Uhrzeit.', + ]; + + ob_start(); + ?> +
+ +
+ +
+ +
+ + +
+ + + + + + +
+

Bitte wählen Sie zuerst Datum und Personenzahl.

+ +

Reservierungen werden direkt gegen bestehende Buchungen geprüft. Gesperrte Zeiten richten sich nach der Personenzahl: 1 Person = 10 Min., 2 Personen = 15 Min., 3–4 Personen = 30 Min., ab 5 Personen = 60 Min.

+ +
+
+ sanitize_text_field(wp_unslash($_POST['guest_name'] ?? '')), + 'guest_phone' => sanitize_text_field(wp_unslash($_POST['guest_phone'] ?? '')), + 'guest_email' => sanitize_email(wp_unslash($_POST['guest_email'] ?? '')), + 'party_size' => sanitize_text_field(wp_unslash($_POST['party_size'] ?? '')), + 'reservation_date' => sanitize_text_field(wp_unslash($_POST['reservation_date'] ?? '')), + 'reservation_time' => sanitize_text_field(wp_unslash($_POST['reservation_time'] ?? '')), + 'reservation_notes' => sanitize_textarea_field(wp_unslash($_POST['reservation_notes'] ?? '')), + ]; + + if (!$fields['guest_name'] || !$fields['guest_phone'] || !$fields['guest_email'] || !$fields['party_size'] || !$fields['reservation_date'] || !$fields['reservation_time']) { + wp_safe_redirect(add_query_arg('reservation', 'error', $redirect_url)); + exit; + } + + $fields['reservation_time'] = $this->normalize_time($fields['reservation_time']); + + if (!$fields['reservation_time'] || !$this->is_time_available($fields['reservation_date'], $fields['reservation_time'], $fields['party_size'])) { + wp_safe_redirect(add_query_arg('reservation', 'conflict', $redirect_url)); + exit; + } + + $title = sprintf( + 'Reservierung – %s – %s %s', + $fields['guest_name'], + $fields['reservation_date'], + $fields['reservation_time'] + ); + + $post_id = wp_insert_post([ + 'post_type' => self::POST_TYPE, + 'post_status' => 'publish', + 'post_title' => $title, + 'meta_input' => [ + '_guest_name' => $fields['guest_name'], + '_guest_phone' => $fields['guest_phone'], + '_guest_email' => $fields['guest_email'], + '_party_size' => $fields['party_size'], + '_reservation_date' => $fields['reservation_date'], + '_reservation_time' => $fields['reservation_time'], + '_reservation_notes' => $fields['reservation_notes'], + '_reservation_duration' => $this->get_duration_minutes($fields['party_size']), + self::STATUS_META => 'neu', + ], + ]); + + if (is_wp_error($post_id) || !$post_id) { + wp_safe_redirect(add_query_arg('reservation', 'error', $redirect_url)); + exit; + } + + $notification_results = $this->send_new_reservation_notifications($post_id, $fields); + update_post_meta($post_id, '_admin_notification_sent', $notification_results['admin'] ? 'yes' : 'no'); + update_post_meta($post_id, '_customer_notification_sent', $notification_results['customer'] ? 'yes' : 'no'); + update_post_meta($post_id, '_notification_sent_at', current_time('mysql')); + + wp_safe_redirect(add_query_arg('reservation', 'success', home_url('/reservierung/'))); + exit; + } + + public function ajax_get_available_times() { + check_ajax_referer(self::AVAILABILITY_NONCE, 'nonce'); + + $date = sanitize_text_field(wp_unslash($_POST['reservation_date'] ?? '')); + $party_size = sanitize_text_field(wp_unslash($_POST['party_size'] ?? '')); + + if (!$date || !$party_size) { + wp_send_json_error([ + 'message' => 'Datum und Personenzahl sind erforderlich.', + ], 400); + } + + $times = $this->get_available_time_slots($date, $party_size); + $duration = $this->get_duration_minutes($party_size); + + wp_send_json_success([ + 'times' => $times, + 'duration' => $duration, + 'message' => sprintf( + 'Für %s blockiert eine Reservierung %d Minuten. Es werden nur freie Uhrzeiten angezeigt.', + $party_size, + $duration + ), + ]); + } + + public function admin_columns($columns) { + return [ + 'cb' => $columns['cb'], + 'title' => 'Anfrage', + 'reservation_datetime' => 'Datum & Uhrzeit', + 'party_size' => 'Personen', + 'contact' => 'Kontakt', + 'reservation_status' => 'Status', + 'date' => 'Eingegangen', + ]; + } + + public function render_admin_columns($column, $post_id) { + switch ($column) { + case 'reservation_datetime': + echo esc_html(get_post_meta($post_id, '_reservation_date', true)); + echo '
'; + echo esc_html(get_post_meta($post_id, '_reservation_time', true)); + break; + case 'party_size': + echo esc_html(get_post_meta($post_id, '_party_size', true)); + break; + case 'contact': + echo esc_html(get_post_meta($post_id, '_guest_name', true)); + echo '
'; + echo esc_html(get_post_meta($post_id, '_guest_phone', true)); + $email = get_post_meta($post_id, '_guest_email', true); + if ($email) { + echo '
' . esc_html($email); + } + break; + case 'reservation_status': + echo esc_html(ucfirst(get_post_meta($post_id, self::STATUS_META, true) ?: 'neu')); + break; + } + } + + public function add_meta_boxes() { + add_meta_box( + 'nazar_reservation_details', + 'Reservierungsdetails', + [$this, 'render_meta_box'], + self::POST_TYPE, + 'normal', + 'high' + ); + } + + public function render_meta_box($post) { + wp_nonce_field('nazar_save_reservation', 'nazar_save_reservation_nonce'); + $status = get_post_meta($post->ID, self::STATUS_META, true) ?: 'neu'; + ?> + + + + + + + + + + + + + + + + +
NameID, '_guest_name', true)); ?>
TelefonID, '_guest_phone', true)); ?>
E-MailID, '_guest_email', true)); ?>
DatumID, '_reservation_date', true)); ?>
UhrzeitID, '_reservation_time', true)); ?>
PersonenID, '_party_size', true)); ?>
Blockiert bisget_blocked_until_label($post->ID)); ?>
Admin-E-Mailhumanize_notification_status(get_post_meta($post->ID, '_admin_notification_sent', true))); ?>
Kunden-E-Mailhumanize_notification_status(get_post_meta($post->ID, '_customer_notification_sent', true))); ?>
Status-E-Mailhumanize_notification_status(get_post_meta($post->ID, '_status_notification_sent', true))); ?>
HinweiseID, '_reservation_notes', true))); ?>
+ +
+ send_status_update_notification($post_id, $status, $previous_status); + update_post_meta($post_id, '_status_notification_sent', $status_sent ? 'yes' : 'no'); + update_post_meta($post_id, '_status_notification_sent_at', current_time('mysql')); + } + } + + public function get_available_time_slots($date, $party_size) { + if (!$this->is_valid_reservation_date($date) || !$this->parse_party_size($party_size)) { + return []; + } + + $slots = []; + $start = $this->date_time_to_timestamp($date, self::OPENING_TIME); + $end = $this->date_time_to_timestamp($date, self::LAST_BOOKING_TIME); + + if (!$start || !$end || $start > $end) { + return []; + } + + for ($cursor = $start; $cursor <= $end; $cursor += self::TIME_STEP_MINUTES * MINUTE_IN_SECONDS) { + $time = wp_date('H:i', $cursor); + if ($this->is_time_available($date, $time, $party_size)) { + $slots[] = [ + 'value' => $time, + 'label' => $time, + ]; + } + } + + return $slots; + } + + public function is_time_available($date, $time, $party_size, $exclude_post_id = 0) { + if (!$this->is_valid_reservation_date($date)) { + return false; + } + + $time = $this->normalize_time($time); + $party_count = $this->parse_party_size($party_size); + + if (!$time || !$party_count) { + return false; + } + + $requested_start = $this->date_time_to_timestamp($date, $time); + $requested_end = $requested_start ? $requested_start + ($this->get_duration_minutes($party_size) * MINUTE_IN_SECONDS) : false; + + if (!$requested_start || !$requested_end) { + return false; + } + + foreach ($this->get_reservations_for_date($date, $exclude_post_id) as $reservation) { + if (($reservation['status'] ?? '') === 'abgelehnt') { + continue; + } + + if (!$reservation['start'] || !$reservation['end']) { + continue; + } + + if ($requested_start < $reservation['end'] && $requested_end > $reservation['start']) { + return false; + } + } + + return true; + } + + private function send_new_reservation_notifications($post_id, $fields) { + $admin_email = sanitize_email(get_option('admin_email')); + $admin_sent = false; + $customer_sent = false; + + $details = $this->get_reservation_email_details($post_id, $fields); + + if ($admin_email) { + $subject = sprintf('Neue Reservierung: %s am %s um %s', $details['name'], $details['date_label'], $details['time_label']); + $message = implode(" +", [ + 'Eine neue Reservierungsanfrage wurde über die Website gesendet.', + '', + 'Name: ' . $details['name'], + 'Telefon: ' . $details['phone'], + 'E-Mail: ' . $details['email'], + 'Personen: ' . $details['party_size'], + 'Datum: ' . $details['date_label'], + 'Uhrzeit: ' . $details['time_label'], + 'Blockiert bis: ' . $details['blocked_until_label'], + 'Hinweise: ' . ($details['notes'] ?: 'Keine'), + '', + 'Im Admin bearbeiten: ' . admin_url('post.php?post=' . $post_id . '&action=edit'), + ]); + + $admin_sent = wp_mail($admin_email, $subject, $message, $this->get_email_headers()); + } + + if ($details['email']) { + $subject = sprintf('Ihre Reservierungsanfrage bei %s', get_bloginfo('name')); + $message = implode(" +", [ + 'Vielen Dank für Ihre Reservierungsanfrage bei ' . get_bloginfo('name') . '.', + '', + 'Ihre Buchungsdaten:', + 'Name: ' . $details['name'], + 'Telefon: ' . $details['phone'], + 'E-Mail: ' . $details['email'], + 'Personen: ' . $details['party_size'], + 'Datum: ' . $details['date_label'], + 'Uhrzeit: ' . $details['time_label'], + 'Reservierungsdauer: ' . $details['duration_label'], + 'Hinweise: ' . ($details['notes'] ?: 'Keine'), + '', + 'Falls wir Rückfragen haben, melden wir uns unter der angegebenen Telefonnummer oder E-Mail-Adresse.', + 'Telefon Restaurant: +49 781 96643005', + 'Adresse: Saarlandstraße 2, 77652 Offenburg', + ]); + + $customer_sent = wp_mail($details['email'], $subject, $message, $this->get_email_headers()); + } + + return [ + 'admin' => (bool) $admin_sent, + 'customer' => (bool) $customer_sent, + ]; + } + + private function send_status_update_notification($post_id, $new_status, $old_status) { + $email = sanitize_email(get_post_meta($post_id, '_guest_email', true)); + + if (!$email) { + return false; + } + + $details = $this->get_reservation_email_details($post_id); + $status_labels = [ + 'neu' => 'neu', + 'bestätigt' => 'bestätigt', + 'abgelehnt' => 'abgelehnt', + 'erledigt' => 'erledigt', + ]; + + $new_label = $status_labels[$new_status] ?? $new_status; + $old_label = $status_labels[$old_status] ?? $old_status; + + $subject = sprintf('Update zu Ihrer Reservierung bei %s', get_bloginfo('name')); + $message = implode(" +", [ + 'Es gibt ein Update zu Ihrer Reservierung bei ' . get_bloginfo('name') . '.', + '', + 'Bisheriger Status: ' . $old_label, + 'Neuer Status: ' . $new_label, + '', + 'Name: ' . $details['name'], + 'Personen: ' . $details['party_size'], + 'Datum: ' . $details['date_label'], + 'Uhrzeit: ' . $details['time_label'], + '', + 'Bei Fragen erreichen Sie uns unter +49 781 96643005.', + ]); + + return (bool) wp_mail($email, $subject, $message, $this->get_email_headers()); + } + + private function get_reservation_email_details($post_id = 0, $fields = []) { + $name = $fields['guest_name'] ?? get_post_meta($post_id, '_guest_name', true); + $phone = $fields['guest_phone'] ?? get_post_meta($post_id, '_guest_phone', true); + $email = $fields['guest_email'] ?? get_post_meta($post_id, '_guest_email', true); + $party_size = $fields['party_size'] ?? get_post_meta($post_id, '_party_size', true); + $date = $fields['reservation_date'] ?? get_post_meta($post_id, '_reservation_date', true); + $time = $fields['reservation_time'] ?? get_post_meta($post_id, '_reservation_time', true); + $notes = $fields['reservation_notes'] ?? get_post_meta($post_id, '_reservation_notes', true); + + $date_label = $date ? wp_date('d.m.Y', strtotime($date)) : '–'; + $time_label = $this->normalize_time($time) ?: '–'; + $duration = $this->get_duration_minutes($party_size); + $blocked_until_label = '–'; + + if ($date && $time_label) { + $start = $this->date_time_to_timestamp($date, $time_label); + if ($start) { + $blocked_until_label = wp_date('d.m.Y H:i', $start + ($duration * MINUTE_IN_SECONDS)); + } + } + + return [ + 'name' => $name ?: '–', + 'phone' => $phone ?: '–', + 'email' => $email ?: '', + 'party_size' => $party_size ?: '–', + 'date_label' => $date_label, + 'time_label' => $time_label, + 'duration_label' => $duration ? ($duration . ' Minuten') : '–', + 'blocked_until_label' => $blocked_until_label, + 'notes' => $notes ?: '', + ]; + } + + private function get_email_headers() { + $blogname = wp_specialchars_decode(get_bloginfo('name'), ENT_QUOTES); + $admin_email = sanitize_email(get_option('admin_email')); + + return [ + 'Content-Type: text/plain; charset=UTF-8', + sprintf('Reply-To: %s <%s>', $blogname, $admin_email), + ]; + } + + private function humanize_notification_status($status) { + return $status === 'yes' ? 'Gesendet' : ($status === 'no' ? 'Fehlgeschlagen' : '–'); + } + + private function get_reservations_for_date($date, $exclude_post_id = 0) { + $query = new WP_Query([ + 'post_type' => self::POST_TYPE, + 'post_status' => 'publish', + 'posts_per_page' => -1, + 'fields' => 'ids', + 'meta_key' => '_reservation_date', + 'meta_value' => $date, + 'orderby' => 'meta_value', + 'order' => 'ASC', + 'post__not_in' => $exclude_post_id ? [(int) $exclude_post_id] : [], + ]); + + $reservations = []; + + foreach ($query->posts as $post_id) { + $time = $this->normalize_time(get_post_meta($post_id, '_reservation_time', true)); + $party_size = get_post_meta($post_id, '_party_size', true); + $start = $time ? $this->date_time_to_timestamp($date, $time) : false; + $duration = $this->get_duration_minutes($party_size); + + $reservations[] = [ + 'post_id' => $post_id, + 'status' => get_post_meta($post_id, self::STATUS_META, true) ?: 'neu', + 'time' => $time, + 'party_size' => $party_size, + 'duration' => $duration, + 'start' => $start, + 'end' => $start ? $start + ($duration * MINUTE_IN_SECONDS) : false, + ]; + } + + wp_reset_postdata(); + + return $reservations; + } + + private function get_duration_minutes($party_size) { + $count = $this->parse_party_size($party_size); + + if ($count <= 0) { + return 0; + } + + if ($count === 1) { + return 10; + } + + if ($count === 2) { + return 15; + } + + if ($count <= 4) { + return 30; + } + + return 60; + } + + private function parse_party_size($party_size) { + if (is_numeric($party_size)) { + return max(0, (int) $party_size); + } + + if (is_string($party_size) && preg_match('/^(\d+)\+?$/', $party_size, $matches)) { + return max(0, (int) $matches[1]); + } + + return 0; + } + + private function normalize_time($time) { + if (!is_string($time) || $time === '') { + return ''; + } + + $date_time = date_create_from_format('H:i', $time, wp_timezone()) ?: date_create_from_format('H:i:s', $time, wp_timezone()); + + if (!$date_time) { + return ''; + } + + return $date_time->format('H:i'); + } + + private function is_valid_reservation_date($date) { + if (!preg_match('/^\d{4}-\d{2}-\d{2}$/', (string) $date)) { + return false; + } + + $candidate = date_create_immutable_from_format('Y-m-d', $date, wp_timezone()); + + return $candidate && $candidate->format('Y-m-d') === $date; + } + + private function date_time_to_timestamp($date, $time) { + $date_time = date_create_immutable_from_format('Y-m-d H:i', $date . ' ' . $time, wp_timezone()); + + return $date_time ? $date_time->getTimestamp() : false; + } + + private function get_blocked_until_label($post_id) { + $date = get_post_meta($post_id, '_reservation_date', true); + $time = $this->normalize_time(get_post_meta($post_id, '_reservation_time', true)); + $party_size = get_post_meta($post_id, '_party_size', true); + $start = ($date && $time) ? $this->date_time_to_timestamp($date, $time) : false; + + if (!$start) { + return '–'; + } + + $end = $start + ($this->get_duration_minutes($party_size) * MINUTE_IN_SECONDS); + + return wp_date('Y-m-d H:i', $end); + } +} + +$GLOBALS['nazar_kebap_mvp'] = new Nazar_Kebap_MVP(); diff --git a/wp-content/plugins/nazar-kebap-mvp/setup-site.php b/wp-content/plugins/nazar-kebap-mvp/setup-site.php new file mode 100644 index 0000000..e94681e --- /dev/null +++ b/wp-content/plugins/nazar-kebap-mvp/setup-site.php @@ -0,0 +1,524 @@ + 'page', + 'post_title' => $title, + 'post_name' => $slug, + 'post_content' => $content, + 'post_status' => $status, + ]; + + if ($existing) { + $page_args['ID'] = $existing->ID; + return wp_update_post($page_args, true); + } + + return wp_insert_post($page_args, true); +} + +function nazar_home_content($urls) { + return << +
+
+

Nazar Kebap · Offenburg · Restaurant, Grill & Gastlichkeit

+ + + +

Moderne Restaurant-Website mit echter Reservierung statt nur schöner Fassade.

+ + + +

Ob kurzer Lunch, Abendessen mit Freunden oder eine größere Tischanfrage: Auf dieser Website finden Gäste die wichtigsten Informationen sofort, reservieren online und erhalten direkt eine Bestätigung per E-Mail.

+ + + + + + + +
+
ÖffnungszeitenTäglich 09:00 – 00:00 Uhr
+ +
StandortSaarlandstraße 2
77652 Offenburg
+
ReservierungVerfügbare Zeiten werden live geprüft
+
+
+ + + +
+

Premium-Auftritt

+ + +

Alles klar strukturiert: entdecken, reservieren, vorbeikommen.

+ + +
+

Mehrere klare Seiten

Startseite, Speisekarte, Reservierung, Über uns, Gruppen & Feiern und Kontakt haben jeweils eine eigene Aufgabe statt alles auf eine einzige Landingpage zu drücken.

+

Reservierung mit Logik

Zeiten werden je nach Personenzahl dynamisch blockiert, damit Gäste nicht dieselbe Zeit buchen können, wenn sie schon belegt ist.

+

E-Mail-Bestätigung

Nach jeder Anfrage werden die Buchungsdaten per E-Mail bestätigt, während im Admin gleichzeitig eine Benachrichtigung eingeht.

+
+
+ + + +
+
+
+

Signature Experience

+ + +

Für spontane Besuche genauso stark wie für geplante Abende.

+ + +

Die Website verbindet warmes Branding, klare Nutzerführung und echte Restaurant-Funktionalität. Gäste sehen sofort, wann geöffnet ist, was sie erwartet und wie sie in wenigen Klicks einen Tisch anfragen können.

+ + + +
+ + + +
+
+
09:00 – 00:00Täglich geöffnet
+
5-Minuten RasterFeine Verfügbarkeitslogik
+
E-Mail direktBestätigung für Gäste
+
Admin-ÜbersichtReservierungen im WordPress-Backend
+
+
+
+
+ + + +
+
+
+

Auf der Karte

+ + +

Vom schnellen Klassiker bis zum Abendessen in Runde.

+ + +

Die Speisekarte ist als eigene Seite angelegt und zeigt die wichtigsten Kategorien für Gäste, die noch vor der Reservierung schnell entscheiden möchten.

+ + + +
+ + + +
+
+

Döner & Grill

Beliebte Klassiker für Lunch und Abend.

+

Pizza & Ofen

Warme Ofengerichte für Gruppen und Familien.

+

Vegetarisch

Falafel, Salate und leichte Alternativen.

+

Getränke

Vom schnellen Erfrischer bis zum Abendgetränk.

+
+
+
+
+ + + +
+

Nächster Schritt

+ + +

Reservieren Sie online oder planen Sie einen größeren Abend mit Ihrer Gruppe.

+ + + +
+
+ +HTML; +} + +function nazar_menu_content($urls) { + return << +
+
+

Speisekarte

+ + +

Die wichtigsten Kategorien auf einen Blick.

+ + +

Diese Seite gibt Gästen einen klaren ersten Eindruck vom Angebot und führt direkt zur Reservierung oder zum schnellen Anruf.

+
+ + + +
+

Döner & Grill

  • Döner im BrotKlassiker
  • DürümSchnell serviert
  • Döner TellerMit Beilage
  • Gemischter GrillFür mehr Hunger
+

Pizza & Ofengerichte

  • Pizza MargheritaBeliebt
  • Pizza SucukHausstil
  • Pizza VegetarischLeicht
  • LahmacunWürzig
+

Salate & Vegetarisch

  • Falafel TellerVegetarisch
  • Gemischter SalatFrisch
  • Salat mit DönerfleischHerzhaft
  • Vegetarische BeilagenAls Ergänzung
+

Getränke

  • SoftdrinksKalt
  • AyranKlassisch
  • BierZum Abend
  • Heiße GetränkeAuf Anfrage
+
+ + + +
+
+
+

Hinweis für Gäste

Die dargestellten Kategorien geben einen klaren Überblick. Finale Preise und tagesaktuelle Spezialitäten können im Restaurant oder direkt im WordPress-Editor gepflegt werden.

+
+ + + +
+

Jetzt weiter

Wenn Sie bereits wissen, wann Sie kommen möchten, reservieren Sie direkt online und erhalten sofort eine E-Mail mit den wichtigsten Buchungsdaten.

+
+
+
+
+ +HTML; +} + +function nazar_reservation_content($urls) { + return << +
+
+

Reservierung

+ + +

Tisch online anfragen – mit Bestätigung per E-Mail.

+ + +

Wählen Sie Datum, Personenzahl und eine freie Uhrzeit. Die Verfügbarkeit wird direkt geprüft, damit keine überlappenden Reservierungen entstehen.

+
+ + + +
+
[nazar_reservation_form]
+ + + +
+
+

So funktioniert die Anfrage

+
    +
  • Datum + Gästezahl wählenVerfügbarkeit live
  • +
  • Freie Zeit auswählenKeine Doppelbuchung
  • +
  • Bestätigung erhaltenDirekt per E-Mail
  • +
+
+
+

Für Gruppen & Feiern

+

Für größere Runden, Geburtstage oder besondere Abende nutzen Sie die Gruppen-Seite oder rufen Sie direkt an.

+ +
+
+

Direktkontakt

+

Telefon:
+49 781 96643005

+

Adresse:
Saarlandstraße 2
77652 Offenburg

+

Öffnungszeiten:
Täglich 09:00 – 00:00 Uhr

+
+
+
+
+ +HTML; +} + +function nazar_about_content($urls) { + return << +
+
+

Über uns

+ + +

Ein Restaurant, das schnell zugänglich wirkt und trotzdem Charakter zeigt.

+ + +

Nazar Kebap verbindet warme, unkomplizierte Gastfreundschaft mit einem Angebot, das vom schnellen Mittagessen bis zum entspannten Abend mit Freunden reicht.

+
+ + + +
+
+

Was Gäste erwartet

+

Klare Auswahl, direkter Service, unkomplizierte Reservierung.

+

Die Website spiegelt genau das wider: einfache Wege, starke CTAs und ein Auftritt, der modern wirkt, ohne das Lokale und Persönliche zu verlieren.

+
+
+

Für wen es passt

+
    +
  • MittagspauseSchnell & klar
  • +
  • AbendessenGemütlich mit Freunden
  • +
  • Kleine FeiernPlanbar im Voraus
  • +
  • Spontane BesucheKontakt direkt sichtbar
  • +
+
+
+ + + +
+

Warum die neue Struktur besser funktioniert

+ + +
+

Mehr Vertrauen

Ein eigener Bereich für Über uns stärkt den Eindruck einer echten Marke statt einer simplen Kontaktseite.

+

Mehr Übersicht

Jede Unterseite hat einen klaren Zweck und hilft Gästen schneller zum nächsten Schritt.

+

Mehr Conversion

Reservierungs- und Kontaktwege bleiben auf jeder Seite sichtbar und logisch eingebunden.

+
+
+ + + + +
+ +HTML; +} + +function nazar_groups_content($urls) { + return << +
+
+

Gruppen & Feiern

+ + +

Mehr Platz für Geburtstage, Team-Essen und gemeinsame Abende.

+ + +

Für größere Runden lohnt sich eine kurze Voranfrage. So kann das Restaurant besser planen und Ihnen einen passenden Zeitrahmen anbieten.

+
+ + + +
+

Geburtstage

Gemeinsame Essen mit Familie und Freunden lassen sich frühzeitig anfragen.

+

Firmenrunden

Ideal für unkomplizierte Team-Lunches oder Abendtermine.

+

Wochenend-Abende

Für stark nachgefragte Zeiten empfiehlt sich eine frühere Anfrage.

+
+
+
1Wunschtermin wählen
+
2Personenzahl angeben
+
3Rückfrage per E-Mail oder Telefon erhalten
+
+ + + + +
+ +HTML; +} + +function nazar_contact_content($urls) { + $maps = 'https://www.google.com/maps/search/?api=1&query=' . rawurlencode('Saarlandstraße 2, 77652 Offenburg, Germany'); + return << +
+
+

Kontakt & Anfahrt

+ + +

Alle wichtigen Infos für Ihren Besuch.

+ + +

Adresse, Öffnungszeiten, Telefon und die direkte Route sind auf dieser Seite bewusst schnell erreichbar gehalten.

+
+ + + +
+

Adresse

Saarlandstraße 2
77652 Offenburg
Deutschland

+

Telefon

+49 781 96643005

Für spontane Fragen oder größere Gruppen am besten direkt anrufen.

+

Öffnungszeiten

Täglich
09:00 – 00:00 Uhr

Für Reservierungen am selben Tag lohnt sich eine frühzeitige Anfrage.

+

Weiterklicken

Sie kennen Ihren Wunschtermin schon? Dann senden Sie Ihre Anfrage direkt online.

+
+
+ +HTML; +} + +function nazar_impressum_content() { + return << +
+
+

Impressum

+ + +

Die rechtlichen Angaben sollten vor dem Livegang vollständig geprüft und ergänzt werden.

+
+ + + + +
+ +HTML; +} + +function nazar_datenschutz_content() { + return << +
+
+

Datenschutz

+ + +

Die Website verarbeitet Daten aus dem Reservierungsformular zur Bearbeitung von Tischanfragen. Vor Livegang sollte diese Seite final juristisch geprüft werden.

+
+ + + + +
+ +HTML; +} + +update_option('blogname', 'Nazar Kebap – Gasthaus'); +update_option('blogdescription', 'Moderne Restaurant-Website mit Online-Reservierung und Kontakt für Offenburg.'); +update_option('timezone_string', 'Europe/Berlin'); + +$slugs = [ + 'startseite' => 'Startseite', + 'speisekarte' => 'Speisekarte', + 'reservierung' => 'Reservierung', + 'ueber-uns' => 'Über uns', + 'gruppen-feiern' => 'Gruppen & Feiern', + 'kontakt-anfahrt' => 'Kontakt & Anfahrt', + 'impressum' => 'Impressum', + 'datenschutz' => 'Datenschutz', +]; + +foreach ($slugs as $slug => $title) { + if (!get_page_by_path($slug, OBJECT, 'page')) { + wp_insert_post([ + 'post_type' => 'page', + 'post_title' => $title, + 'post_name' => $slug, + 'post_content' => '', + 'post_status' => 'publish', + ]); + } +} + +$urls = [ + 'startseite' => '/', + 'speisekarte' => '/speisekarte/', + 'reservierung' => '/reservierung/', + 'ueber-uns' => '/ueber-uns/', + 'gruppen-feiern' => '/gruppen-feiern/', + 'kontakt' => '/kontakt-anfahrt/', + 'impressum' => '/impressum/', + 'datenschutz' => '/datenschutz/', +]; + +nazar_upsert_page('startseite', 'Startseite', nazar_home_content($urls)); +nazar_upsert_page('speisekarte', 'Speisekarte', nazar_menu_content($urls)); +nazar_upsert_page('reservierung', 'Reservierung', nazar_reservation_content($urls)); +nazar_upsert_page('ueber-uns', 'Über uns', nazar_about_content($urls)); +nazar_upsert_page('gruppen-feiern', 'Gruppen & Feiern', nazar_groups_content($urls)); +nazar_upsert_page('kontakt-anfahrt', 'Kontakt & Anfahrt', nazar_contact_content($urls)); +nazar_upsert_page('impressum', 'Impressum', nazar_impressum_content()); +nazar_upsert_page('datenschutz', 'Datenschutz', nazar_datenschutz_content()); + +$home_page = get_page_by_path('startseite', OBJECT, 'page'); +if ($home_page) { + update_option('show_on_front', 'page'); + update_option('page_on_front', $home_page->ID); +} + +$nav_post = get_page_by_path('navigation', OBJECT, 'wp_navigation'); +if (!$nav_post) { + $nav_post_id = wp_insert_post([ + 'post_type' => 'wp_navigation', + 'post_status' => 'publish', + 'post_title' => 'Navigation', + 'post_name' => 'navigation', + ]); +} else { + $nav_post_id = $nav_post->ID; +} + +if (!is_wp_error($nav_post_id) && $nav_post_id) { + $navigation_pages = [ + ['label' => 'Start', 'slug' => 'startseite', 'url' => '/'], + ['label' => 'Speisekarte', 'slug' => 'speisekarte', 'url' => '/speisekarte/'], + ['label' => 'Reservierung', 'slug' => 'reservierung', 'url' => '/reservierung/'], + ['label' => 'Über uns', 'slug' => 'ueber-uns', 'url' => '/ueber-uns/'], + ['label' => 'Gruppen & Feiern', 'slug' => 'gruppen-feiern', 'url' => '/gruppen-feiern/'], + ['label' => 'Kontakt', 'slug' => 'kontakt-anfahrt', 'url' => '/kontakt-anfahrt/'], + ]; + + $nav_content = ''; + foreach ($navigation_pages as $item) { + $page = get_page_by_path($item['slug'], OBJECT, 'page'); + if (!$page) { + continue; + } + $nav_content .= sprintf( + '', + esc_attr($item['label']), + $page->ID, + esc_url($item['url']) + ); + } + + wp_update_post([ + 'ID' => $nav_post_id, + 'post_content' => $nav_content, + 'post_title' => 'Navigation', + 'post_name' => 'navigation', + ]); +} + +echo "Site setup complete\n";