Changeset 51322 for trunk/src/wp-content/themes/twentytwenty/functions.php
- Timestamp:
- 07/03/2021 09:13:48 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/functions.php
r49347 r51322 31 31 * runs before the init hook. The init hook is too late for some features, such 32 32 * as indicating support for post thumbnails. 33 * 34 * @since Twenty Twenty 1.0 33 35 */ 34 36 function twentytwenty_theme_support() { … … 184 186 /** 185 187 * Register and Enqueue Styles. 188 * 189 * @since Twenty Twenty 1.0 186 190 */ 187 191 function twentytwenty_register_styles() { … … 204 208 /** 205 209 * Register and Enqueue Scripts. 210 * 211 * @since Twenty Twenty 1.0 206 212 */ 207 213 function twentytwenty_register_scripts() { … … 225 231 * This does not enqueue the script because it is tiny and because it is only for IE11, 226 232 * thus it does not warrant having an entire dedicated blocking script being loaded. 233 * 234 * @since Twenty Twenty 1.0 227 235 * 228 236 * @link https://git.io/vWdr2 … … 238 246 add_action( 'wp_print_footer_scripts', 'twentytwenty_skip_link_focus_fix' ); 239 247 240 /** Enqueue non-latin language styles 248 /** 249 * Enqueue non-latin language styles. 241 250 * 242 251 * @since Twenty Twenty 1.0 … … 256 265 /** 257 266 * Register navigation menus uses wp_nav_menu in five places. 267 * 268 * @since Twenty Twenty 1.0 258 269 */ 259 270 function twentytwenty_menus() { … … 274 285 /** 275 286 * Get the information about the logo. 287 * 288 * @since Twenty Twenty 1.0 276 289 * 277 290 * @param string $html The HTML output from get_custom_logo (core function). … … 332 345 /** 333 346 * Shim for wp_body_open, ensuring backward compatibility with versions of WordPress older than 5.2. 347 * 348 * @since Twenty Twenty 1.0 334 349 */ 335 350 function wp_body_open() { 351 /** This action is documented in wp-includes/general-template.php */ 336 352 do_action( 'wp_body_open' ); 337 353 } … … 340 356 /** 341 357 * Include a skip to content link at the top of the page so that users can bypass the menu. 358 * 359 * @since Twenty Twenty 1.0 342 360 */ 343 361 function twentytwenty_skip_link() { … … 349 367 /** 350 368 * Register widget areas. 369 * 370 * @since Twenty Twenty 1.0 351 371 * 352 372 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar … … 392 412 /** 393 413 * Enqueue supplemental block editor styles. 414 * 415 * @since Twenty Twenty 1.0 394 416 */ 395 417 function twentytwenty_block_editor_styles() { … … 413 435 /** 414 436 * Enqueue classic editor styles. 437 * 438 * @since Twenty Twenty 1.0 415 439 */ 416 440 function twentytwenty_classic_editor_styles() { … … 429 453 * Output Customizer settings in the classic editor. 430 454 * Adds styles to the head of the TinyMCE iframe. Kudos to @Otto42 for the original solution. 455 * 456 * @since Twenty Twenty 1.0 431 457 * 432 458 * @param array $mce_init TinyMCE styles. … … 480 506 * Block Editor Settings. 481 507 * Add custom colors and font sizes to the block editor. 508 * 509 * @since Twenty Twenty 1.0 482 510 */ 483 511 function twentytwenty_block_editor_settings() { … … 633 661 * @since Twenty Twenty 1.0 634 662 * 635 * @param string $area The area we want to get the colors for.663 * @param string $area The area we want to get the colors for. 636 664 * @param string $context Can be 'text' or 'accent'. 637 665 * @return string Returns a HEX color. … … 751 779 752 780 /** 753 * Filters Twenty Twenty theme elements754 *755 * @since Twenty Twenty 1.0756 *757 * @param array Array of elements758 */781 * Filters Twenty Twenty theme elements. 782 * 783 * @since Twenty Twenty 1.0 784 * 785 * @param array Array of elements. 786 */ 759 787 return apply_filters( 'twentytwenty_get_elements_array', $elements ); 760 788 }
Note: See TracChangeset
for help on using the changeset viewer.