Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1cea6a67
authored
2010-09-22 19:59:28 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix for filesystem linked themes
1 parent
1b9bd638
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
tz-tools.php
tz-tools.php
View file @
1cea6a6
...
...
@@ -58,8 +58,19 @@ function url($script, $base_file = false) {
if
(
defined
(
__NAMESPACE__
.
'\OVERRIDE'
))
{
$info
=
Array
(
pathinfo
(
DIR
),
pathinfo
(
__DIR__
));
$base_file
=
str_replace
(
__DIR__
,
DIR
,
$base_file
);
$base_file
=
str_replace
(
$info
[
1
][
'dirname'
],
$info
[
0
][
'dirname'
],
$base_file
);
// This should replace link for tz-tools com components
$base_file
=
str_replace
(
__DIR__
,
DIR
,
$base_file
,
$q
);
// I think this does the same...?
$base_file
=
str_replace
(
$info
[
1
][
'dirname'
],
$info
[
0
][
'dirname'
],
$base_file
,
$r
);
// This should replace for theme files
$theme_dir
=
get_theme_root
()
.
DIRECTORY_SEPARATOR
.
get_template
();
if
(
is_link
(
$theme_dir
))
{
$base_file
=
str_replace
(
readlink
(
$theme_dir
),
$theme_dir
.
DIRECTORY_SEPARATOR
,
$base_file
);
}
// I probably will need to add another replace for plugins (if we use plugins w/ tz-tools, prolly won't come to think of it)
}
$base_dir
=
(
false
===
$base_file
?
DIR
:
dirname
(
$base_file
));
...
...
Please
register
or
sign in
to post a comment