'ambition_get_featured_posts', 'max_posts' => 6, )); } endif; add_action('ambition_init', 'ambition_constants', 10); /** * This function defines the Ambition theme constants * * @since 1.0 */ function ambition_constants() { /** Define Directory Location Constants */ define('AMBITION_PARENT_DIR', get_template_directory()); define('AMBITION_CHILD_DIR', get_stylesheet_directory()); define('AMBITION_INC_DIR', AMBITION_PARENT_DIR . '/inc'); define('AMBITION_ADMIN_DIR', AMBITION_INC_DIR . '/admin'); define('AMBITION_ADMIN_JS_DIR', AMBITION_ADMIN_DIR . '/js'); define('AMBITION_ADMIN_CSS_DIR', AMBITION_ADMIN_DIR . '/css'); define('AMBITION_JS_DIR', AMBITION_PARENT_DIR . '/js'); define('AMBITION_FUNCTIONS_DIR', AMBITION_INC_DIR . '/functions'); define('AMBITION_SHORTCODES_DIR', AMBITION_INC_DIR . '/footer_info'); define('AMBITION_STRUCTURE_DIR', AMBITION_INC_DIR . '/structure'); if (!defined('AMBITION_LANGUAGES_DIR')) /** So we can define with a child theme */ { define('AMBITION_LANGUAGES_DIR', AMBITION_PARENT_DIR . '/languages'); } define('AMBITION_WIDGETS_DIR', AMBITION_INC_DIR . '/widgets'); /** Define URL Location Constants */ define('AMBITION_PARENT_URL', get_template_directory_uri()); define('AMBITION_CHILD_URL', get_stylesheet_directory_uri()); define('AMBITION_INC_URL', AMBITION_PARENT_URL . '/inc'); define('AMBITION_ADMIN_URL', AMBITION_INC_URL . '/admin'); define('AMBITION_ADMIN_JS_URL', AMBITION_ADMIN_URL . '/js'); define('AMBITION_ADMIN_CSS_URL', AMBITION_ADMIN_URL . '/css'); define('AMBITION_JS_URL', AMBITION_PARENT_URL . '/js'); define('AMBITION_FUNCTIONS_URL', AMBITION_INC_URL . '/functions'); define('AMBITION_SHORTCODES_URL', AMBITION_INC_URL . '/footer_info'); define('AMBITION_STRUCTURE_URL', AMBITION_INC_URL . '/structure'); if (!defined('AMBITION_LANGUAGES_URL')) /** So we can predefine to child theme */ { define('AMBITION_LANGUAGES_URL', AMBITION_PARENT_URL . '/languages'); } define('AMBITION_WIDGETS_URL', AMBITION_INC_URL . '/widgets'); } add_action('ambition_init', 'ambition_load_files', 15); /** * Loading the included files. * * @since 1.0 */ function ambition_load_files() { /** * ambition_add_files hook * * Adding other addtional files if needed. */ do_action('ambition_add_files'); /** Load functions */ require_once (AMBITION_FUNCTIONS_DIR . '/i18n.php'); require_once (AMBITION_FUNCTIONS_DIR . '/custom-header.php'); require_once (AMBITION_FUNCTIONS_DIR . '/functions.php'); require_once (AMBITION_FUNCTIONS_DIR . '/custom-style.php'); require_once (AMBITION_FUNCTIONS_DIR . '/customizer.php'); require_once (AMBITION_FUNCTIONS_DIR . '/featured-content.php'); require_once (AMBITION_ADMIN_DIR . '/ambition-metaboxes.php'); /** Load Footer Info */ require_once (AMBITION_SHORTCODES_DIR . '/ambition-footer_info.php'); /** Load Structure */ require_once (AMBITION_STRUCTURE_DIR . '/header-extensions.php'); require_once (AMBITION_STRUCTURE_DIR . '/footer-extensions.php'); require_once (AMBITION_STRUCTURE_DIR . '/content-extensions.php'); /** Load Widgets and Widgetized Area */ require_once (AMBITION_WIDGETS_DIR . '/ambition_widgets.php'); } add_action('ambition_init', 'ambition_core_functionality', 20); /** * Adding the core functionality of WordPess. * * @since 1.0 */ function ambition_core_functionality() { /** * ambition_add_functionality hook * * Adding other addtional functionality if needed. */ do_action('ambition_add_functionality'); // 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