/home/u523506497/domains/mymelon.in/public_html/info/wp-includes UP
<?php
/**
* Fonts functions.
*
* @package WordPress
* @subpackage Fonts
* @since 6.4.0
*/
/**
* Generates and prints font-face styles for given fonts or theme.json fonts.
*
* @since 6.4.0
*
* @param array[][] $fonts {
* Optional. The font-families and their font faces. Default empty array.
*
* @type array ...$0 {
* An indexed or associative (keyed by font-family) array of font variations for this font-family.
* Each font face has the following structure.
*
* @type array ...$0 {
* The font face properties.
*
* @type string $font-family The font-family property.
* @type string|string[] $src The URL(s) to each resource containing the font data.
* @type string $font-style Optional. The font-style property. Default 'normal'.
* @type string $font-weight Optional. The font-weight property. Default '400'.
* @type string $font-display Optional. The font-display property. Default 'fallback'.
* @type string $ascent-override Optional. The ascent-override property.
* @type string $descent-override Optional. The descent-override property.
* @type string $font-stretch Optional. The font-stretch property.
* @type string $font-variant Optional. The font-variant property.
* @type string $font-feature-settings Optional. The font-feature-settings property.
* @type string $font-variation-settings Optional. The font-variation-settings property.
* @type string $line-gap-override Optional. The line-gap-override property.
* @type string $size-adjust Optional. The size-adjust property.
* @type string $unicode-range Optional. The unicode-range property.
* }
* }
* }
*/
function wp_print_font_faces( $fonts = array() ) {
if ( empty( $fonts ) ) {
$fonts = WP_Font_Face_Resolver::get_fonts_from_theme_json();
}
if ( empty( $fonts ) ) {
return;
}
$wp_font_face = new WP_Font_Face();
$wp_font_face->generate_and_print( $fonts );
}
/**
* Generates and prints font-face styles defined in the theme style variations.
*
* @since 6.7.0
*
*/
function wp_print_font_faces_from_style_variations() {
$fonts = WP_Font_Face_Resolver::get_fonts_from_style_variations();
if ( empty( $fonts ) ) {
return;
}
wp_print_font_faces( $fonts );
}
/**
* Registers a new font collection in the font library.
*
* See {@link https://schemas.wp.org/trunk/font-collection.json} for the schema
* the font collection data must adhere to.
*
* @since 6.5.0
*
* @param string $slug Font collection slug. May only contain alphanumeric characters, dashes,
* and underscores. See sanitize_title().
* @param array $args {
* Font collection data.
*
* @type string $name Required. Name of the font collection shown in the Font Library.
* @type string $description Optional. A short descriptive summary of the font collection. Default empty.
* @type array|string $font_families Required. Array of font family definitions that are in the collection,
* or a string containing the path or URL to a JSON file containing the font collection.
* @type array $categories Optional. Array of categories, each with a name and slug, that are used by the
* fonts in the collection. Default empty.
* }
* @return WP_Font_Collection|WP_Error A font collection if it was registered
* successfully, or WP_Error object on failure.
*/
function wp_register_font_collection( string $slug, array $args ) {
return WP_Font_Library::get_instance()->register_font_collection( $slug, $args );
}
/**
* Unregisters a font collection from the Font Library.
*
* @since 6.5.0
*
* @param string $slug Font collection slug.
* @return bool True if the font collection was unregistered successfully, else false.
*/
function wp_unregister_font_collection( string $slug ) {
return WP_Font_Library::get_instance()->unregister_font_collection( $slug );
}
/**
* Retrieves font uploads directory information.
*
* Same as wp_font_dir() but "light weight" as it doesn't attempt to create the font uploads directory.
* Intended for use in themes, when only 'basedir' and 'baseurl' are needed, generally in all cases
* when not uploading files.
*
* @since 6.5.0
*
* @see wp_font_dir()
*
* @return array See wp_font_dir() for description.
*/
function wp_get_font_dir() {
return wp_font_dir( false );
}
/**
* Returns an array containing the current fonts upload directory's path and URL.
*
* @since 6.5.0
*
* @param bool $create_dir Optional. Whether to check and create the font uploads directory. Default true.
* @return array {
* Array of information about the font upload directory.
*
* @type string $path Base directory and subdirectory or full path to the fonts upload directory.
* @type string $url Base URL and subdirectory or absolute URL to the fonts upload directory.
* @type string $subdir Subdirectory
* @type string $basedir Path without subdir.
* @type string $baseurl URL path without subdir.
* @type string|false $error False or error message.
* }
*/
function wp_font_dir( $create_dir = true ) {
/*
* Allow extenders to manipulate the font directory consistently.
*
* Ensures the upload_dir filter is fired both when calling this function
* directly and when the upload directory is filtered in the Font Face
* REST API endpoint.
*/
add_filter( 'upload_dir', '_wp_filter_font_directory' );
$font_dir = wp_upload_dir( null, $create_dir, false );
remove_filter( 'upload_dir', '_wp_filter_font_directory' );
return $font_dir;
}
/**
* A callback function for use in the {@see 'upload_dir'} filter.
*
* This function is intended for internal use only and should not be used by plugins and themes.
* Use wp_get_font_dir() instead.
*
* @since 6.5.0
* @access private
*
* @param string $font_dir The font directory.
* @return string The modified font directory.
*/
function _wp_filter_font_directory( $font_dir ) {
if ( doing_filter( 'font_dir' ) ) {
// Avoid an infinite loop.
return $font_dir;
}
$font_dir = array(
'path' => untrailingslashit( $font_dir['basedir'] ) . '/fonts',
'url' => untrailingslashit( $font_dir['baseurl'] ) . '/fonts',
'subdir' => '',
'basedir' => untrailingslashit( $font_dir['basedir'] ) . '/fonts',
'baseurl' => untrailingslashit( $font_dir['baseurl'] ) . '/fonts',
'error' => false,
);
/**
* Filters the fonts directory data.
*
* This filter allows developers to modify the fonts directory data.
*
* @since 6.5.0
*
* @param array $font_dir {
* Array of information about the font upload directory.
*
* @type string $path Base directory and subdirectory or full path to the fonts upload directory.
* @type string $url Base URL and subdirectory or absolute URL to the fonts upload directory.
* @type string $subdir Subdirectory
* @type string $basedir Path without subdir.
* @type string $baseurl URL path without subdir.
* @type string|false $error False or error message.
* }
*/
return apply_filters( 'font_dir', $font_dir );
}
/**
* Deletes child font faces when a font family is deleted.
*
* @access private
* @since 6.5.0
*
* @param int $post_id Post ID.
* @param WP_Post $post Post object.
*/
function _wp_after_delete_font_family( $post_id, $post ) {
if ( 'wp_font_family' !== $post->post_type ) {
return;
}
$font_faces_ids = get_children(
array(
'post_parent' => $post_id,
'post_type' => 'wp_font_face',
'fields' => 'ids',
)
);
foreach ( $font_faces_ids as $font_faces_id ) {
wp_delete_post( $font_faces_id, true );
}
}
/**
* Deletes associated font files when a font face is deleted.
*
* @access private
* @since 6.5.0
*
* @param int $post_id Post ID.
* @param WP_Post $post Post object.
*/
function _wp_before_delete_font_face( $post_id, $post ) {
if ( 'wp_font_face' !== $post->post_type ) {
return;
}
$font_files = get_post_meta( $post_id, '_wp_font_face_file', false );
$font_dir = untrailingslashit( wp_get_font_dir()['basedir'] );
foreach ( $font_files as $font_file ) {
wp_delete_file( $font_dir . '/' . $font_file );
}
}
/**
* Register the default font collections.
*
* @access private
* @since 6.5.0
*/
function _wp_register_default_font_collections() {
wp_register_font_collection(
'google-fonts',
array(
'name' => _x( 'Google Fonts', 'font collection name' ),
'description' => __( 'Install from Google Fonts. Fonts are copied to and served from your site.' ),
'font_families' => 'https://s.w.org/images/fonts/wp-7.1/collections/google-fonts-with-preview.json',
'categories' => array(
array(
'name' => _x( 'Sans Serif', 'font category' ),
'slug' => 'sans-serif',
),
array(
'name' => _x( 'Display', 'font category' ),
'slug' => 'display',
),
array(
'name' => _x( 'Serif', 'font category' ),
'slug' => 'serif',
),
array(
'name' => _x( 'Handwriting', 'font category' ),
'slug' => 'handwriting',
),
array(
'name' => _x( 'Monospace', 'font category' ),
'slug' => 'monospace',
),
),
)
);
}
| ID3 | - | |
| IXR | - | |
| PHPMailer | - | |
| Requests | - | |
| SimplePie | - | |
| Text | - | |
| abilities-api | - | |
| abilities-api.php | 32800 | V |
| abilities.php | 11797 | V |
| admin-bar.php | 40067 | V |
| ai-client | - | |
| ai-client.php | 2549 | V |
| assets | - | |
| atomlib.php | 12181 | V |
| author-template.php | 19844 | V |
| block-bindings | - | |
| block-bindings.php | 7632 | V |
| block-editor.php | 28724 | V |
| block-i18n.json | 316 | V |
| block-patterns | - | |
| block-patterns.php | 15606 | V |
| block-supports | - | |
| block-template-utils.php | 63477 | V |
| block-template.php | 18257 | V |
| blocks | - | |
| blocks.php | 124205 | V |
| bookmark-template.php | 12768 | V |
| bookmark.php | 15427 | V |
| build | - | |
| cache-compat.php | 11021 | V |
| cache.php | 13486 | V |
| canonical.php | 34786 | V |
| capabilities.php | 43584 | V |
| category-template.php | 56990 | V |
| category.php | 12834 | V |
| certificates | - | |
| class-IXR.php | 2609 | V |
| class-avif-info.php | 30008 | V |
| class-feed.php | 539 | V |
| class-http.php | 367 | V |
| class-json.php | 43676 | V |
| class-oembed.php | 401 | V |
| class-phpass.php | 6771 | V |
| class-phpmailer.php | 664 | V |
| class-pop3.php | 21100 | V |
| class-requests.php | 2237 | V |
| class-simplepie.php | 453 | V |
| class-smtp.php | 457 | V |
| class-snoopy.php | 37715 | V |
| class-walker-category-dropdown.php | 2469 | V |
| class-walker-category.php | 8477 | V |
| class-walker-comment.php | 14221 | V |
| class-walker-nav-menu.php | 12044 | V |
| class-walker-page-dropdown.php | 2710 | V |
| class-walker-page.php | 7612 | V |
| class-wp-admin-bar.php | 18002 | V |
| class-wp-ajax-response.php | 5288 | V |
| class-wp-application-passwords.php | 17099 | V |
| class-wp-block-bindings-registry.php | 8263 | V |
| class-wp-block-bindings-source.php | 2992 | V |
| class-wp-block-editor-context.php | 1350 | V |
| class-wp-block-list.php | 4713 | V |
| class-wp-block-metadata-registry.php | 11846 | V |
| class-wp-block-parser-block.php | 2555 | V |
| class-wp-block-parser-frame.php | 1994 | V |
| class-wp-block-parser.php | 11525 | V |
| class-wp-block-pattern-categories-registry.php | 4383 | V |
| class-wp-block-patterns-registry.php | 10265 | V |
| class-wp-block-processor.php | 69914 | V |
| class-wp-block-styles-registry.php | 6419 | V |
| class-wp-block-supports.php | 7578 | V |
| class-wp-block-template.php | 2111 | V |
| class-wp-block-templates-registry.php | 7080 | V |
| class-wp-block-type-registry.php | 5305 | V |
| class-wp-block-type.php | 17222 | V |
| class-wp-block.php | 28236 | V |
| class-wp-classic-to-block-menu-converter.php | 4026 | V |
| class-wp-comment-query.php | 49040 | V |
| class-wp-comment.php | 17249 | V |
| class-wp-connector-registry.php | 15181 | V |
| class-wp-customize-control.php | 26112 | V |
| class-wp-customize-manager.php | 202908 | V |
| class-wp-customize-nav-menus.php | 58034 | V |
| class-wp-customize-panel.php | 10703 | V |
| class-wp-customize-section.php | 11209 | V |
| class-wp-customize-setting.php | 29956 | V |
| class-wp-customize-widgets.php | 72596 | V |
| class-wp-date-query.php | 35970 | V |
| class-wp-dependencies.php | 17089 | V |
| class-wp-dependency.php | 2653 | V |
| class-wp-duotone.php | 40836 | V |
| class-wp-editor.php | 72228 | V |
| class-wp-embed.php | 15908 | V |
| class-wp-error.php | 7514 | V |
| class-wp-exception.php | 253 | V |
| class-wp-fatal-error-handler.php | 8150 | V |
| class-wp-feed-cache-transient.php | 3304 | V |
| class-wp-feed-cache.php | 969 | V |
| class-wp-filter-sentinel.php | 760 | V |
| class-wp-hook.php | 17584 | V |
| class-wp-http-cookie.php | 7269 | V |
| class-wp-http-curl.php | 13261 | V |
| class-wp-http-encoding.php | 6689 | V |
| class-wp-http-ixr-client.php | 3516 | V |
| class-wp-http-proxy.php | 5980 | V |
| class-wp-http-requests-hooks.php | 2022 | V |
| class-wp-http-requests-response.php | 4243 | V |
| class-wp-http-response.php | 2977 | V |
| class-wp-http-streams.php | 16764 | V |
| class-wp-http.php | 41641 | V |
| class-wp-icon-collections-registry.php | 5805 | V |
| class-wp-icons-registry.php | 9903 | V |
| class-wp-image-editor-gd.php | 20741 | V |
| class-wp-image-editor-imagick.php | 43454 | V |
| class-wp-image-editor.php | 17456 | V |
| class-wp-list-util.php | 7443 | V |
| class-wp-locale-switcher.php | 6776 | V |
| class-wp-locale.php | 16848 | V |
| class-wp-matchesmapregex.php | 1828 | V |
| class-wp-meta-query.php | 30507 | V |
| class-wp-metadata-lazyloader.php | 6833 | V |
| class-wp-navigation-fallback.php | 9193 | V |
| class-wp-network-query.php | 19989 | V |
| class-wp-network.php | 12411 | V |
| class-wp-object-cache.php | 17524 | V |
| class-wp-oembed-controller.php | 6905 | V |
| class-wp-oembed.php | 34372 | V |
| class-wp-paused-extensions-storage.php | 5067 | V |
| class-wp-phpmailer.php | 4348 | V |
| class-wp-plugin-dependencies.php | 25209 | V |
| class-wp-post-type.php | 30672 | V |
| class-wp-post.php | 8806 | V |
| class-wp-query.php | 164148 | V |
| class-wp-recovery-mode-cookie-service.php | 6877 | V |
| class-wp-recovery-mode-email-service.php | 11162 | V |
| class-wp-recovery-mode-key-service.php | 4914 | V |
| class-wp-recovery-mode-link-service.php | 3523 | V |
| class-wp-recovery-mode.php | 11460 | V |
| class-wp-rewrite.php | 63693 | V |
| class-wp-role.php | 2523 | V |
| class-wp-roles.php | 9326 | V |
| class-wp-script-modules.php | 40743 | V |
| class-wp-scripts.php | 36754 | V |
| class-wp-session-tokens.php | 7319 | V |
| class-wp-simplepie-file.php | 3552 | V |
| class-wp-simplepie-sanitize-kses.php | 1903 | V |
| class-wp-site-query.php | 31482 | V |
| class-wp-site.php | 7836 | V |
| class-wp-speculation-rules.php | 7884 | V |
| class-wp-styles.php | 13316 | V |
| class-wp-tax-query.php | 19577 | V |
| class-wp-taxonomy.php | 18559 | V |
| class-wp-term-query.php | 40751 | V |
| class-wp-term.php | 5263 | V |
| class-wp-text-diff-renderer-inline.php | 979 | V |
| class-wp-text-diff-renderer-table.php | 18925 | V |
| class-wp-textdomain-registry.php | 10481 | V |
| class-wp-theme-json-data.php | 1805 | V |
| class-wp-theme-json-resolver.php | 35692 | V |
| class-wp-theme-json-schema.php | 7367 | V |
| class-wp-theme-json.php | 222059 | V |
| class-wp-theme.php | 65811 | V |
| class-wp-token-map.php | 29032 | V |
| class-wp-url-pattern-prefixer.php | 4802 | V |
| class-wp-user-meta-session-tokens.php | 2954 | V |
| class-wp-user-query.php | 44102 | V |
| class-wp-user-request.php | 2342 | V |
| class-wp-user.php | 23189 | V |
| class-wp-view-config-data.php | 29427 | V |
| class-wp-walker.php | 13292 | V |
| class-wp-widget-factory.php | 4113 | V |
| class-wp-widget.php | 18452 | V |
| class-wp-xmlrpc-server.php | 217288 | V |
| class-wp.php | 26520 | V |
| class-wpdb.php | 121437 | V |
| class.wp-dependencies.php | 373 | V |
| class.wp-scripts.php | 343 | V |
| class.wp-styles.php | 338 | V |
| comment-template.php | 103211 | V |
| comment.php | 150630 | V |
| compat-utf8.php | 19386 | V |
| compat.php | 22479 | V |
| connectors.php | 32922 | V |
| cron.php | 46266 | V |
| css | - | |
| customize | - | |
| date.php | 400 | V |
| default-constants.php | 11365 | V |
| default-filters.php | 39500 | V |
| default-widgets.php | 2288 | V |
| deprecated.php | 193977 | V |
| embed-template.php | 338 | V |
| embed.php | 39215 | V |
| error-protection.php | 4092 | V |
| feed-atom-comments.php | 5504 | V |
| feed-atom.php | 3114 | V |
| feed-rdf.php | 2668 | V |
| feed-rss.php | 1189 | V |
| feed-rss2-comments.php | 4136 | V |
| feed-rss2.php | 3799 | V |
| feed.php | 25189 | V |
| fonts | - | |
| fonts.php | 9789 | V |
| formatting.php | 357678 | V |
| functions.php | 295481 | V |
| functions.wp-scripts.php | 20492 | V |
| functions.wp-styles.php | 8654 | V |
| general-template.php | 184198 | V |
| global-styles-and-settings.php | 20780 | V |
| html-api | - | |
| http.php | 28961 | V |
| https-detection.php | 5857 | V |
| https-migration.php | 4741 | V |
| icons.php | 6334 | V |
| images | - | |
| interactivity-api | - | |
| js | - | |
| json-schema.php | 7802 | V |
| kses.php | 88497 | V |
| l10n | - | |
| l10n.php | 71415 | V |
| link-template.php | 160143 | V |
| load.php | 56475 | V |
| locale.php | 162 | V |
| media-template.php | 65759 | V |
| media.php | 236804 | V |
| meta.php | 66739 | V |
| ms-blogs.php | 26324 | V |
| ms-default-constants.php | 4921 | V |
| ms-default-filters.php | 6636 | V |
| ms-deprecated.php | 21787 | V |
| ms-files.php | 2857 | V |
| ms-functions.php | 92530 | V |
| ms-load.php | 20055 | V |
| ms-network.php | 3782 | V |
| ms-settings.php | 4197 | V |
| ms-site.php | 41729 | V |
| nav-menu-template.php | 25983 | V |
| nav-menu.php | 44269 | V |
| option.php | 105246 | V |
| php-ai-client | - | |
| php-compat | - | |
| pluggable-deprecated.php | 6324 | V |
| pluggable.php | 127919 | V |
| plugin.php | 37123 | V |
| pomo | - | |
| post-formats.php | 7070 | V |
| post-template.php | 69129 | V |
| post-thumbnail-template.php | 10879 | V |
| post.php | 305215 | V |
| query.php | 37554 | V |
| registration-functions.php | 200 | V |
| registration.php | 200 | V |
| rest-api | - | |
| rest-api.php | 102951 | V |
| revision.php | 31241 | V |
| rewrite.php | 19567 | V |
| robots-template.php | 5185 | V |
| rss-functions.php | 277 | V |
| rss.php | 23203 | V |
| script-loader.php | 163550 | V |
| script-modules.php | 12311 | V |
| session.php | 258 | V |
| shortcodes.php | 24034 | V |
| sitemaps | - | |
| sitemaps.php | 3238 | V |
| sodium_compat | - | |
| speculative-loading.php | 11880 | V |
| spl-autoload-compat.php | 441 | V |
| style-engine | - | |
| style-engine.php | 8045 | V |
| taxonomy.php | 178307 | V |
| template-canvas.php | 544 | V |
| template-loader.php | 4267 | V |
| template.php | 38826 | V |
| theme-compat | - | |
| theme-i18n.json | 1892 | V |
| theme-previews.php | 2887 | V |
| theme-templates.php | 4060 | V |
| theme.json | 9480 | V |
| theme.php | 134913 | V |
| update.php | 38269 | V |
| user.php | 180301 | V |
| utf8.php | 6977 | V |
| vars.php | 6600 | V |
| version.php | 1103 | V |
| view-config.php | 19087 | V |
| view-transitions.php | 602 | V |
| widgets | - | |
| widgets.php | 70866 | V |
| wp-db.php | 445 | V |
| wp-diff.php | 792 | V |