$themes_allowedtags =
array_fill_keys( array
( 'a', 'abbr', 'acronym', 'code', 'pre', 'em', 'strong', 'div', 'p', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img'
),
array
() );
$themes_allowedtags['a'
] =
array_fill_keys( array
( 'href', 'title', 'target'
), true
);
$themes_allowedtags['acronym'
]['title'
] = true;
$themes_allowedtags['abbr'
]['title'
] = true;
$themes_allowedtags['img'
] =
array_fill_keys( array
( 'src', 'class', 'alt'
), true
);
// Prepare a list of installed themes to check against before the loop.
$installed_themes = array
();
$wp_themes =
wp_get_themes();
foreach ( $wp_themes as $theme ) { $installed_themes[] =
$theme->
get_stylesheet();
} $update_php =
network_admin_url( 'update.php?action=install-theme'
);
// Set up properties for themes available on WordPress.org.
foreach ( $themes->themes
as &
$theme ) { $theme->install_url =
add_query_arg( array
( 'theme' =>
$theme->slug,
'_wpnonce' =>
wp_create_nonce( 'install-theme_' .
$theme->slug
),
),