Skip to content

Allow easier customization of live blog entries without requiring template modifications #82

Merged
merged 2 commits into from Jan 24, 2013

2 participants

@cfg
cfg commented Jan 22, 2013
  • Add WPCOM_Liveblog_Entry::get_entry to consistently retrieve an entry.
  • Add liveblog_entry_template_variables filter to allow easy modification of values used by the template.
@cfg cfg Add WPCOM_Liveblog_Entry::get_fields_for_render to consistently retri…
…eve an entry.

Add liveblog_entry_template_variables filter to allow easy modification of values used by the template.
0a17bec
@cfg
cfg commented Jan 23, 2013

Renamed WPCOM_Liveblog_Entry::get_entry to WPCOM_Liveblog_Entry::get_fields_for_render and squashed the commits.

@nb
Automattic member
nb commented Jan 24, 2013

Looks much better.

One more question: why do you need to make sure all keys are set? I doubt plugins will try to build a totally new entry or unset keys. Most of the time they will just change a few values.

@cfg
cfg commented Jan 24, 2013

I wanted to ensure that someone didn't just blindly unset a value which would result in a warning when the template was rendered and a variable was missing. I suppose that's their issue/responsibility though. Should I remove it?

@nb
Automattic member
nb commented Jan 24, 2013

I think very very few people will manage to unset values and because of that their templates might break. Let's leave them do their thing :) Yeah, I think we'd better remove it.

@nb
Automattic member
nb commented Jan 24, 2013

Awesome, thanks.

@nb nb merged commit 981d013 into Automattic:master Jan 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.