Ticket #18560: plugin-install.diff
| File plugin-install.diff, 1.9 KB (added by trepmal, 21 months ago) |
|---|
-
wp-admin/includes/plugin-install.php
12 12 * It is possible for a plugin to override the Plugin API result with three 13 13 * filters. Assume this is for plugins, which can extend on the Plugin Info to 14 14 * offer more choices. This is very powerful and must be used with care, when 15 * overrid ding the filters.15 * overriding the filters. 16 16 * 17 17 * The first filter, 'plugins_api_args', is for the args and gives the action as 18 18 * the second parameter. The hook for 'plugins_api_args' must ensure that an … … 35 35 $args->per_page = 24; 36 36 37 37 // Allows a plugin to override the WordPress.org API entirely. 38 // Use the filter 'plugins_api_result' to me arly add results.38 // Use the filter 'plugins_api_result' to merely add results. 39 39 // Please ensure that a object is returned from the following filters. 40 40 $args = apply_filters('plugins_api_args', $args, $action); 41 41 $res = apply_filters('plugins_api', false, $action, $args); … … 97 97 if ( is_wp_error($api_tags) ) { 98 98 echo $api_tags->get_error_message(); 99 99 } else { 100 //Set up the tags in a way which can be interpr ated by wp_generate_tag_cloud()100 //Set up the tags in a way which can be interpreted by wp_generate_tag_cloud() 101 101 $tags = array(); 102 102 foreach ( (array)$api_tags as $tag ) 103 103 $tags[ $tag['name'] ] = (object) array( … … 134 134 } 135 135 136 136 /** 137 * Upload from zip 137 * Upload from zip. 138 138 * @since 2.8.0 139 139 * 140 140 * @param string $page … … 175 175 * @since 3.0.0 176 176 */ 177 177 function install_plugin_install_status($api, $loop = false) { 178 // this function is called recursiv ly, $loop prevents futhur loops.178 // this function is called recursively, $loop prevents further loops. 179 179 if ( is_array($api) ) 180 180 $api = (object) $api; 181 181
