__( 'Primary Menu', 'mon_cahier' ), 'secondary' => __( 'Footer Menu', 'mon_cahier' ), ) ); /** * Add support for the Aside and Gallery Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'quote' ) ); /** * Add styling for editor for both LTR and RTL */ add_theme_support( 'editor-style', 'editor-style-rtl' ); /** * Add featured image support */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 640, 200, true ); /** * Add Custom Bacckground support */ $args = array( 'default-color' => 'ffffff', 'default-image' => get_template_directory_uri() . '/images/grid.png', ); $args = apply_filters( 'mon_cahier_custom_background_args', $args ); if ( function_exists( 'wp_get_theme' ) ) { add_theme_support( 'custom-background', $args ); } else { define( 'BACKGROUND_COLOR', $args['default-color'] ); define( 'BACKGROUND_IMAGE', $args['default-image'] ); add_theme_support( 'custom-background', $args ); } } endif; // mon_cahier_setup add_action( 'after_setup_theme', 'mon_cahier_setup' ); /** * Add link and rollover colours to customizer * * @since mon_cahier 1.0 */ function mon_cahier_customize_register($wp_customize){ $wp_customize->add_setting('mon_cahier_theme_options[link_color]', array( 'default' => '000', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_setting('mon_cahier_theme_options[rollover_color]', array( 'default' => '000', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array( 'label' => __('Link Color', 'mon_cahier'), 'section' => 'colors', 'settings' => 'mon_cahier_theme_options[link_color]', ))); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'rollover_color', array( 'label' => __('Rollover Color', 'mon_cahier'), 'section' => 'colors', 'settings' => 'mon_cahier_theme_options[rollover_color]', ))); } add_action('customize_register', 'mon_cahier_customize_register'); /** * Register widgetized area and update sidebar with default widgets * * @since mon_cahier 1.0 */ function mon_cahier_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'mon_cahier' ), 'id' => 'sidebar-1', 'before_widget' => '", 'before_title' => '