__( 'Header Menu', 'avalon' ) ) ); } /** * Register sidebars. */ function avalon_register_sidebars() { register_sidebar( array( 'id' => 'primary', 'name' => __( 'Left Sidebar', 'avalon' ), 'description' => __( 'Left sidebar.', 'avalon' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'avalon_register_sidebars' ); /** * Filter the "read more" excerpt string link to the post. */ function avalon_excerpt_more( $more ) { return sprintf( '... %2$s', get_permalink( get_the_ID() ), __( 'Read More', 'avalon' ) ); } add_filter( 'excerpt_more', 'avalon_excerpt_more' ); /* * Pagination */ function avalon_pagination( $pages = '', $range = 4 ) { ?> < id="comment-">
%s', 'avalon' ), get_comment_author_link() ); ?> ' . get_comment_date() . ''; ?>
comment_approved ) : ?>

$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
'avalon_header_background_color', 'default' => '#f5f7fa', 'label' => __( 'Header Background', 'avalon' ), ); $colors[] = array( 'slug' => 'avalon_main_background_color', 'default' => '#349bc0', 'label' => __( 'Main Background', 'avalon' ), ); $colors[] = array( 'slug' => 'avalon_widget_header_background_color', 'default' => '#bdc3c7', 'label' => __( 'Widget Header Background', 'avalon' ), ); foreach ( $colors as $color ) { $wp_customize->add_setting( $color[ 'slug' ], array( 'default' => $color[ 'default' ], 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $color[ 'slug' ], array( 'label' => $color[ 'label' ], 'section' => 'colors', 'settings' => $color[ 'slug' ] ) ) ); } $wp_customize->add_section( 'social_media_settings_section', array( 'title' => __( 'Social Media', 'avalon' ), 'description' => __( 'Add yours social media links', 'avalon' ), 'priority' => 160, ) ); $social_medias[] = array( 'slug' => 'avalon_social_media_wordpress', 'default' => '', 'label' => __( 'WordPress Profile', 'avalon' ), ); $social_medias[] = array( 'slug' => 'avalon_social_media_github', 'default' => '', 'label' => __( 'GitHub', 'avalon' ), ); $social_medias[] = array( 'slug' => 'avalon_social_media_facebook', 'default' => '', 'label' => __( 'Facebook', 'avalon' ), ); $social_medias[] = array( 'slug' => 'avalon_social_media_twitter', 'default' => '', 'label' => __( 'Twitter', 'avalon' ), ); $social_medias[] = array( 'slug' => 'avalon_social_media_instagram', 'default' => '', 'label' => __( 'Instagram', 'avalon' ), ); $social_medias[] = array( 'slug' => 'avalon_social_media_google_plus', 'default' => '', 'label' => __( 'Google Plus', 'avalon' ), ); $social_medias[] = array( 'slug' => 'avalon_social_media_youtube', 'default' => '', 'label' => __( 'Youtube', 'avalon' ), ); foreach ( $social_medias as $social_media ) { $wp_customize->add_setting( $social_media[ 'slug' ], array( 'default' => $social_media[ 'default' ], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $social_media[ 'slug' ], array( 'label' => $social_media[ 'label' ], 'section' => 'social_media_settings_section', 'type' => 'text', ) ); } $wp_customize->add_section( 'avalon_footer_section', array( 'title' => 'Footer', 'description' => 'Set a text to copyright.', 'priority' => 165, ) ); $wp_customize->add_setting( 'copyright_text', array( 'default' => 'Theme Avalon B', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'copyright_text', array( 'label' => 'Copyright text', 'section' => 'avalon_footer_section', 'type' => 'text', ) ); }