PHPackages                             spindogs/wp-platform - 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. [Framework](/categories/framework)
4. /
5. spindogs/wp-platform

ActiveLibrary[Framework](/categories/framework)

spindogs/wp-platform
====================

Platform to allow developers to build bespoke functionality in an MVC and OOP fashion

v2.0.19(6y ago)12.4k51PHPPHP &gt;=5.6.4

Since May 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/spindogs/wp-platform)[ Packagist](https://packagist.org/packages/spindogs/wp-platform)[ RSS](/packages/spindogs-wp-platform/feed)WikiDiscussions v2 Synced 1w ago

READMEChangelog (10)DependenciesVersions (28)Used By (1)

Installing
----------

[](#installing)

Install via composer:

```
composer require spindogs/wp-platform

```

Ensure you add the following PSR-4 autoloading location to your `composer.json` file:

```
"autoload": {
    "psr-4": {
        "App\\": "app/"
    }
}

```

Assuming your `vendor` directory is in your theme root, add the following line to `functions.php` to hook up the composer autoloading to your theme:

```
require('vendor/autoload.php');

```

Platform
--------

[](#platform)

All platform classes can be accessed via the namespace `Platform`.

To setup the platform for Wordpress add the following line to your `functions.php`:

```
Platform\Setup::setupWordpress();

```

If you are using the platform outside of Wordpress you must call the following method instead to run some core setup routines:

```
Platform\Setup::setup();

```

Post Types
----------

[](#post-types)

To make a Wordpress custom post type create a new class in the namespace `App\PostType` that extends `Platform\PostType.php`:

```
