Skip to content

Calling core and using it

Jakub edited this page Aug 22, 2017 · 5 revisions

Next step is to initialize your new class which extends ShellPress.

The best place to do that is your plugin root file.

Let's say it's this file: www_root/wp-content/plugins/pizza/pizza.php.

To initialize core, we need to call initShellPress() method of our class. Remember, we don't have autoloading yet, so we need to include our class and call its full name.

<?php
//    pizza.php

if( ! class_exists( 'shellpress\v1_0_6\ShellPress' ) ){
    require( 'path_to_library/ShellPress.php' );
}

Bakery\Pizza\App::initShellPress( __FILE__, 'pizza', '1.0.0' );

Clone this wiki locally