theme_root
Filter HookDescription
Filters the absolute path to the themes directory.Hook Information
File Location |
wp-includes/theme.php
View on GitHub
|
Hook Type | Filter |
Line Number | 629 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$theme_root
|
Absolute path to themes directory. |
Usage Examples
Basic Usage
<?php
// Hook into theme_root
add_filter('theme_root', 'my_custom_filter', 10, 1);
function my_custom_filter($theme_root) {
// Your custom filtering logic here
return $theme_root;
}
Source Code Context
wp-includes/theme.php:629
- How this hook is used in WordPress core
<?php
624 *
625 * @since 1.5.0
626 *
627 * @param string $theme_root Absolute path to themes directory.
628 */
629 return apply_filters( 'theme_root', $theme_root );
630 }
631
632 /**
633 * Retrieves URI for themes directory.
634 *
PHP Documentation
<?php
/**
* Filters the absolute path to the themes directory.
*
* @since 1.5.0
*
* @param string $theme_root Absolute path to themes directory.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/theme.php
Related Hooks
Related hooks will be displayed here in future updates.