Aquesta extensió no s’ha provat en les darreres 3 versions majors del WordPress. Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat quan s’usa en versions recents del WordPress.



Churro is a plugin that allows developers to easily create pages and functionality, in a style similar to CodeIgniter. By itself, Churro will not add any functionality to your WordPress site.

Tested with WordPress and WordPress MU 2.8.0 ~ 3.0.5
Requires PHP 5. PHP 4 is like 10 years old, you know?

Churro Basics

= URLs =
Churro requires friendly urls rather than query strings. Your url will usually be mapped as following:


The controller will be directly mapped to a file and class with the same name. For example,
will look for a file named contact.php in the /churro/ directory. This file should have a class contact that extends Churro. Without a defined method, it will default to index. All methods accessible through URLs will have ‘Action’ appended to it. The following code will provide scaffolding for and

class contact extends Churro {
    public function indexAction(){


    public function submitAction(){



Churro gives you access to several important WordPress Models through the $this keyword. The $wp, $wpdb, and $wp_query classes, as well as $blog_id in MU are all availble without using the global keyword, eg $this->wpdb.


Your views belong in your normal theme directory. If you are using multiple themes, you can override the direcotry using $this->Theme( 'directory-name' ) any place in the controller. To specify a view to use, $this->View( 'file-name' ). Seperating logic from views is the most important thing to remember in Churro. To set varaibles in your view, use $this->vars->var_name in the controller, and $var_name in your view.

Ajax / Javascript

If you use the excellent jQuery javascript library, Churro will detect ajax requests and automatically return JSON. Churro defines a constant ISAJAX on each request. With a little planning, it is very easy to create a dynamic application in a way that is totally accessible without javascript.

Learning Churro

There is much more functionality in Churro than outlined here. As of September 2, 2009, there is no complete, formal, documentation for writing code with Churro. Stay tuned to Substance Labs for tutorials.


  • Churros are delicious /trunk/screenshot-1.png


  1. Place entire /churro/ directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Write some code


This doesn’t do anything!

Churro does not add any functionality to WordPress by itself. Instead, it allows developers a structure to integrate well organized, easily maintainable, object oriented MVC code into their applications.

Why did you create Churro?

Churro was originally developed as a stand-alone framework, sort of a hobby project after I had learned Zend framework and wanted to use the same concepts in my own projects, with simpler syntax and lighter footprint. After Churro reached a fairly stable state, I realized it’s similarities to CodeIgniter. After wrestling with WordPress, I decided to refactor the Churro code as a plugin, to allow easy, rapid development.


No hi ha ressenyes per a aquesta extensió.

Col·laboradors i desenvolupadors

«Churro» és programari de codi obert. La següent gent ha col·laborat en aquesta extensió.


Registre de canvis


  • Fairly major refactoring of code, moved virtually all functions into class methods.


  • Cleaning things up, more testing. No new functionality.


  • Experimental support for HTML Tidy.


  • Minor bug fix in jquery queue in admin.


  • Bug fixes, slightly more documentation.


  • Initial public release. No documentation.