/**
* AccessPress Root functions and definitions
*
* @package AccessPress Root
*/
/**
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) ) {
$content_width = 640; /* pixels */
}
if ( ! function_exists( 'accesspress_root_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 accesspress_root_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on AccessPress Root, use a find and replace
* to change 'accesspress-root' to the name of your theme in all the template files
*/
load_theme_textdomain( 'accesspress-root', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/**
* Add callback for custom TinyMCE editor stylesheets. (editor-style.css)
* @see http://codex.wordpress.org/Function_Reference/add_editor_style
*/
add_editor_style('css/editor-style.css');
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded
tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/** Woocommerce Compatibility **/
add_theme_support( 'woocommerce' );
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
/*
* 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('accesspress-root-service-thumbnail', 380, 252, true);
add_image_size('accesspress-root-blog-thumbnail', 558, 237, true);
add_image_size('accesspress-root-project-thumbnail', 264, 200, true);
add_image_size('accesspress-root-project-big-thumbnail', 558, 160, true);
add_image_size('accesspress-root-blog-big-thumbnail', 760, 300, true);
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'accesspress-root' ),
'footer' => __( 'Footer Menu', 'accesspress-root' ),
) );
/*
* 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',
) );
}
endif; // accesspress_root_setup
add_action( 'after_setup_theme', 'accesspress_root_setup' );
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
*/
function accesspress_root_widgets_init() {
register_sidebar( array(
'name' => __( 'Left Sidebar', 'accesspress-root' ),
'id' => 'sidebar-left',
'description' => '',
'before_widget' => '',
'before_title' => '