get_the_title() ) );
?>
' . __( 'Continue Reading→', 'broadwell' ) . '';
}
/**
* Dynamic CSS
*/
add_action( 'wp_enqueue_scripts', 'broadwell_dynamic_css' );
function broadwell_dynamic_css() {
if ( !is_admin() ) {
$primary_color = get_theme_mod( 'setting_primary_color', '#ff6633' );
$secondary_color = get_theme_mod( 'setting_secondary_color' , '#204a5d' );
if ( get_theme_mod( 'setting_image_area1' ) ? $area1_pic = get_theme_mod( 'setting_image_area1' ) : $area1_pic = C_ROOT.'/images/decks.jpg' );
if ( get_theme_mod( 'setting_image_area2' ) ? $area2_pic = get_theme_mod( 'setting_image_area2' ) : $area2_pic = C_ROOT.'/images/placeholder.png' );
if ( get_theme_mod( 'setting_image_area3' ) ? $area3_pic = get_theme_mod( 'setting_image_area3' ) : $area3_pic = C_ROOT.'/images/placeholder.png' );
if ( get_theme_mod( 'setting_image_area4' ) ? $area4_pic = get_theme_mod( 'setting_image_area4' ) : $area4_pic = C_ROOT.'/images/placeholder.png' );
if ( get_theme_mod( 'setting_image_area5' ) ? $area5_pic = get_theme_mod( 'setting_image_area5' ) : $area5_pic = C_ROOT.'/images/placeholder.png' );
$dynamic_css = '
/*-------------------'.strtoupper(C_NAME).' DYNAMIC CSS---------------------*/
#primary-menu li > a:hover{ color: '.$primary_color.' }
.home #primary-menu li > a.active { background-color: '.$secondary_color.'; color:#eee}
.comments-title i { color: '.$primary_color.' }
.comment-reply-link {background-color: '.$primary_color.'; color: #fff !important}
.entry-title, .entry-title a{color: '.$secondary_color.' }
.entry-title a:hover {color: '.$primary_color.' }
#area1 {background: url("'.$area1_pic.'") no-repeat center center fixed; background-size:cover; }
#area2 {background: url("'.$area2_pic.'") no-repeat center center fixed; background-size:cover; }
#area3 {background: url("'.$area3_pic.'") no-repeat center center fixed; background-size:cover; }
#area4 {background: url("'.$area4_pic.'") no-repeat center center fixed; background-size:cover; }
#area5 {background: url("'.$area5_pic.'") no-repeat center center fixed; background-size:cover; }
.mobile.lt-1280 #area1 {background: url("'.$area1_pic.'") no-repeat center center; background-size:cover; }
.mobile.lt-1280 #area2 {background: url("'.$area2_pic.'") no-repeat center center; background-size:cover; }
.mobile.lt-1280 #area3 {background: url("'.$area3_pic.'") no-repeat center center; background-size:cover; }
.mobile.lt-1280 #area4 {background: url("'.$area4_pic.'") no-repeat center center; background-size:cover; }
.mobile.lt-1280 #area5 {background: url("'.$area5_pic.'") no-repeat center center; background-size:cover; }
.nav-next, .nav-previous { background-color: '.$secondary_color.' }
#searchform .input-group-addon {background-color: '.$primary_color.' ; color:#fff}
#secondary .widget-title { color: '.$secondary_color.' }
.site-footer {background-color: '.$primary_color.' }
/*-------------------'.strtoupper(C_NAME).' DYNAMIC CSS---------------------*/
';
wp_add_inline_style( 'broadwell-dynamic', $dynamic_css );
}
}
/**
* User CSS
*/
add_action( 'wp_enqueue_scripts', 'broadwell_user_css' );
function broadwell_user_css() {
if ( !is_admin() ) {
$css = get_theme_mod( 'setting_custom_css' );
if ( !empty ($css) ) {
$user_css = '
/*-------------------'.strtoupper(C_NAME).' USER CSS---------------------*/
'.$css.'
/*-------------------'.strtoupper(C_NAME).' USER CSS---------------------*/
';
wp_add_inline_style( 'broadwell-dynamic', $user_css );
}
}
}
/**
* Generate Welcome Pointer
*
* @credit: Based mostly on the tutorial at: http://www.wpexplorer.com/making-themes-plugins-more-usable/
*
*/
function broadwell_enqueue_pointer_script_style( $hook_suffix ) {
$enqueue_pointer_script_style = false;
$dismissed_pointers = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
if( !in_array( 'broadwell_settings_pointer', $dismissed_pointers ) ) {
$enqueue_pointer_script_style = true;
add_action( 'admin_print_footer_scripts', 'broadwell_pointer_print_scripts' );
}
if( $enqueue_pointer_script_style ) {
wp_enqueue_style( 'wp-pointer' );
wp_enqueue_script( 'wp-pointer' );
}
}
/**
* Display Welcome Pointer
*/
function broadwell_pointer_print_scripts() {
$pointer_content = ''.sprintf(__( 'Welcome to %s', 'broadwell' ), C_NAME ).'
';
$pointer_content .= ''.__( 'Use the Customize menu to the left to manage theme settings.', 'broadwell' ).'
';
?>