Skip to content

Commit

Permalink
Merge pull request #583 from NHSLeadership/develop
Browse files Browse the repository at this point in the history
v2.4.13
  • Loading branch information
maheshmuralip authored Jun 15, 2023
2 parents 2839695 + c161696 commit 1bc9ccc
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 79 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Nightingale 2.4.12
<img src="https://img.shields.io/badge/nightingale-v2.4.12-blue">
# Nightingale 2.4.13
<img src="https://img.shields.io/badge/nightingale-v2.4.13-blue">
<a href="https://github.com/nhsuk/nhsuk-frontend">
<img src="https://img.shields.io/badge/nhsuk--frontend-v6.1.0-blue"></a> <a href="https://www.gnu.org/licenses/gpl-3.0.en.html"><img src="https://img.shields.io/badge/license-GPL%20(%3E%3D3)-green"></a> <a href="https://wordpress.org"><img src="https://img.shields.io/badge/WordPress-v5.5%20%2B-lightgrey"></a> <img src="https://img.shields.io/badge/php-5.6%2B-red"> <img src="https://img.shields.io/badge/pull%20requests-welcome-blueviolet"> <a href="https://wordpress.org/themes/nightingale"><img src="https://img.shields.io/badge/theme%20install-WP%20repo-lightgrey"></a>

