PHPackages                             ericmann/mvpress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. ericmann/mvpress

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

ericmann/mvpress
================

MVC-style template loader for WordPress

1.0.0(10y ago)19261GPLv2+PHP

Since Feb 24Pushed 8y ago3 watchersCompare

[ Source](https://github.com/ericmann/MVPress)[ Packagist](https://packagist.org/packages/ericmann/mvpress)[ RSS](/packages/ericmann-mvpress/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

MVPress [![Build Status](https://camo.githubusercontent.com/e96bba0265dfb2fa1bcd91b562467d9529ead94b97586f2fb8d75be363d73b51/68747470733a2f2f7472617669732d63692e6f72672f657269636d616e6e2f4d5650726573732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ericmann/MVPress) [![Coverage Status](https://camo.githubusercontent.com/edd2f872f8b18125509699cd1f86ec34bda728c61c43c8dbb4b6891c3344de5c/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f657269636d616e6e2f4d5650726573732f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/ericmann/MVPress?branch=master)
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#mvpress--)

MVC-style template loader for WordPress

Installation
------------

[](#installation)

This module can be easily installed by adding `ericmann/mvpress` to your `composer.json` file. Then, either autoload your Composer dependencies or manually `include()` the `mvpress.php` bootstrap file.

Usage
-----

[](#usage)

The namespaced `\MVPress\get_template_part()` function is a fully backwards-compatible replacement for WordPress' default `get_template_part()`. At a minimum, you can use the new version as a 1:1 alternative.

However, once using the new version, you can:

- Pass an optional 3rd parameter to define a model object in the scope of the template.
- Pass an optional 4th parameter to define an array of dynamic user data in the scope of the template.
- Reference `$this->model` in the template directly (no globals!).
- Reference `$this->context->query` in the template to access the global `WP_Query` object in-scope.
- Reference `$this->context->request` in the template to access the global `$_REQUEST` object in-scope.
- Reference `$this->context->userData` in the template to access the passed-in dynamic array in-scope.

Changelog
---------

[](#changelog)

02-23-16 - 1.0.0 - Refactored as Composer module 12-13-13 - 0.1.0 - First release

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3732d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86bb3fa9fcfe57b8d313e527e9e02bde810951b25722b4717b0953a6c8db41b2?d=identicon)[ericmann](/maintainers/ericmann)

---

Top Contributors

[![ericmann](https://avatars.githubusercontent.com/u/605474?v=4)](https://github.com/ericmann "ericmann (32 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ericmann-mvpress/health.svg)

```
[![Health](https://phpackages.com/badges/ericmann-mvpress/health.svg)](https://phpackages.com/packages/ericmann-mvpress)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
