- Timestamp:
- 10/03/2023 03:12:30 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyfour/functions.php
r56716 r56764 1 1 <?php 2 2 /** 3 * Twenty Twenty 3 * Twenty Twenty-Four functions and definitions 4 4 * 5 5 * @link https://developer.wordpress.org/themes/basics/theme-functions/ … … 34 34 array( 35 35 'handle' => 'twentytwentyfour-button-style-outline', 36 'src' => get_t emplate_directory_uri() . '/assets/css/button-outline.css',36 'src' => get_theme_file_uri( 'assets/css/button-outline.css' ), 37 37 'ver' => wp_get_theme()->get( 'Version' ), 38 'path' => get_theme_file_path( 'assets/css/button-outline.css' ), 38 39 ) 39 40 ); 40 41 /**42 * Add the `path` data to our stylesheet.43 *44 * This will let WordPress determine the best loading strategy for the stylesheet:45 * Small stylesheets will get inlined, while larger stylesheets will be loaded separately.46 *47 * See https://make.wordpress.org/core/2021/07/01/block-styles-loading-enhancements-in-wordpress-5-8/#inlining-small-assets for more info.48 */49 wp_style_add_data( 'twentytwentyfour-button-style-outline', 'path', get_theme_file_path( 'assets/css/button-outline.css' ) );50 41 51 42 register_block_style( … … 64 55 border-bottom: 1px solid rgba(255, 255, 255, 0.20); 65 56 } 66 57 67 58 .is-style-arrow-icon-details summary { 68 59 list-style-type: "\2193\00a0\00a0\00a0"; 69 60 } 70 61 71 62 .is-style-arrow-icon-details[open]>summary { 72 63 list-style-type: "\2192\00a0\00a0\00a0"; … … 91 82 border-radius: var(--wp--preset--spacing--20); 92 83 } 93 84 94 85 .is-style-pill a:hover { 95 86 background-color: var(--wp--preset--color--contrast-3); … … 110 101 list-style-type: "\2713"; 111 102 } 112 103 113 104 ul.is-style-checkmark-list li { 114 105 padding-inline-start: 1ch; 106 }', 107 ) 108 ); 109 register_block_style( 110 'core/navigation-link', 111 array( 112 'name' => 'arrow-link', 113 'label' => __( 'With arrow', 'twentytwentyfour' ), 114 /* 115 * Styles for the custom arrow nav link block style 116 */ 117 'inline_style' => ' 118 .is-style-arrow-link .wp-block-navigation-item__label:after { 119 content: "\2197"; 120 padding-inline-start: 0.25rem; 121 vertical-align: middle; 122 text-decoration: none; 123 display: inline-block; 115 124 }', 116 125 ) … … 130 139 display: block; 131 140 } 132 141 142 /* Hide the asterisk if the heading has no content, to avoid using empty headings to display the asterisk only, which is an A11Y issue */ 143 .is-style-asterisk:empty:before { 144 content: none; 145 } 146 147 .is-style-asterisk:-moz-only-whitespace:before { 148 content: none; 149 } 150 133 151 .is-style-asterisk.has-text-align-center:before { 134 152 margin: 0 auto; 135 153 } 136 154 137 155 .is-style-asterisk.has-text-align-right:before { 138 156 margin-left: auto; 139 157 } 140 158 141 159 .rtl .is-style-asterisk.has-text-align-left:before { 142 160 margin-right: auto;
Note: See TracChangeset
for help on using the changeset viewer.