Skip to content

Commit

Permalink
Update Astra theme from 4.4.0 to 4.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpoke-bot committed Nov 9, 2023
1 parent d90cf41 commit 8a55744
Show file tree
Hide file tree
Showing 77 changed files with 37,504 additions and 37,375 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wp-content/themes/astra/assets/css/minified/style.min-rtl.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wp-content/themes/astra/assets/css/minified/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-content/themes/astra/assets/js/minified/frontend.min.js

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions wp-content/themes/astra/assets/js/minified/live-search.min.js

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-content/themes/astra/assets/js/minified/style.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-content/themes/astra/assets/js/unminified/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
* @since x.x.x
*/
if ( astra.is_scroll_to_id ) {
const links = document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger)');
const links = document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger):not(.skip-link)');
if (links) {

for (const link of links) {
Expand Down
94 changes: 50 additions & 44 deletions wp-content/themes/astra/assets/js/unminified/live-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
let processedHtml = '';

Object.entries( resultsData ).map( ( [ postType, postsData ] ) => {
processedHtml += `<label class="ast-search--posttype-heading"> ${postType}s </label>`;
let postTypeLabel = astra_search.search_post_types_labels[postType] ? astra_search.search_post_types_labels[postType] : postType + 's';
processedHtml += `<label class="ast-search--posttype-heading"> ${postTypeLabel} </label>`;
postsData.map((post) => {
const searchPostTitle = decodeHTMLEntities(post.title.rendered);
processedHtml += `<a class="ast-search-item" role="option" target="_self" href="${post.link}"> <span> ${searchPostTitle} </span> </a>`;
Expand All @@ -29,7 +30,7 @@
window.addEventListener( "load", function(e) {
const searchInputs = document.querySelectorAll('.search-field');
searchInputs.forEach(searchInput => {
searchInput.addEventListener('input', async (event) => {
searchInput.addEventListener('input', function (event) {
const searchForm = searchInput.closest('form.search-form');
const searchTerm = event.target.value.trim();
const postTypes = astra_search.search_post_types;
Expand All @@ -48,52 +49,57 @@
astra_search.search_posts_per_page
}&search=${searchTerm}${astra_search.search_language ? `&lang=${astra_search.search_language}` : ''}`;

const response = await fetch( restRequest );
const postsData = await response.json();
let resultsContainer = '';

if (postsData.length > 0) {
let formattedPostsData = {}
postsData.map((post) => {
if ( post.type in formattedPostsData ) {
formattedPostsData[post.type].push(post);
var xhr = new XMLHttpRequest();
xhr.open( 'GET', restRequest, true );
xhr.onreadystatechange = function () {
if ( xhr.readyState === 4 && xhr.status === 200 ) {
const postsData = JSON.parse(xhr.responseText);
let resultsContainer = '';

if (postsData.length > 0) {
let formattedPostsData = {}
postsData.map((post) => {
if ( post.type in formattedPostsData ) {
formattedPostsData[post.type].push(post);
} else {
formattedPostsData[post.type] = [post];
}
});
let searchResultMarkup = getSearchResultPostMarkup(formattedPostsData);
resultsContainer = `
<div
class="ast-live-search-results"
role="listbox"
aria-label="Search results"
style="top: ${parseInt(searchForm.offsetHeight) + 10}px;"
>
${searchResultMarkup}
</div>
`;
} else {
formattedPostsData[post.type] = [post];
resultsContainer = `
<div
class="ast-live-search-results"
role="listbox"
aria-label="Search results"
style="top: ${parseInt(searchForm.offsetHeight) + 10}px;"
>
<label class="ast-search--no-results-heading"> ${astra_search.no_live_results_found} </label>
</div>
`;
}
});
let searchResultMarkup = getSearchResultPostMarkup(formattedPostsData);
resultsContainer = `
<div
class="ast-live-search-results"
role="listbox"
aria-label="Search results"
style="top: ${parseInt(searchForm.offsetHeight) + 10}px;"
>
${searchResultMarkup}
</div>
`;
} else {
resultsContainer = `
<div
class="ast-live-search-results"
role="listbox"
aria-label="Search results"
style="top: ${parseInt(searchForm.offsetHeight) + 10}px;"
>
<label class="ast-search--no-results-heading"> ${astra_search.no_live_results_found} </label>
</div>
`;
}

const searchResultsWrappers = document.querySelectorAll('.ast-live-search-results');
if ( searchResultsWrappers ) {
searchResultsWrappers.forEach(function(wrap) {
wrap.parentNode.removeChild(wrap);
});
}

searchForm.insertAdjacentHTML('beforeend', resultsContainer);
const searchResultsWrappers = document.querySelectorAll('.ast-live-search-results');
if ( searchResultsWrappers ) {
searchResultsWrappers.forEach(function(wrap) {
wrap.parentNode.removeChild(wrap);
});
}
searchForm.insertAdjacentHTML('beforeend', resultsContainer);
}
};

xhr.send();
} catch (error) {
console.error('Error while fetching data:', error);
}
Expand Down
2 changes: 1 addition & 1 deletion wp-content/themes/astra/assets/js/unminified/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
* @since x.x.x
*/
if ( astra.is_scroll_to_id ) {
const links = document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger)');
const links = document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger):not(.skip-link)');
if (links) {

for (const link of links) {
Expand Down
2 changes: 1 addition & 1 deletion wp-content/themes/astra/assets/js/unminified/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ astScrollToTopHandler = function ( masthead, astScrollTop ) {
* @since x.x.x
*/
if ( astra.is_scroll_to_id ) {
const links = document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger)');
const links = document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger):not(.skip-link)');
if (links) {

for (const link of links) {
Expand Down
14 changes: 14 additions & 0 deletions wp-content/themes/astra/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
v4.4.1
- Improvement: Compatibility with WordPress-6.4.
- Improvement: Updated SelectWoo library to 1.0.10 to hardened the security.
- Fix: Default colors from customizer palette are mismatch with frontend global colors & with block editor's theme colors.
- Fix: Smooth Scroll fails to navigate by keyboard on-focus and eventually breaks Accessibility.
- Fix: Search - Live Search - Search results dropdown goes beneath the header menu.
- Fix: Search - Live Search results container not visible in offcanvas section.
- Fix: Search - Live search is not working on the Safari browser.
- Fix: Search - Live search not getting their translated post type label on the frontend.
- Fix: WooCommerce - Duplicate 'No Products in the Cart' Message in WooCommerce Cart Widget.
- Fix: Editor - Content Background not applying correctly in some edge cases.
- Fix: Post Title - Behind Featured image position breaks the UI with sidebar layout.
- Fix: Block Editor - Slow editor experience after version 4.4.0.

v4.4.0
- New: Header Builder - Search - Introducing a new feature Live Search. ( https://wpastra.com/docs/live-search/ )
- New: Header Builder - Search - Post Types selection option to filter Live Search results within.
Expand Down
2 changes: 1 addition & 1 deletion wp-content/themes/astra/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Define Constants
*/
define( 'ASTRA_THEME_VERSION', '4.4.0' );
define( 'ASTRA_THEME_VERSION', '4.4.1' );
define( 'ASTRA_THEME_SETTINGS', 'astra-settings' );
define( 'ASTRA_THEME_DIR', trailingslashit( get_template_directory() ) );
define( 'ASTRA_THEME_URI', trailingslashit( esc_url( get_template_directory_uri() ) ) );
Expand Down
Loading

0 comments on commit 8a55744

Please sign in to comment.