Articles of mvc

Is wordpress written in MVC pattern?

Is WordPress written in MVC architect? How to understand a CMS is a MVC? A CMS that written in MVC must have directories with named “Model”, “Controller”, “View”? Sorry for my beginner question .

Adding items to page template dropdown on Page Edit Screen

I am developing a WP theme with MVC approach. It only have index.php, functions.php and styles.css on the parent directory. So, I do not want to place page templates on it rather then I want to programmatically provide them from View classes while functionality from edit screen stays the same. Users need to have page […]

require.js to load javascript

whilst wp_enqueue_script seems to work it’s not really elegant. I’m currently making a WP front end which uses MVC (backbone.js) and has literally 30+ seperate Model/View/Collection/Controller scripts and I keep adding to the number. I’ve used require.js a lot before and really like it, however it seems to completely break wordpresses logic. Can anyone point […]

How to add a new menu/submenu page in WPMVC?

I’m completely new to WPMVC. Followed and finished their tutorial for creating plugins. Now I’m trying to add a search page to search Venues (that comes from their example!). This page should appear as a submenu page of the Venues menu. I created a file named search.php in the app/views/admin/venue/search folder. What should I do […]

Has anyone tried putting PHP ActiveRecord on WordPress?

I have worked with Ruby on Rails and I was looking for some code that did something close to the wonderfull RoR’s ActiveRecord. I stepped by this site. Its PHP-ActiveRecord! I found it amazing, and it was exactly what I was looking for, but I didn’t find anyone trying to use it on WordPress, so […]

How to structure a plugin

This isn’t a question about how to build a WordPress plugin. Rather, what, if any, guides could be applied to how to put together the file architecture of any plugin. Some other programming languages or libraries have very controlled ways of organizing directories and files. Sometimes this is annoying and highlights the freedom that PHP […]