Server : Apache System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : andertr9 ( 1047) PHP Version : 8.2.18 Disable Function : NONE Directory : /home1/andertr9/www/wp-content/themes/ssp-starter/ |
Upload File : |
<?php /* Prohibit direct script loading ------------------------------------------------------------ */ defined( 'ABSPATH' ) || die( ); /* Load theme configuration ------------------------------------------------------------ */ $config = (object)array( ); if ( file_exists( get_stylesheet_directory( ) . '/config.php' )) { $config = require_once( get_stylesheet_directory( ) . '/config.php' ); } else { $config = require_once( get_template_directory( ) . '/config.php' ); } /* Load theme styelesheets ------------------------------------------------------------ */ if ( ! function_exists( 'ssp_starter_styles' )) { function ssp_starter_styles( ) { // Base //wp_enqueue_style( 'normalize' , get_template_directory_uri( ) . '/css/normalize.css' , array( ) , '3.0.2' ); $version = md5( date( 'Y-m-d : H:i:s' ) . rand( 0 , 1000000000 )); //wp_enqueue_style( 'skeleton' , get_template_directory_uri( ) . '/css/skeleton.css' , array( 'normalize' ) , $version ); // Icons //wp_enqueue_style( 'font-awesome' , get_template_directory_uri( ) . '/css/font-awesome.min.css' , array( ) , '4.5.0' ); // Bxslider //wp_enqueue_style( 'bxslider' , get_template_directory_uri( ) . '/css/jquery.bxslider.css' , array( ) , '4.1.2' ); // Animate //wp_enqueue_style( 'animate' , get_template_directory_uri( ) . '/css/animate.min.css' ); // Gallery //wp_enqueue_style( 'isotope' , get_template_directory_uri( ) . '/css/isotope.css' ); wp_deregister_style( 'layerslider' ); wp_deregister_style( 'contact-form-7' ); wp_deregister_style( 'foobox-min' ); wp_enqueue_style( 'combine' , get_template_directory_uri( ) . '/css/styles.css' , array( ) , $version ); // Theme Styles //wp_enqueue_style( 'ssp-starter' , get_template_directory_uri( ) . '/css/ssp-starter.css' , array( 'skeleton' , 'bxslider' ) , '1.0.0' ); $version = md5( date( 'Y-m-d : H:i:s' ) . rand( 0 , 1000000000 )); //wp_enqueue_style( 'ssp-starter' , get_template_directory_uri( ) . '/css/ssp-starter.css' , array( 'combine' ) , $version ); //wp_enqueue_style( 'ssp-starter-responsive' , get_template_directory_uri( ) . '/css/ssp-starter-responsive.css' , array( 'ssp-starter' ) , '1.0.0' ); $version = md5( date( 'Y-m-d : H:i:s' ) . rand( 0 , 1000000000 )); //wp_enqueue_style( 'ssp-starter-responsive' , get_template_directory_uri( ) . '/css/ssp-starter-responsive.css' , array( 'ssp-starter' ) , $version ); } } add_action( 'wp_enqueue_scripts' , 'ssp_starter_styles' ); /* Load theme dashboard styelesheets ------------------------------------------------------------ */ if ( ! function_exists( 'ssp_starter_dashboard_styles' )) { function ssp_starter_dashboard_styles( ) { wp_enqueue_style( 'ssp-starter-dashboard' , get_template_directory_uri( ) . '/css/ssp-starter-dashboard.css' , array( ) , '1.0.0' ); } } add_action( 'admin_enqueue_scripts' , 'ssp_starter_dashboard_styles' ); /* Load theme scripts ------------------------------------------------------------ */ if ( ! function_exists( 'ssp_starter_scripts' )) { function ssp_starter_scripts( ) { //wp_deregister_script( 'jquery' ); wp_deregister_script( 'greensock' ); wp_deregister_script( 'layerslider' ); wp_deregister_script( 'layerslider-transitions' ); $version = md5( date( 'Y-m-d : H:i:s' ) . rand( 0 , 1000000000 )); // Base // wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'combine' , get_template_directory_uri( ) . '/js/jquery.packed.js' , array( ) , $version ); // Google Map //wp_enqueue_script( 'google-map' , 'https://maps.googleapis.com/maps/api/js' , array( 'jquery' ) , '3.0.0' ); // Add To Any wp_enqueue_script( 'addtoany' , 'http://static.addtoany.com/menu/page.js' , array( 'jquery' ) , '1.0.0' ); // Mobile Menu //wp_enqueue_script( 'mobile-menu' , get_template_directory_uri( ) . '/js/jquery.mobilemenu.js' , array( 'jquery' ) , '1.1.0' ); // Scroll To wp_enqueue_script( 'scrollTo' , 'http://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.0/jquery.scrollTo.min.js' , array( 'jquery' ) , '2.1.0' ); // Bxslider //wp_enqueue_script( 'bxslider' , get_template_directory_uri( ) . '/js/jquery.bxslider.min.js' , array( 'jquery' ) , '4.1.2' ); // Flip //wp_enqueue_script( 'flip' , get_template_directory_uri( ) . '/js/jquery.flip.min.js' , array( 'jquery' ) , md5( date( 'Y-m-d H:i:s' )) ); wp_enqueue_script( 'simplemodal' , get_template_directory_uri( ) . '/js/jquery.simplemodal.js' , array( 'jquery' ) ); // Wow Animation //wp_enqueue_script( 'wow' , get_template_directory_uri( ) . '/js/wow.min.js' , array( 'jquery' ) , '0.1.6' ); // Wow Animation //wp_enqueue_script( 'isotope' , get_template_directory_uri( ) . '/js/jquery.isotope.js' , array( 'jquery' ) , '1.0.0' ); //wp_enqueue_script( 'combine' , get_template_directory_uri( ) . '/js/combine.js' , array( 'jquery' ) , '1.0.0' ); // Theme Scripts if ( file_exists( get_stylesheet_directory( ) . '/js/jquery.scripts.js' )) { // wp_enqueue_script( 'ssp-starter-script' , get_stylesheet_directory_uri( ) . '/js/jquery.scripts.js' , array( 'jquery' , 'scrollTo' , 'combine' ) , md5( date( 'Y-m-d H:i:s' )) ); } else { //wp_enqueue_script( 'ssp-starter-script' , get_template_directory_uri( ) . '/js/jquery.scripts.js' , array( 'jquery' , 'scrollTo' , 'combine' ) , md5( date( 'Y-m-d H:i:s' )) ); } } } add_action( 'wp_enqueue_scripts' , 'ssp_starter_scripts' ); if ( ! function_exists( 'ssp_starter_sidebars' )) { function ssp_starter_sidebars( ) { global $config; register_sidebar( array( 'name' => __( 'Main Widget Area', 'ssp_starter' ), 'id' => 'sidebar', 'description' => __( 'Appears on posts and pages in the sidebar.', 'ssp_starter' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', )); if ( isset( $config->sidebars ) && is_array( $config->sidebars ) && count( $config->sidebars )) { foreach( $config->sidebars AS $sidebar ) { register_sidebar( (array)$sidebar ); } } } } add_action( 'widgets_init' , 'ssp_starter_sidebars' ); if ( ! function_exists( 'ssp_starter_setup' )) { function ssp_starter_setup( ) { //--- Post Types $files = scandir( get_template_directory( ) . '/includes/post-types/' ); foreach( $files AS $file ) { if ( is_file( get_template_directory( ) . '/includes/post-types/' . $file ) && $file != 'index.php' ) { $file = get_template_directory( ) . '/includes/post-types/' . $file; $sql = include_once( $file ); } } //--- Shortcodes $files = scandir( get_template_directory( ) . '/includes/shortcodes/' ); foreach( $files AS $file ) { if ( is_file( get_template_directory( ) . '/includes/shortcodes/' . $file ) && $file != 'index.php' ) { $file = get_template_directory( ) . '/includes/shortcodes/' . $file; $sql = include_once( $file ); } } //--- Widgets $files = scandir( get_template_directory( ) . '/includes/widgets/' ); foreach( $files AS $file ) { if ( is_file( get_template_directory( ) . '/includes/widgets/' . $file ) && $file != 'index.php' ) { $file = get_template_directory( ) . '/includes/widgets/' . $file; $sql = include_once( $file ); } } //--- Register Menus Locations register_nav_menus( array( 'primary' => __( 'Primary Navigation' , 'ssp_starter' ), )); //--- Enable post thumbnails add_theme_support( 'post-thumbnails' ); //--- Enable shortcode on text widget add_filter( 'widget_text' , 'do_shortcode' ); } } add_action( 'after_setup_theme' , 'ssp_starter_setup' ); if ( ! function_exists( 'testimonial_excerpt_more' )) { function testimonial_excerpt_more( $more ) { if ( in_array( get_post_type( ) , array( 'testimonial' ))) { return ''; } elseif ( in_array( get_post_type( ) , array( 'post' ))) { return '<a href="' . get_the_permalink( ) . '" class="blog-readmore test"> Read More</a>'; }else { return '<a href="' . get_the_permalink( ) . '" class="blog-readmore test"> Read More</a>'; } return $more; } } add_filter( 'excerpt_more', 'testimonial_excerpt_more' );