芝麻web文件管理V1.00
编辑当前文件:/home/conskgoa/doughi.co.uk/fonts.tar
class-wp-font-face-resolver.php 0000644 00000013024 15220052304 0012476 0 ustar 00 array( 'fontFamilies' => array( 'theme' => $fonts, ), ), ); return static::parse_settings( $settings ); } /** * Parse theme.json settings to extract font definitions with variations grouped by font-family. * * @since 6.4.0 * * @param array $settings Font settings to parse. * @return array Returns an array of fonts, grouped by font-family. */ private static function parse_settings( array $settings ) { $fonts = array(); foreach ( $settings['typography']['fontFamilies'] as $font_families ) { foreach ( $font_families as $definition ) { // Skip if "fontFace" is not defined, meaning there are no variations. if ( empty( $definition['fontFace'] ) ) { continue; } // Skip if "fontFamily" is not defined. if ( empty( $definition['fontFamily'] ) ) { continue; } $font_family_name = static::maybe_parse_name_from_comma_separated_list( $definition['fontFamily'] ); // Skip if no font family is defined. if ( empty( $font_family_name ) ) { continue; } $fonts[] = static::convert_font_face_properties( $definition['fontFace'], $font_family_name ); } } return $fonts; } /** * Parse font-family name from comma-separated lists. * * If the given `fontFamily` is a comma-separated lists (example: "Inter, sans-serif" ), * parse and return the fist font from the list. * * @since 6.4.0 * * @param string $font_family Font family `fontFamily' to parse. * @return string Font-family name. */ private static function maybe_parse_name_from_comma_separated_list( $font_family ) { if ( str_contains( $font_family, ',' ) ) { $font_family = explode( ',', $font_family )[0]; } return trim( $font_family, "\"'" ); } /** * Converts font-face properties from theme.json format. * * @since 6.4.0 * * @param array $font_face_definition The font-face definitions to convert. * @param string $font_family_property The value to store in the font-face font-family property. * @return array Converted font-face properties. */ private static function convert_font_face_properties( array $font_face_definition, $font_family_property ) { $converted_font_faces = array(); foreach ( $font_face_definition as $font_face ) { // Add the font-family property to the font-face. $font_face['font-family'] = $font_family_property; // Converts the "file:./" src placeholder into a theme font file URI. if ( ! empty( $font_face['src'] ) ) { $font_face['src'] = static::to_theme_file_uri( (array) $font_face['src'] ); } // Convert camelCase properties into kebab-case. $font_face = static::to_kebab_case( $font_face ); $converted_font_faces[] = $font_face; } return $converted_font_faces; } /** * Converts each 'file:./' placeholder into a URI to the font file in the theme. * * The 'file:./' is specified in the theme's `theme.json` as a placeholder to be * replaced with the URI to the font file's location in the theme. When a "src" * beings with this placeholder, it is replaced, converting the src into a URI. * * @since 6.4.0 * * @param array $src An array of font file sources to process. * @return array An array of font file src URI(s). */ private static function to_theme_file_uri( array $src ) { $placeholder = 'file:./'; foreach ( $src as $src_key => $src_url ) { // Skip if the src doesn't start with the placeholder, as there's nothing to replace. if ( ! str_starts_with( $src_url, $placeholder ) ) { continue; } $src_file = str_replace( $placeholder, '', $src_url ); $src[ $src_key ] = get_theme_file_uri( $src_file ); } return $src; } /** * Converts all first dimension keys into kebab-case. * * @since 6.4.0 * * @param array $data The array to process. * @return array Data with first dimension keys converted into kebab-case. */ private static function to_kebab_case( array $data ) { foreach ( $data as $key => $value ) { $kebab_case = _wp_to_kebab_case( $key ); $data[ $kebab_case ] = $value; if ( $kebab_case !== $key ) { unset( $data[ $key ] ); } } return $data; } } dashicons.svg 0000644 00000363306 15220052304 0007244 0 ustar 00
admin-appearance
admin-collapse
admin-comments
admin-customizer
admin-generic
admin-home
admin-links
admin-media
admin-multisite
admin-network
admin-page
admin-plugins
admin-post
admin-settings
admin-site-alt
admin-site-alt2
admin-site-alt3
admin-site
admin-tools
admin-users
airplane
album
align-center
align-full-width
align-left
align-none
align-pull-left
align-pull-right
align-right
align-wide
amazon
analytics
archive
arrow-down-alt
arrow-down-alt2
arrow-down
arrow-left-alt
arrow-left-alt2
arrow-left
arrow-right-alt
arrow-right-alt2
arrow-right
arrow-up-alt
arrow-up-alt2
arrow-up-duplicate
arrow-up
art
awards
backup
bank
beer
bell
block-default
book-alt
book
buddicons-activity
buddicons-bbpress-logo
buddicons-buddypress-logo
buddicons-community
buddicons-forums
buddicons-friends
buddicons-groups
buddicons-pm
buddicons-replies
buddicons-topics
buddicons-tracking
building
businessman
businessperson
businesswoman
button
calculator
calendar-alt
calendar
camera-alt
camera
car
carrot
cart
category
chart-area
chart-bar
chart-line
chart-pie
clipboard
clock
cloud-saved
cloud-upload
cloud
code-standards
coffee
color-picker
columns
controls-back
controls-forward
controls-pause
controls-play
controls-repeat
controls-skipback
controls-skipforward
controls-volumeoff
controls-volumeon
cover-image
dashboard
database-add
database-export
database-import
database-remove
database-view
database
desktop
dismiss
download
drumstick
edit-large
edit-page
edit
editor-aligncenter
editor-alignleft
editor-alignright
editor-bold
editor-break
editor-code-duplicate
editor-code
editor-contract
editor-customchar
editor-expand
editor-help
editor-indent
editor-insertmore
editor-italic
editor-justify
editor-kitchensink
editor-ltr
editor-ol-rtl
editor-ol
editor-outdent
editor-paragraph
editor-paste-text
editor-paste-word
editor-quote
editor-removeformatting
editor-rtl
editor-spellcheck
editor-strikethrough
editor-table
editor-textcolor
editor-ul
editor-underline
editor-unlink
editor-video
ellipsis
email-alt
email-alt2
email
embed-audio
embed-generic
embed-photo
embed-post
embed-video
excerpt-view
exit
external
facebook-alt
facebook
feedback
filter
flag
food
format-aside
format-audio
format-chat
format-gallery
format-image
format-quote
format-status
format-video
forms
fullscreen-alt
fullscreen-exit-alt
games
google
googleplus
grid-view
groups
hammer
heading
heart
hidden
hourglass
html
id-alt
id
image-crop
image-filter
image-flip-horizontal
image-flip-vertical
image-rotate-left
image-rotate-right
image-rotate
images-alt
images-alt2
index-card
info-outline
info
insert-after
insert-before
insert
instagram
laptop
layout
leftright
lightbulb
linkedin
list-view
location-alt
location
lock-duplicate
lock
marker
media-archive
media-audio
media-code
media-default
media-document
media-interactive
media-spreadsheet
media-text
media-video
megaphone
menu-alt
menu-alt2
menu-alt3
menu
microphone
migrate
minus
money-alt
money
move
nametag
networking
no-alt
no
open-folder
palmtree
paperclip
pdf
performance
pets
phone
pinterest
playlist-audio
playlist-video
plugins-checked
plus-alt
plus-alt2
plus
podio
portfolio
post-status
pressthis
printer
privacy
products
randomize
reddit
redo
remove
rest-api
rss
saved
schedule
screenoptions
search
share-alt
share-alt2
share
shield-alt
shield
shortcode
slides
smartphone
smiley
sort
sos
spotify
star-empty
star-filled
star-half
sticky
store
superhero-alt
superhero
table-col-after
table-col-before
table-col-delete
table-row-after
table-row-before
table-row-delete
tablet
tag
tagcloud
testimonial
text-page
text
thumbs-down
thumbs-up
tickets-alt
tickets
tide
translation
trash
twitch
twitter-alt
twitter
undo
universal-access-alt
universal-access
unlock
update-alt
update
upload
vault
video-alt
video-alt2
video-alt3
visibility
warning
welcome-add-page
welcome-comments
welcome-learn-more
welcome-view-site
welcome-widgets-menus
welcome-write-blog
whatsapp
wordpress-alt
wordpress
xing
yes-alt
yes
youtube