-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·128 lines (119 loc) · 5.31 KB
/
Copy pathfunctions.php
File metadata and controls
executable file
·128 lines (119 loc) · 5.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
/**
* turing functions and definitions
*
* @package turing
* @since turing 1.0
*/
/**
* Set the content width based on the theme's design and stylesheet.
*
* @since turing 1.0
*/
if ( ! isset( $content_width ) ) $content_width = 640; /* pixels */
// update_option('siteurl','http://colorflow.wp');
// update_option('home','http://colorflow.wp');
require( get_template_directory().'/lib/talent-post-type.php' );
require( get_template_directory().'/lib/services-post-type.php' );
require( get_template_directory().'/lib/amenity-post-type.php' );
require( get_template_directory().'/lib/project-post-type.php' );
require( get_template_directory().'/lib/metabox/init.php');
// require( get_template_directory() . '/lib/metaboxes.php' );
if ( ! function_exists( 'turing_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 post thumbnails.
* @since turing 1.0
*/
function turing_setup() {
/*** Custom template tags for this theme. */
require( get_template_directory() . '/lib/template-tags.php' );
/*** Custom functions that act independently of the theme templates */
require( get_template_directory() . '/lib/tweaks.php' );
/*** Custom Theme Options */
require( get_template_directory() . '/lib/theme-options/theme-options.php' );
/*** Custom User Fields */
require( get_template_directory() . '/lib/theme-options/user-options.php' );
/*** WordPress.com-specific functions and definitions **/
// require( get_template_directory() . '/lib/wpcom.php' );
/** Make theme available for translation Translations can be filed in the /languages/ directory If you're building a theme based on turing,
use a find and replace to change 'turing' to the name of your theme in all the template files */
// Custom Post Types
load_theme_textdomain( 'turing', get_template_directory() . '/languages' );
/*** Add default posts and comments RSS feed links to head */
add_theme_support( 'automatic-feed-links' );
/*** Enable support for Post Thumbnails */
add_theme_support( 'post-thumbnails' );
/** This theme uses wp_nav_menu() in one location. */
register_nav_menus( array('primary' => __( 'Primary Menu', 'turing' ), ) );
/** Add support for the Aside Post Formats */
add_theme_support( 'post-formats', array('aside','gallery','link','image','quote','status','video') );
/*** Implement the Custom Header feature */
//require( get_template_directory() . '/lib/custom-header.php' );
}
endif; // turing_setup
add_action( 'after_setup_theme', 'turing_setup' );
/**
* Register widgetized area and update sidebar with default widgets
*
* @since turing 1.0
*/
function turing_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'turing' ),
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</aside>",
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>',
) );
}
add_action( 'widgets_init', 'turing_widgets_init' );
/** Enqueue scripts and styles */
function turing_scripts() {
global $post;
wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/libraries/modernizr.js', array( 'jquery' ), '20120206', false );
wp_enqueue_script( 'colorflow', get_template_directory_uri() . '/js/colorflow.js', array( 'jquery' ), '20120206', true );
wp_enqueue_script( 'quicksand', get_template_directory_uri() . '/js/libraries/quicksand.js', array( 'jquery' ), '20120206', true );
// if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
// wp_enqueue_script( 'comment-reply' );
// }
// if ( is_singular() && wp_attachment_is_image( $post->ID ) ) {
// wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
// }
}
add_action( 'wp_enqueue_scripts', 'turing_scripts' );
add_action( 'init', 'cmb_initialize_cmb_meta_boxes', 9999 );
/*** Initialize the metabox class. */
function cmb_initialize_cmb_meta_boxes() {
if ( ! class_exists( 'cmb_Meta_Box' ) ) require_once 'init.php';
}
// RESERVED NAMES : thumb, thumbnail, medium, large, post-thumbnail
// add_image_size( $name, $width, $height, $crop );
// set_post_thumbnail_size( $width, $height, $crop );
add_image_size( 'billboard', 1360, 9999, false );
add_image_size( 'grid-thumb', 316, 178, true );
add_image_size( 'gallery', 956, 396, false );
// update_option('thumbnail_size_w', 160);
// update_option('thumbnail_size_h', 160);
// update_option('thumbnail_crop', 1);
// update_option('medium_size_w', 500);
// update_option('medium_size_h', 500);
// update_option('medium_size_crop', 1);
// update_option('large_size_w', 500);
// update_option('large_size_h', 500);
// update_option('large_size_crop', 1);
// Custom WordPress Admin Color Scheme
// function admin_css() {
// wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/stylesheets/admin.css' );
// }
// add_action('admin_print_styles', 'admin_css' );
// CUSTOM CONTACT FORM 7 LOADER
/* Custom ajax loader */
add_filter('wpcf7_ajax_loader', 'my_wpcf7_ajax_loader');
function my_wpcf7_ajax_loader () {
return get_bloginfo('stylesheet_directory') . '/images/ajax-loader.gif';
}