includes_url()
是一个函数,它检索WordPress中包含目录的url,默认情况下其输出看起来像http://example.com/wp-includes/
。过滤器includes_url()PHP函数(更改wp-includes URL)
function includes_url($path = '') {
$url = site_url() . '/' . WPINC . '/';
if (!empty($path) && is_string($path) && strpos($path, '..') === false)
$url .= ltrim($path, '/');
return apply_filters('includes_url', $url, $path);
}
如何更换我自己的(使用的functions.php)的功能呢?本质上,我想改变第二行 - $url = 'http://static-content.com/' . WPINC . '/';
不幸的是每插件使用'includes_url()',所以我需要使用函数中的过滤器来修改它以满足我的需要。如果问题只出现在我的主题上,答案将是一种选择。但是非常感谢你们的帮助。 :) –