|
|
|
|
|
by byoung2
5756 days ago
|
|
Rewrite with OOP and MVC" is an easy, whiny, pointless suggestion 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: <?php
$title = the_title( "<h1>", "</h1>", true );
if(strlen($title > 80) {
echo(substr($title, 0,80)."...");
}
?>
Would be this if Wordpress used Smarty: <h1>{{$TITLE|truncate}}</h1>
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. |
|
Anyway PHP is itself designed as a Templating language and works very well.
Adding Smarty or any other templating language into the mix just means that users and developers have to learn both PHP and the templating language.