Expand Down
2 changes: 1 addition & 1 deletion assets/scss/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ textarea {
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
position: absolute;
width: 1px;
word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
}
Expand Down
1 change: 0 additions & 1 deletion assets/scss/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
.nhsuk-header {
&.nhsuk-header--transactional {
.nhsuk-header__menu-toggle {
position: absolute;
@include mq($until: tablet) {
top: auto;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nhsleadership/nightingale",
"version": "2.4.12",
"version": "2.4.13",
"description": " NHSUK Frontend style theme for WordPress",
"repositories":[{"type":"composer","url":"https://wpackagist.org"}],
"type": "wordpress-theme",
Expand Down
112 changes: 57 additions & 55 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://developer.wordpress.org/themes/basics/theme-functions/
* @package Nightingale
* @copyright NHS Leadership Academy, Tony Blacker
* @version 2.4.12 07 mar 2023
* @version 2.4.13 15 jun 2023
*/

/**
Expand Down Expand Up @@ -380,45 +380,70 @@ function nightingale_register_required_plugins() {
}
}

// Only perform these over-rides if there are active plugins.
if ( $active_plugins ) {

/**
* Gravity Forms style over-ride.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the Gravity Forms plugin so any content generated by Gravity Forms fits in to this theme.
* The check around the require is to see if the plugin is active on this install
*/
if ( in_array( 'gravityforms/gravityforms.php', $active_plugins, true ) ) {
if ( ! is_admin() ) {
require get_template_directory() . '/inc/gravity-forms.php';
/**
* Gravity Forms style over-ride.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the Gravity Forms plugin so any content generated by Gravity Forms fits in to this theme.
* The check around the require is to see if the plugin is active on this install
*/
if ( in_array( 'gravityforms/gravityforms.php', $active_plugins, true ) ) {
if ( ! is_admin() ) {
require get_template_directory() . '/inc/gravity-forms.php';
}
}
}

/**
* Formidable Forms style over-ride.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the Formidable Forms plugin so any content generated by Formidable Forms fits in to this theme.
* The check around the require is to see if the plugin is active on this install
* N.B - You must set formidaable forms to 'Do not use formidable styles' for it to kick in
*/
if ( in_array( 'formidable/formidable.php', $active_plugins, true ) ) {
if ( ! is_admin() ) {
require get_template_directory() . '/inc/formidable.php';
}
}

/**
* Formidable Forms style over-ride.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the Formidable Forms plugin so any content generated by Formidable Forms fits in to this theme.
* The check around the require is to see if the plugin is active on this install
* N.B - You must set formidaable forms to 'Do not use formidable styles' for it to kick in
*/
if ( in_array( 'formidable/formidable.php', $active_plugins, true ) ) {
if ( ! is_admin() ) {
require get_template_directory() . '/inc/formidable.php';
/**
* LearnDash style over-ride.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the LearnDash plugin so any content generated by LearnDash fits in to this theme.
* The check around the require is to see if the plugin is active on this install
*/
if ( in_array( 'sfwd-lms/sfwd_lms.php', $active_plugins, true ) ) {
if ( ! is_admin() ) {
require get_template_directory() . '/inc/learndash.php';
}

add_action( 'admin_head', 'nightingale_learndash_admin_fix' );
}
}

/**
* LearnDash style over-ride.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the LearnDash plugin so any content generated by LearnDash fits in to this theme.
* The check around the require is to see if the plugin is active on this install
*/
if ( in_array( 'sfwd-lms/sfwd_lms.php', $active_plugins, true ) ) {
if ( ! is_admin() ) {
require get_template_directory() . '/inc/learndash.php';
/**
* Events Calendar style over-ride.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the Events Calendar plugin so any content generated by Events Calendar fits in to this theme.
* The check around the require is to see if the plugin is active on this install
*/
if ( in_array( 'the-events-calendar/the-events-calendar.php', $active_plugins, true ) ) {
if ( ! is_admin() ) {
require get_template_directory() . '/inc/events-calendar.php';
}
}

add_action( 'admin_head', 'nightingale_learndash_admin_fix' );
/**
* Cookie Control plugin check.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the Cookie Control plugin so the element is presented first on screen for improved accessibility
* on screen readers and for keyboard navigation.
* The check around the require is to see if the plugin is active on this install
*/
if ( in_array( 'cookie-notice/cookie-notice.php', $active_plugins, true ) ) {
require get_template_directory() . '/inc/cookie-notice.php';
}
}

/**
Expand All @@ -438,29 +463,6 @@ function nightingale_learndash_admin_fix() {
</style>';
}

/**
* Events Calendar style over-ride.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the Events Calendar plugin so any content generated by Events Calendar fits in to this theme.
* The check around the require is to see if the plugin is active on this install
*/
if ( in_array( 'the-events-calendar/the-events-calendar.php', $active_plugins, true ) ) {
if ( ! is_admin() ) {
require get_template_directory() . '/inc/events-calendar.php';
}
}

/**
* Cookie Control plugin check.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a theme file for
* the Cookie Control plugin so the element is presented first on screen for improved accessibility
* on screen readers and for keyboard navigation.
* The check around the require is to see if the plugin is active on this install
*/
if ( in_array( 'cookie-notice/cookie-notice.php', $active_plugins, true ) ) {
require get_template_directory() . '/inc/cookie-notice.php';
}

/*
* Google Tag Manager.
* N.B. This is not a plugin, nor does it provide any plugin-like changes. This is a file for
Expand Down
4 changes: 2 additions & 2 deletions inc/last-reviewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @package Nightingale-2-0
* @copyright NHS Leadership Academy, Very Twisty
* @version Feburary 2020
* @version April 2023
*/

// Tutorial found here:
Expand Down Expand Up @@ -122,7 +122,7 @@ function nightingale_page_last_reviewed() {
return;
}

$updated_date = get_the_modified_time( 'j F, Y' );
$updated_date = get_the_modified_time( 'j F Y' );
?>

<div class="nhsuk-review-date">
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
* @package Nightingale
* @copyright NHS Leadership Academy, Tony Blacker
* @version 2.4.12 7th March 2023
* @version 2.4.13 15th June 2023
*/

get_header();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "https://github.com/NHSLeadership/nightingale-2-0.git"
},
"version": "2.4.4",
"version": "2.4.13",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Requires PHP: 5.6
License: GPL v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
Theme URI: https://digital.leadershipacademy.nhs.uk/digital-capabilities/websites/nightingale-theme-user-guide/
Version: 2.4.12
Version: 2.4.13
Stable tag: 2.4


Expand Down Expand Up @@ -43,6 +43,12 @@ one level only. To show further levels, we recommend using the right (or left) h

== Changelog

=2.4.13=
* Fix for date format in last page reviewed text
* Fix for alignment issue with responsive menu button
* Bug fixes for search results page
* Removes !important from position absolute within .screen-reader-text class.

=2.4.12=
* Button style improvement for gravity forms 2.7
* Fix for checkbox rendering in gravity forms 2.7
Expand Down
13 changes: 8 additions & 5 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@

<?php
if ( has_post_thumbnail() ) :
the_post_thumbnail( 'thumbnail', [ 'class' => 'nhsuk-card__img' ] );
$image_proportion = get_theme_mod( 'blog_image_display', 'default' );
the_post_thumbnail( $image_proportion, [ 'class' => 'nhsuk-card__img' ] );
else :
$fallback = get_theme_mod( 'blog_fallback' );
if ( $fallback ) {
if ( $fallback ) :
echo wp_get_attachment_image( $fallback, 'thumbnail', false, [ 'class' => 'nhsuk-card__img' ] );
}
endif;
endif;
?>
<div class="nhsuk-card__content">
Expand All @@ -57,8 +58,10 @@
<p class="nhsuk-card__description">
<?php
$excerpt = get_the_excerpt();
$keys = explode( ' ', $s );
$excerpt = preg_replace( '/(' . implode( '|', $keys ) . ')/iu', '<span class="search-terms">\0</span>', $excerpt );
if ( ( str_contains( $excerpt, $s ) ) && ( !empty( $s ) ) ) :
$keys = explode( ' ', $s );
$excerpt = preg_replace( '/(' . implode( '|', $keys ) . ')/iu', '<span class="search-terms">\0</span>', $excerpt );
endif;
echo $excerpt; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</p>
Expand Down
2 changes: 1 addition & 1 deletion style-gutenburg.css

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

7 changes: 2 additions & 5 deletions style.css

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

2 changes: 1 addition & 1 deletion style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion style.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Theme Name: Nightingale
Text Domain: nightingale
Version: 2.4.12
Version: 2.4.13
Requires at least: 5.0
Tested up to: 6
Requires PHP: 5.2.4
Expand Down

0 comments on commit 1bc9ccc

Please sign in to comment.