Skip to content

Commit

Permalink
Merge develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
KingYes committed Mar 27, 2023
2 parents d685a48 + caa6f04 commit 10e0723
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 18 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
**Contributors:** [elemntor](https://profiles.wordpress.org/elemntor), [KingYes](https://profiles.wordpress.org/KingYes), [ariel.k](https://profiles.wordpress.org/ariel.k), [jzaltzberg](https://profiles.wordpress.org/jzaltzberg), [mati1000](https://profiles.wordpress.org/mati1000), [bainternet](https://profiles.wordpress.org/bainternet)
**Requires at least:** 5.9
**Tested up to:** 6.2
**Stable tag:** 2.7.0
**Version:** 2.7.0
**Stable tag:** 2.7.0
**Version:** 2.7.0
**Requires PHP:** 5.6
**License:** GNU General Public License v3 or later
**License URI:** https://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -92,6 +92,12 @@ Source: https://stocksnap.io/photo/4B83RD7BV9

## Changelog ##

### 2.7.1 - 2023-03-27 ###
* Tweak: Add excerpt support for pages [ED-10254]
* Tweak: When comments is closed to post, display it to the user
* Fix: Empty "Skip to content" href ([#276](https://github.com/elementor/hello-theme/issues/276))
* Fix: Child themes using hello_elementor_body_open() no longer working ([#278](https://github.com/elementor/hello-theme/issues/278))

### 2.7.0 - 2023-03-26 ###
* Tweak: Update `Requires at least 5.9`
* Tweak: Update `Tested up to 6.2`
Expand Down
4 changes: 2 additions & 2 deletions assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Description: A plain-vanilla & lightweight theme for Elementor page builder
Author: Elementor Team
Author URI: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
Version: 2.7.0
Stable tag: 2.7.0
Version: 2.7.1
Stable tag: 2.7.1
Requires at least: 5.9
Tested up to: 6.2
Requires PHP: 5.6
Expand Down
15 changes: 8 additions & 7 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
exit; // Exit if accessed directly.
}

if ( ! post_type_supports( get_post_type(), 'comments' ) ) {
return;
}

if ( ! have_comments() && ! comments_open() ) {
return;
}

// Comment Reply Script.
if ( comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
Expand Down Expand Up @@ -60,13 +68,6 @@

<?php endif; // Check for have_comments(). ?>

<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php echo esc_html__( 'Comments are closed.', 'hello-elementor' ); ?></p>
<?php endif; ?>

<?php
comment_form(
[
Expand Down
17 changes: 16 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
exit; // Exit if accessed directly.
}

define( 'HELLO_ELEMENTOR_VERSION', '2.7.0' );
define( 'HELLO_ELEMENTOR_VERSION', '2.7.1' );

if ( ! isset( $content_width ) ) {
$content_width = 800; // Pixels.
Expand All @@ -31,6 +31,10 @@ function hello_elementor_setup() {
register_nav_menus( [ 'menu-2' => esc_html__( 'Footer', 'hello-elementor' ) ] );
}

if ( apply_filters( 'hello_elementor_post_type_support', true ) ) {
add_post_type_support( 'page', 'excerpt' );
}

if ( apply_filters( 'hello_elementor_add_theme_support', true ) ) {
add_theme_support( 'post-thumbnails' );
add_theme_support( 'automatic-feed-links' );
Expand Down Expand Up @@ -195,3 +199,14 @@ function hello_elementor_check_hide_title( $val ) {
}
}
add_filter( 'hello_elementor_page_title', 'hello_elementor_check_hide_title' );

/**
* BC:
* In v2.7.0 the theme removed the `hello_elementor_body_open()` from `header.php` replacing it with `wp_body_open()`.
* The following code prevents fatal errors in child themes that still use this function.
*/
if ( ! function_exists( 'hello_elementor_body_open' ) ) {
function hello_elementor_body_open() {
wp_body_open();
}
}
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<?php wp_body_open(); ?>

<?php if ( $enable_skip_link ) { ?>
<a class="skip-link screen-reader-text" href="<?php esc_url( $skip_link_url ); ?>"><?php echo esc_html__( 'Skip to content', 'hello-elementor' ); ?></a>
<a class="skip-link screen-reader-text" href="<?php echo esc_url( $skip_link_url ); ?>"><?php echo esc_html__( 'Skip to content', 'hello-elementor' ); ?></a>
<?php } ?>

<?php
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"slug": "elementor-hello-theme",
"homepage": "https://elementor.com/",
"description": "A sample theme for Elementor.",
"version": "2.7.0",
"version": "2.7.1",
"last_beta_version": "2.4.0-beta3",
"scripts": {
"update-version": "node .github/scripts/update-version-in-files.js",
Expand Down Expand Up @@ -53,7 +53,7 @@
"dependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.3.4",
"@lodder/grunt-postcss": "^3.1.1",
"@lodder/grunt-postcss": "^3.1.1",
"grunt-autoprefixer": "^3.0.4",
"grunt-cssnano": "^2.1.0"
}
Expand Down
10 changes: 8 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Contributors: elemntor, KingYes, ariel.k, jzaltzberg, mati1000, bainternet
Requires at least: 5.9
Tested up to: 6.2
Stable tag: 2.7.0
Version: 2.7.0
Stable tag: 2.7.1
Version: 2.7.1
Requires PHP: 5.6
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -90,6 +90,12 @@ Source: https://stocksnap.io/photo/4B83RD7BV9

== Changelog ==

= 2.7.1 - 2023-03-27 =
* Tweak: Add excerpt support for pages [ED-10254]
* Tweak: When comments is closed to post, display it to the user
* Fix: Empty "Skip to content" href ([#276](https://github.com/elementor/hello-theme/issues/276))
* Fix: Child themes using hello_elementor_body_open() no longer working ([#278](https://github.com/elementor/hello-theme/issues/278))

= 2.7.0 - 2023-03-26 =
* Tweak: Update `Requires at least 5.9`
* Tweak: Update `Tested up to 6.2`
Expand Down

0 comments on commit 10e0723

Please sign in to comment.