'FFFFFF'));
/**
* Adds supports for Theme menu.
* Actuate uses wp_nav_menu() in a single location to diaplay one single menu.
*/
register_nav_menu('primary', __('Primary Menu', 'actuate'));
/**
* Add support for Post Thumbnails.
* Defines a custom name and size for Thumbnails to be used in the theme.
*
* Note: In order to use the default theme thumbnail, add_image_size() must be removed
* and 'actuateThumb' value must be removed from the_post_thumbnail in the loop file.
*/
add_theme_support('post-thumbnails');
add_image_size('actuateThumb', 190, 130, true);
}
add_action( 'after_setup_theme', 'actuate_setup' );
/**
* Defines menu values and call the menu itself.
* The menu is registered using register_nav_menu function in the theme setup.
*
* @since 1.0
*/
function actuate_nav($location) {
switch ($location):
case 'primary':
wp_nav_menu(array(
'theme_location' => 'primary',
'container_id' => 'menu',
'menu_class' => 'sf-menu actuate_menu clearfix',
'menu_id' => 'actuate_menu',
'fallback_cb' => 'actuate_nav_fallback' // Fallback function in case no menu item is defined.
));
break;
case 'mobile':
wp_nav_menu(array(
'theme_location' => 'primary',
'container_id' => 'sidr-menu',
'menu_class' => '',
'menu_id' => '',
'fallback_cb' => 'actuate_mobile_nav_fallback' // Fallback function in case no menu item is defined.
));
break;
endswitch;
}
/**
* Displays a custom menu in case either no menu is selected or
* menu does not contains any items or wp_nav_menu() is unavailable.
*
* @since 1.0
*/
function actuate_nav_fallback() {
?>
__('Right Sidebar', 'actuate'),
'id' => 'right_sidebar',
'description' => __('Right Sidebar', 'actuate'),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
// Footerbox Sidebar #1
register_sidebar(array(
'name' => __('Footerbox Sidebar #1', 'actuate'),
'id' => 'footerbox_sidebar_1',
'description' => __('Footerbox Sidebar #1', 'actuate'),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
// Footerbox Sidebar #2
register_sidebar(array(
'name' => __('Footerbox Sidebar #2', 'actuate'),
'id' => 'footerbox_sidebar_2',
'description' => __('Footerbox Sidebar #2', 'actuate'),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
// Footerbox Sidebar #3
register_sidebar(array(
'name' => __('Footerbox Sidebar #3', 'actuate'),
'id' => 'footerbox_sidebar_3',
'description' => __('Footerbox Sidebar #3', 'actuate'),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
));
}
add_action( 'widgets_init', 'actuate_sidebars' );
/**
* Enqueue CSS and JS files
*
* @since 1.0
*/
function actuate_enqueue() {
if(function_exists('wp_get_theme')){
$theme_version = wp_get_theme()->get('Version');
}else{
$theme_version = '1.0.0';
}
wp_enqueue_style('google-font-merriweather', '//fonts.googleapis.com/css?family=Merriweather:400,300,300italic,700,400italic,700italic,900,900italic');
wp_enqueue_style('google-font-oswald', '//fonts.googleapis.com/css?family=Oswald:400,300,700');
wp_enqueue_style('actuate-font-awesome', ACTUATE_GLOBAL_CSS_URL . 'font-awesome.4.4.0.css', false, '4.4.0', 'all');
wp_enqueue_style('actuate-stylesheet', get_stylesheet_uri(), false, $theme_version, 'all' );
// Enqueue (comment-reply )Javascript in case of threaded comments.
if (is_singular() && comments_open() && get_option('thread_comments')) :
wp_enqueue_script('comment-reply');
endif;
wp_enqueue_script('actuate-superfish', ACTUATE_GLOBAL_JS_URL . 'superfish.min.js', array( 'jquery' ), '1.4.8', true);
wp_enqueue_script('actuate-sidr', ACTUATE_GLOBAL_JS_URL . 'jquery.sidr.js', array( 'jquery' ), '1.2.1', true);
wp_enqueue_script('jquery-color');
wp_enqueue_script('actuate-custom', ACTUATE_GLOBAL_JS_URL . 'custom.js', array( 'jquery' ), $theme_version, true);
}
add_action( 'wp_enqueue_scripts', 'actuate_enqueue');
/**
* Hooks respond.js for IE in the wp_head hook.
*
* @since 1.0
*/
function actuate_enqueue_ie_script() {
echo "\n";
?>';
}
return $output;
}
/**
* Used to display social section
*
* @since 1.0
*/
function actuate_social_section_show() {
if(!actuate_get_option('disable_social_section')):
$output = false;
$output .= actuate_get_social_section_individual_icon('facebook', __('Facebook','actuate'), 'facebook');
$output .= actuate_get_social_section_individual_icon('twitter', __('Twitter','actuate'), 'twitter');
$output .= actuate_get_social_section_individual_icon('rss', __('RSS feed','actuate'), 'rss');
if($output !== false): ?>
max_num_pages > 1): ?>
← '.__('Newer posts', 'actuate')); ?>
→'); ?>
comment_type ):
case '' :
// Proceed with normal comments. ?>
id="li-comment-">
comment_approved == '0') : ?>
comment_parent ?>
comment_parent) ?>
'.wrapper .site-title a',
'color_site_desc' => '.wrapper .site-description',
'color_blog_p_title' => '.wrapper .loop-post-title h1 a',
'color_blog_p_meta' => '.wrapper .loop-post-meta',
'color_blog_p_content' => '.wrapper .loop-post-excerpt p',
'color_posts_title' => 'body.single .wrapper .post-title h1',
'color_posts_meta' => 'body.single .wrapper .post-meta'.actuate_multichild_selector_generator('.single .post-meta', array('.post-meta-comments a'), true),
'color_posts_content' => 'body.single .wrapper .post-content',
);
foreach ($elements_color as $key => $value) {
if(actuate_get_option($key)) {
$style .= $value . '{color:'. wp_filter_nohtml_kses(actuate_get_option($key)).';}';
}
}
$style .= "\n";
$output .= '' . "\n";
echo $output;
}
add_action('wp_head', 'actuate_attach_options_style');