use Ultra\Config\Config; /** * Set up the images sizes we need. */ if (Config::theme('thumbnail_support') === true) { add_theme_support('post-thumbnails'); // Register the sizes we want to use. // add_image_size('xyz', 123, 123, true); } /** * Disable the theme editor, or not. */ if (Config::theme('theme_editor') === false) { function remove_editor_menu() { remove_action('admin_menu', '_add_themes_utility_last', 101); } add_action('_admin_menu', 'remove_editor_menu', 1); } /** * Disable the admin bar, or not. */ if (Config::theme('admin_bar') === false) { add_filter('show_admin_bar', '__return_false'); } /** * Hide the 'Custom Fields' menu in production mode. */ if (defined('USE_PRODUCTION_ACF')) { define('ACF_LITE', true); }
<?php use Ultra\Application\Container; use Ultra\Config\Config; /** * Load the classmap. */ require_once FULL_PATH . 'vendor/autoload.php'; /** * Load helper functions. */ foreach (glob(FULL_PATH . 'helpers/*.php') as $filename) { include $filename; } /** * Initialize the configuration. */ Config::init(); /** * Bind instances of each post type to the app so we can call them easily. * Simply add more by creating a new custom post-type class and * adding the full class path to the array below. */ Container::bind(['pages' => new UltraPress\PostTypes\Page(), 'posts' => new UltraPress\PostTypes\Post()]);