The install_themes_table_header WordPress PHP action fires in the Install Themes list table header.
Usage
add_action('install_themes_table_header', 'your_custom_function');
function your_custom_function() {
// your custom code here
}
Parameters
- None
More information
See WordPress Developer Resources: install_themes_table_header
Examples
Add a custom column to the Install Themes table
Add a custom column called “Author Twitter” to the Install Themes table header.
add_action('install_themes_table_header', 'add_custom_column');
function add_custom_column() {
echo '<th scope="col" id="author-twitter" class="manage-column column-author-twitter">Author Twitter</th>';
}
Add a custom CSS class to the table header
Add a custom CSS class called “custom-theme-header” to the Install Themes table header.
add_action('install_themes_table_header', 'add_custom_css_class');
function add_custom_css_class() {
echo '<style>.wp-list-table th { class="custom-theme-header"; }</style>';
}
Add a custom message in the table header
Display a custom message in the Install Themes table header.
add_action('install_themes_table_header', 'add_custom_message');
function add_custom_message() {
echo '<div class="custom-message">Remember to check theme compatibility!</div>';
}
Display a custom logo in the table header
Show a custom logo in the Install Themes table header.
add_action('install_themes_table_header', 'display_custom_logo');
function display_custom_logo() {
echo '<img src="https://yourdomain.com/path/to/logo.png" alt="Your Custom Logo" class="custom-logo" />';
}
Add a search box for filtering themes
Add a custom search box to the Install Themes table header for filtering themes.
add_action('install_themes_table_header', 'add_search_box');
function add_search_box() {
echo '<input type="text" class="theme-search-box" placeholder="Search Themes...">';
}