Wordpress++

This commit is contained in:
nikolark committed 2015-08-22 18:55:55 +02:00
1 parent 790f1487a2
commit 3f49ab1747
610 files changed
+58979 -36562

No files matched your search

+25 -15
View File
@@ -130,6 +130,9 @@ function install_popular_tags( $args = array() ) {
return $tags;
}
/**
* @since 2.7.0
*/
function install_dashboard() {
?>
<p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format via <a href="%2$s">this page</a>.' ), 'https://wordpress.org/plugins/', self_admin_url( 'plugin-install.php?tab=upload' ) ); ?></p>
@@ -148,22 +151,28 @@ function install_dashboard() {
} else {
//Set up the tags in a way which can be interpreted by wp_generate_tag_cloud()
$tags = array();
foreach ( (array)$api_tags as $tag )
$tags[ $tag['name'] ] = (object) array(
'link' => esc_url( self_admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),
'name' => $tag['name'],
'id' => sanitize_title_with_dashes($tag['name']),
'count' => $tag['count'] );
foreach ( (array) $api_tags as $tag ) {
$url = self_admin_url( 'plugin-install.php?tab=search&type=tag&s=' . urlencode( $tag['name'] ) );
$data = array(
'link' => esc_url( $url ),
'name' => $tag['name'],
'slug' => $tag['slug'],
'id' => sanitize_title_with_dashes( $tag['name'] ),
'count' => $tag['count']
);
$tags[ $tag['name'] ] = (object) $data;
}
echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%s plugin'), 'multiple_text' => __('%s plugins') ) );
}
echo '</p><br class="clear" />';
}
add_action( 'install_plugins_featured', 'install_dashboard' );
/**
* Display search form for searching plugins.
*
* @since 2.7.0
*
* @param bool $type_selector
*/
function install_search_form( $type_selector = true ) {
$type = isset($_REQUEST['type']) ? wp_unslash( $_REQUEST['type'] ) : 'term';
@@ -209,7 +218,6 @@ function install_plugins_upload() {
</div>
<?php
}
add_action('install_plugins_upload', 'install_plugins_upload' );
/**
* Show a username form for the favorites page
@@ -235,6 +243,8 @@ function install_plugins_favorites_form() {
* Display plugin content based on plugin list.
*
* @since 2.7.0
*
* @global WP_List_Table $wp_list_table
*/
function display_plugins_table() {
global $wp_list_table;
@@ -256,17 +266,15 @@ function display_plugins_table() {
</form>
<?php
}
add_action( 'install_plugins_search', 'display_plugins_table' );
add_action( 'install_plugins_popular', 'display_plugins_table' );
add_action( 'install_plugins_recommended', 'display_plugins_table' );
add_action( 'install_plugins_new', 'display_plugins_table' );
add_action( 'install_plugins_beta', 'display_plugins_table' );
add_action( 'install_plugins_favorites', 'display_plugins_table' );
/**
* Determine the status we can perform on a plugin.
*
* @since 3.0.0
*
* @param array|object $api
* @param bool $loop
* @return type
*/
function install_plugin_install_status($api, $loop = false) {
// This function is called recursively, $loop prevents further loops.
@@ -337,6 +345,9 @@ function install_plugin_install_status($api, $loop = false) {
* Display plugin information in dialog box form.
*
* @since 2.7.0
*
* @global string $tab
* @global string $wp_version
*/
function install_plugin_information() {
global $tab;
@@ -577,4 +588,3 @@ function install_plugin_information() {
iframe_footer();
exit;
}
add_action('install_plugins_pre_plugin-information', 'install_plugin_information');