diff --git a/functions.php b/functions.php index 2dc2cd8bd..68d44aaed 100644 --- a/functions.php +++ b/functions.php @@ -559,3 +559,23 @@ function twentytwelve_customize_preview_js() { wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true ); } add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' ); + + +/** + * Modifies tag cloud widget arguments to display all tags in the same font size + * and use list format for better accessibility. + * + * @since Twenty Twelve 2.4 + * + * @param array $args Arguments for tag cloud widget. + * @return array The filtered arguments for tag cloud widget. + */ +function twentytwelve_widget_tag_cloud_args( $args ) { + $args['largest'] = 22; + $args['smallest'] = 8; + $args['unit'] = 'pt'; + $args['format'] = 'list'; + + return $args; +} +add_filter( 'widget_tag_cloud_args', 'twentytwelve_widget_tag_cloud_args' ); diff --git a/style.css b/style.css index dd5dffbb3..0a6329c09 100644 --- a/style.css +++ b/style.css @@ -1450,6 +1450,20 @@ a.comment-edit-link:hover { display: block; text-align: right; } +.tagcloud ul { + list-style-type: none; +} + +.tagcloud ul li { + display: inline-block; +} + +.widget-area .widget.widget_tag_cloud li { + line-height: 1; +} +.template-front-page .widget-area .widget.widget_tag_cloud li { + margin: 0; +} /* =Plugins ----------------------------------------------- */ @@ -1460,7 +1474,6 @@ img#wpstats { margin: 0 auto 1.714285714rem; } - /* =Media queries -------------------------------------------------------------- */