This file loads all the needed files for the theme to work properly. * IMPORTANT : DO NOT USE AN "ILLEGAL" COPY OF THIS THEME * IMPORTANT : DO NOT EVER EDIT THIS FILE * IMPORTANT : DO NOT COPY AND PASTE THIS FILE INTO YOUR CHILD THEME * IMPORTANT : DO NOT EVER COPY AND PASTE ANYTHING FROM THIS FILE TO YOUR CHILD THEME BECAUSE IT WILL CAUSE ERRORS * * White Paper is a very powerful theme and virtually anything can be customized * via a child theme. If you need any help altering a function, just let us know we are here to help! * * Advanced customizations aren't included with your purchase but if it's a simple task we can assist :) * * * @package White Paper WordPress Theme * @subpackage Templates * @version 1.0.0 */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } class White_Papers_Init { function __construct(){ /***********************************************************************************************/ /* Theme Setup Actions and Filters */ /***********************************************************************************************/ add_action( 'after_setup_theme' , array( $this, 'wpc_theme_setup')); add_action( 'after_setup_theme' , array( $this, 'wpc_widgets')); add_action( 'vc_before_init', array( $this, 'wpc_vcSetAsTheme')); add_action( 'wp_enqueue_scripts' , array( $this, 'wpc_theme_scripts_styles')); add_action( 'widgets_init' , array( $this, 'wpc_register_sidebars')); add_action( 'wpc_pagination_nav', array($this, 'render_pagination_navigation'), 10, 3 ); add_filter('user_contactmethods', array($this, 'add_to_author_profile'), 10, 1); add_filter( 'wp_nav_menu_objects', array($this, 'add_has_children_to_nav_items')); add_filter( 'excerpt_length', array($this , 'custom_excerpt_length'), 999 ); add_action( 'wpc_breadcrumbs', array($this, 'render_wpc_breadcrumbs') ); add_filter('style_loader_tag', array($this, 'wpc_remove_type_attr'), 10, 2); add_filter('script_loader_tag', array($this, 'wpc_remove_type_attr'), 10, 2); /***********************************************************************************************/ /* Including White Paper Custom Hooks */ /***********************************************************************************************/ require_once get_parent_theme_file_path('inc/templates/related-posts.php'); require_once get_parent_theme_file_path('inc/templates/featured-image.php'); require_once get_parent_theme_file_path('inc/templates/author-bio.php'); require_once get_parent_theme_file_path('inc/templates/social-share.php'); require_once get_parent_theme_file_path('inc/templates/pre-loader.php'); require_once get_parent_theme_file_path('inc/templates/comments.php'); require_once get_parent_theme_file_path('inc/templates/login-nav.php'); require_once get_parent_theme_file_path('inc/templates/top-bar-social.php'); require_once get_parent_theme_file_path('inc/templates/search-form.php'); require_once get_parent_theme_file_path('inc/templates/post-carousel.php'); require_once get_parent_theme_file_path('inc/templates/footer-callout.php'); require_once get_parent_theme_file_path('inc/templates/footer-carousel.php'); require_once get_parent_theme_file_path('inc/templates/footer-social.php'); require_once get_parent_theme_file_path('inc/templates/footer-copyright.php'); require_once get_parent_theme_file_path('inc/templates/page-title.php'); require_once get_parent_theme_file_path('inc/templates/headers.php'); require_once get_parent_theme_file_path('inc/templates/topbar.php'); require_once get_parent_theme_file_path('inc/templates/audio-post.php'); require_once get_parent_theme_file_path('inc/templates/video-post.php'); require_once get_parent_theme_file_path('inc/templates/check-post-format.php'); require_once get_parent_theme_file_path('inc/templates/single-audio-post.php'); require_once get_parent_theme_file_path('inc/templates/single-video-post.php'); require_once get_parent_theme_file_path('inc/templates/slider.php'); /***********************************************************************************************/ /* Including Classes */ /***********************************************************************************************/ if (class_exists('Kirki')) { require_once get_parent_theme_file_path('inc/classes/theme-options.php'); } require_once get_parent_theme_file_path('inc/metaboxes/post.settings.class.php'); require_once get_parent_theme_file_path('inc/classes/nav-walker.php'); require_once get_parent_theme_file_path('inc/classes/helper-functions.php'); require_once get_parent_theme_file_path('inc/classes/class-tgm-plugin-activation.php'); require_once get_parent_theme_file_path('inc/classes/required_plugins.php'); require_once get_parent_theme_file_path('inc/classes/one-click-demo-importer.php'); } /***********************************************************************************************/ /* Function called on theme activation */ /***********************************************************************************************/ function wpc_theme_setup() { load_theme_textdomain('blue-paper', get_template_directory() . '/languages'); /** *** Set up the content width value based on the theme's design and stylesheet. **/ if (! isset ( $content_width )){ global $content_width; $content_width = 800; } /** *** Let WordPress manage the document title *** By adding theme support, we declare that this theme does not use a *** hard-coded