'ffffff'
);
add_theme_support( 'custom-background', $nimbus_custom_background_defaults );
// Set Content Width
global $content_width;
if ( ! isset( $content_width ) ) {
$content_width = 810;
}
// Register Menus
register_nav_menu('mobile', __('Mobile Menu', 'nimbus'));
register_nav_menu('top-bar', __('Primary Menu', 'nimbus'));
}
}
/* **************************************************************************************************** */
// Do Title
/* **************************************************************************************************** */
add_action('wp_title', 'nimbus_title');
if (!function_exists('nimbus_title')) {
function nimbus_title() {
global $wp_query;
$title = get_bloginfo('name');
$seporate = ' | ';
if (is_front_page()) {
$title = get_bloginfo('name');
} else if (is_feed()) {
$title = '';
} else if (is_page() || is_single()) {
$postid = $wp_query->post->ID;
$title = the_title('','',false) . $seporate . get_bloginfo('name');
}
wp_reset_query();
return $title;
}
}
/* * *************************************************************************************************** */
// Override gallery style
/* * *************************************************************************************************** */
add_filter( 'use_default_gallery_style', '__return_false' );
/* **************************************************************************************************** */
// Set Content Width On full_width.php Template
/* **************************************************************************************************** */
add_action( 'template_redirect', 'nimbus_adjust_content_width' );
if (!function_exists('nimbus_adjust_content_width')) {
function nimbus_adjust_content_width() {
global $content_width;
if ( is_page_template( 'full_width.php' ) ) {
$content_width = 1112;
}
}
}
/* * *************************************************************************************************** */
// Register Sidebars
/* * *************************************************************************************************** */
add_action('widgets_init', 'nimbus_register_sidebars');
if (!function_exists('nimbus_register_sidebars')) {
function nimbus_register_sidebars() {
register_sidebar(array(
'name' => __('Frontpage Sidebar', 'nimbus'),
'id' => 'sidebar_frontpage',
'description' => __('Widgets in this area will be displayed in the sidebar on the frontpage.', 'nimbus'),
'before_widget' => '
',
'before_title' => '',
'after_title' => '
'
));
register_sidebar(array(
'name' => __('Default Page Sidebar', 'nimbus'),
'id' => 'sidebar_pages',
'description' => __('Widgets in this area will be displayed in the sidebar on the pages.', 'nimbus'),
'before_widget' => '',
'before_title' => '',
'after_title' => '
'
));
register_sidebar(array(
'name' => __('Blog Sidebar', 'nimbus'),
'id' => 'sidebar_blog',
'description' => __('Widgets in this area will be displayed in the sidebar on all blog related post and archives.', 'nimbus'),
'before_widget' => '',
'before_title' => '',
'after_title' => '
'
));
register_sidebar(array(
'name' => __('Footer Left', 'nimbus'),
'id' => 'footer-left',
'description' => __('Widgets in this area will be shown in the left footer column.', 'nimbus'),
'before_widget' => '',
'before_title' => '',
'after_title' => '
'
));
register_sidebar(array(
'name' => __('Footer Center', 'nimbus'),
'id' => 'footer-center',
'description' => __('Widgets in this area will be shown in the center footer column.', 'nimbus'),
'before_widget' => '',
'before_title' => '',
'after_title' => '
'
));
register_sidebar(array(
'name' => __('Footer Right', 'nimbus'),
'id' => 'footer-right',
'description' => __('Widgets in this area will be shown in the right footer column.', 'nimbus'),
'before_widget' => '',
'before_title' => '',
'after_title' => '
'
));
$i = 1;
while ($i <= 20) {
register_sidebar(array(
'name' => __('Alternative Sidebar', 'nimbus') . $i,
'id' => 'sidebar_' . $i,
'description' => __('Widgets in this area will be displayed in the sidebar for any posts, or pages items that are taged with sidebar', 'nimbus') . $i . '.',
'before_widget' => '',
'before_title' => '',
'after_title' => '
'
));
$i++;
}
}
}
/* * *************************************************************************************************** */
// Modify Search Form
/* * *************************************************************************************************** */
add_filter('get_search_form', 'nimbus_modify_search_form');
if (!function_exists('nimbus_modify_search_form')) {
function nimbus_modify_search_form($form) {
$form = '';
return $form;
}
}
/* * *************************************************************************************************** */
// Excerpt Modifications
/* * *************************************************************************************************** */
// Excerpt Length
add_filter('excerpt_length', 'nimbus_excerpt_length');
if (!function_exists('nimbus_excerpt_length')) {
function nimbus_excerpt_length($length) {
return 80;
}
}
// Excerpt More
add_filter('excerpt_more', 'nimbus_excerpt_more');
if (!function_exists('nimbus_excerpt_more')) {
function nimbus_excerpt_more($more) {
return '...';
}
}
// Add to pages
add_action('init', 'nimbus_add_excerpts_to_pages');
if (!function_exists('nimbus_add_excerpts_to_pages')) {
function nimbus_add_excerpts_to_pages() {
add_post_type_support('page', 'excerpt');
}
}
// Get by ID
if (!function_exists('nimbus_get_the_excerpt_by_id')) {
function nimbus_get_the_excerpt_by_id($post_id) {
global $post;
$save_post = $post;
$post = get_post($post_id);
$output = get_the_excerpt();
$post = $save_post;
return $output;
}
}
/* * *************************************************************************************************** */
// Enable Threaded Comments
/* * *************************************************************************************************** */
add_action('wp_enqueue_scripts', 'nimbus_threaded_comments');
if (!function_exists('nimbus_threaded_comments')) {
function nimbus_threaded_comments() {
if (is_singular() && comments_open() && (get_option('thread_comments') == 1)) {
wp_enqueue_script('comment-reply');
}
}
}
/* * *************************************************************************************************** */
// Modify Comments Output
/* * *************************************************************************************************** */
if (!function_exists('nimbus_comment')) {
function nimbus_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
?>
id="li_comment_">
__('Leave a Reply', 'nimbus'), 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
comment_approved == '0') : ?>