daymobrew
Forum Replies Created
-
me-south-1 = Middle East (Bahrain)
For @korsani they can Inspect Element to see which one is really Stockholm – I expect that the select/option markup includes Stockholm as a ‘name’ attribute.
I’m running my site in English so I won’t see any issue.
I had a quick look at the languanges/*.po files looking for Stockholm and Ireland.
I think that some of the po files are out of date and don’t list ‘Stockholm’ at all.
backupwpup.pot has ‘Amazon S3: Europe (Stockholm)’. The DE, DE formal and ES po files have translated this string. The others have not (FR, IT, JP, BR, PT, RU, SE, CN). This might be causing the issue (even though it’s not logical that it would).
The error is because there are 2 empty lines at the end of cardoza_facebook_like_box.php.
The last few lines are (note the blank lines):
add_action( 'admin_enqueue_scripts', 'add_promotion_to_admin_footer' );
add_action( 'login_enqueue_scripts', 'add_promotion_to_admin_footer' );
?>The best solution is to remove the close
?>
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' );
The plugin is probably compatible with HPOS because it does not work on orders (HPOS is only for orders).
Forum: Plugins
In reply to: [One Click Accessibility] 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 7 months, 2 weeks ago by daymobrew.
Forum: Plugins
In reply to: [One Click Accessibility] 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-isotope
attribute 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-isotop
e 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.