Why WordPress theming sucks
1–10 of 28 posts
Re: Why WordPress theming sucks
#2I'd be willing to help out if anyone here is brave enough to try a rewrite!
Re: Why WordPress theming sucks
#3I bet the developers have thought of rewriting it using OOP and an MVC pattern, but all current plugins and themes would have to be rewritten as well. It's not so bad, since you'd only need the top few dozen plugins and themes rewritten to get traction. I'd be willing to help out if anyone here is brave enough to try a rewrite!
Re: Why WordPress theming sucks
#4I bet the developers have thought of rewriting it using OOP and an MVC pattern, but all current plugins and themes would have to be rewritten as well. It's not so bad, since you'd only need the top few dozen plugins and themes rewritten to get traction. I'd be willing to help out if anyone here is brave enough to try a rewrite!
http://wordpress.org/news/2010/07/eol-for-php4-and-mysql4/
It doesn't need a rewrite. Instead, work with the many brilliant devs who have been improving it for years and know it inside-and-out -- including its flaws and areas for improvement.
Re: Why WordPress theming sucks
#5#2) True, and I agree. The function naming could be improved. If you don't know what the function does, look it up in the codex or the source code. The documentation could improve, too, but one of the stated goals for their next development period is improved docs.
#3) Look at the docs. Yes, the_title() writes to the page. If you want to use the title in a variable, there is get_the_title(). There are generally other functions or parameters you can do if you want it to return the value rather than writing it.
#4) False. The comments template file is comments.php.
#5) True.
Re: Why WordPress theming sucks
#6We use Twig as a templating language and expose our entire data API so there isn't a massive set of functions to learn. Here is an example of how to list the latest posts:
{% for post in hifi.get({'type':'post','orderBy':'-publishedAt'}) %}
{{ post.title }}
{% endfor %}
This keeps the process of creating a theme mostly about HTML/CSS because it dramatically reduces the specific information that you need to know about the platform itself.Re: Why WordPress theming sucks
#7#1) True. It does not use an MVC paradigm. That's not the way it was designed, and they're not able to make it MVC w/o breaking backward compatibility with the huge ecosystem of plugins and themes that currently exist. #2) True, and I agree. The function naming could be improved. If you don't know what the function does, look it up in the codex or the source code. The documentation could improve, too, but one of the…
Re: Why WordPress theming sucks
#8I bet the developers have thought of rewriting it using OOP and an MVC pattern, but all current plugins and themes would have to be rewritten as well. It's not so bad, since you'd only need the top few dozen plugins and themes rewritten to get traction. I'd be willing to help out if anyone here is brave enough to try a rewrite!
Why bother? You could go a long way and make things clearer by giving the functions better, new names and deprecating the old ones. "Rewrite with OOP and MVC" is an easy, whiny, pointless suggestion. Wordpress is warty, but it doesn't need a rewrite.
Separating the design from the code would make it a lot easier for designers to create themes without having to worry about PHP. A proper templating system like Smarty would make a huge improvement with its built-in modifiers. For example:
", "", true );
if(strlen($title > 80) {
echo(substr($title, 0,80)."...");
}
?>
Would be this if Wordpress used Smarty: {{$TITLE|truncate}}
This makes any display logic in the templates more portable when switching themes as well, because designers will be less prone to putting that code in header.php or single.php.Re: Why WordPress theming sucks
#9#1) True. It does not use an MVC paradigm. That's not the way it was designed, and they're not able to make it MVC w/o breaking backward compatibility with the huge ecosystem of plugins and themes that currently exist. #2) True, and I agree. The function naming could be improved. If you don't know what the function does, look it up in the codex or the source code. The documentation could improve, too, but one of the…
Actually, within The Loop, you would us the_title('','',false)
Re: Why WordPress theming sucks
#10This almost happens to me all the time but I know better. I spend 10 minutes with a new program, decide it's batshit crazy but instead of posting a lame article I have the wisdom and experience to stop and tell myself "I'm just a noob" and will probably embarrass myself.