Skip to content

Commit

Permalink
MyMenu: fixing after review (#7946)
Browse files Browse the repository at this point in the history
* MyMenu: fixing after review

* MyMenu: final edits before resubmitting
  • Loading branch information
henriqueiamarino committed Jul 10, 2024
1 parent 6993100 commit 5c4d79c
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 70 deletions.
22 changes: 11 additions & 11 deletions mymenu/functions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php declare( strict_types = 1 ); ?>
<?php
/**
* MENU functions and definitions
* MYMENU functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
Expand All @@ -10,16 +10,16 @@
*/


if ( ! function_exists( 'menu_support' ) ) :
if ( ! function_exists( 'mymenu_support' ) ) :

/**
* Sets up theme defaults and registers support for various WordPress features.
*
* @since MENU 1.0
* @since MYMENU 1.0
*
* @return void
*/
function menu_support() {
function mymenu_support() {

// Enqueue editor styles.
add_editor_style( 'style.css' );
Expand All @@ -30,32 +30,32 @@ function menu_support() {

endif;

add_action( 'after_setup_theme', 'menu_support' );
add_action( 'after_setup_theme', 'mymenu_support' );

if ( ! function_exists( 'menu_styles' ) ) :
if ( ! function_exists( 'mymenu_styles' ) ) :

/**
* Enqueue styles.
*
* @since MENU 1.0
* @since MYMENU 1.0
*
* @return void
*/
function menu_styles() {
function mymenu_styles() {

// Register theme stylesheet.
wp_register_style(
'menu-style',
'mymenu-style',
get_stylesheet_directory_uri() . '/style.css',
array(),
wp_get_theme()->get( 'Version' )
);

// Enqueue theme stylesheet.
wp_enqueue_style( 'menu-style' );
wp_enqueue_style( 'mymenu-style' );

}

endif;

add_action( 'wp_enqueue_scripts', 'menu_styles' );
add_action( 'wp_enqueue_scripts', 'mymenu_styles' );
11 changes: 5 additions & 6 deletions mymenu/patterns/404.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php declare( strict_types = 1 ); ?>
<?php
/**
* Title: 404
Expand All @@ -9,11 +8,11 @@
?>
<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"top":"6vh","bottom":"6vh"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:6vh;padding-bottom:6vh"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"6vh","bottom":"6vh"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:6vh;padding-bottom:6vh"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
<div class="wp-block-group alignwide"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"0","bottom":"0","left":"var:preset|spacing|40","right":"var:preset|spacing|40"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group alignwide" style="margin-top:0;margin-bottom:0;padding-top:0;padding-right:var(--wp--preset--spacing--40);padding-bottom:0;padding-left:var(--wp--preset--spacing--40)"><!-- wp:heading {"textAlign":"left","level":1,"align":"wide","className":"wp-block-heading"} -->
<h1 class="wp-block-heading alignwide has-text-align-left"><?php esc_html_e('We\'re sorry!', 'mymenu');?></h1>
<h1 class="wp-block-heading alignwide has-text-align-left"><?php echo __('We\'re sorry!', 'mymenu');?></h1>
<!-- /wp:heading --></div>
<!-- /wp:group -->

Expand All @@ -23,7 +22,7 @@

<!-- wp:group {"align":"full","layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group alignfull"><!-- wp:paragraph -->
<p><?php esc_html_e('We are apparently out of that item. What about a new selection?', 'mymenu');?></p>
<p><?php echo __('We are apparently out of that item. What about a new selection?', 'mymenu');?></p>
<!-- /wp:paragraph -->

<!-- wp:spacer {"height":"6vh"} -->
Expand All @@ -32,7 +31,7 @@

<!-- wp:search {"showLabel":false,"width":75,"widthUnit":"%","buttonText":"Search"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
9 changes: 4 additions & 5 deletions mymenu/patterns/archive.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php declare( strict_types = 1 ); ?>
<?php
/**
* Title: archive
Expand All @@ -9,8 +8,8 @@
?>
<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"top":"6vh","bottom":"6vh"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:6vh;padding-bottom:6vh"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"6vh","bottom":"6vh"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-top:6vh;padding-bottom:6vh"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
<div class="wp-block-group alignwide"><!-- wp:query {"queryId":24,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"align":"wide"} -->
<div class="wp-block-query alignwide"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"0","bottom":"0","left":"var:preset|spacing|40","right":"var:preset|spacing|40"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group alignwide" style="margin-top:0;margin-bottom:0;padding-top:0;padding-right:var(--wp--preset--spacing--40);padding-bottom:0;padding-left:var(--wp--preset--spacing--40)"><!-- wp:query-title {"type":"archive","align":"wide"} /--></div>
Expand Down Expand Up @@ -44,11 +43,11 @@

<!-- wp:query-no-results -->
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} -->
<p><?php esc_html_e('', 'mymenu');?></p>
<p><?php echo __('', 'mymenu');?></p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results --></div>
<!-- /wp:query --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
Loading

0 comments on commit 5c4d79c

Please sign in to comment.