$nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item.
+ /**
+ * Filter the tabs shown on the Plugin Install screen.
+ *
+ * @since 2.7.0
+ *
+ * @param array $tabs The tabs shown on the Plugin Install screen. Defaults are 'dashboard', 'search',
+ * 'upload', 'featured', 'popular', 'new', and 'favorites'.
+ */
$tabs = apply_filters( 'install_plugins_tabs', $tabs );
+
+ /**
+ * Filter tabs not associated with a menu item on the Plugin Install screen.
+ *
+ * @since 2.7.0
+ *
+ * @param array $nonmenu_tabs The tabs that don't have a Menu item on the Plugin Install screen.
+ */
$nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs );
// If a non-valid menu tab has been selected, And it's not a non-menu action.
default:
$args = false;
+ break;
}
+ /**
+ * Filter API request arguments for each Plugin Install screen tab.
+ *
+ * The dynamic portion of the hook name, $tab, refers to the plugin install tabs.
+ * Default tabs are 'dashboard', 'search', 'upload', 'featured', 'popular', 'new',
+ * and 'favorites'.
+ *
+ * @since 3.7.0
+ *
+ * @param array|bool $args Plugin Install API arguments.
+ */
+ $args = apply_filters( "install_plugins_table_api_args_$tab", $args );
+
if ( !$args )
return;
if ( 'top' == $which ) { ?>
<div class="tablenav top">
<div class="alignleft actions">
- <?php do_action( 'install_plugins_table_header' ); ?>
+ <?php
+ /**
+ * Fires before the Plugin Install table header pagination is displayed.
+ *
+ * @since 2.7.0
+ */
+ do_action( 'install_plugins_table_header' ); ?>
</div>
<?php $this->pagination( $which ); ?>
<br class="clear" />
}
}
+ /**
+ * Filter the install action links for a plugin.
+ *
+ * @since 2.7.0
+ *
+ * @param array $action_links An array of plugin action hyperlinks. Defaults are links to Details and Install Now.
+ * @param array $plugin The plugin currently being listed.
+ */
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
?>
<tr>
</td>
<td class="vers column-version"<?php echo $style['version']; ?>><?php echo $version; ?></td>
<td class="vers column-rating"<?php echo $style['rating']; ?>>
- <div class="star-holder" title="<?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $plugin['num_ratings'] ), number_format_i18n( $plugin['num_ratings'] ) ) ?>">
- <div class="star star-rating" style="width: <?php echo esc_attr( str_replace( ',', '.', $plugin['rating'] ) ); ?>px"></div>
- </div>
+ <?php wp_star_rating( array( 'rating' => $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'] ) ); ?>
</td>
<td class="desc column-description"<?php echo $style['description']; ?>><?php echo $description, $author; ?></td>
</tr>