Created
March 5, 2019 23:26
-
-
Save hellofromtonya/aacecb4574c1e827de4253c0a44b7a9f to your computer and use it in GitHub Desktop.
Example of unnecessarily calling get_template_directory() over and over again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Start the engine. | |
include_once( get_template_directory() . '/lib/init.php' ); | |
// Setup Theme. | |
include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' ); | |
// Set Localization (do not remove). | |
add_action( 'after_setup_theme', 'altitude_localization_setup' ); | |
function altitude_localization_setup(){ | |
load_child_theme_textdomain( 'altitude-pro', get_stylesheet_directory() . '/languages' ); | |
} | |
// Add the theme helper functions. | |
include_once( get_stylesheet_directory() . '/lib/helper-functions.php' ); | |
// Add Image upload and Color select to WordPress Theme Customizer. | |
require_once( get_stylesheet_directory() . '/lib/customize.php' ); | |
// Include Customizer CSS. | |
include_once( get_stylesheet_directory() . '/lib/output.php' ); | |
// Include the WooCommerce setup functions. | |
include_once( get_stylesheet_directory() . '/lib/woocommerce/woocommerce-setup.php' ); | |
// Include the WooCommerce custom CSS if customized. | |
include_once( get_stylesheet_directory() . '/lib/woocommerce/woocommerce-output.php' ); | |
// Include notice to install Genesis Connect for WooCommerce. | |
include_once( get_stylesheet_directory() . '/lib/woocommerce/woocommerce-notice.php' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment