admin管理员组文章数量:1023639
Personally I really dislike how wordpress shows all the "popular terms" in different sizes on the taxonomy add/edit screen in the admin area.
Does anyone know of a way to either remove this entire area completely by adding code to your functions.php file
and/or
how to just change this specific area so that none of the popular terms show up with different font sizes/styles?
Thank you
Personally I really dislike how wordpress shows all the "popular terms" in different sizes on the taxonomy add/edit screen in the admin area.
Does anyone know of a way to either remove this entire area completely by adding code to your functions.php file
and/or
how to just change this specific area so that none of the popular terms show up with different font sizes/styles?
Thank you
Share Improve this question asked Jan 21, 2011 at 22:49 NetConstructorNetConstructor 4,41618 gold badges70 silver badges82 bronze badges2 Answers
Reset to default 4Oh, I love it when you give me an easy one. Starts to make up for all those harder ones... (well, partly. ;-)
So what you want is to replace this:
(source: mikeschinkel)
With this:
(source: mikeschinkel)
How? Use the 'wp_tag_cloud'
hook which you can put into your theme's functions.php
file or in a .php
file of a plugin you might be writing. For this one I tested the global variable $pagenow
to make sure it was on the term edit page. In the hook just strip out the style
attribute from each of the <a>
elements:
add_action('wp_tag_cloud','modify_taxonomy_tag_cloud',10,2);
function modify_taxonomy_tag_cloud($html,$args) {
global $pagenow;
if ('edit-tags.php'==$pagenow) // Only for the tag edit page
$html = preg_replace("#style='[^']+'#Us",'',$html);
return $html;
}
Just to offer up an alternative using a CSS override which will actually have the same effect as Mike's solution.
add_action( 'admin_print_styles-edit-tags.php', 'normalize_tag_cloud' );
function normalize_tag_cloud() {
?>
<style type="text/css">.tagcloud a { font-size:inherit!important }</style>
<?php
}
I don't think either way is better, simply wanted to share a way to approach the problem differently.. ;)
Personally I really dislike how wordpress shows all the "popular terms" in different sizes on the taxonomy add/edit screen in the admin area.
Does anyone know of a way to either remove this entire area completely by adding code to your functions.php file
and/or
how to just change this specific area so that none of the popular terms show up with different font sizes/styles?
Thank you
Personally I really dislike how wordpress shows all the "popular terms" in different sizes on the taxonomy add/edit screen in the admin area.
Does anyone know of a way to either remove this entire area completely by adding code to your functions.php file
and/or
how to just change this specific area so that none of the popular terms show up with different font sizes/styles?
Thank you
Share Improve this question asked Jan 21, 2011 at 22:49 NetConstructorNetConstructor 4,41618 gold badges70 silver badges82 bronze badges2 Answers
Reset to default 4Oh, I love it when you give me an easy one. Starts to make up for all those harder ones... (well, partly. ;-)
So what you want is to replace this:
(source: mikeschinkel)
With this:
(source: mikeschinkel)
How? Use the 'wp_tag_cloud'
hook which you can put into your theme's functions.php
file or in a .php
file of a plugin you might be writing. For this one I tested the global variable $pagenow
to make sure it was on the term edit page. In the hook just strip out the style
attribute from each of the <a>
elements:
add_action('wp_tag_cloud','modify_taxonomy_tag_cloud',10,2);
function modify_taxonomy_tag_cloud($html,$args) {
global $pagenow;
if ('edit-tags.php'==$pagenow) // Only for the tag edit page
$html = preg_replace("#style='[^']+'#Us",'',$html);
return $html;
}
Just to offer up an alternative using a CSS override which will actually have the same effect as Mike's solution.
add_action( 'admin_print_styles-edit-tags.php', 'normalize_tag_cloud' );
function normalize_tag_cloud() {
?>
<style type="text/css">.tagcloud a { font-size:inherit!important }</style>
<?php
}
I don't think either way is better, simply wanted to share a way to approach the problem differently.. ;)
本文标签: Removing the quotPopular Termsquot area from the Taxonomy Edit Screen in the Admin Area
版权声明:本文标题:Removing the "Popular Terms" area from the Taxonomy Edit Screen in the Admin Area 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745530375a2154720.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论