From 1dafef44e6550378647276bc5188485e0fd27721 Mon Sep 17 00:00:00 2001 From: "WebMan Design, Oliver Juhas" Date: Wed, 10 Apr 2019 16:46:13 +0200 Subject: [PATCH] 2.4.0 --- assets/css/custom-styles-editor.css | 2 +- assets/js/scripts-navigation-accessibility.js | 24 +- assets/scss/custom-styles-editor.scss | 2 +- .../custom-styles/__editor-typography.scss | 2 +- changelog.md | 50 +++ footer.php | 44 +- header.php | 59 +-- includes/custom-header/class-intro.php | 67 ++- includes/customize/class-customize.php | 83 +--- includes/frontend/class-header.php | 16 +- includes/frontend/class-menu.php | 9 +- includes/frontend/class-post-media.php | 68 ++- includes/frontend/class-post-summary.php | 198 +++++---- .../class-one-click-demo-import.php | 12 +- .../demo-content-modern.xml | 420 ++---------------- includes/welcome/class-welcome.php | 61 ++- languages/modern.pot | 173 +++++--- library/includes/classes/class-core.php | 15 +- .../includes/classes/class-css-variables.php | 16 +- readme.txt | 8 +- style.css | 2 +- template-parts/admin/notice-welcome.php | 42 +- template-parts/admin/welcome-footer.php | 8 +- template-parts/admin/welcome-header.php | 4 +- template-parts/admin/welcome-promo.php | 8 +- template-parts/component/link-more.php | 16 +- template-parts/content/content.php | 12 +- template-parts/header/links-skip.php | 37 ++ .../meta/entry-meta-element-comments.php | 9 +- .../meta/entry-meta-element-date.php | 9 +- 30 files changed, 681 insertions(+), 795 deletions(-) create mode 100644 template-parts/header/links-skip.php diff --git a/assets/css/custom-styles-editor.css b/assets/css/custom-styles-editor.css index 5c4ea77..1c52860 100644 --- a/assets/css/custom-styles-editor.css +++ b/assets/css/custom-styles-editor.css @@ -53,7 +53,7 @@ mark, .highlight { -webkit-box-shadow: 0.38em 0 0 #00855b, -0.38em 0 0 #00855b; @media only screen and (max-width: 41.9375em) { .pagination a { background-color: #00855b; color: #ffffff; background-color: var(--color_accent); color: var(--color_accent_text); } } -/* FILE: main/custom-styles/__typography-editor.scss */ +/* FILE: main/custom-styles/__editor-typography.scss */ .mce-content-body { line-height: 1.62; } .mce-content-body h1, .mce-content-body .h1 { line-height: 1.19; } diff --git a/assets/js/scripts-navigation-accessibility.js b/assets/js/scripts-navigation-accessibility.js index 70c64bb..c8d469c 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 2.0.0 - * @version 2.3.0 + * @version 2.4.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/assets/scss/custom-styles-editor.scss b/assets/scss/custom-styles-editor.scss index 973e4e4..c21da4e 100644 --- a/assets/scss/custom-styles-editor.scss +++ b/assets/scss/custom-styles-editor.scss @@ -10,7 +10,7 @@ // @copyright WebMan Design, Oliver Juhas // // @since 2.0.0 -// @version 2.3.0 +// @version 2.4.0 // diff --git a/assets/scss/main/custom-styles/__editor-typography.scss b/assets/scss/main/custom-styles/__editor-typography.scss index 119c393..c13496f 100644 --- a/assets/scss/main/custom-styles/__editor-typography.scss +++ b/assets/scss/main/custom-styles/__editor-typography.scss @@ -1,4 +1,4 @@ -/* FILE: main/custom-styles/__typography-editor.scss */ +/* FILE: main/custom-styles/__editor-typography.scss */ // // Custom visual editor typography diff --git a/changelog.md b/changelog.md index c2d6ab6..e934219 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,55 @@ # Modern Changelog +## 2.4.0 + +* **Update**: Navigation accessibility and touch screen functionality +* **Update**: Improving intro image accessibility +* **Update**: Custom typography info in theme options +* **Update**: Improving accessibility skip links +* **Update**: Excerpts display +* **Update**: Info about demo required plugins +* **Update**: Demo content +* **Update**: Welcome page and notice +* **Update**: Improving CSS variables functionality for browsers with no support +* **Update**: Donation links +* **Update**: Improving code +* **Update**: Localization +* **Fix**: CSS variables background image code escaping +* **Fix**: Gallery post format slideshow not working with Gutenberg editor + +### Files changed: + + changelog.md + footer.php + header.php + readme.txt + style.css + assets/js/scripts-navigation-accessibility.js + assets/scss/custom-styles-editor.scss + includes/custom-header/class-intro.php + includes/customize/class-customize.php + includes/frontend/class-header.php + includes/frontend/class-menu.php + includes/frontend/class-post-media.php + includes/frontend/class-post-summary.php + includes/plugins/one-click-demo-import/class-one-click-demo-import.php + includes/plugins/one-click-demo-import/demo-content-modern.xml + includes/post-formats/class-post-formats.php + includes/welcome/class-welcome.php + languages/modern.pot + library/includes/classes/class-core.php + library/includes/classes/class-css-variables.php + template-parts/admin/notice-welcome.php + template-parts/admin/welcome-footer.php + template-parts/admin/welcome-header.php + template-parts/admin/welcome-promo.php + template-parts/component/link-more.php + template-parts/content/content.php + template-parts/header/links-skip.php + template-parts/meta/entry-meta-element-comments.php + template-parts/meta/entry-meta-element-date.php + + ## 2.3.1 * **Update**: Removing obsolete files (related to v2.0.0 upgrade notices) diff --git a/footer.php b/footer.php index cc0280b..f5289fa 100644 --- a/footer.php +++ b/footer.php @@ -9,48 +9,26 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 2.0.0 + * @version 2.4.0 */ -/** - * Content - */ - - do_action( 'tha_content_bottom' ); - - do_action( 'tha_content_after' ); - - - -/** - * Footer - */ - - if ( ! apply_filters( 'wmhook_modern_disable_footer', false ) ) { +do_action( 'tha_content_bottom' ); +do_action( 'tha_content_after' ); - do_action( 'tha_footer_before' ); - - do_action( 'tha_footer_top' ); - - do_action( 'tha_footer_bottom' ); - - do_action( 'tha_footer_after' ); - - } - - - -/** - * Body and WordPress footer - */ +if ( ! apply_filters( 'wmhook_modern_disable_footer', false ) ) { + do_action( 'tha_footer_before' ); + do_action( 'tha_footer_top' ); + do_action( 'tha_footer_bottom' ); + do_action( 'tha_footer_after' ); +} - do_action( 'tha_body_bottom' ); +do_action( 'tha_body_bottom' ); - wp_footer(); +wp_footer(); ?> diff --git a/header.php b/header.php index f960830..2158a97 100644 --- a/header.php +++ b/header.php @@ -9,18 +9,14 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 2.0.0 + * @version 2.4.0 */ -/** - * HTML - */ - - do_action( 'tha_html_before' ); +do_action( 'tha_html_before' ); ?> @@ -30,15 +26,10 @@ @@ -49,36 +40,14 @@ attachment_id ) ) { + $image_alt = get_post_meta( $header->attachment_id, '_wp_attachment_image_alt', true ); + if ( + ! empty( $image_alt ) + && wp_get_attachment_url( $header->attachment_id ) === $attr['src'] + ) { + $attr['alt'] = $image_alt; + $html = ' $value ) { + $html .= ' ' . $name . '="' . esc_attr( $value ) . '"'; + } + $html .= ' />'; + } + } + + + // Output + + return $html; + + } // /image_alt_text + + + + + } // /Modern_Intro add_action( 'after_setup_theme', 'Modern_Intro::init' ); diff --git a/includes/customize/class-customize.php b/includes/customize/class-customize.php index 35632e6..1b52bc5 100644 --- a/includes/customize/class-customize.php +++ b/includes/customize/class-customize.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.3.0 + * @version 2.4.0 * * Contents: * @@ -239,7 +239,7 @@ public static function option_pointer_texts_intro( $title ) { * Set theme options array * * @since 2.0.0 - * @version 2.3.0 + * @version 2.4.0 * * @param array $options */ @@ -768,23 +768,19 @@ public static function options( $options = array() ) { ), 900 . 'typography' . 200 => array( - 'type' => 'checkbox', - 'id' => 'typography_custom_fonts', - 'label' => esc_html__( 'Use custom fonts', 'modern' ), - 'default' => false, + 'type' => 'checkbox', + 'id' => 'typography_custom_fonts', + 'label' => esc_html__( 'Use custom fonts', 'modern' ), + 'description' => esc_html__( 'Disables theme default fonts loading and lets you set up your own custom fonts.', 'modern' ), + 'default' => false, ), 900 . 'typography' . 210 => array( 'type' => 'html', - 'content' => '

' . esc_html__( 'Custom fonts setup', 'modern' ) . '

' . - '

' . - sprintf( - esc_html_x( 'This theme does not restrict you to choose from a predefined set of fonts. Instead, please use any font service (such as %s) plugin you like.', '%s: linked examples of web fonts libraries such as Google Fonts or Adobe Typekit.', 'modern' ), - 'Google Fonts, Adobe Typekit' - ) . '

' . - '

' . - esc_html__( 'You can set your fonts plugin according to information provided below, or insert your custom font names (a value of "font-family" CSS property) directly into input fields (you still need to use a plugin to load those fonts on the website).', 'modern' ) . - '

', + 'content' => '

' . esc_html__( 'Custom fonts setup', 'modern' ) . '

' . sprintf( + esc_html_x( 'This theme does not restrict you to choose from a predefined set of fonts. Instead, please use any font service (such as %s) plugin you like.', '%s: linked examples of web fonts libraries such as Google Fonts or Adobe Typekit.', 'modern' ), + 'Google Fonts, Adobe Typekit' + ) . '

' . esc_html__( 'You can set your fonts plugin according to information provided below, or insert your custom font names (a value of "font-family" CSS property) directly into input fields (you still need to use a plugin to load those fonts on the website).', 'modern' ) . '

', 'active_callback' => __CLASS__ . '::is_typography_custom_fonts', ), @@ -842,76 +838,27 @@ public static function options( $options = array() ) { 900 . 'typography' . 290 => array( 'type' => 'html', 'content' => '

' . esc_html__( 'Info: CSS selectors', 'modern' ) . '

' - . '

' - . esc_html__( 'Here you can find CSS selectors list associated with each font group in the theme. You can use these in your custom font plugin settings.', 'modern' ) - . '

' + . '

' . esc_html__( 'Here you can find CSS selectors/variables list associated with each font group in the theme. You can use these in your custom font plugin settings.', 'modern' ) . '

' . '

' . '' . esc_html__( 'General text font CSS selectors:', 'modern' ) . '' . '

' . '
'
-									. implode( ', ', array(
-										'html',
-										'.site .font-body',
-									) )
+									. '--typography_fonts_text'
 									. '
' . '

' . '' . esc_html__( 'Headings font CSS selectors:', 'modern' ) . '' . '

' . '
'
-									. implode( ', ', array(
-										'.site .font-headings',
-										'.site .font-headings-primary',
-
-										'h1, .h1',
-										'h2, .h2',
-										'h3, .h3',
-										'h4, .h4',
-										'h5, .h5',
-										'h6, .h6',
-									) )
+									. '--typography_fonts_headings'
 									. '
' . '

' . '' . esc_html__( 'Logo font CSS selectors:', 'modern' ) . '' . '

' . '
'
-									. implode( ', ', array(
-										'.site-title',
-										'.site .font-logo',
-										'.site .font-headings-secondary',
-
-										'h1.display-1',
-										'h1.display-2',
-										'h1.display-3',
-										'h1.display-4',
-
-										'h2.display-1',
-										'h2.display-2',
-										'h2.display-3',
-										'h2.display-4',
-
-										'h3.display-1',
-										'h3.display-2',
-										'h3.display-3',
-										'h3.display-4',
-
-										'.h1.display-1',
-										'.h1.display-2',
-										'.h1.display-3',
-										'.h1.display-4',
-
-										'.h2.display-1',
-										'.h2.display-2',
-										'.h2.display-3',
-										'.h2.display-4',
-
-										'.h3.display-1',
-										'.h3.display-2',
-										'.h3.display-3',
-										'.h3.display-4',
-									) )
+									. '--typography_fonts_logo'
 									. '
', 'active_callback' => __CLASS__ . '::is_typography_custom_fonts', ), diff --git a/includes/frontend/class-header.php b/includes/frontend/class-header.php index e414f70..e2ef8d4 100644 --- a/includes/frontend/class-header.php +++ b/includes/frontend/class-header.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.2.0 + * @version 2.4.0 * * Contents: * @@ -201,23 +201,13 @@ public static function oldie() { * Skip links: Body top * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 */ public static function skip_links() { // Output - echo ''; + get_template_part( 'template-parts/header/links', 'skip' ); } // /skip_links diff --git a/includes/frontend/class-menu.php b/includes/frontend/class-menu.php index a287ec0..dbe48b6 100644 --- a/includes/frontend/class-menu.php +++ b/includes/frontend/class-menu.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.3.0 + * @version 2.4.0 * * Contents: * @@ -281,12 +281,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 2.0.0 - * @version 2.0.0 + * @version 2.4.0 * * @param string $item_output Menu item output HTML (without closing ``). * @param object $item The current menu item. @@ -302,9 +302,10 @@ public static function nav_menu_item_expander( $item_output, $item, $depth, $arg && in_array( 'menu-item-has-children', (array) $item->classes ) ) { + // `` 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/includes/frontend/class-post-media.php b/includes/frontend/class-post-media.php index af120ad..31e106d 100644 --- a/includes/frontend/class-post-media.php +++ b/includes/frontend/class-post-media.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 * * Contents: * @@ -33,7 +33,7 @@ class Modern_Post_Media { * Constructor * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 */ private function __construct() { @@ -69,6 +69,12 @@ private function __construct() { add_filter( 'wmhook_modern_post_media_image_size', __CLASS__ . '::size' ); + /** + * @todo Remove with WP 5.2+? + * @link https://core.trac.wordpress.org/ticket/43826 + */ + add_filter( 'get_post_gallery', __CLASS__ . '::get_post_gallery_fix', 10, 2 ); + } // /__construct @@ -710,6 +716,64 @@ public static function video( $image_size ) { + /** + * @todo Remove with WP 5.2+? + * + * Fix for retrieving Gutenberg gallery setup parameters in array. + * + * @link https://core.trac.wordpress.org/ticket/43826 + * + * @since 2.4.0 + * @version 2.4.0 + * + * @param array $gallery The first-found post gallery. + * @param int|WP_Post $post Post ID or object. + */ + public static function get_post_gallery_fix( $gallery, $post ) { + + // Variables + + $post = get_post( $post ); + + + // Requirements check + + if ( + $gallery + || ! $post + || ! function_exists( 'has_blocks' ) + || ! has_blocks( $post->post_content ) + ) { + return $gallery; + } + + + // Processing + + preg_match_all( + '/wp:gallery(.*)-->/i', + $post->post_content, + $galleries + ); + + if ( ! empty( $galleries[1] ) ) { + $gallery = json_decode( reset( $galleries[1] ), true ); + foreach ( $gallery as $key => $value ) { + if ( is_array( $value ) ) { + $gallery[ $key ] = implode( ',', $value ); + } + } + } + + + // Output + + return $gallery; + + } // /get_post_gallery_fix + + + } // /Modern_Post_Media diff --git a/includes/frontend/class-post-summary.php b/includes/frontend/class-post-summary.php index 481bcd5..c883659 100644 --- a/includes/frontend/class-post-summary.php +++ b/includes/frontend/class-post-summary.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 * * Contents: * @@ -24,17 +24,13 @@ class Modern_Post_Summary { * 0) Init */ - private static $instance; - - - /** - * Constructor + * Initialization * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 */ - private function __construct() { + public static function init() { // Processing @@ -43,39 +39,15 @@ private function __construct() { // Filters add_filter( 'the_excerpt', 'Modern_Library::remove_shortcodes' ); - add_filter( 'the_excerpt', __CLASS__ . '::excerpt', 20 ); + add_filter( 'get_the_excerpt', __CLASS__ . '::wrap_excerpt', 20 ); + add_filter( 'get_the_excerpt', __CLASS__ . '::continue_reading', 30, 2 ); + add_filter( 'excerpt_length', __CLASS__ . '::excerpt_length' ); add_filter( 'excerpt_more', __CLASS__ . '::excerpt_more' ); - add_filter( 'wmhook_modern_summary_continue_reading', __CLASS__ . '::continue_reading' ); - - - } // /__construct - - - - /** - * Initialization (get instance) - * - * @since 2.0.0 - * @version 2.0.0 - */ - public static function init() { - - // Processing - - if ( null === self::$instance ) { - self::$instance = new self; - } - - - // Output - - return self::$instance; - } // /init @@ -94,13 +66,13 @@ public static function init() { * If the post has more tag, display the content appropriately. * * @since 1.0.0 - * @version 2.0.0 + * @version 2.4.0 * * @param string $excerpt */ - public static function excerpt( $excerpt ) { + public static function excerpt( $excerpt = '' ) { - // Helper variables + // Variables $post_id = get_the_ID(); @@ -108,15 +80,13 @@ public static function excerpt( $excerpt ) { // Requirements check if ( post_password_required( $post_id ) ) { - if ( ! is_single( $post_id ) ) { - - return esc_html__( 'This content is password protected.', 'modern' ) . ' ' . esc_html__( 'Enter the password to view it.', 'modern' ) . ''; - + return esc_html__( 'This content is password protected.', 'modern' ) + . ' ' + . esc_html__( 'Enter the password to view it.', 'modern' ) + . ''; } - return; - } @@ -127,43 +97,46 @@ public static function excerpt( $excerpt ) { && Modern_Library::has_more_tag() ) { - /** - * Post has more tag - */ + if ( has_excerpt( $post_id ) ) { + $excerpt = str_replace( + 'entry-summary', + 'entry-summary has-more-tag', + $excerpt + ); + } else { + $excerpt = ''; + } - if ( has_excerpt( $post_id ) ) { - $excerpt = '
' . get_the_excerpt() . '
'; - } else { - $excerpt = ''; - } + $excerpt = apply_filters( 'the_content', $excerpt . get_the_content( '' ) . self::get_continue_reading_html() ); - $excerpt = apply_filters( 'the_content', $excerpt . get_the_content( '' ) ); + } - } else { - /** - * Default excerpt for posts without more tag - */ + // Output - $excerpt = '
' . $excerpt . '
'; + return $excerpt; - } + } // /excerpt - // Adding "Continue reading" link - if ( - ! Modern_Post::is_singular( $post_id ) - && in_array( get_post_type( $post_id ), (array) apply_filters( 'wmhook_modern_summary_continue_reading_post_type', array( 'post', 'page' ) ) ) - ) { - $excerpt .= apply_filters( 'wmhook_modern_summary_continue_reading', '' ); - } + /** + * Wrap excerpt within a `div.entry-summary`. + * + * Line breaks are required for proper functionality of `wpautop()` later on. + * + * @since 2.4.0 + * @version 2.4.0 + * + * @param string $post_excerpt + */ + public static function wrap_excerpt( $post_excerpt = '' ) { // Output - return $excerpt; + return '
' . PHP_EOL . $post_excerpt . PHP_EOL . '
'; - } // /excerpt + } // /wrap_excerpt @@ -212,29 +185,104 @@ public static function excerpt_more( $more ) { */ /** - * Excerpt "Continue reading" text + * Adding "Continue reading" link to excerpt * * @since 1.0.0 - * @version 2.0.0 + * @version 2.4.0 * - * @param string $continue + * @param string $post_excerpt The post excerpt. + * @param WP_Post $post Post object. */ - public static function continue_reading( $continue ) { + public static function continue_reading( $post_excerpt = '', $post = null ) { + + // Variables + + $post_id = get_the_ID(); + // Processing - ob_start(); - get_template_part( 'template-parts/component/link-more', get_post_type() ); + if ( + ! post_password_required( $post_id ) + && ! Modern_Post::is_singular( $post_id ) + && ! Modern_Library::has_more_tag() + && in_array( + get_post_type( $post_id ), + (array) apply_filters( 'wmhook_modern_summary_continue_reading_post_type', array( 'post', 'page' ) ) + ) + ) { + $post_excerpt .= self::get_continue_reading_html( $post ); + } // Output - return ob_get_clean(); + return $post_excerpt; } // /continue_reading + /** + * Get "Continue reading" HTML. + * + * @since 2.4.0 + * @version 2.4.0 + * + * @param WP_Post $post Post object. + * @param string $scope Optional identification of specific "Continue reading" text for better filtering. + */ + public static function get_continue_reading_html( $post = null, $scope = '' ) { + + // Pre + + $pre = apply_filters( 'wmhook_modern_summary_continue_reading_pre', false, $post, $scope ); + + if ( false !== $pre ) { + return $pre; + } + + + // Variables + + $html = ''; + $scope = (string) $scope; + $template = 'template-parts/component/link-more'; + + + // Processing + + ob_start(); + + if ( $scope && locate_template( $template . '-' . $scope . '.php' ) ) { + get_template_part( $template, $scope ); + } else { + get_template_part( $template, get_post_type() ); + } + + /** + * Stripping all new line and tab characters to prevent `wpautop()` messing things up later. + * + * "\t" - a tab. + * "\n" - a new line (line feed). + * "\r" - a carriage return. + * "\x0B" - a vertical tab. + */ + $html = str_replace( + array( "\t", "\n", "\r", "\x0B" ), + '', + ob_get_clean() + ); + + + // Output + + return (string) apply_filters( 'wmhook_modern_summary_continue_reading', $html, $post, $scope ); + + } // /get_continue_reading_html + + + } // /Modern_Post_Summary diff --git a/includes/plugins/one-click-demo-import/class-one-click-demo-import.php b/includes/plugins/one-click-demo-import/class-one-click-demo-import.php index 224cd63..e637d64 100644 --- a/includes/plugins/one-click-demo-import/class-one-click-demo-import.php +++ b/includes/plugins/one-click-demo-import/class-one-click-demo-import.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.2 + * @version 2.4.0 * * Contents: * @@ -133,7 +133,7 @@ public static function files() { * Info texts * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 * * @param string $text Default intro text. */ @@ -158,7 +158,7 @@ public static function info( $text = '' ) { $text .= '
'; $text .= '

'; - $text .= esc_html__( 'Install required plugins!', 'modern' ); + $text .= esc_html__( 'Install demo required plugins!', 'modern' ); $text .= '

'; $text .= '

'; @@ -169,6 +169,12 @@ public static function info( $text = '' ) { $text .= ''; $text .= '

'; + $text .= '

'; + $text .= ''; + $text .= esc_html__( '(Note that this set of plugins may differ from plugins recommended under Appearance → Install Plugins!)', 'modern' ); + $text .= ''; + $text .= '

'; + $text .= '
'; diff --git a/includes/plugins/one-click-demo-import/demo-content-modern.xml b/includes/plugins/one-click-demo-import/demo-content-modern.xml index d696281..786c00f 100644 --- a/includes/plugins/one-click-demo-import/demo-content-modern.xml +++ b/includes/plugins/one-click-demo-import/demo-content-modern.xml @@ -117,7 +117,7 @@ Post type: jetpack-portfolio http://themedemos.webmandesign.eu/modern/portfolio/project-1/ Fri, 01 Dec 2017 13:23:27 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-portfolio&p=136 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-portfolio&p=136 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eget libero sit amet eros sagittis iaculis sed in est. Nulla porttitor tortor quis sem iaculis, nec elementum ante fermentum.

@@ -150,22 +150,6 @@ Etiam elementum, leo quis mollis sagittis, ex erat sollicitudin libero, id iacul - - - - - - - - - - - - - - - - @@ -216,7 +200,7 @@ Etiam elementum, leo quis mollis sagittis, ex erat sollicitudin libero, id iacul http://themedemos.webmandesign.eu/modern/portfolio/project-2/ Fri, 01 Dec 2017 13:23:46 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-portfolio&p=137 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-portfolio&p=137 Lorem ipsum dolor sit amet consectetur adipiscing elit torquent per, litora risus semper leo integer primis urna nibh, facilisi facilisis suscipit nam hendrerit fames faucibus quisque.

@@ -254,22 +238,6 @@ Praesent vehicula aliquam sollicitudin. Suspendisse porta diam in augue mollis l
- - - - - - - - - - - - - - - - @@ -320,7 +288,7 @@ Praesent vehicula aliquam sollicitudin. Suspendisse porta diam in augue mollis l http://themedemos.webmandesign.eu/modern/portfolio/project-3/ Sat, 02 Dec 2017 13:25:10 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-portfolio&p=138 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-portfolio&p=138 Lorem ipsum dolor sit amet consectetur adipiscing elit tortor mi potenti, malesuada proin purus pulvinar rutrum aenean enim sociis iaculis etiam mauris, urna leo massa cras vel pharetra quam duis viverra.

Aenean maximus, urna gravida dapibus accumsan, ante mauris semper ante, et lacinia erat ipsum fringilla risus. Donec non scelerisque lectus. Suspendisse non consequat risus. @@ -346,22 +314,6 @@ Pellentesque mollis nulla quam, at ornare augue volutpat eu. Etiam elementum, le
- - - - - - - - - - - - - - - - @@ -416,7 +368,7 @@ Pellentesque mollis nulla quam, at ornare augue volutpat eu. Etiam elementum, le http://themedemos.webmandesign.eu/modern/portfolio/project-4/ Fri, 01 Dec 2017 13:25:24 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-portfolio&p=139 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-portfolio&p=139 Pellentesque mollis nulla quam, at ornare augue volutpat eu. Etiam elementum, leo quis mollis sagittis, ex erat sollicitudin libero, id iaculis tellus lacus bibendum tellus. Nam eu ex nec ante viverra elementum id eget mi. @@ -439,22 +391,6 @@ Fusce dapibus imperdiet velit non sodales. Praesent vehicula aliquam sollicitudi - - - - - - - - - - - - - - - - @@ -585,7 +521,7 @@ Etiam elementum, leo quis mollis sagittis, ex erat sollicitudin libero, id iacul http://themedemos.webmandesign.eu/modern/portfolio/project-5/ Mon, 04 Dec 2017 13:25:38 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-portfolio&p=140 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-portfolio&p=140 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eget libero sit amet eros sagittis iaculis sed in est. Nulla porttitor tortor quis sem iaculis, nec elementum ante fermentum.

Aenean maximus, urna gravida dapibus accumsan, ante mauris semper ante, et lacinia erat ipsum fringilla risus. Donec non scelerisque lectus. Suspendisse non consequat risus. @@ -609,22 +545,6 @@ Pellentesque mollis nulla quam, at ornare augue volutpat eu. Etiam elementum, le
- - - - - - - - - - - - - - - - @@ -703,7 +623,7 @@ Pellentesque mollis nulla quam, at ornare augue volutpat eu. Etiam elementum, le http://themedemos.webmandesign.eu/modern/portfolio/project-6/ Wed, 06 Dec 2017 13:25:48 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-portfolio&p=141 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-portfolio&p=141 Lorem ipsum dolor sit amet, consectetur elit. Fusce eget libero sit amet eros sagittis iaculis sed in est. Nulla porttitor tortor quis sem iaculis, nec elementum ante fermentum.

@@ -737,22 +657,6 @@ Aenean maximus, urna gravida dapibus accumsan, ante mauris semper ante, et lacin
- - - - - - - - - - - - - - - - @@ -893,7 +797,7 @@ Post type: jetpack-testimonial http://themedemos.webmandesign.eu/modern/testimonial/testimonial-1/ Fri, 04 Aug 2017 12:09:50 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-testimonial&p=121 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-testimonial&p=121 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec id vestibulum turpis, et varius nulla. Duis ante diam, pretium sollicitudin semper a, dignissim eu turpis.]]> @@ -917,34 +821,18 @@ Post type: jetpack-testimonial - - - - - - - - - - - - - - - - @@ -959,7 +847,7 @@ Post type: jetpack-testimonial http://themedemos.webmandesign.eu/modern/testimonial/testimonial-2/ Fri, 04 Aug 2017 12:10:56 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-testimonial&p=124 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-testimonial&p=124 Pellentesque vel placerat tortor, a consequat nisi. Nullam sit amet convallis leo, fringilla sagittis mi. Mauris gravida augue eget urna tristique accumsan sit amet vestibulum sem. Nulla facilisi.]]> @@ -983,34 +871,18 @@ Post type: jetpack-testimonial - - - - - - - - - - - - - - - - @@ -1025,7 +897,7 @@ Post type: jetpack-testimonial http://themedemos.webmandesign.eu/modern/testimonial/testimonial-3/ Fri, 04 Aug 2017 12:11:26 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-testimonial&p=126 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-testimonial&p=126 Nullam finibus sit amet orci id sagittis. Ut neque nulla, eleifend et auctor vitae, sodales quis sapien. Etiam convallis sem orci, tempor porta eros tincidunt vel.]]> @@ -1049,34 +921,18 @@ Post type: jetpack-testimonial - - - - - - - - - - - - - - - - @@ -1091,7 +947,7 @@ Post type: jetpack-testimonial http://themedemos.webmandesign.eu/modern/testimonial/testimonial-4/ Fri, 04 Aug 2017 12:11:59 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=jetpack-testimonial&p=128 + http://themedemos.webmandesign.eu/modern/?post_type=jetpack-testimonial&p=128 Sed mollis, ligula id dignissim congue, odio dolor consequat eros, ut feugiat diam diam non tellus. Vestibulum in tristique eros, sed lacinia turpis. Donec sed lectus ac ligula scelerisque feugiat.]]> @@ -1115,34 +971,18 @@ Post type: jetpack-testimonial - - - - - - - - - - - - - - - - @@ -3511,7 +3351,7 @@ Post type: page http://themedemos.webmandesign.eu/modern/ Wed, 12 Jul 2017 14:43:23 +0000 - http://themedemos.webmandesign.eu/reykjavik/?page_id=15 + http://themedemos.webmandesign.eu/modern/?page_id=15 This is your homepage, which is what most visitors will see when they come to your site for the first time. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in mauris eleifend, egestas lectus et, vulputate orci.

@@ -3542,22 +3382,6 @@ Vestibulum in mauris eleifend, egestas lectus et, vulputate orci.

- - - - - - - - - - - - - - - - @@ -3596,7 +3420,7 @@ Vestibulum in mauris eleifend, egestas lectus et, vulputate orci.

http://themedemos.webmandesign.eu/modern/blog/ Wed, 12 Jul 2017 14:47:37 +0000 - http://themedemos.webmandesign.eu/reykjavik/?page_id=19 + http://themedemos.webmandesign.eu/modern/?page_id=19 @@ -3620,22 +3444,6 @@ Vestibulum in mauris eleifend, egestas lectus et, vulputate orci.

- - - - - - - - - - - - - - - - @@ -3662,7 +3470,7 @@ Vestibulum in mauris eleifend, egestas lectus et, vulputate orci.

http://themedemos.webmandesign.eu/modern/about-me/ Wed, 12 Jul 2017 14:47:48 +0000 - http://themedemos.webmandesign.eu/reykjavik/?page_id=21 + http://themedemos.webmandesign.eu/modern/?page_id=21 Introduce yourself. You might be an artist who would like to introduce yourself and your work here or maybe you’re a business with a mission to describe. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

@@ -3704,22 +3512,6 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in mauris el
- - - - - - - - - - - - - - - - @@ -3758,7 +3550,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in mauris el http://themedemos.webmandesign.eu/modern/contact-me/ Wed, 12 Jul 2017 14:48:00 +0000 - http://themedemos.webmandesign.eu/reykjavik/?page_id=25 + http://themedemos.webmandesign.eu/modern/?page_id=25 Get in touch This is a page with some basic contact information, such as an address and phone number. You might also try a plugin to add a contact form. @@ -3793,22 +3585,6 @@ This is a page with some basic contact information, such as an address and phone - - - - - - - - - - - - - - - - @@ -3843,7 +3619,7 @@ This is a page with some basic contact information, such as an address and phone http://themedemos.webmandesign.eu/modern/page-with-sidebar/ Fri, 04 Aug 2017 18:19:49 +0000 - http://themedemos.webmandesign.eu/reykjavik/?page_id=202 + http://themedemos.webmandesign.eu/modern/?page_id=202 How to further control sidebar display? Sidebars and other widgetized areas display can be further controlled with WooSidebars plugin. If you only want to control display of specific widgets, you can use Jetpack plugin’s Visibility module for that. Both of these will give you a great control over you website sidebars. @@ -3875,22 +3651,6 @@ Nunc vehicula, arcu nec euismod dignissim, sapien nulla pulvinar nisl, ut fermen - - - - - - - - - - - - - - - - @@ -3929,7 +3689,7 @@ Nunc vehicula, arcu nec euismod dignissim, sapien nulla pulvinar nisl, ut fermen WebMan Design premium products. Or perhaps you are considering a small donation? -Donate now »   |   Get a premium theme » +Donate now »   |   Get a premium theme » You can also support this theme by rating it at WordPress repository page. Let's go and rate the theme ★★★★★ :) @@ -3970,7 +3730,7 @@ Post type: post http://themedemos.webmandesign.eu/modern/post-6/ Sat, 02 Dec 2017 15:48:47 +0000 - http://themedemos.webmandesign.eu/reykjavik/?p=165 + http://themedemos.webmandesign.eu/modern/?p=165 Their new technique, described in a study published on Thursday in the journal Science, promises to open new avenues of research into human prehistory and was met with excitement by geneticists and archaeologists.

@@ -4024,22 +3784,6 @@ To identify the Denisovans, Svante Paabo, a geneticist at the Planck Institute a
- - - - - - - - - - - - - - - - @@ -4086,7 +3830,7 @@ To identify the Denisovans, Svante Paabo, a geneticist at the Planck Institute a http://themedemos.webmandesign.eu/modern/post-8/ Fri, 01 Dec 2017 15:55:38 +0000 - http://themedemos.webmandesign.eu/reykjavik/?p=167 + http://themedemos.webmandesign.eu/modern/?p=167 Space is full of radio waves, and those waves, just like the ones bouncing through the Earth's atmosphere, can be converted into audible sounds. The recording starts with the patter of a summer squall. Later, a drifting tone like that of a not-quite-tuned-in radio station rises and for a while drowns out the patter. https://open.spotify.com/track/2rgraXNrUO66qHvaxft3C3 @@ -4130,22 +3874,6 @@ Dr. Kurth said the background patter was likely oscillations of charged particle - - - - - - - - - - - - - - - - @@ -4192,7 +3920,7 @@ Dr. Kurth said the background patter was likely oscillations of charged particle http://themedemos.webmandesign.eu/modern/post-7/ Fri, 01 Dec 2017 15:53:32 +0000 - http://themedemos.webmandesign.eu/reykjavik/?p=170 + http://themedemos.webmandesign.eu/modern/?p=170 @@ -4219,22 +3947,6 @@ Dr. Kurth said the background patter was likely oscillations of charged particle - - - - - - - - - - - - - - - - @@ -4343,7 +4055,7 @@ Dr. Kurth said the background patter was likely oscillations of charged particle http://themedemos.webmandesign.eu/modern/post-1/ Wed, 06 Dec 2017 15:32:08 +0000 - http://themedemos.webmandesign.eu/reykjavik/?p=154 + http://themedemos.webmandesign.eu/modern/?p=154 What is a post format? A post format is used by a theme for presenting posts in a certain format and style, such as "standard", "image", "gallery" "audio", "video", "quote", "status", "aside", "link" and/or a "chat" post. You can actually read thorough explanation of post formats on WordPress codex pages. (Post formats should not be confused with post types!) @@ -4434,22 +4146,6 @@ If you experience any difficulty setting up post formats, please http://themedemos.webmandesign.eu/modern/post-2/ Tue, 05 Dec 2017 15:35:53 +0000 - http://themedemos.webmandesign.eu/reykjavik/?p=156 + http://themedemos.webmandesign.eu/modern/?p=156 Below is just about every HTML element you might want to use in your blog posts. Check the source code to see the many embedded elements within paragraphs. This is also an example of text paragraph with dropcap first letter. Simply add class="dropcap-text" on the paragraph HTML tag where you want to display the dropcap.

@@ -4722,22 +4418,6 @@ The awesome mosaic thumbnail gallery is provided by the Jetpack plugin. To add t
- - - - - - - - - - - - - - - - @@ -4780,7 +4460,7 @@ The awesome mosaic thumbnail gallery is provided by the Jetpack plugin. To add t http://themedemos.webmandesign.eu/modern/post-3/ Mon, 04 Dec 2017 15:38:35 +0000 - http://themedemos.webmandesign.eu/reykjavik/?p=158 + http://themedemos.webmandesign.eu/modern/?p=158 Text styles

Dropcap text. Apply this format on a text paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat voltu.

@@ -4859,22 +4539,6 @@ Create a link and then turn it into a button. Like this:
- - - - - - - - - - - - - - - - @@ -4921,7 +4585,7 @@ Create a link and then turn it into a button. Like this: http://themedemos.webmandesign.eu/modern/post-4/ Mon, 04 Dec 2017 15:41:37 +0000 - http://themedemos.webmandesign.eu/reykjavik/?p=160 + http://themedemos.webmandesign.eu/modern/?p=160 Swimming hundreds of feet beneath the ocean’s surface in many parts of the world are prolific architects called giant larvaceans. These zooplankton are not particularly giant themselves (they resemble tadpoles and are about the size of a pinkie finger), but every day, they construct one or more spacious "houses” that can exceed three feet in length.

The houses are transparent mucus structures that encase the creatures inside. Giant larvaceans beat their tails to pump seawater through these structures, which filter tiny bits of dead or drifting organic matter for the animals to eat. When their filters get clogged, the larvaceans abandon ship and construct a new house. @@ -4958,22 +4622,6 @@ A high-definition camera on the remotely operated vehicle can then capture the i
- - - - - - - - - - - - - - - - @@ -5066,7 +4714,7 @@ A high-definition camera on the remotely operated vehicle can then capture the i http://themedemos.webmandesign.eu/modern/post-5/ Sun, 03 Dec 2017 15:45:33 +0000 - http://themedemos.webmandesign.eu/reykjavik/?p=163 + http://themedemos.webmandesign.eu/modern/?p=163 Sifting through teaspoons of clay and sand scraped from the floors of caves, researchers have managed to isolate ancient human DNA without turning up a single bone. Their new technique, described in a study published on Thursday in the journal Science, promises to open new avenues of research into human prehistory and was met with excitement by geneticists and archaeologists.

@@ -5125,22 +4773,6 @@ To identify the Denisovans, Svante Paabo, a geneticist at the Planck Institute a
- - - - - - - - - - - - - - - - @@ -5274,7 +4906,7 @@ Post type: sidebar http://themedemos.webmandesign.eu/modern/sidebars/sidebar-with-content/ Fri, 04 Aug 2017 15:00:36 +0000 - http://themedemos.webmandesign.eu/reykjavik/?post_type=sidebar&p=173 + http://themedemos.webmandesign.eu/modern/?post_type=sidebar&p=173 @@ -5870,4 +5502,4 @@ Post type: attachment - \ No newline at end of file + diff --git a/includes/welcome/class-welcome.php b/includes/welcome/class-welcome.php index e95de12..4b78f04 100644 --- a/includes/welcome/class-welcome.php +++ b/includes/welcome/class-welcome.php @@ -6,14 +6,15 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 * * Contents: * - * 0) Init - * 10) Renderer - * 20) Admin menu - * 30) Assets + * 0) Init + * 10) Renderer + * 20) Admin menu + * 30) Assets + * 100) Others */ class Modern_Welcome { @@ -200,6 +201,56 @@ public static function assets( $hook_suffix = '' ) { + /** + * 100) Others + */ + + /** + * Info text: Rate the theme. + * + * @since 2.4.0 + * @version 2.4.0 + */ + public static function get_info_like() { + + // Output + + return sprintf( + esc_html_x( 'If you %1$s like this theme, please rate it %2$s', '%1$s: heart icon, %2$s: star icons', 'modern' ), + '', + '
' + ) + . '
' + . '' + . esc_html__( 'And/or please consider a donation, thank you 🙏😊', 'modern' ) + . ''; + + } // /get_info_like + + + + /** + * Info text: Contact support. + * + * @since 2.4.0 + * @version 2.4.0 + */ + public static function get_info_support() { + + // Output + + return + esc_html__( 'Have a suggestion for improvement or something is not working as it should?', 'modern' ) + . ' ' + . esc_html__( 'Contact support center →', 'modern' ) + . ''; + + } // /get_info_support + + + + + } // /Modern_Welcome add_action( 'after_setup_theme', 'Modern_Welcome::init' ); diff --git a/languages/modern.pot b/languages/modern.pot index c7c2228..2d67277 100644 --- a/languages/modern.pot +++ b/languages/modern.pot @@ -3,9 +3,9 @@ msgid "" msgstr "" "Project-Id-Version: Modern\n" "Report-Msgid-Bugs-To: https://support.webmandesign.eu\n" -"POT-Creation-Date: 2019-01-27 14:06+0100\n" +"POT-Creation-Date: 2019-04-10 16:34+0200\n" "PO-Revision-Date: 2015-04-15 10:00+0100\n" -"Last-Translator: WebMan - Oliver Juhas \n" +"Last-Translator: Oliver Juhas, WebMan Design\n" "Language-Team: \n" "Language: en\n" "MIME-Version: 1.0\n" @@ -48,7 +48,7 @@ msgid "Comments are closed." msgstr "" #. translators: Custom header image description, %d: image sequential number. -#: includes/custom-header/class-intro.php:147 +#: includes/custom-header/class-intro.php:150 #, php-format msgid "Header image %d" msgstr "" @@ -80,7 +80,7 @@ msgstr "" #: includes/customize/class-customize.php:630 #: includes/customize/class-customize.php:706 #: includes/customize/class-customize.php:743 -#: includes/customize/class-customize.php:928 +#: includes/customize/class-customize.php:875 msgctxt "Customizer panel title." msgid "Theme Options" msgstr "" @@ -370,11 +370,17 @@ msgstr "" msgid "Use custom fonts" msgstr "" -#: includes/customize/class-customize.php:779 +#: includes/customize/class-customize.php:774 +msgid "" +"Disables theme default fonts loading and lets you set up your own custom " +"fonts." +msgstr "" + +#: includes/customize/class-customize.php:780 msgid "Custom fonts setup" msgstr "" -#: includes/customize/class-customize.php:782 +#: includes/customize/class-customize.php:781 #, php-format msgctxt "" "%s: linked examples of web fonts libraries such as Google Fonts or Adobe " @@ -384,7 +390,7 @@ msgid "" "Instead, please use any font service (such as %s) plugin you like." msgstr "" -#: includes/customize/class-customize.php:786 +#: includes/customize/class-customize.php:783 msgid "" "You can set your fonts plugin according to information provided below, or " "insert your custom font names (a value of \"font-family\" CSS property) " @@ -392,93 +398,94 @@ msgid "" "fonts on the website)." msgstr "" -#: includes/customize/class-customize.php:794 +#: includes/customize/class-customize.php:790 msgid "General text font" msgstr "" -#: includes/customize/class-customize.php:796 -#: includes/customize/class-customize.php:813 -#: includes/customize/class-customize.php:830 +#: includes/customize/class-customize.php:792 +#: includes/customize/class-customize.php:809 +#: includes/customize/class-customize.php:826 #, php-format msgid "Default value: %s" msgstr "" -#: includes/customize/class-customize.php:811 +#: includes/customize/class-customize.php:807 #: includes/setup/class-setup.php:591 msgid "Headings font" msgstr "" -#: includes/customize/class-customize.php:828 +#: includes/customize/class-customize.php:824 #: includes/setup/class-setup.php:597 msgid "Logo font" msgstr "" -#: includes/customize/class-customize.php:844 +#: includes/customize/class-customize.php:840 msgid "Info: CSS selectors" msgstr "" -#: includes/customize/class-customize.php:846 +#: includes/customize/class-customize.php:841 msgid "" -"Here you can find CSS selectors list associated with each font group in the " -"theme. You can use these in your custom font plugin settings." +"Here you can find CSS selectors/variables list associated with each font " +"group in the theme. You can use these in your custom font plugin settings." msgstr "" -#: includes/customize/class-customize.php:850 +#: includes/customize/class-customize.php:844 msgid "General text font CSS selectors:" msgstr "" -#: includes/customize/class-customize.php:860 +#: includes/customize/class-customize.php:851 msgid "Headings font CSS selectors:" msgstr "" -#: includes/customize/class-customize.php:877 +#: includes/customize/class-customize.php:858 msgid "Logo font CSS selectors:" msgstr "" -#: includes/customize/class-customize.php:927 +#: includes/customize/class-customize.php:874 msgctxt "Customizer section title." msgid "Others" msgstr "" -#: includes/customize/class-customize.php:934 +#: includes/customize/class-customize.php:881 +#: template-parts/admin/notice-welcome.php:40 msgid "Show \"Welcome\" page" msgstr "" -#: includes/customize/class-customize.php:935 +#: includes/customize/class-customize.php:882 msgid "Under \"Appearance\" WordPress dashboard menu." msgstr "" -#: includes/customize/class-customize.php:943 +#: includes/customize/class-customize.php:890 msgid "Enable mobile navigation" msgstr "" -#: includes/customize/class-customize.php:944 +#: includes/customize/class-customize.php:891 msgid "" "If your website navigation is very simple and you do not want to use the " "mobile navigation functionality, you can disable it here." msgstr "" -#: includes/customize/class-customize.php:1060 +#: includes/customize/class-customize.php:1007 msgid "" "Please set your website credits text or the theme default one will be " "displayed." msgstr "" -#: includes/customize/class-customize.php:1091 +#: includes/customize/class-customize.php:1038 msgid "Do not display" msgstr "" -#: includes/customize/class-customize.php:1093 -#: includes/customize/class-customize.php:1094 -#: includes/customize/class-customize.php:1095 +#: includes/customize/class-customize.php:1040 +#: includes/customize/class-customize.php:1041 +#: includes/customize/class-customize.php:1042 #, php-format msgctxt "%d: Position priority number." msgid "Above page content, position %d" msgstr "" -#: includes/customize/class-customize.php:1097 -#: includes/customize/class-customize.php:1098 -#: includes/customize/class-customize.php:1099 +#: includes/customize/class-customize.php:1044 +#: includes/customize/class-customize.php:1045 +#: includes/customize/class-customize.php:1046 #, php-format msgctxt "%d: Position priority number." msgid "Below page content, position %d" @@ -494,14 +501,6 @@ msgctxt "Slideshow slide." msgid "Next" msgstr "" -#: includes/frontend/class-header.php:212 -msgid "Skip to main navigation" -msgstr "" - -#: includes/frontend/class-header.php:218 -msgid "Skip to footer" -msgstr "" - #: includes/frontend/class-loop.php:114 includes/frontend/class-loop.php:187 msgctxt "Pagination text (visible): previous." msgid "«" @@ -536,11 +535,15 @@ msgstr "" msgid "Skip to menu toggle button" msgstr "" -#: includes/frontend/class-post-summary.php:114 +#: includes/frontend/class-menu.php:308 +msgid "(Focus the link to toggle submenu.)" +msgstr "" + +#: includes/frontend/class-post-summary.php:84 msgid "This content is password protected." msgstr "" -#: includes/frontend/class-post-summary.php:114 +#: includes/frontend/class-post-summary.php:86 msgid "Enter the password to view it." msgstr "" @@ -690,7 +693,7 @@ msgid "Get media for your website »" msgstr "" #: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:161 -msgid "Install required plugins!" +msgid "Install demo required plugins!" msgstr "" #: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:165 @@ -713,37 +716,43 @@ msgstr "" msgid "View the list of required plugins »" msgstr "" -#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:369 +#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:174 +msgid "" +"(Note that this set of plugins may differ from plugins recommended under " +"Appearance → Install Plugins!)" +msgstr "" + +#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:375 msgid "Jetpack Custom content types" msgstr "" -#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:373 +#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:379 msgid "" "Please make sure your Jetpack plugin is connected and you have activated " "Testimonials and Portfolios \"Custom content types\" in Jetpack settings " "(navigate to Jetpack → Settings → Writing)." msgstr "" -#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:374 +#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:380 msgid "" "If you do not activate these, the related demo content will not be imported." msgstr "" -#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:378 +#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:384 msgid "" "If your Jetpack plugin is connected, you may just try to reload this page " "and we will attempt to activate those custom content types for you " "automatically." msgstr "" -#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:380 +#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:386 msgid "" "If the operation is successful, this message will disappear and you should " "see 2 new items in your WordPress dashboard menu: \"Portfolio\" and " "\"Testimonials\"." msgstr "" -#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:383 +#: includes/plugins/one-click-demo-import/class-one-click-demo-import.php:389 msgid "Reload this page »" msgstr "" @@ -952,11 +961,30 @@ msgctxt "Plugins." msgid "Or install the ones you prefer." msgstr "" -#: includes/welcome/class-welcome.php:149 -#: includes/welcome/class-welcome.php:151 +#: includes/welcome/class-welcome.php:150 +#: includes/welcome/class-welcome.php:152 msgid "Welcome" msgstr "" +#: includes/welcome/class-welcome.php:219 +#, php-format +msgctxt "%1$s: heart icon, %2$s: star icons" +msgid "If you %1$s like this theme, please rate it %2$s" +msgstr "" + +#: includes/welcome/class-welcome.php:225 +msgid "And/or please consider a donation, thank you 🙏😊" +msgstr "" + +#: includes/welcome/class-welcome.php:243 +msgid "" +"Have a suggestion for improvement or something is not working as it should?" +msgstr "" + +#: includes/welcome/class-welcome.php:245 +msgid "Contact support center →" +msgstr "" + #: library/includes/classes/class-core.php:156 #, php-format msgctxt "%s: post title." @@ -974,7 +1002,8 @@ msgctxt "Paginated content title suffix, %s: page number." msgid "(page %s)" msgstr "" -#: library/includes/classes/class-core.php:455 +#: library/includes/classes/class-core.php:457 +#: template-parts/header/links-skip.php:23 msgid "Skip to main content" msgstr "" @@ -1602,17 +1631,11 @@ msgstr "" #: template-parts/admin/notice-welcome.php:27 #, php-format msgctxt "%s: Theme name." -msgid "Thank you for installing %s!" +msgid "Thank you for installing %s theme!" msgstr "" #: template-parts/admin/notice-welcome.php:34 -msgid "Please read \"Welcome\" page for information about the theme setup." -msgstr "" - -#: template-parts/admin/notice-welcome.php:41 -#, php-format -msgctxt "%s: Theme name." -msgid "Get started with %s" +msgid "Visit \"Welcome\" page for information on how to set up your website." msgstr "" #: template-parts/admin/welcome-demo.php:22 @@ -1650,7 +1673,7 @@ msgid "" "process." msgstr "" -#: template-parts/admin/welcome-footer.php:22 +#: template-parts/admin/welcome-footer.php:28 msgid "" "You can disable this page in Appearance » Customize » Theme " "Options » Others." @@ -1672,11 +1695,11 @@ msgstr "" msgid "Please take time to read the steps below to set up your website." msgstr "" -#: template-parts/admin/welcome-header.php:50 +#: template-parts/admin/welcome-header.php:52 msgid "Theme Documentation" msgstr "" -#: template-parts/admin/welcome-header.php:52 +#: template-parts/admin/welcome-header.php:54 msgid "Support Center" msgstr "" @@ -1819,7 +1842,7 @@ msgstr "" msgid "All %s »" msgstr "" -#: template-parts/component/link-more.php:23 +#: template-parts/component/link-more.php:22 #, php-format msgctxt "%s: Name of current post." msgid "Continue reading%s…" @@ -1919,6 +1942,14 @@ msgstr "" msgid "Back to top ↑" msgstr "" +#: template-parts/header/links-skip.php:22 +msgid "Skip to main navigation" +msgstr "" + +#: template-parts/header/links-skip.php:24 +msgid "Skip to footer" +msgstr "" + #: template-parts/menu/menu-primary.php:29 msgid "Primary Menu" msgstr "" @@ -1946,25 +1977,25 @@ msgctxt "Post meta info description: categories list." msgid "Categorized in:" msgstr "" -#: template-parts/meta/entry-meta-element-comments.php:31 +#: template-parts/meta/entry-meta-element-comments.php:34 #, php-format msgctxt "%s: number of comments." msgid "Comments: %s" msgstr "" -#: template-parts/meta/entry-meta-element-comments.php:33 +#: template-parts/meta/entry-meta-element-comments.php:36 msgctxt "Post meta info description: comments count." msgid "Comments:" msgstr "" -#: template-parts/meta/entry-meta-element-date.php:25 -#: template-parts/meta/entry-meta-element-date.php:28 +#: template-parts/meta/entry-meta-element-date.php:20 +#: template-parts/meta/entry-meta-element-date.php:23 msgctxt "Post meta info description: publish date." msgid "Posted on:" msgstr "" -#: template-parts/meta/entry-meta-element-date.php:33 -#: template-parts/meta/entry-meta-element-date.php:35 +#: template-parts/meta/entry-meta-element-date.php:28 +#: template-parts/meta/entry-meta-element-date.php:30 msgctxt "Post meta info description: update date." msgid "Last updated on:" msgstr "" diff --git a/library/includes/classes/class-core.php b/library/includes/classes/class-core.php index 9772cdd..1594f20 100644 --- a/library/includes/classes/class-core.php +++ b/library/includes/classes/class-core.php @@ -9,7 +9,7 @@ * * @since 1.0.0 * @version 2.7.0 - * @version 2.3.0 + * @version 2.4.0 * * Contents: * @@ -433,23 +433,25 @@ public static function remove_shortcodes( $content ) { * * @since 1.0.0 * @version 2.4.3 + * @version 2.4.0 * * @param string $id Link target element ID. * @param string $text Link text. * @param string $class Additional link CSS classes. + * @param string $html Output html, use "%s" for actual link */ - public static function link_skip_to( $id = 'content', $text = '', $class = '' ) { + public static function link_skip_to( $id = 'content', $text = '', $class = '', $html = '%s' ) { // Pre - $pre = apply_filters( 'wmhook_modern_library_link_skip_to_pre', false, $id, $text, $class ); + $pre = apply_filters( 'wmhook_modern_library_link_skip_to_pre', false, $id, $text, $class, $html ); if ( false !== $pre ) { return $pre; } - // Helper variables + // Processing if ( empty( $text ) ) { $text = __( 'Skip to main content', 'modern' ); @@ -458,7 +460,10 @@ public static function link_skip_to( $id = 'content', $text = '', $class = '' ) // Output - return '' . esc_html( $text ) . ''; + return sprintf( + (string) $html, + '' . esc_html( $text ) . '' + ); } // /link_skip_to diff --git a/library/includes/classes/class-css-variables.php b/library/includes/classes/class-css-variables.php index 12bae45..fc09052 100644 --- a/library/includes/classes/class-css-variables.php +++ b/library/includes/classes/class-css-variables.php @@ -8,7 +8,7 @@ * @subpackage Customize * * @since 2.3.0 - * @version 2.3.0 + * @version 2.4.0 * * Contents: * @@ -66,7 +66,7 @@ public static function init() { * @uses `wmhook_modern_theme_options` global hook * * @since 2.3.0 - * @version 2.3.0 + * @version 2.4.0 */ public static function get_variables_array() { @@ -153,7 +153,8 @@ public static function get_variables_array() { ); } - $css_vars[ '--' . sanitize_title( $option['id'] ) ] = esc_attr( $value ); + // Do not apply `esc_attr()` as it will escape quote marks, such as in background image URL. + $css_vars[ '--' . sanitize_title( $option['id'] ) ] = $value; /** * Filters CSS variables output in array after each single variable processing. @@ -258,7 +259,7 @@ public static function get_variable_declaration( $variable, $value ) { * @link https://github.com/jhildenbiddle/css-vars-ponyfill * * @since 2.3.0 - * @version 2.3.0 + * @version 2.4.0 */ public static function compatibility() { @@ -273,7 +274,12 @@ public static function compatibility() { wp_add_inline_script( 'css-vars-ponyfill', - "cssVars( { onlyVars: true, exclude: 'link:not([href^=\"" . esc_url_raw( get_theme_root_uri() ) . "\"])' } );" + 'window.onload = function() {' . PHP_EOL . + "\t" . 'cssVars( {' . PHP_EOL . + "\t\t" . 'onlyVars: true,' . PHP_EOL . + "\t\t" . 'exclude: \'link:not([href^="' . esc_url_raw( get_theme_root_uri() ) . '"])\'' . PHP_EOL . + "\t" . '} );' . PHP_EOL . + '};' ); } // /compatibility diff --git a/readme.txt b/readme.txt index e04b786..fccb820 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ 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, portfolio Requires at least: 4.7.0 -Tested up to: 5.0.3 -Stable tag: 2.3.1 +Tested up to: 5.1.1 +Stable tag: 2.4.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 == -= 2.3.1 = -Removing obsolete files, updating localization. += 2.4.0 = +Improving accessibility, updating info, improving excerpt display, improving CSS variables functionality, fixing Gallery post format slideshow issue with new WordPress block editor. == Resources == diff --git a/style.css b/style.css index 322cc88..61889ef 100644 --- a/style.css +++ b/style.css @@ -3,7 +3,7 @@ Theme Name: Modern Theme URI: https://www.webmandesign.eu/portfolio/modern-wordpress-theme/ Author: WebMan Design Author URI: https://www.webmandesign.eu/ -Version: 2.3.1 +Version: 2.4.0 Text Domain: modern Domain Path: /languages License: GNU General Public License v3 diff --git a/template-parts/admin/notice-welcome.php b/template-parts/admin/notice-welcome.php index b1ea32f..0ed936b 100644 --- a/template-parts/admin/notice-welcome.php +++ b/template-parts/admin/notice-welcome.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 */ @@ -24,25 +24,20 @@ ' . $theme_name . '' ); ?>

- + +
+

- +

@@ -50,23 +45,38 @@ diff --git a/template-parts/admin/welcome-footer.php b/template-parts/admin/welcome-footer.php index 75b64e1..058bd37 100644 --- a/template-parts/admin/welcome-footer.php +++ b/template-parts/admin/welcome-footer.php @@ -8,7 +8,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 */ @@ -19,4 +19,10 @@ +

+ +
+ +

+

diff --git a/template-parts/admin/welcome-header.php b/template-parts/admin/welcome-header.php index 4ce46e0..753d6a7 100644 --- a/template-parts/admin/welcome-header.php +++ b/template-parts/admin/welcome-header.php @@ -8,7 +8,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.3.0 + * @version 2.4.0 */ @@ -43,6 +43,8 @@ ?>
+
+

diff --git a/template-parts/admin/welcome-promo.php b/template-parts/admin/welcome-promo.php index 5fac15c..4c66456 100644 --- a/template-parts/admin/welcome-promo.php +++ b/template-parts/admin/welcome-promo.php @@ -8,7 +8,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 */ @@ -26,18 +26,18 @@ () → - +

- +

- +

diff --git a/template-parts/component/link-more.php b/template-parts/component/link-more.php index 65d2d37..60489ea 100644 --- a/template-parts/component/link-more.php +++ b/template-parts/component/link-more.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 */ @@ -16,14 +16,12 @@ ?>

diff --git a/template-parts/content/content.php b/template-parts/content/content.php index e0d41c1..d3c97bc 100644 --- a/template-parts/content/content.php +++ b/template-parts/content/content.php @@ -8,7 +8,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 2.0.0 + * @version 2.4.0 */ @@ -28,13 +28,13 @@ do_action( 'tha_entry_content_before' ); if ( Modern_Post::is_singular() ) { - - if ( has_excerpt() && ! Modern_Post::is_paged() ) { + if ( + has_excerpt() + && ! Modern_Post::is_paged() + ) { the_excerpt(); } - - the_content( apply_filters( 'wmhook_modern_summary_continue_reading', '' ) ); - + the_content(); } else { the_excerpt(); } diff --git a/template-parts/header/links-skip.php b/template-parts/header/links-skip.php new file mode 100644 index 0000000..621b34d --- /dev/null +++ b/template-parts/header/links-skip.php @@ -0,0 +1,37 @@ + + + diff --git a/template-parts/meta/entry-meta-element-comments.php b/template-parts/meta/entry-meta-element-comments.php index e4adb5c..994906e 100644 --- a/template-parts/meta/entry-meta-element-comments.php +++ b/template-parts/meta/entry-meta-element-comments.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.0.0 + * @version 2.4.0 */ @@ -15,7 +15,10 @@ // Requirements check - if ( ! comments_open( get_the_ID() ) ) { + if ( + post_password_required() + || ! comments_open( get_the_ID() ) + ) { return; } @@ -28,7 +31,7 @@ ?>