189 lines
5.4 KiB
PHP
189 lines
5.4 KiB
PHP
<?php
|
|
if ( ! function_exists( 'pro_terapevt_setup' ) ) :
|
|
|
|
function pro_terapevt_setup() {
|
|
|
|
/*
|
|
* Make theme available for translation.
|
|
* Translations can be filed in the /languages/ directory.
|
|
*/
|
|
/* Pinegrow generated Load Text Domain Begin */
|
|
load_theme_textdomain( 'pro_terapevt', get_template_directory() . '/languages' );
|
|
/* Pinegrow generated Load Text Domain End */
|
|
|
|
// Add default posts and comments RSS feed links to head.
|
|
add_theme_support( 'automatic-feed-links' );
|
|
|
|
/*
|
|
* Let WordPress manage the document title.
|
|
*/
|
|
add_theme_support( 'title-tag' );
|
|
|
|
/*
|
|
* Enable support for Post Thumbnails on posts and pages.
|
|
*/
|
|
add_theme_support( 'post-thumbnails' );
|
|
//Support custom logo
|
|
add_theme_support( 'custom-logo' );
|
|
|
|
// Add menus.
|
|
register_nav_menus( array(
|
|
'primary' => __( 'Primary Menu', 'pro_terapevt' ),
|
|
'social' => __( 'Social Links Menu', 'pro_terapevt' ),
|
|
) );
|
|
|
|
/*
|
|
* Register custom menu locations
|
|
*/
|
|
/* Pinegrow generated Register Menus Begin */
|
|
|
|
/* Pinegrow generated Register Menus End */
|
|
|
|
/*
|
|
* Set image sizes
|
|
*/
|
|
/* Pinegrow generated Image sizes Begin */
|
|
|
|
/* Pinegrow generated Image sizes End */
|
|
|
|
/*
|
|
* 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.
|
|
*/
|
|
add_theme_support( 'post-formats', array(
|
|
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
|
|
) );
|
|
|
|
/*
|
|
* Enable support for Page excerpts.
|
|
*/
|
|
add_post_type_support( 'page', 'excerpt' );
|
|
}
|
|
endif; // pro_terapevt_setup
|
|
|
|
add_action( 'after_setup_theme', 'pro_terapevt_setup' );
|
|
|
|
|
|
if ( ! function_exists( 'pro_terapevt_init' ) ) :
|
|
|
|
function pro_terapevt_init() {
|
|
|
|
|
|
// Use categories and tags with attachments
|
|
register_taxonomy_for_object_type( 'category', 'attachment' );
|
|
register_taxonomy_for_object_type( 'post_tag', 'attachment' );
|
|
|
|
/*
|
|
* Register custom post types. You can also move this code to a plugin.
|
|
*/
|
|
/* Pinegrow generated Custom Post Types Begin */
|
|
|
|
/* Pinegrow generated Custom Post Types End */
|
|
|
|
/*
|
|
* Register custom taxonomies. You can also move this code to a plugin.
|
|
*/
|
|
/* Pinegrow generated Taxonomies Begin */
|
|
|
|
/* Pinegrow generated Taxonomies End */
|
|
|
|
}
|
|
endif; // pro_terapevt_setup
|
|
|
|
add_action( 'init', 'pro_terapevt_init' );
|
|
|
|
|
|
if ( ! function_exists( 'pro_terapevt_custom_image_sizes_names' ) ) :
|
|
|
|
function pro_terapevt_custom_image_sizes_names( $sizes ) {
|
|
|
|
/*
|
|
* Add names of custom image sizes.
|
|
*/
|
|
/* Pinegrow generated Image Sizes Names Begin*/
|
|
/* This code will be replaced by returning names of custom image sizes. */
|
|
/* Pinegrow generated Image Sizes Names End */
|
|
return $sizes;
|
|
}
|
|
add_action( 'image_size_names_choose', 'pro_terapevt_custom_image_sizes_names' );
|
|
endif;// pro_terapevt_custom_image_sizes_names
|
|
|
|
|
|
|
|
if ( ! function_exists( 'pro_terapevt_widgets_init' ) ) :
|
|
|
|
function pro_terapevt_widgets_init() {
|
|
|
|
/*
|
|
* Register widget areas.
|
|
*/
|
|
/* Pinegrow generated Register Sidebars Begin */
|
|
|
|
/* Pinegrow generated Register Sidebars End */
|
|
}
|
|
add_action( 'widgets_init', 'pro_terapevt_widgets_init' );
|
|
endif;// pro_terapevt_widgets_init
|
|
|
|
|
|
|
|
if ( ! function_exists( 'pro_terapevt_customize_register' ) ) :
|
|
|
|
function pro_terapevt_customize_register( $wp_customize ) {
|
|
// Do stuff with $wp_customize, the WP_Customize_Manager object.
|
|
|
|
/* Pinegrow generated Customizer Controls Begin */
|
|
|
|
/* Pinegrow generated Customizer Controls End */
|
|
|
|
}
|
|
add_action( 'customize_register', 'pro_terapevt_customize_register' );
|
|
endif;// pro_terapevt_customize_register
|
|
|
|
|
|
if ( ! function_exists( 'pro_terapevt_enqueue_scripts' ) ) :
|
|
function pro_terapevt_enqueue_scripts() {
|
|
|
|
/* Pinegrow generated Enqueue Scripts Begin */
|
|
|
|
wp_deregister_script( 'pro_terapevt-popper' );
|
|
wp_enqueue_script( 'pro_terapevt-popper', get_template_directory_uri() . '/assets/js/popper.min.js', [], '1.0.2', true);
|
|
|
|
wp_deregister_script( 'pro_terapevt-bootstrap' );
|
|
wp_enqueue_script( 'pro_terapevt-bootstrap', get_template_directory_uri() . '/bootstrap/js/bootstrap.min.js', [], '1.0.2', true);
|
|
|
|
/* Pinegrow generated Enqueue Scripts End */
|
|
|
|
/* Pinegrow generated Enqueue Styles Begin */
|
|
|
|
wp_deregister_style( 'pro_terapevt-bootstrap' );
|
|
wp_enqueue_style( 'pro_terapevt-bootstrap', get_template_directory_uri() . '/bootstrap_theme/bootstrap.css', [], '1.0.2', 'all');
|
|
|
|
wp_deregister_style( 'pro_terapevt-blocks' );
|
|
wp_enqueue_style( 'pro_terapevt-blocks', get_template_directory_uri() . '/blocks.css', [], '1.0.2', 'all');
|
|
|
|
wp_deregister_style( 'pro_terapevt-style' );
|
|
wp_enqueue_style( 'pro_terapevt-style', get_bloginfo('stylesheet_url'), [], '1.0.2', 'all');
|
|
|
|
/* Pinegrow generated Enqueue Styles End */
|
|
|
|
}
|
|
add_action( 'wp_enqueue_scripts', 'pro_terapevt_enqueue_scripts' );
|
|
endif;
|
|
|
|
function pgwp_sanitize_placeholder($input) { return $input; }
|
|
/*
|
|
* Resource files included by Pinegrow.
|
|
*/
|
|
/* Pinegrow generated Include Resources Begin */
|
|
require_once "inc/custom.php";
|
|
if( !class_exists( 'PG_Helper_v2' ) ) { require_once "inc/wp_pg_helpers.php"; }
|
|
|
|
/* Pinegrow generated Include Resources End */
|
|
?>
|