splorp / tersus

An achingly simple WordPress theme without all the usual cruft.
GNU General Public License v3.0
99 stars 6 forks source link

New Tersus Option: Admin Notice #19

Closed splorp closed 12 years ago

splorp commented 12 years ago

Ok, so I was thinking …

Both Chris and Dan have added a blurb at the top of their Tersus-themed sites explaining why they’re so “unstyled”. Why don‘t we add an optional field on the Tersus Options page that can be used to display admin announcements, or in this case, self-promotional text. As in Chris’ example, the blurb is formatted as a <section> … </section> above the `<header> … </header> element.

<section id="admin">       <h3>Blah, blah, blah.</h3>       <p>Yadda, yadda, yadda.</p> </section>

If no text or markup exists in the aforementioned field, then the <section> … </section> doesn‘t get rendered on the page.

What do you folks think?

cdharrison commented 12 years ago

We could approach this a few ways:

This would also appear on the Tersus Options page.

splorp commented 12 years ago

I would like to do both, if possible.

As an admin of several WP sites, I like the idea of being able to easily turn on a site-wide notification or alert. In this case, the notification can double as self-promotion for the theme, as we’re developing it.

I would have a default message inserted into the field, with a means to reset the text. (Is that the function of the “Reset” button in the current Theme Options?) The text would be turned on or off via the checkbox.

cdharrison commented 12 years ago

I'll see about adding In the next day or two.

splorp commented 12 years ago

w00t!

If knew my way around my WP functions a bit better, I’d give it a whirl myself.

(And what’s with all that fugly table-ness in there? Most WP code is way cleaner than that. Ugh.)

cdharrison commented 12 years ago

I'll clean that up. Repurposed it from a tutorial, which I should probably cite in the source...

splorp commented 12 years ago

Ok, that makes sense.

Sometimes it’s hard to tell whether WP requires all that extra markup, just to keep things from going kerflunky.

There’s obviously no rush to clean that up … in fact, I could take a crack at it as well.

cdharrison commented 12 years ago

That would be great actually!

splorp commented 12 years ago

Ok, I tidied up the theme option functions as best I could. There’s still a few <input> cases in there that we aren’t currently using, but they’re not hurting anybody.

The strange thing was that even with all <table> formatting in the code, none of it was appearing in the final rendered page. WP must have been reformatting the HTML for the newer versions, leaving the old formatting for legacy installs.

Which leads to another question … how far backwards compatible should Tersus be?

I’ll open another issue for that discussion.

splorp commented 12 years ago

After a bit of tinkering, I have successfully added the admin notice (now renamed “Announcement”) settings to the theme options page. The changes are checked in, but not mentioned in the read me yet. I’ll add a mention of the new theme options when I finally get around to tagging version 0.1.4.

I also added back in all of the WP table formatting to keep our theme options looking similar to the rest of the WP admin pages.

Closing this issue.

cdharrison commented 12 years ago

Thanks for implementing this. I'll have more time to hop back in to help with this over the coming weeks.

On Nov 28, 2011, at 9:57 PM, Grant Hutchinson reply@reply.github.com wrote:

After a bit of tinkering, I have successfully added the admin notice (now renamed “Announcement”) settings to the theme options page. The changes are checked in, but not mentioned in the read me yet. I’ll add a mention of the new theme options when I finally get around to tagging version 0.1.4.

I also added back in all of the WP table formatting to keep our theme options looking similar to the rest of the WP admin pages.

Closing this issue.


Reply to this email directly or view it on GitHub: https://github.com/splorp/tersus/issues/19#issuecomment-2911419

splorp commented 12 years ago

Strangely enough, it turned out to be much easier to implement than I had thought. Either that or my PHP fu is getting back up to cruising speed.