Skip to content

Commit 10e0723

Browse files
authored
Merge develop into master
2 parents d685a48 + caa6f04 commit 10e0723

File tree

8 files changed

+46
-18
lines changed

8 files changed

+46
-18
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
**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)
66
**Requires at least:** 5.9
77
**Tested up to:** 6.2
8-
**Stable tag:** 2.7.0
9-
**Version:** 2.7.0
8+
**Stable tag:** 2.7.0
9+
**Version:** 2.7.0
1010
**Requires PHP:** 5.6
1111
**License:** GNU General Public License v3 or later
1212
**License URI:** https://www.gnu.org/licenses/gpl-3.0.html
@@ -92,6 +92,12 @@ Source: https://stocksnap.io/photo/4B83RD7BV9
9292

9393
## Changelog ##
9494

95+
### 2.7.1 - 2023-03-27 ###
96+
* Tweak: Add excerpt support for pages [ED-10254]
97+
* Tweak: When comments is closed to post, display it to the user
98+
* Fix: Empty "Skip to content" href ([#276](https://github.com/elementor/hello-theme/issues/276))
99+
* Fix: Child themes using hello_elementor_body_open() no longer working ([#278](https://github.com/elementor/hello-theme/issues/278))
100+
95101
### 2.7.0 - 2023-03-26 ###
96102
* Tweak: Update `Requires at least 5.9`
97103
* Tweak: Update `Tested up to 6.2`

assets/scss/style.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Description: A plain-vanilla & lightweight theme for Elementor page builder
55
Author: Elementor Team
66
Author URI: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
7-
Version: 2.7.0
8-
Stable tag: 2.7.0
7+
Version: 2.7.1
8+
Stable tag: 2.7.1
99
Requires at least: 5.9
1010
Tested up to: 6.2
1111
Requires PHP: 5.6

comments.php

+8-7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
exit; // Exit if accessed directly.
1313
}
1414

15+
if ( ! post_type_supports( get_post_type(), 'comments' ) ) {
16+
return;
17+
}
18+
19+
if ( ! have_comments() && ! comments_open() ) {
20+
return;
21+
}
22+
1523
// Comment Reply Script.
1624
if ( comments_open() && get_option( 'thread_comments' ) ) {
1725
wp_enqueue_script( 'comment-reply' );
@@ -60,13 +68,6 @@
6068

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

63-
<?php
64-
// If comments are closed and there are comments, let's leave a little note, shall we?
65-
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
66-
?>
67-
<p class="no-comments"><?php echo esc_html__( 'Comments are closed.', 'hello-elementor' ); ?></p>
68-
<?php endif; ?>
69-
7071
<?php
7172
comment_form(
7273
[

functions.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
exit; // Exit if accessed directly.
1010
}
1111

12-
define( 'HELLO_ELEMENTOR_VERSION', '2.7.0' );
12+
define( 'HELLO_ELEMENTOR_VERSION', '2.7.1' );
1313

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

34+
if ( apply_filters( 'hello_elementor_post_type_support', true ) ) {
35+
add_post_type_support( 'page', 'excerpt' );
36+
}
37+
3438
if ( apply_filters( 'hello_elementor_add_theme_support', true ) ) {
3539
add_theme_support( 'post-thumbnails' );
3640
add_theme_support( 'automatic-feed-links' );
@@ -195,3 +199,14 @@ function hello_elementor_check_hide_title( $val ) {
195199
}
196200
}
197201
add_filter( 'hello_elementor_page_title', 'hello_elementor_check_hide_title' );
202+
203+
/**
204+
* BC:
205+
* In v2.7.0 the theme removed the `hello_elementor_body_open()` from `header.php` replacing it with `wp_body_open()`.
206+
* The following code prevents fatal errors in child themes that still use this function.
207+
*/
208+
if ( ! function_exists( 'hello_elementor_body_open' ) ) {
209+
function hello_elementor_body_open() {
210+
wp_body_open();
211+
}
212+
}

header.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<?php wp_body_open(); ?>
2929

3030
<?php if ( $enable_skip_link ) { ?>
31-
<a class="skip-link screen-reader-text" href="<?php esc_url( $skip_link_url ); ?>"><?php echo esc_html__( 'Skip to content', 'hello-elementor' ); ?></a>
31+
<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>
3232
<?php } ?>
3333

3434
<?php

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"slug": "elementor-hello-theme",
44
"homepage": "https://elementor.com/",
55
"description": "A sample theme for Elementor.",
6-
"version": "2.7.0",
6+
"version": "2.7.1",
77
"last_beta_version": "2.4.0-beta3",
88
"scripts": {
99
"update-version": "node .github/scripts/update-version-in-files.js",
@@ -53,7 +53,7 @@
5353
"dependencies": {
5454
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
5555
"@babel/plugin-transform-runtime": "^7.3.4",
56-
"@lodder/grunt-postcss": "^3.1.1",
56+
"@lodder/grunt-postcss": "^3.1.1",
5757
"grunt-autoprefixer": "^3.0.4",
5858
"grunt-cssnano": "^2.1.0"
5959
}

readme.txt

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Contributors: elemntor, KingYes, ariel.k, jzaltzberg, mati1000, bainternet
44
Requires at least: 5.9
55
Tested up to: 6.2
6-
Stable tag: 2.7.0
7-
Version: 2.7.0
6+
Stable tag: 2.7.1
7+
Version: 2.7.1
88
Requires PHP: 5.6
99
License: GNU General Public License v3 or later
1010
License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -90,6 +90,12 @@ Source: https://stocksnap.io/photo/4B83RD7BV9
9090

9191
== Changelog ==
9292

93+
= 2.7.1 - 2023-03-27 =
94+
* Tweak: Add excerpt support for pages [ED-10254]
95+
* Tweak: When comments is closed to post, display it to the user
96+
* Fix: Empty "Skip to content" href ([#276](https://github.com/elementor/hello-theme/issues/276))
97+
* Fix: Child themes using hello_elementor_body_open() no longer working ([#278](https://github.com/elementor/hello-theme/issues/278))
98+
9399
= 2.7.0 - 2023-03-26 =
94100
* Tweak: Update `Requires at least 5.9`
95101
* Tweak: Update `Tested up to 6.2`

0 commit comments

Comments
 (0)