Skip to content

Commit

Permalink
title style added
Browse files Browse the repository at this point in the history
  • Loading branch information
themeegg committed Jul 4, 2018
1 parent 946d845 commit 19bad6f
Show file tree
Hide file tree
Showing 7 changed files with 679 additions and 575 deletions.
10 changes: 10 additions & 0 deletions inc/admin/assets/eggnews-sanitize.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,13 @@ function eggnews_website_skin_sanitize( $input ) {
function eggnews_links_sanitize() {
return false;
}

// site title design
function eggnews_sanitize_title_design( $input ) {
$valid_keys = eggnews_site_title_design();
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
28 changes: 28 additions & 0 deletions inc/admin/assets/panels/design-panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,34 @@ function eggnews_design_settings_register( $wp_customize ) {
),
)
);
/* --------------------------------------------------------------------------------------------------------------- */
/**
* Title Style
*/
$wp_customize->add_section(
'eggnews_site_title_design', array(
'title' => __( 'Title Style', 'eggnews' ),
'description' => __( 'Design option of title style', 'eggnews'),
'priority' => 26,
'panel' => 'eggnews_design_settings_panel',
)
);

$wp_customize->add_setting(
'site_title_design_options', array(
'default' => 'default',
'sanitize_callback' => 'eggnews_sanitize_title_design',
)
);
$wp_customize->add_control(
'site_title_design_options', array(
'type' => 'radio',
'priority' => 10,
'label' => __( 'Title design styles', 'eggnews' ),
'section' => 'eggnews_site_title_design',
'choices' => eggnews_site_title_design(),
)
);


}
Loading

0 comments on commit 19bad6f

Please sign in to comment.