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

Store temp content per post, Fixes #84 #85

Merged
merged 1 commit into from
Apr 13, 2018
Merged

Store temp content per post, Fixes #84 #85

merged 1 commit into from
Apr 13, 2018

Conversation

stian-overasen
Copy link
Member

Change core property $_flexible_content from string to array. Temporary save Hogan content per post id to avoid getting content for previous post in loop.

See #84

@@ -441,7 +441,7 @@ public function append_modules_content( string $content ) : string {
* @return string
*/
private function get_modules_content( \WP_Post $post ) : string {
$flexible_content = $this->_flexible_content;
$flexible_content = $this->_flexible_content[ $post->ID ] ?? null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bør det ikke være ?? []?

Siden du har sagt at det er en array?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glem det. Jeg som tenkte feil

Copy link
Member Author

@stian-overasen stian-overasen Apr 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, nei. $flexible_content (den lokale i funksjonen) skal ikke være array.

@stian-overasen stian-overasen merged commit 9fedb76 into master Apr 13, 2018
@stian-overasen stian-overasen deleted the iss84 branch April 13, 2018 09:42
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.

3 participants