I need to wrap "No pending revisions found." in a paragraph.
<p>No pending revisions found.</p>
I see two options
1. Change the code to
return '<p>'. t('No pending revisions found.') .'</p>';
2. Convert revision_moderation_pending_revisions_admin() into a theme function
function theme_revision_moderation_pending_revisions_admin()
2 seems like the right solution, but I'm not sure if it's overkill. What would be the best way to do this? I can create the patch.
Thanks
Comments
Comment #1
webchickOh, yuck. Yes, that should totally be a theme function. If you have time to whip up a patch, that would be awesome.
Comment #2
webchickOh, and let's wrap that t() in p tags while we're at it.
So the answer is: "1 and 2, please" ;)
Comment #3
jbjaaz commentedHere is the patch.
Is it okay to call a theme function from a menu item or is it better to have the menu point to a function which then points to the theme function?
vs
Comment #4
webchickIn a quick grep through core, it looks like there's always an interim function. So yeah, let's do the second option you listed there.
Comment #5
jbjaaz commentedGot it.
I also made a quick tweak to the table column that prints out the node type. I updated it to display the human readable version of the node type instead of the internal name, eg. "Job posting" instead of "job_posting". I borrowed the code from node.module.
Comment #6
jbjaaz commentedwhoops, forgot to update the status
Comment #7
toemaz commentedI rerolled the patch against the latest dev version. Find new patch attached.
I reviewed it and it looks fine to me. Yet I'm not setting it on RTBC because I didn't test it yet.
Comment #8
add1sun commentedThat last patch is missing the p tags around the t(). I added that locally (and capitalized the comment) and everything seems hunky dory. New patch attached. If someone else can test, we can go ahead and commit this.
Comment #9
add1sun commentedcommitted to 5 and 6. 6 also needed a hook_theme for the theme function, which I added.