Exemple #1
0
 /**
  * Initialize required classes and add them to the container
  *
  * @throws Exceptions\ContainerOverrideException
  * @throws Exceptions\NotStringException
  */
 public function boot()
 {
     $container = Container::get_instance();
     if (apply_filters($this->filter_base . 'core/register/prepare/post', true)) {
         $container->add('Xeeeveee\\Core\\WordPress\\Prepare\\Post', Post::get_instance());
     }
     if (apply_filters($this->filter_base . 'core/register/prepare/post', true)) {
         $container->add('Xeeeveee\\Core\\WordPress\\Prepare\\Term', Term::get_instance());
     }
     if (apply_filters($this->filter_base . 'core/register/prepare/post', true)) {
         $container->add('Xeeeveee\\Core\\WordPress\\Register\\Decorators\\PostDecorator', PostDecorator::get_instance());
     }
     if (apply_filters($this->filter_base . 'core/register/enqueue/admin_scripts', true)) {
         $container->add('Xeeeveee\\Core\\WordPress\\Enqueue\\Script\\AdminScripts', AdminMain::get_instance());
     }
     if (apply_filters($this->filter_base . 'core/register/enqueue/color_picker_styles', true)) {
         $container->add('Xeeeveee\\Core\\WordPress\\Enqueue\\Style\\ColorPicker', ColorPicker::get_instance());
     }
     if (apply_filters($this->filter_base . 'core/register/enqueue/jquery_ui_styles', true)) {
         $container->add('Xeeeveee\\Core\\WordPress\\Enqueue\\Style\\JQueryUi', JQueryUi::get_instance());
     }
 }
Exemple #2
0
<?php

/*
 * Plugin Name: Core
 * Plugin URI: https://github.com/xeeeveee/core
 * Description: WordPress Core Plugin
 * Author: Jack Neary
 * Version: 0.1
 * Author URI: https://github.com/xeeeveee/core
 */
namespace Xeeeveee\Core;

use Xeeeveee\Core\Container\Container;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'Autoloader.php';
$container = Container::get_instance();
$container->add('Xeeeveee\\Core\\Core', Core::get_instance());