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

replace deprecated calls #35

Closed
wants to merge 2 commits into from
Closed

replace deprecated calls #35

wants to merge 2 commits into from

Conversation

andiwand
Copy link

this avoids the following in my log:

[23-Feb-2016 17:19:18 UTC] PHP Notice: get_post_language was called incorrectly in /opt/users/www/wu22web1web95/html/wordpress/wp-content/plugins/polylang-translate-rewrite-slugs/polylang-translate-rewrite-slugs.php on line 175: the call to $polylang->model->get_post_language() has been deprecated in Polylang 1.8, use PLL()->model->post->get_language() instead.
Error handler in /opt/users/www/wu22web1web95/html/wordpress/wp-content/plugins/polylang/include/model.php on line 543

@grappler
Copy link

It might be nice to keep it backwards compatable. This is how I did it in another project https://github.com/grappler/polylang-slug/blob/master/polylang-slug.php#L307-L336

@andiwand
Copy link
Author

you are definitely right. i realized this after i changed it. i also saw
use and saw the oder code and may adopt it!
thanks for your reply!
On Feb 26, 2016 10:56, "Ulrich Pogson" [email protected] wrote:

It might be nice to keep it backwards compatable. This is how I did it in
another project
https://github.com/grappler/polylang-slug/blob/master/polylang-slug.php#L307-L336


Reply to this email directly or view it on GitHub
#35 (comment)
.

@andiwand andiwand closed this Mar 6, 2016
@andiwand
Copy link
Author

andiwand commented Mar 6, 2016

sorry i have stupidly recreated my fork, so this pr is broken...
here is my new one: #37

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.

2 participants