Skip to content

Instantly share code, notes, and snippets.

@keks55
Created November 9, 2017 08:55
Show Gist options
  • Save keks55/1c9f58274a92ee1a883ab1035c1ea162 to your computer and use it in GitHub Desktop.
Save keks55/1c9f58274a92ee1a883ab1035c1ea162 to your computer and use it in GitHub Desktop.
if theme
if ( wp_get_theme() == 'Colored' ) {
/*
// if theme active set default values
// default colors
// background colors
set_theme_mod( 'header_bg', '#beeb9f' );
set_theme_mod( 'header_search_bg', '#fff' );
set_theme_mod( 'header_submenu_bg', '#000' );
set_theme_mod( 'header_submenu_mobile_bg', '#252525' );
set_theme_mod( 'content_bg', '#fff8e3' );
set_theme_mod( 'blockquote_bg', '#fff' );
set_theme_mod( 'footer_bg', '#beeb9f' );
set_theme_mod( 'background_color', '#beeb9f' );
// title & links colors
set_theme_mod( 'logo_title_color', '#000' );
set_theme_mod( 'header_link_color', '#000' );
set_theme_mod( 'header_sub_link_color', '#fff' );
set_theme_mod( 'content_title_color', '#000' );
set_theme_mod( 'sidebar_link_color', '#000' );
set_theme_mod( 'sidebar_title_color', '#000' );
set_theme_mod( 'footer_link_color', '#000' );
set_theme_mod( 'readmore_button_color', '#000' );
set_theme_mod( 'commentsub_button_color', '#000' );
set_theme_mod( 'bullets_li_color', '#000' );
set_theme_mod( 'slider_arrows_color', '#000' );
*/
//set_theme_mod( 'colored_mas_columns', 3 );
//set_theme_mod( 'colored_hide_date', 0 );
//set_theme_mod( 'colored_hide_comment', 1 );
//set_theme_mod( 'colored_hide_slider', 1 );
//set_theme_mod( 'colored_hide_arrows', 1 );
/*
// content
//set_theme_mod( 'colored_hide_breadcrumbs', 0 );
set_theme_mod( 'colored_hide_date', 0 );
set_theme_mod( 'colored_hide_comment', 1 );
//set_theme_mod( 'colored_hide_author', 0 );
//set_theme_mod( 'colored_hide_category', 0 );
//set_theme_mod( 'colored_hide_views', 0 );
//set_theme_mod( 'colored_hide_tags', 0 );
//set_theme_mod( 'colored_hide_description', 0 );
set_theme_mod( 'colored_hide_comment_template', 1 );
// post
set_theme_mod( 'colored_post_thumb', 1 );
//set_theme_mod( 'colored_big_post_thumb', 0 );
// slider
set_theme_mod( 'colored_hide_slider', 1 );
set_theme_mod( 'colored_slide_speed', 6000 );
set_theme_mod( 'colored_slide_animation', 300 );
set_theme_mod( 'colored_hide_arrows', 1 );
set_theme_mod( 'colored_hide_bullets', 0 );
// masonry
set_theme_mod( 'colored_hide_mas_date', 1 );
set_theme_mod( 'colored_hide_mas_comment', 1 );
//set_theme_mod( 'colored_hide_mas_author', 0 );
//set_theme_mod( 'colored_hide_mas_category', 0 );
//set_theme_mod( 'colored_hide_mas_views', 0 );
set_theme_mod( 'colored_mas_columns', 3 );
*/
// delete all theme mods
// $wpdb->query("DELETE FROM $wpdb->options WHERE option_name = 'theme_mods_colored'");
// DELETE FROM wp_options WHERE option_name = 'theme_mods_colored'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment