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

PostGetter::get_post_class unnecessarily instantiates return PostClass #1660

Closed
StuartFeldt opened this issue Feb 15, 2018 · 1 comment
Closed

Comments

@StuartFeldt
Copy link
Contributor

Expected behavior

I expect the class wrapper for the returned post class in Timber::get_post to only be instantiated once.

Actual behavior

The class wrapper is instantiated twice.

Steps to reproduce behavior

Create a class wrapper which extends TimberPost, the constructor will be called twice.

What version of WordPress, PHP and Timber are you using?

WordPress 4.9.4, PHP PHP 7.0.27, Timber 1.7.0

How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)

Composer

@jarednova
Copy link
Member

Closed by #1663 and #1661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants