From 9a5b76dfbdfa49c8e9bc2e58a2a3f5dd25697f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= <69369238+mrpauloen@users.noreply.github.com> Date: Tue, 23 Aug 2022 20:52:17 +0200 Subject: [PATCH 1/3] New branch --- inc/template-tags.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index 53403e9..9b93d23 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -11,7 +11,7 @@ * * This function changes the way you see (in header section) * your site tile (or blog name), depends on different pages - * See line: 36 in header.php file + * See line: 61 in header.php file * * @since The Bootstrap Blog 0.1 */ @@ -22,6 +22,13 @@ function the_bootstrap_blog__site_title(){ if ( is_attachment() ) { $site_title = __( 'Attachment', 'the-bootstrap-blog'); } + // if feature is active, it display post title instead of site title, + // then site title from the article container is removed + // since v 0.1.5 + elseif ( is_single() and get_theme_mod( 'header_as_title' ) ){ + $site_title = the_bootstrap_blog__padlock() . single_post_title('', FALSE); + } + elseif ( is_404() ) { $site_title = __( '404', 'the-bootstrap-blog'); } @@ -53,9 +60,18 @@ function the_bootstrap_blog__site_title(){ * @since The Bootstrap Blog 0.1.4 */ function the_bootstrap_blog__site_description(){ - global $wp_query; + global $wp_query, $post; - if ( is_archive() ){ + // if there is attachment page display: Attachment + if ( is_attachment() ) { + echo get_queried_object()->post_title; + } + // if feature is active, it display post excerpt instead of site description, + elseif ( is_single() and get_theme_mod( 'header_as_title' ) ){ + remove_filter( 'get_the_excerpt', 'the_bootstrap_blog__filter__excerpt_more' ); + echo get_the_excerpt( $post ); + } + elseif ( is_archive() ){ the_archive_title(); } elseif ( is_404() ) { esc_html_e( 'Sorry, no posts matched your criteria.', 'the-bootstrap-blog' ); From 9dc0f93190d0c8a7fb82cc30e26bda5de77e53c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= <69369238+mrpauloen@users.noreply.github.com> Date: Thu, 25 Aug 2022 21:19:36 +0200 Subject: [PATCH 2/3] Header as title feature --- README.md | 13 +++++++--- header.php | 2 +- inc/customizer/customizer.php | 47 +++++++++++++++++++++++++++++++++++ inc/template-tags.php | 21 ++++++++-------- readme.txt | 22 +++++++++------- single.php | 7 ++++-- style.css | 6 ++--- 7 files changed, 89 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 6d84189..c28953c 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Summary: | The Bootstrap Blog -------------------|---------------- Contributors: | [mrpauloen](https://profiles.wordpress.org/mrpauloen/) -Version: | 0.1.4.4 +Version: | 0.1.5 Requires at least: | 5.5 -Tested up to: | 5.8 +Tested up to: | 6.0 Requires PHP: | 7.0 License: | GPLv2 or later License URI: | http://www.gnu.org/licenses/gpl-2.0.html @@ -148,13 +148,18 @@ https://wordpress.org/support/theme/the-bootstrap-blog ## Changelog +### 0.1.5 +*Released: August, 2022* + +* Added: Header as Title feature + ### 0.1.4.4 -*Released: November 14, 2021 +*Released: November 14, 2021* * Added: support JS - Remove the `no-js` class from body if JS is supported * Removed: unnecessary comment_reply_link filter hook - - fixed by new patch (51081) + - fixed by new WordPress patch (51081) ### 0.1.4.3 *Released: July 24, 2021* diff --git a/header.php b/header.php index 7efc02b..8169b2e 100644 --- a/header.php +++ b/header.php @@ -58,7 +58,7 @@ echo esc_attr( ' has-custom-header'); } ?>"> -


+


+ +

- diff --git a/style.css b/style.css index 755d94e..a175bc0 100644 --- a/style.css +++ b/style.css @@ -3,9 +3,9 @@ Theme Name: The Bootstrap Blog Author: mrpauloen Author URI: https://profiles.wordpress.org/mrpauloen/ Description: Based on the popular Bootstrap 4 library, this theme shows how mobile friendly CSS framework can be used to create sleek, simple, fast and functional websites, with ease and intuitive way in modern front-end web developmen days. -Version: 0.1.4.4 +Version: 0.1.5 Requires at least: 5.5 -Tested up to: 5.8 +Tested up to: 6.0 Requires PHP: 7.0 Tags: two-columns, custom-menu, custom-background, right-sidebar, custom-header, featured-images, sticky-post, theme-options, threaded-comments, translation-ready, blog License: GPLv2 or later @@ -15,7 +15,7 @@ Domain Path: /languages == Copyright & License Notes == - The Bootstrap Blog WordPress Theme, Copyright 2016-2021 Paweł Nowak + The Bootstrap Blog WordPress Theme, Copyright 2016-2022 Paweł Nowak The Bootstrap Blog is distributed under the terms of the GNU GPL From 953f1222c475804bd01c66ee12e53e632447985d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= <69369238+mrpauloen@users.noreply.github.com> Date: Thu, 25 Aug 2022 21:23:23 +0200 Subject: [PATCH 3/3] . --- readme.txt | 2 +- style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index eb033a1..44d5895 100644 --- a/readme.txt +++ b/readme.txt @@ -10,7 +10,7 @@ A simple two-column blog template built with Bootstrap with custom navigation, h == Description == -A simple two-column blog template built with Bootstrap with custom navigation, header, and type.. Based on the popular Bootstrap 4 library, this theme shows how mobile friendly CSS framework can be used to create sleek, simple, fast and functional websites, with ease and intuitive way in modern front-end web developmen days. +Based on the popular Bootstrap 4 library, this theme shows how mobile friendly CSS framework can be used to create sleek, simple, fast and functional websites, with ease and intuitive way in modern front-end web developmen days. == Installation == diff --git a/style.css b/style.css index a175bc0..a0b1ed8 100644 --- a/style.css +++ b/style.css @@ -2,7 +2,7 @@ Theme Name: The Bootstrap Blog Author: mrpauloen Author URI: https://profiles.wordpress.org/mrpauloen/ -Description: Based on the popular Bootstrap 4 library, this theme shows how mobile friendly CSS framework can be used to create sleek, simple, fast and functional websites, with ease and intuitive way in modern front-end web developmen days. +Description: A simple two-column WordPress theme, built on Bootstrap 4 with custom navigation, header, and type. Based on the popular Bootstrap 4 library, this theme shows how mobile friendly CSS framework can be used to create sleek, simple, fast and functional websites, with ease and intuitive way in modern front-end web developmen days. Version: 0.1.5 Requires at least: 5.5 Tested up to: 6.0