Introduce 'tag-link-position-x' class to tag cloud links.
The new class describes the cardinal position of a link in the cloud, allowing more fine-grained CSS and JS targeting. Props Mte90, chmac. Fixes #5172. Built from https://develop.svn.wordpress.org/trunk@35984 git-svn-id: http://core.svn.wordpress.org/trunk@35949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2cc4ca6875
commit
20651de171
|
@ -904,7 +904,8 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
|
|||
|
||||
// generate the output links array
|
||||
foreach ( $tags_data as $key => $tag_data ) {
|
||||
$a[] = "<a href='" . esc_url( $tag_data['url'] ) . "' class='" . esc_attr( $tag_data['class'] ) . "' title='" . esc_attr( $tag_data['title'] ) . "' style='font-size: " . esc_attr( str_replace( ',', '.', $tag_data['font_size'] ) . $args['unit'] ) . ";'>" . esc_html( $tag_data['name'] ) . "</a>";
|
||||
$class = $tag_data['class'] . ' tag-link-position-' . ( $key + 1 );
|
||||
$a[] = "<a href='" . esc_url( $tag_data['url'] ) . "' class='" . esc_attr( $class ) . "' title='" . esc_attr( $tag_data['title'] ) . "' style='font-size: " . esc_attr( str_replace( ',', '.', $tag_data['font_size'] ) . $args['unit'] ) . ";'>" . esc_html( $tag_data['name'] ) . "</a>";
|
||||
}
|
||||
|
||||
switch ( $args['format'] ) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-35983';
|
||||
$wp_version = '4.5-alpha-35984';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue