Exemple #1
0
 private function __construct()
 {
     $this->paths();
     // Determine Shopp paths
     $this->constants();
     // Setup Shopp constants
     $this->textdomain();
     // Load the translation file
     // Load the Developer API
     ShoppDeveloperAPI::load(SHOPP_PATH);
     // Initialize error system
     ShoppErrors();
     // Initialize application control processing
     $this->Flow = new ShoppFlow();
     // Initialize Settings
     $this->Settings = ShoppSettings();
     // Hooks
     add_action('init', array($this, 'init'));
     // Core WP integration
     add_action('shopp_init', array($this, 'pages'));
     add_action('shopp_init', array($this, 'collections'));
     add_action('shopp_init', array($this, 'taxonomies'));
     add_action('shopp_init', array($this, 'products'), 99);
     // Theme integration
     add_action('widgets_init', array($this, 'widgets'));
     // Request handling
     add_filter('rewrite_rules_array', array($this, 'rewrites'));
     add_filter('query_vars', array($this, 'queryvars'));
 }
Exemple #2
0
    require "{$path}/core/library/Loader.php";
}
// Barebones bootstrap (say that 5x fast) for WordPress
if (!defined('ABSPATH') && ($loadfile = ShoppLoader::find_wpload())) {
    require $loadfile;
    global $table_prefix;
}
// Stub i18n for compatibility
if (!function_exists('__')) {
    // Localization API is not available at this point
    function __($string, $domain = false)
    {
        return $string;
    }
}
ShoppDeveloperAPI::load(dirname(ShoppLoader::basepath()), array('core', 'settings'));
// Start the server
new ImageServer();
exit;
/**
 * ImageServer class
 *
 * @author Jonathan Davis
 * @since 1.1
 * @package image
 **/
class ImageServer
{
    static $prettyurls = '{^/.+?/images/(\\d+)/.*$}';
    private $caching = true;
    // Set to false to force off image caching
Exemple #3
0
 /**
  * Sets up the Shopp stub environment and ShoppSettings
  *
  * @author Jonathan Davis
  * @since 1.2
  * @version 1.3
  *
  * @return void
  **/
 public function setup()
 {
     global $Shopp;
     if (!defined('SHOPP_PATH')) {
         define('SHOPP_PATH', self::path());
     }
     if (!defined('SHOPP_STORAGE')) {
         define('SHOPP_STORAGE', SHOPP_PATH . '/storage');
     }
     if (!defined('SHOPP_ADDONS')) {
         define('SHOPP_ADDONS', WP_CONTENT_DIR . '/shopp-addons');
     }
     ShoppDeveloperAPI::load(SHOPP_PATH);
     ShoppSettings();
     // $Shopp = Shopp::plugin();
     // $Shopp->Storage = new StorageEngines();
     $modules = shopp_setting('imaging_modules');
     // Only load image modules if necessary
     if (!empty($modules)) {
         new ShoppImagingModules();
     }
 }