wp_get_update_data
Filter HookDescription
Filters the returned array of update data for plugins, themes, and WordPress core. }Hook Information
File Location |
wp-includes/update.php
View on GitHub
|
Hook Type | Filter |
Line Number | 992 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$update_data
|
{ Fetched update data. |
array
|
$titles
|
An array of update counts and UI strings for available updates. |
Usage Examples
Basic Usage
<?php
// Hook into wp_get_update_data
add_filter('wp_get_update_data', 'my_custom_filter', 10, 2);
function my_custom_filter($update_data, $titles) {
// Your custom filtering logic here
return $update_data;
}
Source Code Context
wp-includes/update.php:992
- How this hook is used in WordPress core
<?php
987 * @type int[] $counts An array of counts for available plugin, theme, and WordPress updates.
988 * @type string $update_title Titles of available updates.
989 * }
990 * @param array $titles An array of update counts and UI strings for available updates.
991 */
992 return apply_filters( 'wp_get_update_data', $update_data, $titles );
993 }
994
995 /**
996 * Determines whether core should be updated.
997 *
PHP Documentation
<?php
/**
* Filters the returned array of update data for plugins, themes, and WordPress core.
*
* @since 3.5.0
*
* @param array $update_data {
* Fetched update data.
*
* @type int[] $counts An array of counts for available plugin, theme, and WordPress updates.
* @type string $update_title Titles of available updates.
* }
* @param array $titles An array of update counts and UI strings for available updates.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/update.php
Related Hooks
Related hooks will be displayed here in future updates.