Skip to content

Commit

Permalink
build: make it ready for wordpress.org
Browse files Browse the repository at this point in the history
  • Loading branch information
AdelDima committed Nov 18, 2023
1 parent 3d5ef86 commit 7c270be
Show file tree
Hide file tree
Showing 24 changed files with 114 additions and 104 deletions.
8 changes: 4 additions & 4 deletions inc/class-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function __construct( array $modules = array() ) {
throw new InvalidArgumentException(
sprintf(
/* translators: 1: classname/type of the variable, 2: interface name */
__( 'The theme module %1$s does not implement the %2$s interface.', 'noon-theme' ),
__( 'The theme module %1$s does not implement the %2$s interface.', 'thenoon' ),
gettype( $module ),
Module_Interface::class
)
Expand Down Expand Up @@ -176,7 +176,7 @@ private function autoload( $class_name ) {
*/
public function __clone() {
// Cloning instances of the class is forbidden.
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'noon-theme' ), '1.0' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'thenoon' ), '1.0' );
}

/**
Expand All @@ -186,7 +186,7 @@ public function __clone() {
*/
public function __wakeup() {
// Unserializing instances of the class is forbidden.
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'noon-theme' ), '1.0' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'thenoon' ), '1.0' );
}


Expand Down Expand Up @@ -232,7 +232,7 @@ public function module( string $slug ) : Module_Interface {
throw new InvalidArgumentException(
sprintf(
/* translators: %s: slug */
__( 'No theme module with the slug %s exists.', 'noon-theme' ),
__( 'No theme module with the slug %s exists.', 'thenoon' ),
$slug
)
);
Expand Down
6 changes: 3 additions & 3 deletions inc/modules/blocks/patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public function get_slug() : string {
function noon_register_block_pattern_categories() {

if ( function_exists( 'register_block_pattern_category_type' ) ) {
register_block_pattern_category_type( 'noon', array( 'label' => __( 'Noon Patterns', 'noon-theme' ) ) );
register_block_pattern_category_type( 'noon', array( 'label' => __( 'Noon Patterns', 'thenoon' ) ) );
}

$block_pattern_categories = array(
'noon' => array(
'label' => __( 'Noon', 'noon-theme' ),
'categoryTypes' => array( 'noon-theme' ),
'label' => __( 'Noon', 'thenoon' ),
'categoryTypes' => array( 'thenoon' ),
),
);

Expand Down
30 changes: 15 additions & 15 deletions inc/modules/blocks/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,44 @@ public function get_slug() : string {
function noon_register_block_styles() {
$block_styles = array(
'core/button' => array(
'secondary-button' => __( 'Secondary', 'noon-theme' ),
'secondary-button' => __( 'Secondary', 'thenoon' ),
),
'core/query-pagination-next' => array(
'wp-block-button__link' => __( 'Button', 'noon-theme' ),
'wp-block-button__link' => __( 'Button', 'thenoon' ),
),
'core/query-pagination-previous' => array(
'wp-block-button__link' => __( 'Button', 'noon-theme' ),
'wp-block-button__link' => __( 'Button', 'thenoon' ),
),
'core/image' => array(
'm-0' => __( 'No Margin', 'noon-theme' ),
'm-0' => __( 'No Margin', 'thenoon' ),
),
'core/paragraph' => array(
'm-0' => __( 'No Margin', 'noon-theme' ),
'm-0' => __( 'No Margin', 'thenoon' ),
),
'core/separator' => array(
'separator-dotted' => __( 'Dotted', 'noon-theme' ),
'separator-dotted' => __( 'Dotted', 'thenoon' ),
),
'core/column' => array(
'noon-shadow' => __( 'Noon Shadow', 'noon-theme' ),
'noon-solid-shadow' => __( 'Solid Shadow', 'noon-theme' ),
'noon-shadow' => __( 'Noon Shadow', 'thenoon' ),
'noon-solid-shadow' => __( 'Solid Shadow', 'thenoon' ),
),
'core/group' => array(
'noon-shadow' => __( 'Noon Shadow', 'noon-theme' ),
'noon-solid-shadow' => __( 'Solid Shadow', 'noon-theme' ),
'noon-shadow' => __( 'Noon Shadow', 'thenoon' ),
'noon-solid-shadow' => __( 'Solid Shadow', 'thenoon' ),
),
'core/code' => array(
'contrast-code' => __( 'Contrast Style', 'noon-theme' ),
'contrast-code' => __( 'Contrast Style', 'thenoon' ),
),
'core/preformatted' => array(
'preformatted-dark' => __( 'Contrast Style', 'noon-theme' ),
'preformatted-dark' => __( 'Contrast Style', 'thenoon' ),
),

'core/post-terms' => array(
'tags' => __( 'Tags Style', 'noon-theme' ),
'tags' => __( 'Tags Style', 'thenoon' ),
),
'core/template-part/header' => array(
'noon-header-transparent' => __( 'Transparent', 'noon-theme' ),
'noon-header-default' => __( 'Default', 'noon-theme' ),
'noon-header-transparent' => __( 'Transparent', 'thenoon' ),
'noon-header-default' => __( 'Default', 'thenoon' ),
),
);

Expand Down
2 changes: 1 addition & 1 deletion inc/modules/styles/style.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function ( $handle ) use ( $css_files ) {
$is_valid = isset( $css_files[ $handle ] ) && ! $css_files[ $handle ]['global'];
if ( ! $is_valid ) {
/* translators: %s: stylesheet handle */
_doing_it_wrong( __CLASS__ . '::print_styles()', esc_html( sprintf( __( 'Invalid theme stylesheet handle: %s', 'noon-theme' ), $handle ) ), 'Kadence 1.0.0' );
_doing_it_wrong( __CLASS__ . '::print_styles()', esc_html( sprintf( __( 'Invalid theme stylesheet handle: %s', 'thenoon' ), $handle ) ), 'Kadence 1.0.0' );
}
return $is_valid;
}
Expand Down
8 changes: 4 additions & 4 deletions inc/modules/template_tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct( array $modules = array() ) {
throw new InvalidArgumentException(
sprintf(
/* translators: 1: classname/type of the variable, 2: interface name */
__( 'The theme templating module %1$s does not implement the %2$s interface.', 'noon-theme' ),
__( 'The theme templating module %1$s does not implement the %2$s interface.', 'thenoon' ),
gettype( $module ),
Templating_Module_Interface::class
)
Expand All @@ -78,7 +78,7 @@ public function __call( string $method, array $args ) {
throw new BadMethodCallException(
sprintf(
/* translators: %s: template tag name */
__( 'The template tag %s does not exist.', 'noon-theme' ),
__( 'The template tag %s does not exist.', 'thenoon' ),
'noon()->' . $method . '()'
)
);
Expand Down Expand Up @@ -107,7 +107,7 @@ protected function set_template_tags( Templating_Module_Interface $module ) {
throw new InvalidArgumentException(
sprintf(
/* translators: 1: template tag method name, 2: module class name */
__( 'The template tag method %1$s registered by theme module %2$s must either be a callable or an array.', 'noon-theme' ),
__( 'The template tag method %1$s registered by theme module %2$s must either be a callable or an array.', 'thenoon' ),
$method_name,
get_class( $module )
)
Expand All @@ -118,7 +118,7 @@ protected function set_template_tags( Templating_Module_Interface $module ) {
throw new RuntimeException(
sprintf(
/* translators: 1: template tag method name, 2: module class name */
__( 'The template tag method %1$s registered by theme module %2$s conflicts with an already registered template tag of the same name.', 'noon-theme' ),
__( 'The template tag method %1$s registered by theme module %2$s conflicts with an already registered template tag of the same name.', 'thenoon' ),
$method_name,
get_class( $module )
)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "noon-theme",
"name": "thenoon",
"private": true,
"version": "1.0.0",
"prettier": "@wordpress/prettier-config",
Expand Down Expand Up @@ -54,7 +54,7 @@
"lint:css": "wp-scripts lint-style",
"lint:js": "wp-scripts lint-js",
"lint": "eslint \"assets/**/*.{js,tsx,jsx}\" --quiet",
"zip": "rm -rf zip && ./node_modules/.bin/webpack --config ./webpack.zip.config.js --mode production",
"zip": "rm -rf zip && ./node_modules/.bin/webpack --config ./webpack.comp.config.js --mode production",
"lint:pkg-json": "wp-scripts lint-pkg-json",
"packages-update": "wp-scripts packages-update",
"test:e2e": "wp-scripts test-e2e",
Expand Down
2 changes: 1 addition & 1 deletion patterns/call-to-action-card-boxed.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<!-- wp:column {"verticalAlignment":"center","width":"30%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:30%"><!-- wp:buttons {"layout":{"type":"flex","justifyContent":"right"}} -->
<div class="wp-block-buttons"><!-- wp:button {"style":{"border":{"radius":"50px"}}} -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" style="border-radius:50px"><?php echo esc_html__( 'Read More', 'noon-theme' ); ?></a></div>
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" style="border-radius:50px"><?php echo esc_html__( 'Read More', 'thenoon' ); ?></a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column --></div>
Expand Down
2 changes: 1 addition & 1 deletion patterns/call-to-action-card.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<!-- wp:column {"verticalAlignment":"center","width":"30%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:30%"><!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center","flexWrap":"wrap"}} -->
<div class="wp-block-buttons"><!-- wp:button {"style":{"border":{"radius":"50px"}}} -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" style="border-radius:50px"><?php echo esc_html__( 'Read More', 'noon-theme' ); ?></a></div>
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" style="border-radius:50px"><?php echo esc_html__( 'Read More', 'thenoon' ); ?></a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column --></div>
Expand Down
2 changes: 1 addition & 1 deletion patterns/call-to-action-full-width-dark.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<!-- wp:column {"verticalAlignment":"center","width":"30%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:30%"><!-- wp:buttons {"layout":{"type":"flex","justifyContent":"right"}} -->
<div class="wp-block-buttons"><!-- wp:button -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button"><?php echo esc_html__( 'Read More', 'noon-theme' ); ?></a></div>
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button"><?php echo esc_html__( 'Read More', 'thenoon' ); ?></a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:column --></div>
Expand Down
18 changes: 9 additions & 9 deletions patterns/contact-us.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<!-- wp:cover {"overlayColor":"base-1","minHeight":20,"minHeightUnit":"rem","contentPosition":"center center","isDark":false,"tagName":"header","align":"full","style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"top":"var:preset|spacing|large","bottom":"0","right":"0","left":"0"}}}} -->
<header class="wp-block-cover alignfull is-light" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--large);padding-right:0;padding-bottom:0;padding-left:0;min-height:20rem"><span aria-hidden="true" class="wp-block-cover__background has-base-1-background-color has-background-dim-100 has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:group {"style":{"spacing":{"padding":{"top":"0","right":"var:preset|spacing|medium","left":"var:preset|spacing|medium"}}},"textColor":"contrast-3","layout":{"type":"constrained"}} -->
<div class="wp-block-group has-contrast-3-color has-text-color" style="padding-top:0;padding-right:var(--wp--preset--spacing--medium);padding-left:var(--wp--preset--spacing--medium)"><!-- wp:heading {"textAlign":"center","level":1,"align":"wide"} -->
<h1 class="wp-block-heading alignwide has-text-align-center"><?php echo esc_html__( 'Share Your Feedback', 'noon-theme' ); ?>
<br><?php echo esc_html__( 'We Love Hearing from You!', 'noon-theme' ); ?>
<h1 class="wp-block-heading alignwide has-text-align-center"><?php echo esc_html__( 'Share Your Feedback', 'thenoon' ); ?>
<br><?php echo esc_html__( 'We Love Hearing from You!', 'thenoon' ); ?>
</h1>
<!-- /wp:heading --></div>
<!-- /wp:group --></div></header>
Expand All @@ -28,32 +28,32 @@
<div class="wp-block-columns alignwide" style="margin-top:0px;margin-bottom:0px"><!-- wp:column {"style":{"spacing":{"blockGap":"var:preset|spacing|small","padding":{"top":"var:preset|spacing|medium","right":"var:preset|spacing|medium","bottom":"var:preset|spacing|medium","left":"var:preset|spacing|medium"}},"border":{"width":"1px"}},"borderColor":"base-2","backgroundColor":"tertiary","className":"is-style-noon-shadow","layout":{"type":"default"}} -->
<div class="wp-block-column is-style-noon-shadow has-border-color has-base-2-border-color has-tertiary-background-color has-background" style="border-width:1px;padding-top:var(--wp--preset--spacing--medium);padding-right:var(--wp--preset--spacing--medium);padding-bottom:var(--wp--preset--spacing--medium);padding-left:var(--wp--preset--spacing--medium)"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|small"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:heading {"level":3,"fontSize":"base"} -->
<h3 class="wp-block-heading has-base-font-size"><?php echo esc_html__( 'Address', 'noon-theme' ); ?>
<h3 class="wp-block-heading has-base-font-size"><?php echo esc_html__( 'Address', 'thenoon' ); ?>
</h3>
<!-- /wp:heading -->

<!-- wp:paragraph {"textColor":"contrast-2","fontSize":"text-base"} -->
<p class="has-contrast-2-color has-text-color has-text-base-font-size"><?php echo esc_html__( 'Craving a visit? Discover our handy-dandy location and drop by for a delightful experience.', 'noon-theme' ); ?></p>
<p class="has-contrast-2-color has-text-color has-text-base-font-size"><?php echo esc_html__( 'Craving a visit? Discover our handy-dandy location and drop by for a delightful experience.', 'thenoon' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:separator {"backgroundColor":"base-2","className":"is-style-wide"} -->
<hr class="wp-block-separator has-text-color has-base-2-color has-alpha-channel-opacity has-base-2-background-color has-background is-style-wide"/>
<!-- /wp:separator -->

<!-- wp:paragraph {"style":{"typography":{"textDecoration":"underline"}},"fontSize":"text-xl"} -->
<p class="has-text-xl-font-size" style="text-decoration:underline"><a href="#"><?php echo esc_html__( '199 North Baronial St. Dorchester Center', 'noon-theme' ); ?></a></p>
<p class="has-text-xl-font-size" style="text-decoration:underline"><a href="#"><?php echo esc_html__( '199 North Baronial St. Dorchester Center', 'thenoon' ); ?></a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:column -->

<!-- wp:column {"style":{"spacing":{"blockGap":"var:preset|spacing|small","padding":{"top":"var:preset|spacing|medium","right":"var:preset|spacing|medium","bottom":"var:preset|spacing|medium","left":"var:preset|spacing|medium"}},"border":{"width":"1px"}},"borderColor":"base-2","backgroundColor":"tertiary","className":"is-style-noon-shadow"} -->
<div class="wp-block-column is-style-noon-shadow has-border-color has-base-2-border-color has-tertiary-background-color has-background" style="border-width:1px;padding-top:var(--wp--preset--spacing--medium);padding-right:var(--wp--preset--spacing--medium);padding-bottom:var(--wp--preset--spacing--medium);padding-left:var(--wp--preset--spacing--medium)"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|small"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:heading {"level":3,"fontSize":"base"} -->
<h3 class="wp-block-heading has-base-font-size"><?php echo esc_html__( 'Email Address', 'noon-theme' ); ?></h3>
<h3 class="wp-block-heading has-base-font-size"><?php echo esc_html__( 'Email Address', 'thenoon' ); ?></h3>
<!-- /wp:heading -->

<!-- wp:paragraph {"textColor":"contrast-2"} -->
<p class="has-contrast-2-color has-text-color"><?php echo esc_html__( 'Got a question? We\'re here to help! Send us a message and we\'ll get back to you soon.', 'noon-theme' ); ?></p>
<p class="has-contrast-2-color has-text-color"><?php echo esc_html__( 'Got a question? We\'re here to help! Send us a message and we\'ll get back to you soon.', 'thenoon' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:separator {"backgroundColor":"base-2","className":"is-style-wide"} -->
Expand All @@ -69,11 +69,11 @@
<!-- wp:column {"style":{"spacing":{"blockGap":"var:preset|spacing|small","padding":{"top":"var:preset|spacing|medium","right":"var:preset|spacing|medium","bottom":"var:preset|spacing|medium","left":"var:preset|spacing|medium"}},"border":{"width":"1px"}},"borderColor":"base-2","backgroundColor":"tertiary","className":"is-style-noon-shadow"} -->
<div class="wp-block-column is-style-noon-shadow has-border-color has-base-2-border-color has-tertiary-background-color has-background" style="border-width:1px;padding-top:var(--wp--preset--spacing--medium);padding-right:var(--wp--preset--spacing--medium);padding-bottom:var(--wp--preset--spacing--medium);padding-left:var(--wp--preset--spacing--medium)"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|small"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:heading {"level":3,"fontSize":"base"} -->
<h3 class="wp-block-heading has-base-font-size"><?php echo esc_html__( 'Phone Numbers', 'noon-theme' ); ?></h3>
<h3 class="wp-block-heading has-base-font-size"><?php echo esc_html__( 'Phone Numbers', 'thenoon' ); ?></h3>
<!-- /wp:heading -->

<!-- wp:paragraph {"textColor":"contrast-2"} -->
<p class="has-contrast-2-color has-text-color"><?php echo esc_html__( 'Looking for someone to talk to? Reach out to us at our dedicated helpline and we\'ll lend an ear.', 'noon-theme' ); ?></p>
<p class="has-contrast-2-color has-text-color"><?php echo esc_html__( 'Looking for someone to talk to? Reach out to us at our dedicated helpline and we\'ll lend an ear.', 'thenoon' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:separator {"backgroundColor":"base-2","className":"is-style-wide"} -->
Expand Down
2 changes: 1 addition & 1 deletion patterns/faq-with-columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|xx-large","bottom":"var:preset|spacing|xx-large","right":"var:preset|spacing|medium","left":"var:preset|spacing|medium"},"blockGap":"var:preset|spacing|x-large","margin":{"top":"0","bottom":"0"}}},"backgroundColor":"base-2","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-base-2-background-color has-background" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--xx-large);padding-right:var(--wp--preset--spacing--medium);padding-bottom:var(--wp--preset--spacing--xx-large);padding-left:var(--wp--preset--spacing--medium)"><!-- wp:group {"layout":{"type":"constrained","contentSize":"600px"}} -->
<div class="wp-block-group"><!-- wp:heading {"textAlign":"center"} -->
<h2 class="wp-block-heading has-text-align-center"><?php echo esc_html__( 'Frequently Asked Questions', 'noon-theme' ); ?></h2>
<h2 class="wp-block-heading has-text-align-center"><?php echo esc_html__( 'Frequently Asked Questions', 'thenoon' ); ?></h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"center"} -->
Expand Down
Loading

0 comments on commit 7c270be

Please sign in to comment.