korchiy
Forum Replies Created
-
Forum: Plugins
In reply to: [NextScripts: Social Networks Auto-Poster] SNAP Not posting to VKI found how to solve the problem:
In file:
...\social-networks-auto-poster-facebook-twitter-g\inc-cl\vk.api.php
in string 59replace fragment:
'owner_id'=>$options['pgIntID']
with:
'owner_id'=>intval($options['pgIntID'])
or for replacing the whole string:from:
$postArr = array('owner_id'=>$options['pgIntID'], 'access_token'=>$options['appAuthToken'], 'from_group'=>'1', 'message'=>$msg, 'attachments'=>$atts, 'v'=>$this->apiVer);
to:
$postArr = array('owner_id'=>intval($options['pgIntID']), 'access_token'=>$options['appAuthToken'], 'from_group'=>'1', 'message'=>$msg, 'attachments'=>$atts, 'v'=>$this->apiVer);
It’s strange, the code doesn’t depend on hosting.
Should this code be added to function.php?
Yes, you need it in the functions.php to work.
Have you tried my code? If I’m not mistaken, the WooCommerce product pages are the common “post” pages. So I think my code could work with them too. Of course, it needs to be tested in practice.
I searched the source of the WP Optimize plugin and found the function delete_cache_by_url in the WPO_Page_Cache class.
So to clean cache for the different language, I wrote the following code. Maybe it will be useful for somebody elsefunction wp_optimize_dlang_cache_clean($new_status, $old_status, $post) { if(in_array($post->post_type, ['post', 'page']) && $new_status === 'publish') { if(function_exists('pll_get_post_language') && function_exists('pll_default_language')) { $post_lang = pll_get_post_language($post->ID); // fr $def_lang = pll_default_language(); // en if($post_lang && $def_lang && $post_lang != $def_lang) { $url = home_url() . '/' . $post_lang . '/'; if(class_exists('WPO_Page_Cache')) { WPO_Page_Cache::delete_cache_by_url($url, false); } } } } } add_action('transition_post_status', 'wp_optimize_dlang_cache_clean', 10, 3);
pll_get_post_language and pll_default_language functions are from the Polylang plugin to get the current post language and the default site language.
Is the force deleting the .html, .php and .gz files of the required directory in WP Optimize cache folder equal with the partial clearing cache for this page?
What will appear if I delete them?No, my question is about the free part of your plugin.
I use the “Ultimate Member” without any paid extensions, all I wrote about is in the base plugin functionality.Forum: Plugins
In reply to: [Comments - wpDiscuz] Email activation when social loginThank you, I will try to write them.
Forum: Plugins
In reply to: [Comments - wpDiscuz] Email activation when social loginSorry, I don’t understand. Here is not the plugin support? What the way is to properly contact the plugin support?