Add column "Rating" in Link Manager, props hakre, fixes #9443
git-svn-id: https://develop.svn.wordpress.org/trunk@11191 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3bf18aa189
commit
16e5733fe9
@ -853,7 +853,8 @@ function get_column_headers($page) {
|
||||
'url' => __('URL'),
|
||||
'categories' => __('Categories'),
|
||||
'rel' => __('Relationship'),
|
||||
'visible' => __('Visible')
|
||||
'visible' => __('Visible'),
|
||||
'rating' => __('Rating')
|
||||
);
|
||||
|
||||
break;
|
||||
|
@ -174,6 +174,7 @@ if ( $links ) {
|
||||
if (strlen($short_url) > 35)
|
||||
$short_url = substr($short_url, 0, 32).'...';
|
||||
$visible = ($link->link_visible == 'Y') ? __('Yes') : __('No');
|
||||
$rating = $link->link_rating;
|
||||
$style = ($alt % 2) ? '' : ' class="alternate"';
|
||||
++ $alt;
|
||||
$edit_link = get_edit_bookmark_link();
|
||||
@ -184,8 +185,7 @@ if ( $links ) {
|
||||
$style = '';
|
||||
if ( in_array($column_name, $hidden) )
|
||||
$style = ' style="display:none;"';
|
||||
if ( 'visible' == $column_name )
|
||||
$style = empty($style) ? ' style="text-align: center;"' : ' style="text-align: center; display: none;"';
|
||||
|
||||
$attributes = "$class$style";
|
||||
|
||||
switch($column_name) {
|
||||
@ -233,6 +233,9 @@ if ( $links ) {
|
||||
case 'visible':
|
||||
?><td <?php echo $attributes ?>><?php echo $visible; ?></td><?php
|
||||
break;
|
||||
case 'rating':
|
||||
?><td <?php echo $attributes ?>><?php echo $rating; ?></td><?php
|
||||
break;
|
||||
default:
|
||||
?>
|
||||
<td><?php do_action('manage_link_custom_column', $column_name, $link->link_id); ?></td>
|
||||
|
@ -414,10 +414,6 @@ a.button-secondary {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
table .vers {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
textarea.all-options, input.all-options {
|
||||
width: 250px;
|
||||
}
|
||||
@ -2134,7 +2130,8 @@ body.wp-admin {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
td.action-links, th.action-links {
|
||||
td.action-links,
|
||||
th.action-links {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@ -3018,9 +3015,13 @@ table.fixed {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.fixed .column-rating,
|
||||
.fixed .column-visible {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.fixed .column-date,
|
||||
.fixed .column-parent,
|
||||
.fixed .column-visible,
|
||||
.fixed .column-links {
|
||||
width: 10%;
|
||||
}
|
||||
@ -3062,6 +3063,12 @@ table.fixed {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
table .vers,
|
||||
table .column-visible,
|
||||
table .column-rating {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.icon32 {
|
||||
float: left;
|
||||
height: 36px;
|
||||
|
Loading…
Reference in New Issue
Block a user