plugin_install_action_links
Filter HookDescription
Filters the install action links for a plugin.Hook Information
File Location |
wp-admin/includes/class-wp-plugin-install-list-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 599 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$action_links
|
An array of plugin action links. Defaults are links to Details and Install Now. |
array
|
$plugin
|
An array of plugin data. See {@see plugins_api()} for the list of possible values. |
Usage Examples
Basic Usage
<?php
// Hook into plugin_install_action_links
add_filter('plugin_install_action_links', 'my_custom_filter', 10, 2);
function my_custom_filter($action_links, $plugin) {
// Your custom filtering logic here
return $action_links;
}
Source Code Context
wp-admin/includes/class-wp-plugin-install-list-table.php:599
- How this hook is used in WordPress core
<?php
594 * @param string[] $action_links An array of plugin action links.
595 * Defaults are links to Details and Install Now.
596 * @param array $plugin An array of plugin data. See {@see plugins_api()}
597 * for the list of possible values.
598 */
599 $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
600
601 $last_updated_timestamp = strtotime( $plugin['last_updated'] );
602 ?>
603 <div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
604 <?php
PHP Documentation
<?php
/**
* Filters the install action links for a plugin.
*
* @since 2.7.0
*
* @param string[] $action_links An array of plugin action links.
* Defaults are links to Details and Install Now.
* @param array $plugin An array of plugin data. See {@see plugins_api()}
* for the list of possible values.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/class-wp-plugin-install-list-table.php
Related Hooks
Related hooks will be displayed here in future updates.