Browse Source

Specials: fixing after review (#7967)

Henrique Iamarino 1 year ago
parent
commit
e7cc26b273

+ 11 - 11
specials/functions.php

@@ -1,7 +1,7 @@
 <?php declare( strict_types = 1 ); ?>
 <?php
 /**
- * MENU functions and definitions
+ * Specials functions and definitions
  *
  * @link https://developer.wordpress.org/themes/basics/theme-functions/
  *
@@ -10,16 +10,16 @@
  */
 
 
-if ( ! function_exists( 'menu_support' ) ) :
+if ( ! function_exists( 'specials_support' ) ) :
 
 	/**
 	 * Sets up theme defaults and registers support for various WordPress features.
 	 *
-	 * @since MENU 1.0
+	 * @since Specials 1.0
 	 *
 	 * @return void
 	 */
-	function menu_support() {
+	function specials_support() {
 
 		// Enqueue editor styles.
 		add_editor_style( 'style.css' );
@@ -30,32 +30,32 @@ if ( ! function_exists( 'menu_support' ) ) :
 
 endif;
 
-add_action( 'after_setup_theme', 'menu_support' );
+add_action( 'after_setup_theme', 'specials_support' );
 
-if ( ! function_exists( 'menu_styles' ) ) :
+if ( ! function_exists( 'specials_styles' ) ) :
 
 	/**
 	 * Enqueue styles.
 	 *
-	 * @since MENU 1.0
+	 * @since Specials 1.0
 	 *
 	 * @return void
 	 */
-	function menu_styles() {
+	function specials_styles() {
 
 		// Register theme stylesheet.
 		wp_register_style(
-			'menu-style',
+			'specials-style',
 			get_stylesheet_directory_uri() . '/style.css',
 			array(),
 			wp_get_theme()->get( 'Version' )
 		);
 
 		// Enqueue theme stylesheet.
-		wp_enqueue_style( 'menu-style' );
+		wp_enqueue_style( 'specials-style' );
 
 	}
 
 endif;
 
-add_action( 'wp_enqueue_scripts', 'menu_styles' );
+add_action( 'wp_enqueue_scripts', 'specials_styles' );

+ 3 - 4
specials/patterns/404.php

@@ -1,4 +1,3 @@
-<?php declare( strict_types = 1 ); ?>
 <?php
 /**
  * Title: 404
@@ -9,8 +8,8 @@
 ?>
 <!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
 
-<!-- wp:group {"style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"2px"}},"border":{"bottom":{"width":"2px"},"top":[],"right":[],"left":[]}},"layout":{"type":"default"}} -->
+<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"2px"}},"border":{"bottom":{"width":"2px"},"top":[],"right":[],"left":[]}},"layout":{"type":"default"}} -->
 <div class="wp-block-group alignwide" style="border-bottom-width:2px;padding-bottom:2px"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"4vh","top":"8vh","right":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":"4vh"},"border":{"left":{"width":"1px"},"right":{"width":"1px"},"bottom":{"width":"1px"}}},"layout":{"type":"default"}} -->
 <div class="wp-block-group alignwide" style="border-right-width:1px;border-bottom-width:1px;border-left-width:1px;padding-top:8vh;padding-right:var(--wp--preset--spacing--50);padding-bottom:4vh;padding-left:var(--wp--preset--spacing--50)"><!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"2vh"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
 <div class="wp-block-group alignwide"><!-- wp:heading {"textAlign":"left","level":1,"align":"wide","style":{"typography":{"fontSize":"4rem"}}} -->
@@ -30,7 +29,7 @@
 
 <!-- wp:search {"showLabel":false,"width":50,"widthUnit":"%","buttonText":"Search","buttonPosition":"button-inside","buttonUseIcon":true,"style":{"border":{"width":"0px","style":"none"}}} /--></div>
 <!-- /wp:group --></div>
-<!-- /wp:group --></div>
+<!-- /wp:group --></main>
 <!-- /wp:group -->
 
 <!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

+ 4 - 5
specials/patterns/home.php

@@ -1,4 +1,3 @@
-<?php declare( strict_types = 1 ); ?>
 <?php
 /**
  * Title: home
@@ -9,10 +8,10 @@
 ?>
 <!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
 
-<!-- wp:group {"style":{"spacing":{"padding":{"top":"0vh","bottom":"0vh"},"blockGap":"0vh","margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh;padding-top:0vh;padding-bottom:0vh"><!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
+<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"0vh","bottom":"0vh"},"blockGap":"0vh","margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh;padding-top:0vh;padding-bottom:0vh"><!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignfull has-primary-background-color has-background" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/korean-bibimbap-in-yamyam-berlin_foodiesfeed.png","dimRatio":0,"isUserOverlayColor":true,"minHeight":480,"contentPosition":"bottom left","align":"wide","style":{"color":[],"border":{"left":{"color":"var:preset|color|background","width":"1px"},"right":{"color":"var:preset|color|background","width":"1px"}},"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|30","bottom":"var:preset|spacing|30"}},"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"textColor":"background","layout":{"type":"constrained"}} -->
-<div class="wp-block-cover alignwide has-custom-content-position is-position-bottom-left has-background-color has-text-color has-link-color" style="border-right-color:var(--wp--preset--color--background);border-right-width:1px;border-left-color:var(--wp--preset--color--background);border-left-width:1px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--50);min-height:480px"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span><img class="wp-block-cover__image-background " alt="<?php echo __('', 'specials');?>" src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/korean-bibimbap-in-yamyam-berlin_foodiesfeed.png" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} -->
+<div class="wp-block-cover alignwide has-custom-content-position is-position-bottom-left has-background-color has-text-color has-link-color" style="border-right-color:var(--wp--preset--color--background);border-right-width:1px;border-left-color:var(--wp--preset--color--background);border-left-width:1px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--50);min-height:480px"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span><img class="wp-block-cover__image-background" alt="<?php echo __('', 'specials');?>" src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/korean-bibimbap-in-yamyam-berlin_foodiesfeed.png" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} -->
 <p class="has-text-align-center has-large-font-size"><?php echo __('', 'specials');?></p>
 <!-- /wp:paragraph --></div></div>
 <!-- /wp:cover --></div>
@@ -726,7 +725,7 @@
 <!-- /wp:columns --></div>
 <!-- /wp:group --></div>
 <!-- /wp:group --></div>
-<!-- /wp:group --></div>
+<!-- /wp:group --></main>
 <!-- /wp:group -->
 
 <!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

+ 5 - 6
specials/patterns/index.php

@@ -1,4 +1,3 @@
-<?php declare( strict_types = 1 ); ?>
 <?php
 /**
  * Title: index
@@ -9,12 +8,12 @@
 ?>
 <!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
 
-<!-- wp:group {"style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
-<div class="wp-block-group alignwide"><!-- wp:query {"queryId":0,"query":{"perPage":20,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"parents":[]},"tagName":"main","align":"wide","layout":{"type":"constrained","justifyContent":"left"}} -->
+<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
+<div class="wp-block-group alignwide"><!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"parents":[]},"tagName":"main","align":"wide","layout":{"type":"constrained","justifyContent":"left"}} -->
 <main class="wp-block-query alignwide"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"2vh","top":"8vh","right":"var:preset|spacing|50","left":"var:preset|spacing|50"}},"border":{"left":{"width":"1px"},"right":{"width":"1px"},"bottom":[]}},"layout":{"type":"default"}} -->
 <div class="wp-block-group alignwide" style="border-right-width:1px;border-left-width:1px;padding-top:8vh;padding-right:var(--wp--preset--spacing--50);padding-bottom:2vh;padding-left:var(--wp--preset--spacing--50)"><!-- wp:heading {"level":1} -->
-<h1 class="wp-block-heading"><?php esc_html_e('All choices', 'specials');?></h1>
+<h1 class="wp-block-heading"><?php echo __('All choices', 'specials');?></h1>
 <!-- /wp:heading --></div>
 <!-- /wp:group -->
 
@@ -54,7 +53,7 @@
 <!-- /wp:query-pagination --></div>
 <!-- /wp:group --></main>
 <!-- /wp:query --></div>
-<!-- /wp:group --></div>
+<!-- /wp:group --></main>
 <!-- /wp:group -->
 
 <!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

+ 1 - 5
specials/readme.txt

@@ -17,11 +17,7 @@ A clean, beautiful, and customizable theme for restaurant menu websites.
 
 == Copyright ==
 
-Specials is based on The MENU (https://github.com/wordpress/the-menu/), (C) the WordPress team, [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
-
-The MENU WordPress Theme, (C) 2023 the WordPress team
-The MENU is distributed under the terms of the GNU GPL.
-The MENU is based on Block Canvas (https://github.com/Automattic/themes/tree/trunk/block-canvas), (C) Automattic, [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
+Specials is based on MyMenu (https://github.com/wordpress/mymenu/), (C) the WordPress team, [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by

+ 1 - 1
specials/style.css

@@ -7,7 +7,7 @@ Description: A clean, beautiful, and customizable theme for restaurant menu webs
 Requires at least: 6.0
 Tested up to: 6.5
 Requires PHP: 5.7
-Version: 1.0.0
+Version: 1.0.1
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: specials

+ 3 - 3
specials/templates/archive.html

@@ -1,7 +1,7 @@
 <!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
 
-<!-- wp:group {"style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
+<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignwide"><!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"parents":[]},"tagName":"main","align":"wide","layout":{"type":"constrained","justifyContent":"left"}} -->
 <main class="wp-block-query alignwide"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"4vh","top":"8vh","right":"var:preset|spacing|50","left":"var:preset|spacing|50"}},"border":{"left":{"width":"1px"},"right":{"width":"1px"},"bottom":[]}},"layout":{"type":"default"}} -->
 <div class="wp-block-group alignwide" style="border-right-width:1px;border-left-width:1px;padding-top:8vh;padding-right:var(--wp--preset--spacing--50);padding-bottom:4vh;padding-left:var(--wp--preset--spacing--50)"><!-- wp:query-title {"type":"archive","align":"wide"} /--></div>
@@ -43,7 +43,7 @@
 <!-- /wp:query-pagination --></div>
 <!-- /wp:group --></main>
 <!-- /wp:query --></div>
-<!-- /wp:group --></div>
+<!-- /wp:group --></main>
 <!-- /wp:group -->
 
 <!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

+ 3 - 3
specials/templates/page.html

@@ -1,13 +1,13 @@
 <!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
 
-<!-- wp:group {"style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"8vh","bottom":"8vh"},"blockGap":"4vh"}},"layout":{"type":"constrained"}} -->
+<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"8vh","bottom":"8vh"},"blockGap":"4vh"}},"layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignwide" style="padding-top:8vh;padding-bottom:8vh"><!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"2vh"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
 <div class="wp-block-group alignwide"><!-- wp:post-title {"level":1,"align":"wide"} /-->
 
 <!-- wp:post-content {"lock":{"move":false,"remove":false},"align":"wide","layout":{"type":"default"}} /--></div>
 <!-- /wp:group --></div>
-<!-- /wp:group --></div>
+<!-- /wp:group --></main>
 <!-- /wp:group -->
 
 <!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

+ 3 - 3
specials/templates/search.html

@@ -1,7 +1,7 @@
 <!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
 
-<!-- wp:group {"style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
+<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignwide"><!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"parents":[]},"tagName":"main","align":"wide","layout":{"type":"constrained","justifyContent":"left"}} -->
 <main class="wp-block-query alignwide"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"4vh","top":"8vh","right":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":"2vh"},"border":{"left":{"width":"1px"},"right":{"width":"1px"},"bottom":[]}},"layout":{"type":"default"}} -->
 <div class="wp-block-group alignwide" style="border-right-width:1px;border-left-width:1px;padding-top:8vh;padding-right:var(--wp--preset--spacing--50);padding-bottom:4vh;padding-left:var(--wp--preset--spacing--50)"><!-- wp:query-title {"type":"search"} /-->
@@ -45,7 +45,7 @@
 <!-- /wp:query-pagination --></div>
 <!-- /wp:group --></main>
 <!-- /wp:query --></div>
-<!-- /wp:group --></div>
+<!-- /wp:group --></main>
 <!-- /wp:group -->
 
 <!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

+ 3 - 3
specials/templates/single.html

@@ -1,7 +1,7 @@
 <!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
 
-<!-- wp:group {"style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"8vh","bottom":"8vh"},"blockGap":"4vh"}},"layout":{"type":"constrained"}} -->
+<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0vh","bottom":"0vh"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group" style="margin-top:0vh;margin-bottom:0vh"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"8vh","bottom":"8vh"},"blockGap":"4vh"}},"layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignwide" style="padding-top:8vh;padding-bottom:8vh"><!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"2vh"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
 <div class="wp-block-group alignwide"><!-- wp:post-title {"level":1,"align":"wide"} /-->
 
@@ -9,7 +9,7 @@
 <!-- /wp:group -->
 
 <!-- wp:template-part {"slug":"post-meta","align":"wide"} /--></div>
-<!-- /wp:group --></div>
+<!-- /wp:group --></main>
 <!-- /wp:group -->
 
 <!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->