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

Wrapper function to get URL #127

Open
remyperona opened this issue Nov 30, 2016 · 2 comments
Open

Wrapper function to get URL #127

remyperona opened this issue Nov 30, 2016 · 2 comments

Comments

@remyperona
Copy link

Hi,

I'm the lead developer of WP Rocket, a caching plugin (https://github.com/wp-media/wp-rocket)

We have customers using your plugin with qTranslate-X, and we're having one issue with our exclude pages option: it's the default slug that is added, instead of the translated slug.

For example: /cart/ and /fr/cart/ instead of /cart/ and /fr/panier/

We use the qtranxf_convertURL() to get the correct path for each language currently. So ideally, you can give us a way to work with that, or another option would be to have a wrapper function which given an id and a lang would return the full URL for the page.

Kinda like the qts_get_slug() function, but returning a full path/URL.

@LC43
Copy link
Collaborator

LC43 commented Dec 6, 2016

Hi @Tabrisrp, sorry for the delay!

Would you want a function qts_get_url($lang = false) { that returns the full url based on an ID?

this qts_get_url() returns the url for the current page.

@remyperona
Copy link
Author

Yes qts_get_url( $id, $lang = false ) for example, that would be very good

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

No branches or pull requests

2 participants