theme_install_actions
Filter HookDescription
Filters the install action links for a theme in the Install Themes list table.Hook Information
File Location |
wp-admin/includes/class-wp-theme-install-list-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 361 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$actions
|
An array of theme action links. Defaults are links to Install Now, Preview, and Details. |
stdClass
|
$theme
|
An object that contains theme data returned by the WordPress.org API. |
Usage Examples
Basic Usage
<?php
// Hook into theme_install_actions
add_filter('theme_install_actions', 'my_custom_filter', 10, 2);
function my_custom_filter($actions, $theme) {
// Your custom filtering logic here
return $actions;
}
Source Code Context
wp-admin/includes/class-wp-theme-install-list-table.php:361
- How this hook is used in WordPress core
<?php
356 * @param string[] $actions An array of theme action links. Defaults are
357 * links to Install Now, Preview, and Details.
358 * @param stdClass $theme An object that contains theme data returned by the
359 * WordPress.org API.
360 */
361 $actions = apply_filters( 'theme_install_actions', $actions, $theme );
362
363 ?>
364 <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" aria-label="<?php echo esc_attr( $preview_title ); ?>">
365 <img src="<?php echo esc_url( $theme->screenshot_url . '?ver=' . $theme->version ); ?>" width="150" alt="" />
366 </a>
PHP Documentation
<?php
/**
* Filters the install action links for a theme in the Install Themes list table.
*
* @since 3.4.0
*
* @param string[] $actions An array of theme action links. Defaults are
* links to Install Now, Preview, and Details.
* @param stdClass $theme An object that contains theme data returned by the
* WordPress.org API.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/class-wp-theme-install-list-table.php
Related Hooks
Related hooks will be displayed here in future updates.