The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Add filter for $fil...
 
Share:
Notifications
Clear all

Suggestion Add filter for $fileName in getCommentsCacheFileinfo

3 Posts
2 Users
0 Reactions
1,073 Views
Posts: 1
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@mbedzinski)
New Member
Joined: 3 years ago
[#5345]

Hello, I have changed comments args thats querying comments 

add_filter("wpdiscuz_comments_args", function ($args) use ($profile){
$args[ 'meta_key' ] = 'xxx';
$args[ 'meta_value' ] = $profile->id;
$args[ 'wpdType' ] = $profile->id; // need to add this to get correct cached results

return $args;
});

I get correct results but is geting cached without my custom args. Problem is cache (its file name) which dont support any custom args. 

$fileName = md5(implode(",", $commentsArgs["user_roles"]) . $commentsArgs["wpdType"] . $commentsArgs["last_parent_id"] . $commentsArgs["page"] . $commentsArgs["order"] . $commentsArgs["orderby"]) . "_" . $commentsArgs["last_parent_id"];

I need to modify cached file name that i get results with my custom args (meta_key, meta_value)

My temporary fix is adding something specific ($profile->id) to $args['wpdType'] but i dont exactly know what side effect I can get.

 

Please add filter for $filename variable 🙂


2 Replies
Asti
Posts: 8210
 Asti
Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@asti)
Illustrious Member
Joined: 8 years ago

Hi

I'm going to ask the developers about this request. I'll update the topic once I get news for you.


Reply
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8210
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

The hook will be added in future versions. 


Reply
Share: