-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I am testing WordPress Playground to create a PR with the necessary f…
…ixes after the Dotorg review. Also exported as a zip file. * [Preview loaded from this PR – available **before** this PR is merged](https://playground.wordpress.net/?import-site=https%3A%2F%2Fraw.githubusercontent.com%2FAutomattic%2Fthemes%2Fplayground-changes-2024-07-09T16-22-53-846Z%2Fmymenu%2Fplayground.zip) * [Preview loaded from the main branch – available **after** this PR is merged](https://playground.wordpress.net/?import-site=https%3A%2F%2Fraw.githubusercontent.com%2FAutomattic%2Fthemes%2Ftrunk%2Fmymenu%2Fplayground.zip)
- Loading branch information
1 parent
e341696
commit fbfc32a
Showing
9 changed files
with
548 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php declare( strict_types = 1 ); ?> | ||
<?php | ||
/** | ||
* MYMENU functions and definitions | ||
* | ||
* @link https://developer.wordpress.org/themes/basics/theme-functions/ | ||
* | ||
* @package MyMenu | ||
* @since MyMenu 1.0 | ||
*/ | ||
|
||
|
||
if ( ! function_exists( 'mymenu_support' ) ) : | ||
|
||
/** | ||
* Sets up theme defaults and registers support for various WordPress features. | ||
* | ||
* @since MYMENU 1.0 | ||
* | ||
* @return void | ||
*/ | ||
function mymenu_support() { | ||
|
||
// Enqueue editor styles. | ||
add_editor_style( 'style.css' ); | ||
|
||
// Make theme available for translation. | ||
load_theme_textdomain( 'mymenu' ); | ||
} | ||
|
||
endif; | ||
|
||
add_action( 'after_setup_theme', 'mymenu_support' ); | ||
|
||
if ( ! function_exists( 'mymenu_styles' ) ) : | ||
|
||
/** | ||
* Enqueue styles. | ||
* | ||
* @since MYMENU 1.0 | ||
* | ||
* @return void | ||
*/ | ||
function mymenu_styles() { | ||
|
||
// Register theme stylesheet. | ||
wp_register_style( | ||
'mymenu-style', | ||
get_stylesheet_directory_uri() . '/style.css', | ||
array(), | ||
wp_get_theme()->get( 'Version' ) | ||
); | ||
|
||
// Enqueue theme stylesheet. | ||
wp_enqueue_style( 'mymenu-style' ); | ||
|
||
} | ||
|
||
endif; | ||
|
||
add_action( 'wp_enqueue_scripts', 'mymenu_styles' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Title: 404 | ||
* Slug: mymenu/404 | ||
* Categories: hidden | ||
* Inserter: no | ||
*/ | ||
?> | ||
<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /--> | ||
|
||
<!-- 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 echo __('We\'re sorry!', 'mymenu');?></h1> | ||
<!-- /wp:heading --></div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:spacer {"height":"3vh","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} --> | ||
<div style="margin-top:0px;margin-bottom:0px;height:3vh" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:group {"align":"full","layout":{"type":"constrained","justifyContent":"left"}} --> | ||
<div class="wp-block-group alignfull"><!-- wp:paragraph --> | ||
<p><?php echo __('We are apparently out of that item. What about a new selection?', 'mymenu');?></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:spacer {"height":"6vh"} --> | ||
<div style="height:6vh" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:search {"showLabel":false,"width":75,"widthUnit":"%","buttonText":"Search"} /--></div> | ||
<!-- /wp:group --></div> | ||
<!-- /wp:group --></main> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
/** | ||
* Title: archive | ||
* Slug: mymenu/archive | ||
* Categories: hidden | ||
* Inserter: no | ||
*/ | ||
?> | ||
<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /--> | ||
|
||
<!-- 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> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:spacer {"height":"3vh","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} --> | ||
<div style="margin-top:0px;margin-bottom:0px;height:3vh" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:post-template --> | ||
<!-- wp:group {"style":{"spacing":{"padding":{"bottom":"var:preset|spacing|50"}},"border":{"bottom":{"width":"1px"}}},"layout":{"type":"default"}} --> | ||
<div class="wp-block-group" style="border-bottom-width:1px;padding-bottom:var(--wp--preset--spacing--50)"><!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"0px","left":"1px"},"padding":{"right":"0","left":"0","top":"0","bottom":"0"}},"border":{"left":{"width":"1px"},"right":{"width":"1px"}}},"backgroundColor":"primary"} --> | ||
<div class="wp-block-columns has-primary-background-color has-background" style="border-right-width:1px;border-left-width:1px;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><!-- wp:column {"width":"30%","style":{"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20","left":"var:preset|spacing|40","right":"var:preset|spacing|40"}}},"backgroundColor":"background","layout":{"type":"constrained","justifyContent":"left"}} --> | ||
<div class="wp-block-column has-background-background-color has-background" style="padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--40);flex-basis:30%"><!-- wp:post-title /--></div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column {"width":"70%","style":{"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20","left":"var:preset|spacing|40","right":"var:preset|spacing|40"}}},"backgroundColor":"background","layout":{"type":"constrained","justifyContent":"left"}} --> | ||
<div class="wp-block-column has-background-background-color has-background" style="padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--40);flex-basis:70%"><!-- wp:post-excerpt /--></div> | ||
<!-- /wp:column --></div> | ||
<!-- /wp:columns --></div> | ||
<!-- /wp:group --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination --> | ||
<!-- wp:query-pagination-previous /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p><?php echo __('', 'mymenu');?></p> | ||
<!-- /wp:paragraph --> | ||
<!-- /wp:query-no-results --></div> | ||
<!-- /wp:query --></div> | ||
<!-- /wp:group --></main> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /--> |
Oops, something went wrong.