<plugin_dir>
refers to the location of the filter-everything plugin, in my case /var/www/html/wp-content/plugins/filter-everything
First, add these 2 lines to <plugin_dir>
/src/Admin/FilterFields.php
‘s getOrderByOptions
function:
– 'naturalasc' => esc_html__( 'Natural «123»', 'filter-everything' ),
– 'naturaldesc' => esc_html__( 'Natural
«123»
', 'filter-everything' ),
This will add the options in the user’s Sort Terms by
dropdown menu.
Add the following case statements to <plugin_dir>
/src/Entities/EntityManager.php
‘s sortTerms
‘s function’s switch statement:
case 'naturalasc':
usort( $terms, self::compareNatAsc('name') );
break;
case 'naturaldesc':
usort( $terms, self::compareNatDesc('name') );
break;
This will point naturalasc
and naturaldesc
to 2 new function, see next step.
Add these 2 new functions to <plugin_dir>
/src/Entities/EntityManager.php
‘s sortTerms
‘s function:
public static function compareNatAsc( $key ){
return function ($a, $b) use ($key) {
$value_1 = isset( $a->$key ) ? strtolower($a->$key) : 0;
$value_2 = isset( $b->$key ) ? strtolower($b->$key) : 0;
return strnatcmp( $value_1, $value_2 );
};
}
public static function compareNatDesc( $key ){
return function ($a, $b) use ($key) {
$value_1 = isset( $a->$key ) ? strtolower($a->$key) : 0;
$value_2 = isset( $b->$key ) ? strtolower($b->$key) : 0;
return -strnatcmp( $value_1, $value_2 );
};
}
Please update your code with this, this is a necessary sorting option for me and probably many other.
Thanks.
Would it be possible to hide the Turnstile elements (at minimum, span.cf-turnstile > div
and br.cf-turnstile-br
) when an interaction isn’t needed? Seems that leaving a huge space where the Turnstile would be kinda defeats the purpose of the “Interaction Only” setting in Advanced Settings > Appearance Mode. This is much more noticeable on the comment form than on the Forgot Password form.
What I’m going for is something like the following:
p.form-submit .cf-turnstile-comments:has(iframe[style='height: 0']),
p.form-submit:has(.cf-turnstile-comments iframe[style='height: 0']) br {
display: none;
}
But this doesn’t work, because CSS can’t target shadow DOM elements.
]]>However, each time I refresh the page, the shortcode creates a totally new set of lipsum content, making it difficult to test if I am trying to style a specific element. Is it possible to make it so the content stays the same?
One answer I can think of is to output the HTML underneath the shortcode on the generator page, that way I can copy the HTML instead of the shortcode, and paste that into the Text tab of the WYSIWYG.
On a similar note, I have a feature request: Can you add a button to the WYSIWYG to opens the shortcode generator in a popup or something? That way, we can generate the shortcode/HTML right there on the page.
]]>One thing that would be really helpful is a Group Repeater field—something that lets us create repeatable groups of fields (like a group with text, image, and link fields that can be duplicated multiple times).
This would be useful for things like:
Is this something that might be added in the future? Or is there a workaround for now?
Thanks!
]]>A.
]]>I was wondering if it would be possible to hide hashtags used at the end of the post.
Current Mastodon versions tuck these tags away nicely in the default UI as a hashtag bar, but they still show up on my site as part of the post.
For an example of the desired behavior, in the following post:I sure do love the #IncludeMastodonFeed plugin. Thank you wolfgang.lol! #wordpress #plugins #mastodon #activitypub
…we would still see “#IncludeMastodonFeed” in the post on my site, but we wouldn’t see the other ones at the end.
]]>Not all image elements have?
[alt]
-attributesElements with an informative function should have a short, descriptive alternative text. Elements that have only an aesthetic function can be ignored by leaving the alt attribute blank. Read more about the attribute
Text provided by the report @ https://pagespeed.web.dev/alt
.
Please, update the plugin to allow us to set our own alt-text or provide an alt-attribute for the cookie image.
Thanks for providing this plugin!
]]>Would that be possible?
]]>Thank you for the great plugin! I just noticed that I am unable to use a link with the type “tel:” as the Add to Cart link. It always adds the http prefix and wraps it up in “window.click” function. I needed to modify the elex-woocommerce-catalog-mode/includes/elex-catalog-mode-admin.php, function elex_cm_redirect_addtocart_product_page
to be able to let the link works on my product page.
Perhaps an ideal would be to add the feature to use other types of hyperlinks, however, an easy solution is to change the following line:
<button id="elex_prod_btn" class="btn btn-success" style="margin-top: 10px;height: 40px;padding: 0 20px;text-wrap: nowrap" onclick=" window.open('<?php echo esc_html( $suff ) . esc_html( $url_product_page ); ?>','_self')"><?php echo esc_html( $button_text_product_page ); ?></button>
to:
<button id="elex_prod_btn" class="btn btn-success" style="margin-top: 10px;height: 40px;padding: 0 20px;text-wrap: nowrap" href="<?php echo esc_html( $url_product_page ); ?>"><?php echo esc_html( $button_text_product_page ); ?></button>
The same for the shop page too: elex_cm_replace_add_cart_text_shop_with_url
Thank you very much for your great work.
]]>