PATH:
home
/
centosnipponia
/
public_html
/
lineup
/
wp-content
/
themes
/
sydney-pro-ii
<?php /** * Sydney functions and definitions * * @package Sydney */ if ( ! function_exists( 'sydney_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function sydney_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on Sydney, use a find and replace * to change 'sydney' to the name of your theme in all the template files */ load_theme_textdomain( 'sydney', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); // Content width global $content_width; if ( ! isset( $content_width ) ) { $content_width = 1170; /* pixels */ } /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded <title> tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); add_image_size('large-thumb', 830); add_image_size('medium-thumb', 550, 400, true); add_image_size('small-thumb', 230); add_image_size('sydney-service-thumb', 350); add_image_size('sydney-mas-thumb', 480); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'sydney' ), 'social' => __( 'Header social', 'sydney' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'sydney_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); //Gutenberg align-wide support add_theme_support( 'align-wide' ); } endif; // sydney_setup add_action( 'after_setup_theme', 'sydney_setup' ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function sydney_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'sydney' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); //Footer widget areas $widget_areas = get_theme_mod('footer_widget_areas', '3'); for ($i=1; $i<=$widget_areas; $i++) { register_sidebar( array( 'name' => __( 'Footer ', 'sydney' ) . $i, 'id' => 'footer-' . $i, 'description' => '', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); } //Below header widget area if ( get_theme_mod('activate_bh_widgets') ) { register_sidebar( array( 'name' => __( 'Below header area', 'sydney' ), 'id' => 'sidebar-header', 'description' => '', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); } //Register the front page widgets if ( defined( 'SITEORIGIN_PANELS_VERSION' ) ) { register_widget( 'Sydney_List' ); register_widget( 'Sydney_Services_Type_A' ); register_widget( 'Sydney_Services_Type_B' ); register_widget( 'Sydney_Facts' ); register_widget( 'Sydney_Clients' ); register_widget( 'Sydney_Testimonials' ); register_widget( 'Sydney_Skills' ); register_widget( 'Sydney_Action' ); register_widget( 'Sydney_Video_Widget' ); register_widget( 'Sydney_Employees' ); register_widget( 'Sydney_Employees_Type_B' ); register_widget( 'Sydney_Latest_News' ); register_widget( 'Sydney_Latest_News_Type_B' ); register_widget( 'Sydney_Timeline' ); register_widget( 'Sydney_FP_Contact_Info' ); register_widget( 'Sydney_Contact_Info' ); register_widget( 'Sydney_Portfolio' ); register_widget( 'Sydney_Image_widget' ); register_widget( 'Sydney_Pricing_Tables' ); } register_widget( 'Sydney_Social_Profile' ); } add_action( 'widgets_init', 'sydney_widgets_init' ); /** * Load the front page widgets. */ if ( defined( 'SITEORIGIN_PANELS_VERSION' ) ) { require get_template_directory() . "/widgets/fp-list.php"; require get_template_directory() . "/widgets/fp-services-type-a.php"; require get_template_directory() . "/widgets/fp-services-type-b.php"; require get_template_directory() . "/widgets/fp-facts.php"; require get_template_directory() . "/widgets/fp-clients.php"; require get_template_directory() . "/widgets/fp-testimonials.php"; require get_template_directory() . "/widgets/fp-skills.php"; require get_template_directory() . "/widgets/fp-call-to-action.php"; require get_template_directory() . "/widgets/video-widget.php"; require get_template_directory() . "/widgets/fp-employees.php"; require get_template_directory() . "/widgets/fp-employees-type-b.php"; require get_template_directory() . "/widgets/fp-latest-news.php"; require get_template_directory() . "/widgets/fp-latest-news-type-b.php"; require get_template_directory() . "/widgets/fp-timeline.php"; require get_template_directory() . "/widgets/fp-contact.php"; require get_template_directory() . "/widgets/fp-portfolio.php"; require get_template_directory() . "/widgets/fp-image.php"; require get_template_directory() . "/widgets/fp-pricing.php"; require get_template_directory() . "/widgets/contact-info.php"; } require get_template_directory() . "/widgets/fp-social.php"; /** * Enqueue scripts and styles. */ function sydney_scripts() { wp_enqueue_style( 'sydney-fonts', esc_url( sydney_google_fonts() ), array(), null ); wp_enqueue_style( 'sydney-style', get_stylesheet_uri(), '', '20180710' ); wp_enqueue_style( 'sydney-font-awesome', get_template_directory_uri() . '/fonts/font-awesome.min.css' ); wp_enqueue_style( 'sydney-ie9', get_template_directory_uri() . '/css/ie9.css', array( 'sydney-style' ) ); wp_style_add_data( 'sydney-ie9', 'conditional', 'lte IE 9' ); $api_key = get_theme_mod('sydney_pro_maps_api'); if ( !$api_key ) { wp_enqueue_script( 'sydney-gmaps-api', '//maps.google.com/maps/api/js' ); } else { wp_enqueue_script( 'sydney-gmaps-api', '//maps.google.com/maps/api/js?key=' . $api_key ); } wp_enqueue_script( 'sydney-scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery'), '', true ); wp_enqueue_script( 'sydney-main', get_template_directory_uri() . '/js/main.min.js', array('jquery'), '20190731', true ); wp_enqueue_script( 'sydney-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( get_theme_mod('blog_layout') == 'masonry-layout' && (is_home() || is_archive()) ) { wp_enqueue_script( 'sydney-masonry-init', get_template_directory_uri() . '/js/masonry-init.js', array('masonry'), '', true ); } if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'sydney_scripts' ); /** * Elementor editor scripts */ function sydney_elementor_editor_scripts() { wp_enqueue_script( 'sydney-elementor-editor', get_template_directory_uri() . '/js/elementor.js', array( 'jquery' ), '20181215', true ); } add_action('elementor/frontend/after_register_scripts', 'sydney_elementor_editor_scripts'); /** * Fonts */ if ( !function_exists('sydney_google_fonts') ) : function sydney_google_fonts() { $body_font = get_theme_mod('body_font_name', 'Poppins:400,600'); $headings_font = get_theme_mod('headings_font_name', 'Ubuntu:400,400i,500,500i'); $fonts = array(); $fonts[] = esc_attr( str_replace( '+', ' ', $body_font ) ); $fonts[] = esc_attr( str_replace( '+', ' ', $headings_font ) ); if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => urlencode( implode( '|', $fonts ) ) ), 'https://fonts.googleapis.com/css' ); } return $fonts_url; } endif; /** * Enqueue Bootstrap */ function sydney_enqueue_bootstrap() { wp_enqueue_style( 'sydney-bootstrap', get_template_directory_uri() . '/css/bootstrap/bootstrap.min.css', array(), true ); } add_action( 'wp_enqueue_scripts', 'sydney_enqueue_bootstrap', 9 ); /** * Change the excerpt length */ function sydney_excerpt_length( $length ) { $excerpt = get_theme_mod('exc_lenght', '55'); return $excerpt; } add_filter( 'excerpt_length', 'sydney_excerpt_length', 999 ); /** * Blog layout */ function sydney_blog_layout() { $layout = get_theme_mod('blog_layout','classic-alt'); return $layout; } /** * Menu fallback */ function sydney_menu_fallback() { if ( current_user_can('edit_theme_options') ) { echo '<a class="menu-fallback" href="' . admin_url('nav-menus.php') . '">' . __( 'Create your menu here', 'sydney' ) . '</a>'; } } /** * Header image overlay */ function sydney_header_overlay() { $overlay = get_theme_mod( 'hide_overlay', 0); if ( !$overlay ) { echo '<div class="overlay"></div>'; } } /** * Header contact info */ if ( !function_exists( 'sydney_contact_info' ) ) { function sydney_contact_info() { $toggle_contact = get_theme_mod('toggle_contact'); $phone = get_theme_mod('contact_phone', '99.123.456'); $email = get_theme_mod('contact_email', 'office@site.com'); $address = get_theme_mod('contact_address', '12 Street, New York City'); if ($toggle_contact) { echo '<div class="header-contact clearfix"><div class="container">'; echo '<div class="header-contact-info">'; if ($phone) { echo '<span class="header-phone">'; echo '<i class="fa fa-phone"></i>' . '<a href="tel:' . esc_attr($phone) . '">' . esc_html($phone) . '</a>'; echo '</span>'; } if ($email) { echo '<span class="header-email">'; echo '<i class="fa fa-envelope"></i>' . '<a href="mailto:' . antispambot($email) . '">' . antispambot($email) . '</a>'; echo '</span>'; } if ($address) { echo '<span class="header-address">'; echo '<i class="fa fa-home"></i>' . esc_html($address); echo '</span>'; } echo '</div>'; sydney_header_social(); echo '</div></div>'; } } } if ( !function_exists( 'sydney_header_social' ) ) { function sydney_header_social() { if ( has_nav_menu( 'social' ) ) { ?> <nav class="social-navigation social-links clearfix"> <?php wp_nav_menu( array( 'theme_location' => 'social', 'link_before' => '<span class="screen-reader-text">', 'link_after' => '</span>', 'menu_class' => 'menu clearfix', 'fallback_cb' => false ) ); ?> </nav> <?php } } } /** * Header video */ function sydney_header_video() { if ( !function_exists('the_custom_header_markup') ) { return; } $front_header_type = get_theme_mod( 'front_header_type' ); $site_header_type = get_theme_mod( 'site_header_type' ); if ( ( get_theme_mod('front_header_type') == 'core-video' && is_front_page() || get_theme_mod('site_header_type') == 'core-video' && !is_front_page() ) ) { the_custom_header_markup(); } } /** * Polylang compatibility */ if ( function_exists('pll_register_string') ) : function sydney_polylang() { for ( $i=1; $i<=5; $i++) { pll_register_string('Slide title ' . $i, get_theme_mod('slider_title_' . $i), 'Sydney'); pll_register_string('Slide subtitle ' . $i, get_theme_mod('slider_subtitle_' . $i), 'Sydney'); } pll_register_string('Slider button text', get_theme_mod('slider_button_text'), 'Sydney'); pll_register_string('Slider button URL', get_theme_mod('slider_button_url'), 'Sydney'); } add_action( 'admin_init', 'sydney_polylang' ); endif; /** * Preloader */ function sydney_preloader() { ?> <div class="preloader"> <div class="spinner"> <div class="pre-bounce1"></div> <div class="pre-bounce2"></div> </div> </div> <?php } add_action('sydney_before_site', 'sydney_preloader'); /** * Header clone */ function sydney_header_clone() { $front_header_type = get_theme_mod('front_header_type','slider'); $site_header_type =get_theme_mod('site_header_type'); if ( ( $front_header_type == 'nothing' && is_front_page() ) || ( is_page_template( 'page-templates/page_no-header.php' ) ) || ( is_page_template( 'page-templates/page_no-header-wide.php' ) ) || ( $site_header_type == 'nothing' && !is_front_page() ) ) { ?> <div class="header-clone"></div> <?php } } add_action('sydney_before_header', 'sydney_header_clone'); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; require get_template_directory() . '/inc/customizer-wc.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; /** * Page builder support */ require get_template_directory() . '/inc/page-builder.php'; /** * Slider */ require get_template_directory() . '/inc/slider.php'; /** * Styles */ require get_template_directory() . '/inc/styles.php'; /** * Category metabox for page templates */ require get_template_directory() . '/inc/pt-metabox.php'; /** * Contact metabox */ require get_template_directory() . '/inc/contact-metabox.php'; /** * Gutenberg */ require get_template_directory() . '/inc/editor.php'; /** * Woocommerce compatibility */ require get_template_directory() . '/inc/woocommerce.php'; /** * Pricing tables */ require get_template_directory() . '/inc/pricing-tables.php'; /** * Demo content */ require_once dirname( __FILE__ ) . '/demo-content/setup.php'; /** *TGM Plugin activation. */ require_once dirname( __FILE__ ) . '/plugins/class-tgm-plugin-activation.php'; add_action( 'tgmpa_register', 'sydney_recommend_plugin' ); function sydney_recommend_plugin() { if ( !defined( 'SITEORIGIN_PANELS_VERSION' ) ) { $plugins[] = array( 'name' => 'Elementor', 'slug' => 'elementor', 'required' => false, ); } $plugins[] = array( 'name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false, ); $plugins[] = array( 'name' => 'Sydney Toolbox - custom posts and fields for the Sydney theme', 'slug' => 'sydney-toolbox', 'required' => false, ); if ( !defined('CS_VERSION') ) { $plugins[] = array( 'name' => 'Smart Slider', 'slug' => 'smart-slider-3', 'required' => false, ); } tgmpa( $plugins); } /** * Load theme updater functions. */ function sydney_pro_updater() { require( get_template_directory() . '/updater/theme-updater.php' ); } add_action( 'after_setup_theme', 'sydney_pro_updater' ); /** * License notice */ function sydney_pro_admin_notice(){ $license = get_option( 'sydney-pro-ii_license_key' ); if (!$license) { echo '<div class="updated">'; echo '<p>Please activate your license key for Sydney Pro to get the latest theme updates automatically. You can get your key from your <a href="http://athemes.com/your-account/" target="_blank">aThemes account</a> and activate it <a href="' . menu_page_url( 'sydney-pro-ii-license' ,0 ) . '">here</a></p>'; echo '</div>'; } } add_action('admin_notices', 'sydney_pro_admin_notice'); /* * Pass Customizer settings from free to pro */ function sydney_pro_import_settings() { $mods_free = get_option( 'theme_mods_sydney' ); $mods_pro = get_option( 'theme_mods_sydney-pro-ii' ); unset( $mods_pro['custom_css_post_id'] ); unset( $mods_pro['nav_menu_locations'] ); if ( empty( $mods_pro ) && !empty( $mods_free ) ) { update_option( "theme_mods_sydney-pro-ii", $mods_free ); } } add_action('after_switch_theme', 'sydney_pro_import_settings'); /* * Disable Elementor globals */ function sydney_pro_disable_elementor_globals() { update_option( 'elementor_disable_color_schemes', 'yes' ); update_option( 'elementor_disable_typography_schemes', 'yes' ); } add_action('after_switch_theme', 'sydney_pro_disable_elementor_globals');
[+]
..
[-] 404.php
[edit]
[-] archive-employees.php
[edit]
[-] archive-services.php
[edit]
[-] archive.php
[edit]
[-] comments.php
[edit]
[-] content-classic-alt.php
[edit]
[-] content-none.php
[edit]
[-] content-page.php
[edit]
[-] content-search.php
[edit]
[-] content-single.php
[edit]
[-] content.php
[edit]
[+]
css
[+]
demo-content
[+]
fonts
[-] footer.php
[edit]
[-] functions.php
[edit]
[-] header-contact.php
[edit]
[-] header-featured-image.php
[edit]
[-] header-no-header.php
[edit]
[-] header.php
[edit]
[-] home.php
[edit]
[+]
images
[+]
inc
[-] index.php
[edit]
[+]
js
[+]
languages
[-] license.txt
[edit]
[+]
page-templates
[-] page.php
[edit]
[+]
partials
[+]
plugins
[+]
post-templates
[-] readme.txt
[edit]
[-] rtl.css
[edit]
[-] screenshot.png
[edit]
[-] search.php
[edit]
[-] sidebar-footer.php
[edit]
[-] sidebar.php
[edit]
[-] single-employees.php
[edit]
[-] single-projects.php
[edit]
[-] single.php
[edit]
[-] style.css
[edit]
[-] sydney-gutenberg-editor-styles.css
[edit]
[+]
updater
[+]
widgets
[+]
woocommerce
[-] .htaccess.disabled
[edit]