updated theme Twenty Nineteen version 3.3
This commit is contained in:
@ -181,7 +181,9 @@ if ( ! function_exists( 'wp_get_list_item_separator' ) ) :
|
||||
*
|
||||
* Added for backward compatibility to support pre-6.0.0 WordPress versions.
|
||||
*
|
||||
* @since 6.0.0
|
||||
* @since Twenty Nineteen 2.3
|
||||
*
|
||||
* @return string Locale-specific list item separator.
|
||||
*/
|
||||
function wp_get_list_item_separator() {
|
||||
/* translators: Used between list items, there is a space after the comma. */
|
||||
@ -190,7 +192,7 @@ if ( ! function_exists( 'wp_get_list_item_separator' ) ) :
|
||||
endif;
|
||||
|
||||
/**
|
||||
* Register widget area.
|
||||
* Registers widget area.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
|
||||
*/
|
||||
@ -235,22 +237,28 @@ function twentynineteen_excerpt_more( $link ) {
|
||||
add_filter( 'excerpt_more', 'twentynineteen_excerpt_more' );
|
||||
|
||||
/**
|
||||
* Set the content width in pixels, based on the theme's design and stylesheet.
|
||||
* Sets the content width in pixels, based on the theme's design and stylesheet.
|
||||
*
|
||||
* Priority 0 to make it available to lower priority callbacks.
|
||||
*
|
||||
* @global int $content_width Content width.
|
||||
*/
|
||||
function twentynineteen_content_width() {
|
||||
// This variable is intended to be overruled from themes.
|
||||
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
|
||||
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
|
||||
/**
|
||||
* Filters Twenty Nineteen content width of the theme.
|
||||
*
|
||||
* @since Twenty Nineteen 1.0
|
||||
*
|
||||
* @param int $content_width Content width in pixels.
|
||||
*/
|
||||
$GLOBALS['content_width'] = apply_filters( 'twentynineteen_content_width', 640 );
|
||||
}
|
||||
add_action( 'after_setup_theme', 'twentynineteen_content_width', 0 );
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles.
|
||||
* Enqueues scripts and styles.
|
||||
*
|
||||
* @since Twenty Nineteen 1.0
|
||||
*/
|
||||
function twentynineteen_scripts() {
|
||||
wp_enqueue_style( 'twentynineteen-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );
|
||||
@ -272,7 +280,7 @@ function twentynineteen_scripts() {
|
||||
'twentynineteen-touch-navigation',
|
||||
get_theme_file_uri( '/js/touch-keyboard-navigation.js' ),
|
||||
array(),
|
||||
'20230621',
|
||||
'20250802',
|
||||
array(
|
||||
'in_footer' => true,
|
||||
'strategy' => 'defer',
|
||||
@ -289,7 +297,7 @@ function twentynineteen_scripts() {
|
||||
add_action( 'wp_enqueue_scripts', 'twentynineteen_scripts' );
|
||||
|
||||
/**
|
||||
* Fix skip link focus in IE11.
|
||||
* Fixes skip link focus in IE11.
|
||||
*
|
||||
* This does not enqueue the script because it is tiny and because it is only for IE11,
|
||||
* thus it does not warrant having an entire dedicated blocking script being loaded.
|
||||
@ -309,7 +317,7 @@ function twentynineteen_skip_link_focus_fix() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue supplemental block editor styles.
|
||||
* Enqueues supplemental block editor styles.
|
||||
*/
|
||||
function twentynineteen_editor_customizer_styles() {
|
||||
|
||||
@ -324,7 +332,7 @@ function twentynineteen_editor_customizer_styles() {
|
||||
add_action( 'enqueue_block_editor_assets', 'twentynineteen_editor_customizer_styles' );
|
||||
|
||||
/**
|
||||
* Display custom color CSS in customizer and on frontend.
|
||||
* Displays custom color CSS in customizer and on frontend.
|
||||
*/
|
||||
function twentynineteen_colors_css_wrap() {
|
||||
|
||||
@ -341,7 +349,7 @@ function twentynineteen_colors_css_wrap() {
|
||||
}
|
||||
?>
|
||||
|
||||
<style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . absint( $primary_color ) . '"' : ''; ?>>
|
||||
<style id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . absint( $primary_color ) . '"' : ''; ?>>
|
||||
<?php echo twentynineteen_custom_colors_css(); ?>
|
||||
</style>
|
||||
<?php
|
||||
@ -384,7 +392,7 @@ require get_template_directory() . '/inc/template-tags.php';
|
||||
require get_template_directory() . '/inc/customizer.php';
|
||||
|
||||
/**
|
||||
* Register block patterns and pattern categories.
|
||||
* Registers block patterns and pattern categories.
|
||||
*
|
||||
* @since Twenty Nineteen 3.0
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user