osompress / simple-social-icons

Plugin: Simple Social Icons
62 stars 33 forks source link

Themes should be able to set SSI default styles via a config file #95

Open nathanrice opened 5 years ago

nathanrice commented 5 years ago

Simple Social Icons should automatically detect a config file in a theme (perhaps /config/simple-social-icons.php) and use it to filter the SSI styles to match the style of the theme.

Currently, this task is achieved manually, which unnecessarily complicates child themes.

Alternatively, you could also set the styles by passing an array of values to add_theme_support() like so:

add_theme_support(
    'simple-social-icons',
    array(
        'alignment'              => 'alignleft',
        'background_color'       => '#f5f5f5',
        'background_color_hover' => '#333333',
        'border_radius'          => 3,
        'border_width'           => 0,
        'icon_color'             => '#333333',
        'icon_color_hover'       => '#ffffff',
        'size'                   => 40,
    )
);

If it's a Genesis child theme, the same thing could be done with a config:

add_theme_support( 'simple-social-icons', genesis_get_config( 'simple-social-icons' ) );