Ivaylo Tinchev
Forum Replies Created
-
Forum: Plugins
In reply to: [AboveWP Bulgarian Eurozone] Закръглянето трябва да е диБлагодаря! Работи перфектно.
За онези от използващите разширението, които искат да го осъвременяват, но да запазят закръгляне до стотинка, просто поставете този код във functions.php на child темата (не в основната, за да не се изтрие при замяна с нова версия) или в някое PHP snippet разширение, ако ползвате такова:
function custom_abovewp_bge_convert_eur_to_bgn($price_bgn, $price_eur, $price_bgn_raw) {
return round($price_bgn_raw, 2);
}
add_filter('abovewp_bge_convert_eur_to_bgn', 'custom_abovewp_bge_convert_eur_to_bgn', 10, 3);Forum: Plugins
In reply to: [AboveWP Bulgarian Eurozone] Закръглянето трябва да е диМожете да направите филтър и да подавате към него важните параметри. Нека да се изчислява както вие сте решили, но би било добре да има опция за закачане на филтърна функция и възможност за ползване на друго изчисление.
Например:
public function convert_eur_to_bgn($price_eur) {
$price_bgn = $price_eur / $this->conversion_rate;
$price_bgn_filtered = apply_filters('abovewp_be_convert_eur_to_bgn', $price_bgn, $price_eur, $price_bgn);
return $price_bgn_filtered;
}или нещо подобно.
public function __construct() {
...
add_filter('abovewp_be_convert_eur_to_bgn', [$this, 'default_convert_eur_to_bgn'], 10, 3);
}public function default_convert_eur_to_bgn($price_bgn_current, $price_bgn, $price_eur) {
$price_bgn_modified = round($price_bgn, 2);
return $price_bgn_modified;
}И всеки може да си променя метода на изчисляване/закръгляне по-късно:
add_filter('abovewp_be_convert_eur_to_bgn', 'custom_convert_eur_to_bgn', 10, 3);function custom_convert_eur_to_bgn($price_bgn_current, $price_bgn, $price_eur) {
/* Calculations go here */
return $price_bgn_modified:
}Писано от телефона и дописано на компютъра. Може да има грешки. Не съм тествал нищо. Само давам идея.
Forum: Reviews
In reply to: [WP Date and Time Shortcode] Roman month datesHi @pavelberg1,
We are currently using the PHP date() and WordPress date_i18() functions to generate the final date results, based on the formatting characters of the PHP’s built-in DateTime class. It does not support Roman months. However please send us a request by email with your specific case (our email is on the installed plugin admin page) and we will provide a separate function for you to use those. We will include our own extensive date processing function in the future Pro edition but not in the free one.Forum: Plugins
In reply to: [WP Date and Time Shortcode] Availability of Browser Time Zone Tag?Please write to [email protected] and describe your exact need and how you plan to use the feature in details, so we may decide if we can provide help.
Forum: Plugins
In reply to: [WP Date and Time Shortcode] adding or removing month not workingThank you for your feedback. We will be working on this issue to find a good solution.
I am closing this support thread for now.
Forum: Plugins
In reply to: [WP Date and Time Shortcode] Security issue in <=2.6.7I am closing this support thread as resolved. Good luck!
Forum: Plugins
In reply to: [WP Date and Time Shortcode] Security issue in <=2.6.7Hello,
A new version of the plugin 2.6.8 was released. You may update.
There was a possible “vulnerability” when a registered contributor creates post or page content using a [wpdts] shortcode in it and purposely places a malicious JavaScript code in the post_id attribute. Then if the submitted content is overlooked and published by the administrator or the editor, the inserted JavaScript may run causing an XSS or other issue.
There is no security risk for general blogs or websites managed by their owners where no contributors are publishing or where the administrators and editors watch the content carefully before publishing it.
Forum: Plugins
In reply to: [WP Date and Time Shortcode] Security issue in <=2.6.7Hello @caordawebsol,
Thank you for writing.
We still have no detailed information and we are trying to find out what exactly is the issue. Once we know more, we will fix it.
Thank you for your patience and understanding.
PS: Generally we do not process any data input from the webpages with our shortcodes in any way, so we don’t know how this vulnerability can be exploited if there is such.
Forum: Plugins
In reply to: [WP Date and Time Shortcode] adding or removing month not workingHello @nicos22,
The plugin is currently using the built-in function of the PHP DateTime class for adding a month. If there is an error it is in the way this class calculates the date. This problem is discussed in other places too. For example here:
https://stackoverflow.com/questions/3602405/php-datetimemodify-adding-and-subtracting-months
I suppose we will have to build our own function and integrate it in the next version of the plugin but we need to think what are the complications that may arise from this and ask ourselves the question why the developers of the PHP have not made it in a different way.Thank you for your feedback.
PS: You may share what exactly is your case of use and we may suggest a solution.
Forum: Plugins
In reply to: [WP Date and Time Shortcode] Shortcode without SundayHello again @hasantaqvi,
Hopefully we have solved your issue. I am closing the support thread.
Hello @rankmathteam,
Thank you for your support!
Those have probably changed in the past because I remember using them before as described in my first post and they worked. By the way, the code in your website uses the
imagepart of the hook without thetwitter_part in front of it. Here is the code for OpenGraph filters listed on the following page https://rankmath.com/kb/filters-hooks-api-developer/:/** * Allows developers to change the OpenGraph image within theme. * * The dynamic part of the hook name. $network, is the network slug. Can be facebook or twitter. * * @param string $attachment_url The image we are about to add. */ add_filter( "rank_math/opengraph/{$network}/image", function( $attachment_url ) { return $attachment_url; });IMHO, it will be good to have a page with all of your up-to-date Rank Math SEO hooks described “one per line” as other products have theirs. And then the examples of use.
Thanks again!
The case in this support thread was solved.
Hello @rankmathteam,
Yes, it works now when the code is placed in the child theme’s functions.php. (It is not working when placed in plugins, probably because the $post global is not available before the wp hook.)
Thanks a lot!
Forum: Plugins
In reply to: [WP Date and Time Shortcode] Conflict with LuckyWP Table of ContentsThere are no new posts in the thread. It will be closed. If you still have the issues, please contact us again.
Hello,
The link in the database for this meta key is correct:
https://www.stp.one/wp-content/uploads/2023/03/Roadshow2023-Social-media-new.jpg