mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Introduce plugin icons in the installer.
See http://wp.me/p2AvED-2P8 for the announcement and how to implement these. props tellyworth. see #28785. Built from https://develop.svn.wordpress.org/trunk@29569 git-svn-id: http://core.svn.wordpress.org/trunk@29343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
31e599943d
commit
0eed9373e2
@ -1297,16 +1297,12 @@ div.action-links,
|
||||
}
|
||||
|
||||
.plugin-card h4 {
|
||||
float: right;
|
||||
margin: 0 0 12px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.plugin-card .desc {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
.plugin-action-buttons {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 2em;
|
||||
margin-bottom: 1em;
|
||||
@ -1350,6 +1346,13 @@ div.action-links,
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.plugin-icon {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
float: right;
|
||||
margin: 0 0 1em 1em;
|
||||
}
|
||||
|
||||
/* ms */
|
||||
/* Background Color for Site Status */
|
||||
.wp-list-table .site-deleted {
|
||||
|
@ -1297,16 +1297,12 @@ div.action-links,
|
||||
}
|
||||
|
||||
.plugin-card h4 {
|
||||
float: left;
|
||||
margin: 0 0 12px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.plugin-card .desc {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.plugin-action-buttons {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 2em;
|
||||
margin-bottom: 1em;
|
||||
@ -1350,6 +1346,13 @@ div.action-links,
|
||||
clear: right;
|
||||
}
|
||||
|
||||
.plugin-icon {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
float: left;
|
||||
margin: 0 1em 1em 0;
|
||||
}
|
||||
|
||||
/* ms */
|
||||
/* Background Color for Site Status */
|
||||
.wp-list-table .site-deleted {
|
||||
|
2
wp-admin/css/wp-admin-rtl.min.css
vendored
2
wp-admin/css/wp-admin-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/css/wp-admin.min.css
vendored
2
wp-admin/css/wp-admin.min.css
vendored
File diff suppressed because one or more lines are too long
@ -98,7 +98,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
$args = array(
|
||||
'page' => $paged,
|
||||
'per_page' => $per_page,
|
||||
'fields' => array( 'last_updated' => true, 'downloaded' => true ),
|
||||
'fields' => array( 'last_updated' => true, 'downloaded' => true, 'icons' => true ),
|
||||
// Send the locale and installed plugin slugs to the API so it can provide context-sensitive results.
|
||||
'locale' => get_locale(),
|
||||
'installed_plugins' => $this->get_installed_plugin_slugs(),
|
||||
@ -398,6 +398,15 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
/* translators: 1: Plugin name and version. */
|
||||
$action_links[] = '<a href="' . esc_url( $details_link ) . '" class="thickbox" aria-label="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
|
||||
|
||||
if ( !empty( $plugin['icons']['svg'] ) ) {
|
||||
$plugin_icon_url = $plugin['icons']['svg'];
|
||||
} elseif ( !empty( $plugin['icons']['2x'] ) ) {
|
||||
$plugin_icon_url = $plugin['icons']['2x'];
|
||||
} elseif ( !empty( $plugin['icons']['1x'] ) ) {
|
||||
$plugin_icon_url = $plugin['icons']['1x'];
|
||||
} else {
|
||||
$plugin_icon_url = $plugin['icons']['default'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the install action links for a plugin.
|
||||
@ -411,15 +420,16 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
?>
|
||||
<div class="plugin-card">
|
||||
<div class="plugin-card-top">
|
||||
<a href="<?php echo esc_url( $details_link ); ?>" class="thickbox"><img src="<?php echo esc_attr( $plugin_icon_url ) ?>" class="plugin-icon" /></a>
|
||||
<div class="action-links">
|
||||
<?php
|
||||
if ( $action_links ) {
|
||||
echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="name column-name">
|
||||
<h4><a href="<?php echo esc_url( $details_link ); ?>" class="thickbox"><?php echo $title; ?></a></h4>
|
||||
<div class="action-links">
|
||||
<?php
|
||||
if ( ! empty( $action_links ) ) {
|
||||
echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc column-description">
|
||||
<p><?php echo $description; ?></p>
|
||||
|
Loading…
Reference in New Issue
Block a user