daymobrew
Forum Replies Created
-
Forum: Plugins
In reply to: [Loco Translate] Translations not showing – custom pluginMy code was missing the domain in the l10n calls.
Something like:
__( 'English string' );instead of:
__( 'English string', 'tracking-info-to-wc-order' );Forum: Plugins
In reply to: [Ally - Web Accessibility & Usability] Red lines caused by pluginThe website has the accessibility plugin, not the site visitor. And I don’t think that the browser knows if the visitor has a disability and needs that feature.
- This reply was modified 2 years, 1 month ago by daymobrew.
Forum: Plugins
In reply to: [Ally - Web Accessibility & Usability] Red lines caused by pluginThis is intentional – it is a :focus style, to help people find what element the keyboard is focussed on. I don’t think that it is possible to determine whether the user needs or does not need that red outline.
Would you prefer if it was a different colour?
Forum: Plugins
In reply to: [WP Super Cache] str_contains etc only in PHP8No errors, a premptive/paranoid report. I didn’t know about the polyfill. I’ve updated my sites with WP Super Cache and zero problems. Thanks.
Forum: Plugins
In reply to: [Post grid and filter ultimate] How do I make grid layout instead of masonryI changed two files
- includes/class-pgafu-script.php – add filter to change layoutMode, use inline script to pass this data to JS file.
- assets/js/pgafu-public.js – use above data to set isotope layoutMode.
Diff is at: https://pastebin.com/nbCeR5Xz and below:
--- post-grid-and-filter-ultimate/assets/js/pgafu-public.js.orig 2021-01-28 08:40:04.000000000 +0000 +++ post-grid-and-filter-ultimate/assets/js/pgafu-public.js 2024-02-22 18:21:03.405981500 +0000 @@ -189,6 +189,7 @@ jQuery('#'+filter_container).isotope({ itemSelector : '.pgafu-post-cnt', filter : active_attr, + layoutMode : PGAGFU.layoutMode, }); jQuery(document).on('click', '#'+filter_id+' li', function() { --- post-grid-and-filter-ultimate/includes/class-pgafu-script.php.orig 2023-06-02 02:43:58.000000000 +0100 +++ post-grid-and-filter-ultimate/includes/class-pgafu-script.php 2024-02-23 15:17:29.976274500 +0000 @@ -125,6 +125,14 @@ wp_enqueue_style( 'pgafu-admin-style'); } + // Allow for different layout mode (default is 'masonry'); + $default_layout_mode = 'masonry'; + $layout_mode = apply_filters( 'pgafu_isotope_layoutmode', $default_layout_mode ); + // Ensure the mode is one of the permitted types. + if ( ! in_array( $layout_mode, array( 'masonry', 'fitRows', 'vertical', 'packery', 'cellsByRow', 'masonryHorizontal', 'fitColumns', 'cellsByColumn', 'horiz' ) ) ) { + $layout_mode = $default_layout_mode; + } + wp_add_inline_script( 'pgafu-public-js', 'const PGAGFU = ' . json_encode( array( 'layoutMode' => "$layout_mode" ) ) ); } }Forum: Plugins
In reply to: [Post grid and filter ultimate] How do I make grid layout instead of masonryI have developed code that allows users change the layoutMode by using a filter. I will post a patch tomorrow.
Would you consider updating the isotope script to the latest version (v3.0.6)?
Forum: Plugins
In reply to: [Post grid and filter ultimate] How do I make grid layout instead of masonryI tried changing the html in includes/shortcode/pgafu-postgrid-filter.php to add a
data-isotopeattribute but it did not render well.<div class="pgafu-filtr-container" id="pgafu-post-filtr-<?php echo esc_attr($unique); ?>" data-isotope='{ "layoutMode": "fitRows" }'>The best solution maybe to use wp_add_inline_script to set a layoutMode value that will be referenced in pgafu-public.js.
I will look into this.
Forum: Plugins
In reply to: [Post grid and filter ultimate] How do I make grid layout instead of masonryI edited assets/js/pgafu-public.js to add
layoutMode : 'fitRows',to the isotope call in pgafu_post_filter_init().
I wonder if there is a way to set the layoutMode via
data-isotope attribute in the html? (it is briefly mentioned at: https://isotope.metafizzy.co/options)The Woo docs recommend checking for the ‘woocommerce’ class.
class_exists( 'woocommerce' )See: https://woo.com/document/query-whether-woocommerce-is-activated/
I have the same issue with PHP 8.3.2.
Same here. Reverted to 2.11.4 (thanks for the quick link @royhuetink)
Thanks for the lengthy reply. Very helpful.
I’d read the guide but I was looking at it from a ‘this affects me how’ viewpoint. I can see that I will need to update one of my blog posts so that
_skucustom field can be referenced byCF7_get_custom_field.It has been fixed in 8.3.1 by adding fallback colours to the property value e.g.
background-color: var(--wp-admin-theme-color);changed to
background-color: var(--wp-admin-theme-color, #007cba);I am using Storefront.
I set up a clean install with Woo 8.3.1 and Storefront and I do not see the issue. While the installation exhibiting the issue only has a few tiny plugins, I will review each.
Screenshot: https://snipboard.io/1ZnAtX.jpg
Status report: https://gist.github.com/damiencarbery/90304322baed53754681675c528721ee
Although my code is for a multisite installation on localhost, I see the same issue on other sites.
- This reply was modified 2 years, 5 months ago by daymobrew.