roryrory
Forum Replies Created
-
Forum: Plugins
In reply to: [Security Optimizer - The All-In-One Protection Plugin] Range of IPHello
1/
In the plugin description it i written that range of IP is available
”
Login AccessLogin Access allows you to limit the access of the login page to a specific IP’s or a range of IP’s to prevent malicious login attempts or brute-force attacks.
”
So maybe it is best to modify this text, to avoid confusion2/
My second question is if it is possible to completely deactivate the monitoring of IP because it is probably ressource consumingNB: another interesting security element that may be developed is to change the admin url so that this url is difficult to find
I mean by default it is https://www.mywebsite.com/wp-admin
So change that by a more anonymous directory like for example https://www.mywebsite.com/hfg782qdbest regards
Forum: Plugins
In reply to: [Transposh WordPress Translation] Bug with url of product permalinkHello
I confirm this bug is on all my websites that use woocommerce.
Just go in a product archives (category) and the urls that linked to each product have “–” instead of “-“.
best regardsForum: Plugins
In reply to: [Transposh WordPress Translation] Bug with url of product permalinkHello
Yes url translation is enable.
I change the function translate_url() in utils.php by adding $ttext =$translated_text; just after $ttext = str_replace(‘-‘, ‘–‘, $translated_text);
line 302 and line 312
It works now.
maybe you can investigate to fix that for the next minor version.
ThanksAlso in the function function __construct(&$transposh) {
these lines will help to get the correct url for woocommerce special page
add_filter(‘woocommerce_get_checkout_url’, array(&$this, ‘woo_uri_filter’));
add_filter(‘woocommerce_get_cart_url’, array(&$this, ‘woo_uri_filter’));
add_filter(‘woocommerce_get_checkout_order_received_url’, array(&$this, ‘woo_uri_filter’));
add_filter(‘woocommerce_get_checkout_payment_url’, array(&$this, ‘woo_uri_filter’));
add_filter(‘woocommerce_get_myaccount_page_permalink’, array(&$this, ‘woo_uri_filter’));
add_filter(‘woocommerce_cart_item_permalink’, array(&$this, ‘woo_uri_filter’));
add_filter(‘woocommerce_get_cart_page_permalink’, array(&$this, ‘woo_uri_filter’));In transposh_3rdparty.
in function function __construct(&$transposh) {
add this filter
add_filter( ‘woocommerce_add_to_cart_redirect’, array(&$this, ‘rv_redirect_on_add_to_cart’) );
then after this function add the rv_redirect_on_add_to_cart function
function rv_redirect_on_add_to_cart($url) {
if ( isset( $_POST[‘add-to-cart’] ) ) {
$product_id = (int) apply_filters( ‘woocommerce_add_to_cart_product_id’, $_POST[‘add-to-cart’] );
$urle = get_permalink($product_id); // URL to redirect to (1 is the page ID here)
$lang = transposh_utils::get_language_from_url($_SERVER[‘HTTP_REFERER’], $this->transposh->home_url);
tp_logger(‘altering woo url to:’ . transposh_utils::rewrite_url_lang_param($urle, $this->transposh->home_url, $this->transposh->enable_permalinks_rewrite, $lang, $this->transposh->edit_mode));
return transposh_utils::rewrite_url_lang_param($urle, $this->transposh->home_url, $this->transposh->enable_permalinks_rewrite, $lang, $this->transposh->edit_mode);
}
}Forum: Plugins
In reply to: [Transposh WordPress Translation] jQuery 3.x patchANother solution is to deregister the default jquery and load a working (old) version of jquery. Version 2.2.4 is working.
add_action( ‘init’, ‘wpm_jquery’ );
function wpm_jquery() {
if ( !is_admin() ) {
wp_deregister_script( ‘jquery’ );
wp_register_script( ‘jquery’, ( ‘https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js’ ), false, null, true );
wp_enqueue_script( ‘jquery’ );
}
}Forum: Plugins
In reply to: [Transposh WordPress Translation] Transposh jQuery patch for WordPress 5.5.xNice Job Senri Muria.
Forum: Plugins
In reply to: [Transposh WordPress Translation] How to generate Sitemap for other languagesHello
If you use Yoast SEO to generate sitemap.
In
wp-content_plugins_wordpress-seo_inc_sitemaps_class-post-type-sitemap-provider
and
wp-content_plugins_wordpress-seo_inc_sitemaps_class-taxonomy-sitemap-provider
just after $links[] = $url;
add
$langurls = apply_filters( ‘wpseo_sitemap_language’,$url);
if ( is_array( $langurls )) {
foreach ($langurls as $langurl) {
$links[] = $langurl;
}
continue;
}I just arrive to disable the plugin when a user is login by creating a mu-plugin
add_filter( ‘option_active_plugins’, ‘disable_logged_in_plugin’ );
function disable_logged_in_plugin( $plugins ) {
require (ABSPATH . WPINC . ‘/pluggable.php’);
if ( is_user_logged_in()) {
$plugins_not_needed = array (‘flying-scripts/flying-scripts.php’);
foreach ( $plugins_not_needed as $plugin ) {
$key = array_search( $plugin, $plugins );
if ( false !== $key ) {
unset( $plugins[ $key ] );
}
}
}
return $plugins;
}Even if this solution works it is not very good. It can be great to have the possibility to disable this plugin not only base on url, but also based on :
-> post type,
-> post number,
-> special page (woocommerce my_account, card, checkout for example)
-> login/non-login status
-> user roles…
thanksok thank you
Jquery and jqueryui are just an example. And i don’t have any issue with your amazing plugin.
But for example if we want to delay jqueryui and a script using jqueryui library.
In the wordpress wp_register_script function, there is such priority using the 3rd argument $deps.
Is the orders respected, and the loading of dependent script done only when the parent script is fully loaded?I think this option is of first importance as more than 90% of wordpress install used scripts that depends of jquery.
Hello
I am also trying to get the name of these scripts to add a http/2 push usingfunction htt2push() {
header(“Link: </wp-content/uploads/siteground-optimizer-assets/siteground-optimizer-combined-css-db2ff765783b43ff170db845f1a00e92.css>; rel=preload; as=style”, false);
}
add_action(‘wp_head’, ‘htt2push’, 0);However The combined CSS/JS filenames can’t be called via hook.
Because Instead of hooks, buffers are used.
add_action( ‘init’, array( $this, ‘start_bufffer’ ) );
add_action( ‘shutdown’, array( $this, ‘end_buffer’ ) );SG told me that we can find the names of the combined CSS/JS files by using regular expressions in this buffer.
But i never used buffer. Can somebody helps and share an example code?
thanks
Forum: Plugins
In reply to: [WooCommerce added to cart popup (Ajax)] ajax call error500Hi again
However i get a second problem unfortunately.
When in the pop-up i update quantity, then the update is done successfully.
But the spinner remains.
How to solve that please?Forum: Plugins
In reply to: [WooCommerce added to cart popup (Ajax)] ajax call error500Hello
The problem is resolved. It was a cache problem. So after clearing caches, it works.
Sorry for that.