Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WPML support #6

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Conversation

cristianorevil
Copy link

@cristianorevil cristianorevil commented Feb 27, 2023

Add WPML support for in proxy for instant results

Description of the Change
Actually the proxy doesn't support wmpl. Results of instant search is not filtered by current user language. To add support for wpml in necessary add these lines to proxy.php file at line 353:

foreach ($existing_filter['bool']['must'] as $key => $must_filter) { if ($must_filter['term']['post_lang.keyword'] != null) { $existing_filter['bool']['must'][$key]['term']['post_lang.keyword'] = $_COOKIE['wp-wpml_current_language']; } }

Alternate Designs
None

Possible Drawbacks
None

Verification Process
Pulled the plugin into my WordPress installation and tested the results of instant search.

Checklist:
I have read the CONTRIBUTING document.
My code follows the code style of this project.
My change requires a change to the documentation.
I have updated the documentation accordingly.
I have added tests to cover my change.
All new and existing tests passed.

@andrewmorganmtc
Copy link

Is there any update on when this might be reviewed and merged? We are having to manually put in the fix breaking our update path currently.

@felipeelia
Copy link
Member

@cristianorevil thanks for the Pull Request but before it can be reviewed, you will need to adjust the code standards to conform with WP's. Do you want to make that change?

@andrewmorganmtc, just to clarify, this repository should be used as a boilerplate. Putting in fixes and adjustments in your version is the expected use of it anyway, okay? Thanks for the comment.

@jeffpaul jeffpaul requested a review from felipeelia April 18, 2024 13:35
@jeffpaul jeffpaul added this to the 1.0.0 milestone Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants