mirror of
https://ghproxy.net/https://github.com/AlxMedia/splits.git
synced 2025-08-26 16:14:14 +08:00
Change theme name from Split to Splits
This commit is contained in:
parent
c7ac424d85
commit
7f892aacf5
36 changed files with 593 additions and 1471 deletions
|
@ -5,9 +5,9 @@
|
|||
|
||||
/* Convert hexadecimal to rgb
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'split_hex2rgb' ) ) {
|
||||
if ( ! function_exists( 'splits_hex2rgb' ) ) {
|
||||
|
||||
function split_hex2rgb( $hex, $array=false ) {
|
||||
function splits_hex2rgb( $hex, $array=false ) {
|
||||
$hex = str_replace("#", "", $hex);
|
||||
|
||||
if ( strlen($hex) == 3 ) {
|
||||
|
@ -30,9 +30,9 @@ if ( ! function_exists( 'split_hex2rgb' ) ) {
|
|||
|
||||
/* Google fonts
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'split_enqueue_google_fonts' ) ) {
|
||||
if ( ! function_exists( 'splits_enqueue_google_fonts' ) ) {
|
||||
|
||||
function split_enqueue_google_fonts () {
|
||||
function splits_enqueue_google_fonts () {
|
||||
if ( get_theme_mod('dynamic-styles', 'on') == 'on' ) {
|
||||
if ( get_theme_mod( 'font' ) == 'titillium-web-ext' ) { wp_enqueue_style( 'titillium-web-ext', '//fonts.googleapis.com/css?family=Titillium+Web:400,400italic,300italic,300,600&subset=latin,latin-ext' ); }
|
||||
if ( get_theme_mod( 'font' ) == 'droid-serif' ) { wp_enqueue_style( 'droid-serif', '//fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700' ); }
|
||||
|
@ -57,19 +57,19 @@ if ( ! function_exists( 'split_enqueue_google_fonts' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'split_enqueue_google_fonts' );
|
||||
add_action( 'wp_enqueue_scripts', 'splits_enqueue_google_fonts' );
|
||||
|
||||
|
||||
/* Dynamic css output
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'split_dynamic_css' ) ) {
|
||||
if ( ! function_exists( 'splits_dynamic_css' ) ) {
|
||||
|
||||
function split_dynamic_css() {
|
||||
function splits_dynamic_css() {
|
||||
if ( get_theme_mod('dynamic-styles', 'on') == 'on' ) {
|
||||
|
||||
// rgb values
|
||||
$color_1 = get_theme_mod('color-1');
|
||||
$color_1_rgb = split_hex2rgb($color_1);
|
||||
$color_1_rgb = splits_hex2rgb($color_1);
|
||||
|
||||
// start output
|
||||
$styles = '';
|
||||
|
@ -204,9 +204,9 @@ a,
|
|||
if ( get_theme_mod( 'header_textcolor' ) != '' ) {
|
||||
$styles .= '.site-title a, .site-description { color: #'.esc_attr( get_theme_mod( 'header_textcolor' ) ).'; }'."\n";
|
||||
}
|
||||
wp_add_inline_style( 'split-style', $styles );
|
||||
wp_add_inline_style( 'splits-style', $styles );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'split_dynamic_css' );
|
||||
add_action( 'wp_enqueue_scripts', 'splits_dynamic_css' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue