Skip to content

Commit

Permalink
1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
webmandesign committed Nov 9, 2022
1 parent 98833d3 commit 60b9523
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 103 deletions.
2 changes: 1 addition & 1 deletion assets/css/blocks-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/blocks.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/editor-style-blocks-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/editor-style-blocks.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/editor-style-classic-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/editor-style-classic.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/global-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/global.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/scss/blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// @copyright WebMan Design, Oliver Juhas
//
// @since 1.0.0
// @version 1.4.0
// @version 1.4.1
//

$left: left;
Expand Down
16 changes: 5 additions & 11 deletions assets/scss/blocks/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,12 @@

.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline {
padding: ( $form_field_padding_vertical / $button_font_size * ( $ratio / 1.25 ) ) 1.5em;
}

.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline {
$button_padding_vertical : $form_field_padding_vertical / $button_font_size * ( $ratio / 1.25 );
$border_width : 1px;
$button_padding_vertical : $form_field_padding_vertical / $button_font_size * ( $ratio / 1.25 );
$border_width : 1px;

padding-top: calc( #{$button_padding_vertical} - #{$border_width} );
padding-bottom: calc( #{$button_padding_vertical} - #{$border_width} );
color: inherit;
}
padding-top: calc( #{$button_padding_vertical} - #{$border_width} );
padding-bottom: calc( #{$button_padding_vertical} - #{$border_width} );
}

.wp-block-buttons.is-style-large {
font-size: var(--typography_font_size_L_em);
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// @copyright WebMan Design, Oliver Juhas
//
// @since 1.0.0
// @version 1.4.0
// @version 1.4.1
//

$left: left;
Expand Down
1 change: 1 addition & 0 deletions assets/scss/global/form/_button.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* FILE: global/form/_button.scss */

#{ $selectors_button } {
display: inline-block; // This is must have not to overflow empty paragraph containers, for example.
padding: ( $form_field_padding_vertical / $button_font_size * ( $ratio / 1.25 ) ) 0;
font-family: var(--typography_font_global);
font-size: $button_font_size +em;
Expand Down
10 changes: 8 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Michelle Changelog

## 1.5.0, 20221110
## 1.4.1, 20221109

### Fixed
- WordPress 6.1 compatibility
- Outline button padding
- Excerpt HTML in Query Loop block
- Mobile pagination previous/next button not displaying
- Full aligned blocks horizontal margin

### File updates
changelog.md
readme.txt
style.css
assets/scss/blocks.scss
assets/scss/global.scss
includes/Content/Block.php


## 1.4.0, 20221102
Expand Down
14 changes: 12 additions & 2 deletions includes/Content/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.0
* @version 1.3.8
* @version 1.4.1
*/

namespace WebManDesign\Michelle\Content;
Expand Down Expand Up @@ -50,7 +50,7 @@ public static function init() {
* Block editor output modifications.
*
* @since 1.0.0
* @version 1.3.8
* @version 1.4.1
*
* @param string $block_content The pre-rendered content. Default null.
* @param array $block The block being rendered.
Expand Down Expand Up @@ -174,6 +174,16 @@ public static function render_block( string $block_content, array $block ): stri
$block_content = preg_replace( $re, '<div class="entry-meta">$0</div>', $block_content );
}

// Post Excerpt block.
if ( 'core/post-excerpt' == $block['blockName'] ) {
// Remove excerpt opening paragraph tag.
$block_content = str_replace( '<p class="wp-block-post-excerpt__excerpt">', '', $block_content );
// Remove excerpt closing paragraph tag (is `</p></div>`).
$block_content = substr( $block_content, 0, -10 ) . '</div>';
// Adding excerpt class back in.
$block_content = str_replace( '"entry-summary', '"entry-summary wp-block-post-excerpt__excerpt', $block_content );
}

// Cover block.
if (
'core/cover' === $block['blockName']
Expand Down
81 changes: 6 additions & 75 deletions includes/Content/Block_Area.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.6
* @version 1.5.0
* @version 1.3.0
*/

namespace WebManDesign\Michelle\Content;
Expand All @@ -21,8 +21,7 @@ class Block_Area implements Component_Interface {
/**
* Initialization.
*
* @since 1.0.6
* @version 1.5.0
* @since 1.0.6
*
* @return void
*/
Expand All @@ -32,71 +31,12 @@ public static function init() {

// Actions

add_action( 'after_setup_theme', __CLASS__ . '::after_setup_theme' );

add_action( 'michelle/content/404', __CLASS__ . '::error_404' );

add_action( 'tha_footer_top', __CLASS__ . '::footer' );

} // /init

/**
* After setup theme.
*
* @since 1.5.0
*
* @return void
*/
public static function after_setup_theme() {

// Processing

add_theme_support( 'block-template-parts' );

} // /after_setup_theme

/**
* Gets WordPress 6.1+ block template part content.
*
* This is basically WordPress' `block_template_part()` function adapted
* for our purpose - to return content instead of echoing it.
*
* @since 1.5.0
*
* @param string $part Name of block template part found in `parts` folder.
*
* @return string
*/
public static function get_template_part_content( string $part = '' ): string {

// Requirements check

if (
empty( $part )
|| ! function_exists( 'block_template_part' )
) {
return '';
}


// Variables

$template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' );

if (
! $template_part
|| empty( $template_part->content )
) {
return '';
}


// Output

return trim( (string) do_blocks( $template_part->content ) );

} // /get_template_part_content

/**
* Get block area post type key.
*
Expand All @@ -123,40 +63,31 @@ public static function get_post_type(): string {
* Site footer content.
*
* @since 1.0.0
* @version 1.5.0
* @version 1.3.0
*
* @return void
*/
public static function footer() {

// Output

if ( ! empty( self::get_template_part_content( 'footer' ) ) ) {
remove_action( 'tha_footer_bottom', 'WebManDesign\Michelle\Footer\Component::site_info', 100 );
block_template_part( 'footer' );
} else {
get_template_part( 'templates/parts/block/area/footer' );
}
get_template_part( 'templates/parts/block/area/footer' );

} // /footer

/**
* Error 404 page content.
*
* @since 1.0.6
* @version 1.5.0
* @version 1.3.0
*
* @return void
*/
public static function error_404() {

// Output

if ( ! empty( self::get_template_part_content( 'error-404' ) ) ) {
block_template_part( 'error-404' );
} else {
get_template_part( 'templates/parts/block/area/404' );
}
get_template_part( 'templates/parts/block/area/404' );

} // /error_404

Expand Down
Empty file removed parts/error-404.html
Empty file.
Empty file removed parts/footer.html
Empty file.
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Please see `changelog.md` file.

== Upgrade Notice ==

= 1.5.0 =
Fixing WordPress 6.1 compatibility.
= 1.4.1 =
Fixing bugs.


== Copyright ==
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: Michelle
Theme URI: https://www.webmandesign.eu/portfolio/michelle-wordpress-theme/
Author: WebMan Design
Author URI: https://www.webmandesign.eu/
Version: 1.5.0
Version: 1.4.1
Text Domain: michelle
Domain Path: /languages
License: GPL-3.0-or-later
Expand Down

0 comments on commit 60b9523

Please sign in to comment.