init(); return self::$instance; } /** * Initialize the theme * * @since 1.0.0 */ public function init() { $this->define_constants(); $this->init_hooks(); $this->includes(); } public function define_constants() { } public function init_hooks() { add_action('after_setup_theme', array($this, 'setup')); add_action('after_setup_theme', array($this, 'content_width'), 0); } public function includes() { // Theme information require AGENCY_ECOMMERCE_THEME_DIR . '/core/info/class-agency-ecommerce-theme-information.php'; require AGENCY_ECOMMERCE_THEME_DIR . '/core/class-agency-ecommerce-assets.php'; // Customizer additions. require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/customizer/customizer.php'; // Load core functions. require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/customizer/core.php'; // Load helper functions. require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/helper/helper-main.php'; // Custom template tags for this theme. require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/template-tags.php'; // Custom functions that act independently of the theme templates. require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/template-functions.php'; // Load widgets. require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/class-agency-ecommerce-widgets.php'; // Load hooks. require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/class-agency-ecommerce-hooks.php'; // Load dynamic css. require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/dynamic.php'; /** * Load TGMPA Configs. */ require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/tgmpa/class-tgm-plugin-activation.php'; require_once AGENCY_ECOMMERCE_THEME_DIR . '/core/tgmpa/tgmpa-agency-ecommerce.php'; } function setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on Agency Ecommerce, use a find and replace * to change 'agency-ecommerce' to the name of your theme in all the template files. */ load_theme_textdomain('agency-ecommerce', get_template_directory() . '/languages'); // Add default posts and comments RSS feed links to head. add_theme_support('automatic-feed-links'); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded