Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
noblogs-wp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai
noblogs-wp
Commits
11555206
Commit
11555206
authored
9 years ago
by
lucha
Committed by
agata
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
removed googleapis font support from path theme
parent
eff044d5
No related branches found
No related tags found
1 merge request
!3
Noblogs 5.4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
wp-content/themes/path/library/extensions/theme-fonts.php
+20
-77
20 additions, 77 deletions
wp-content/themes/path/library/extensions/theme-fonts.php
with
20 additions
and
77 deletions
wp-content/themes/path/library/extensions/theme-fonts.php
+
20
−
77
View file @
11555206
...
@@ -274,64 +274,7 @@ final class Theme_Fonts {
...
@@ -274,64 +274,7 @@ final class Theme_Fonts {
* @return void
* @return void
*/
*/
protected
function
get_style_uri
()
{
protected
function
get_style_uri
()
{
/* Get the theme-specified settings for the 'theme-fonts' feature. */
$supports
=
get_theme_support
(
'theme-fonts'
);
/* Set up an empty string for the font string. */
$font_string
=
''
;
/* Loop through each of the font settings and queue the fonts associated with them. */
foreach
(
$this
->
settings
as
$name
=>
$setting
)
{
$font_handle
=
get_theme_mod
(
"theme_font_
{
$name
}
"
,
$setting
[
'default'
]
);
$this
->
queue_font
(
$font_handle
);
}
if
(
empty
(
$this
->
font_queue
)
)
return
''
;
return
''
;
/* Loop through each of the queued fonts and add them to the font string. */
foreach
(
$this
->
font_queue
as
$family
=>
$args
)
{
$font_string
.
=
!
empty
(
$font_string
)
?
"|
{
$family
}
"
:
$family
;
/* If any font styles (weight, style) were specified, add them to the string. */
if
(
isset
(
$args
[
'styles'
]
)
&&
is_array
(
$args
[
'styles'
]
)
)
{
$font_styles
=
array_unique
(
$args
[
'styles'
]
);
$font_string
.
=
':'
.
join
(
','
,
$font_styles
);
}
}
/* Set up the query arguments and add the font family. */
$query_args
=
array
(
'family'
=>
$font_string
);
/* If the theme registered support for other font settings, add them. */
if
(
!
empty
(
$supports
[
0
]
)
)
{
/* Get the defined subset. */
$subset
=
isset
(
$supports
[
0
][
'subset'
]
)
?
$supports
[
0
][
'subset'
]
:
array
();
/* Allow devs and theme users to override the subset. */
$subset
=
apply_filters
(
'theme_fonts_subset'
,
$subset
);
/* If a subset was defined, add it to the query args. */
if
(
!
empty
(
$subset
)
)
$query_args
[
'subset'
]
=
urlencode
(
join
(
','
,
$subset
)
);
/* If specific text is requested, add it to the query args. */
if
(
isset
(
$supports
[
0
][
'text'
]
)
)
$query_args
[
'text'
]
=
urlencode
(
$supports
[
0
][
'text'
]
);
}
/* Set up the stylesheet URI. */
$style_uri
=
(
is_ssl
()
?
'https'
:
'http'
)
.
'://fonts.googleapis.com/css'
;
/* Return the stylesheet URI with added query args. */
return
add_query_arg
(
$query_args
,
$style_uri
);
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment