Changeset 25511
- Timestamp:
- 09/20/2013 02:21:44 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin-install.php
r25308 r25511 35 35 $args->per_page = 24; 36 36 37 // Allows a plugin to override the WordPress.org API entirely. 38 // Use the filter 'plugins_api_result' to merely add results. 39 // Please ensure that a object is returned from the following filters. 40 $args = apply_filters('plugins_api_args', $args, $action); 41 $res = apply_filters('plugins_api', false, $action, $args); 37 /** 38 * Override the Plugin Install API arguments. 39 * 40 * Please ensure that an object is returned. 41 * 42 * @since 2.7.0 43 * 44 * @param object $args Plugin API arguments. 45 * @param string $action The type of information being requested from the Plugin Install API. 46 */ 47 $args = apply_filters( 'plugins_api_args', $args, $action ); 48 49 /** 50 * Allows a plugin to override the WordPress.org Plugin Install API entirely. 51 * 52 * Please ensure that an object is returned. 53 * 54 * @since 2.7.0 55 * 56 * @param bool|object The result object. Default is false. 57 * @param string $action The type of information being requested from the Plugin Install API. 58 * @param object $args Plugin API arguments. 59 */ 60 $res = apply_filters( 'plugins_api', false, $action, $args ); 42 61 43 62 if ( false === $res ) { … … 65 84 } 66 85 67 return apply_filters('plugins_api_result', $res, $action, $args); 86 /** 87 * Filter the Plugin Install API response results. 88 * 89 * @since 2.7.0 90 * 91 * @param object|WP_Error $res Response object or WP_Error. 92 * @param string $action The type of information being requested from the Plugin Install API. 93 * @param object $args Plugin API arguments. 94 */ 95 return apply_filters( 'plugins_api_result', $res, $action, $args ); 68 96 } 69 97
Note: See TracChangeset
for help on using the changeset viewer.