From 33d50b131493b287262d14acbfbbea42a9b616d2 Mon Sep 17 00:00:00 2001 From: "WebMan Design, Oliver Juhas" Date: Thu, 7 Feb 2019 20:16:02 +0100 Subject: [PATCH] 1.5.0 * Improving navigation accessibility * Improving navigation touch screen functionality * Updating localization * Updating version and changelog --- assets/js/scripts-navigation-accessibility.js | 24 +++++++++------ changelog.md | 29 +++++++++++++++++++ includes/frontend/class-menu.php | 8 ++--- languages/reykjavik.pot | 28 ++++++++++-------- readme.txt | 6 ++-- style.css | 2 +- templates/parts/intro/intro-content.php | 16 ++++++---- 7 files changed, 78 insertions(+), 35 deletions(-) diff --git a/assets/js/scripts-navigation-accessibility.js b/assets/js/scripts-navigation-accessibility.js index d4e3f71..0a505f4 100644 --- a/assets/js/scripts-navigation-accessibility.js +++ b/assets/js/scripts-navigation-accessibility.js @@ -8,7 +8,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.4.0 + * @version 1.5.0 */ @@ -73,22 +73,28 @@ */ $siteNavigation - .on( 'touchstart click', '.menu-item-has-children > a .expander', function( e ) { + .on( 'touchstart', '.menu-item-has-children > a', function( e ) { // Helper variables var - $this = $( this ).parent().parent(); // Get the LI element + el = $( this ).parent( 'li' ); // Processing - e.preventDefault(); - - $this - .toggleClass( 'focus' ) - .siblings() - .removeClass( 'focus' ); + /** + * First touch does not trigger the link, only opens the submenu. + * Second touch does trigger the link. + */ + if ( ! el.hasClass( 'focus' ) ) { + e.preventDefault(); + + el + .toggleClass( 'focus' ) + .siblings( '.focus' ) + .removeClass( 'focus' ); + } } ); diff --git a/changelog.md b/changelog.md index 3e458ef..e9f36bf 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,34 @@ # Reykjavik Changelog +## 1.5.0 + +* **Update**: Improving touch screen navigation +* **Update**: Improving accessibility +* **Update**: Improving excerpt display +* **Update**: Improving Recent Posts widget enhancements +* **Update**: Improving security +* **Update**: Removing obsolete code + +### Files changed: + + changelog.md + readme.txt + style.css + assets/js/scripts-navigation-accessibility.js + assets/scss/main.scss + includes/frontend/class-menu.php + includes/frontend/class-post-summary.php + includes/widgets/class-wp-widget-recent-posts.php + languages/reykjavik.pot + templates/parts/component/link-more.php + templates/parts/component/link-more-product.php + templates/parts/content/content.php + templates/parts/content/content-child-page.php + templates/parts/intro/intro-content.php + templates/parts/meta/entry-meta-element-comments.php + templates/parts/meta/entry-meta-element-date.php + + ## 1.4.2 * **Fix**: Displaying default background image URL when no image set in theme options diff --git a/includes/frontend/class-menu.php b/includes/frontend/class-menu.php index a8dccb6..9198074 100644 --- a/includes/frontend/class-menu.php +++ b/includes/frontend/class-menu.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.4.0 + * @version 1.5.0 * * Contents: * @@ -302,12 +302,12 @@ public static function nav_menu_item_description( $item_output, $item, $depth, $ /** - * Menu item modification: submenu expander + * Menu item modification: submenu expander. * * Primary menu only. * * @since 1.0.0 - * @version 1.3.1 + * @version 1.5.0 * * @param string $item_output Menu item output HTML (without closing ``). * @param object $item The current menu item. @@ -326,7 +326,7 @@ public static function nav_menu_item_expander( $item_output, $item, $depth, $arg // `` is required here as `$args->link_after` could also be an empty string. $item_output = str_replace( $args->link_after . '', - $args->link_after . ' ', // Accessibility: on focus, no screen reader text required + $args->link_after . ' ', $item_output ); diff --git a/languages/reykjavik.pot b/languages/reykjavik.pot index 3515542..ed8ef1f 100644 --- a/languages/reykjavik.pot +++ b/languages/reykjavik.pot @@ -3,12 +3,12 @@ msgid "" msgstr "" "Project-Id-Version: Reykjavik\n" "Report-Msgid-Bugs-To: https://support.webmandesign.eu\n" -"POT-Creation-Date: 2019-01-30 15:00+0100\n" +"POT-Creation-Date: 2019-02-07 20:12+0100\n" "PO-Revision-Date: 2015-05-12 20:39+0100\n" "Last-Translator: Oliver Juhas, WebMan Design\n" "Language-Team: \n" "Language: en\n" -"MIME-Version: 1.4.0\n" +"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.2.1\n" @@ -608,11 +608,15 @@ msgstr "" msgid "Skip to menu toggle button" msgstr "" -#: includes/frontend/class-post-summary.php:114 +#: includes/frontend/class-menu.php:329 +msgid "(Focus the link to toggle submenu.)" +msgstr "" + +#: includes/frontend/class-post-summary.php:88 msgid "This content is password protected." msgstr "" -#: includes/frontend/class-post-summary.php:114 +#: includes/frontend/class-post-summary.php:90 msgid "Enter the password to view it." msgstr "" @@ -1228,7 +1232,7 @@ msgstr "" #. translators: %s: search query. #: includes/plugins/woocommerce/class-woocommerce-pages.php:275 search.php:32 -#: templates/parts/intro/intro-content.php:85 +#: templates/parts/intro/intro-content.php:89 #, php-format msgid "Search Results for: %s" msgstr "" @@ -1714,7 +1718,7 @@ msgstr "" msgid "Recent Posts" msgstr "" -#: includes/widgets/class-wp-widget-recent-posts.php:272 +#: includes/widgets/class-wp-widget-recent-posts.php:260 msgid "From category:" msgstr "" @@ -2638,13 +2642,13 @@ msgstr "" msgid "Breadcrumbs navigation" msgstr "" -#: templates/parts/component/link-more-product.php:33 +#: templates/parts/component/link-more-product.php:32 #, php-format msgctxt "%s: Product name." msgid "View product%s…" msgstr "" -#: templates/parts/component/link-more.php:23 +#: templates/parts/component/link-more.php:22 #, php-format msgctxt "%s: Name of current post." msgid "Continue reading%s…" @@ -2772,14 +2776,14 @@ msgctxt "Post meta info description: comments count." msgid "Comments:" msgstr "" -#: templates/parts/meta/entry-meta-element-date.php:25 -#: templates/parts/meta/entry-meta-element-date.php:28 +#: templates/parts/meta/entry-meta-element-date.php:20 +#: templates/parts/meta/entry-meta-element-date.php:23 msgctxt "Post meta info description: publish date." msgid "Posted on:" msgstr "" -#: templates/parts/meta/entry-meta-element-date.php:33 -#: templates/parts/meta/entry-meta-element-date.php:35 +#: templates/parts/meta/entry-meta-element-date.php:28 +#: templates/parts/meta/entry-meta-element-date.php:30 msgctxt "Post meta info description: update date." msgid "Last updated on:" msgstr "" diff --git a/readme.txt b/readme.txt index ada0edb..ce06e2b 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: webmandesign Tags: one-column, two-columns, right-sidebar, grid-layout, flexible-header, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-image-header, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, e-commerce, portfolio Requires at least: 4.7.0 Tested up to: 5.0.3 -Stable tag: 1.4.2 +Stable tag: 1.5.0 License: GNU General Public License v3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -37,8 +37,8 @@ Please see `changelog.md` file. == Upgrade Notice == -= 1.4.2 = -Fixing displaying default background image URL when no image set in theme options. += 1.5.0 = +Improving navigation touch screen functionality, improving excerpt display, security and accessibility. == Resources == diff --git a/style.css b/style.css index 431193f..05e7047 100644 --- a/style.css +++ b/style.css @@ -3,7 +3,7 @@ Theme Name: Reykjavik Theme URI: https://www.webmandesign.eu/portfolio/reykjavik-wordpress-theme/ Author: WebMan Design Author URI: https://www.webmandesign.eu/ -Version: 1.4.2 +Version: 1.5.0 Text Domain: reykjavik Domain Path: /languages License: GNU General Public License v3 diff --git a/templates/parts/intro/intro-content.php b/templates/parts/intro/intro-content.php index b8f175d..1f8377a 100644 --- a/templates/parts/intro/intro-content.php +++ b/templates/parts/intro/intro-content.php @@ -116,12 +116,16 @@ */ if ( $page_summary ) : - ?> - -
- -
+ if ( strpos( $page_summary, 'entry-summary' ) ) { + $page_summary = str_replace( + 'entry-summary', + 'page-summary entry-summary', + $page_summary + ); + } else { + $page_summary = '
' . PHP_EOL . $page_summary . PHP_EOL . '
'; + } -