if ( $s ) {
$status = 'search';
- $themes['search'] = array_filter( array_merge( $themes['all'], $themes['broken'] ), array( &$this, '_search_callback' ) );
+ $themes['search'] = array_filter( array_merge( $themes['all'], $themes['broken'] ), array( $this, '_search_callback' ) );
}
$totals = array();
if ( 'ASC' == $order )
$this->items = array_reverse( $this->items );
} else {
- uasort( $this->items, array( &$this, '_order_callback' ) );
+ uasort( $this->items, array( $this, '_order_callback' ) );
}
}
function _search_callback( $theme ) {
static $term;
if ( is_null( $term ) )
- $term = stripslashes( $_REQUEST['s'] );
+ $term = wp_unslash( $_REQUEST['s'] );
foreach ( array( 'Name', 'Description', 'Author', 'Author', 'AuthorURI' ) as $field ) {
// Don't mark up; Do translate.
}
function display_rows() {
- foreach ( $this->items as $key => $theme )
- $this->single_row( $key, $theme );
+ foreach ( $this->items as $theme )
+ $this->single_row( $theme );
}
- function single_row( $key, $theme ) {
+ function single_row( $theme ) {
global $status, $page, $s, $totals;
$context = $status;
if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) )
$actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&checked[]=' . $theme_key . '&theme_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
- $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $stylesheet, $theme, $context );
- $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $stylesheet, $theme, $context );
+ $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );
+ $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, $context );
$class = ! $allowed ? 'inactive' : 'active';
$checkbox_id = "checkbox_" . md5( $theme->get('Name') );
case 'description':
echo "<td class='column-description desc'$style>";
if ( $theme->errors() ) {
- $pre = $status == 'broken' ? '' : __( 'Broken Theme:' ) . ' ';
+ $pre = $status == 'broken' ? __( 'Broken Theme:' ) . ' ' : '';
echo '<p><strong class="attention">' . $pre . $theme->errors()->get_error_message() . '</strong></p>';
}
echo "<div class='theme-description'><p>" . $theme->display( 'Description' ) . "</p></div>