Make WordPress Core

Changeset 56118


Ignore:
Timestamp:
06/30/2023 12:52:05 PM (15 months ago)
Author:
audrasjb
Message:

Twenty Twenty-One: Improve various globals documentation, as per docblock standards.

This changeset adds globals documentation, and also a couple Docblock standards improvements.

Props upadalavipul, audrasjb.
Fixes #58684.
See #57840.

Location:
trunk/src/wp-content/themes/twentytwentyone
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php

    r55633 r56118  
    1414
    1515    /**
    16      * Instantiate the object.
     16     * Instantiates the object.
    1717     *
    1818     * @since Twenty Twenty-One 1.0
     
    4646
    4747    /**
    48      * Editor custom color variables & scripts.
     48     * Enqueues editor custom color variables & scripts.
    4949     *
    5050     * @since Twenty Twenty-One 1.0
     
    8383
    8484    /**
    85      * Enqueue scripts and styles.
     85     * Enqueues scripts and styles.
    8686     *
    8787     * @since Twenty Twenty-One 1.0
     
    101101
    102102    /**
    103      * Enqueue scripts for the customizer.
     103     * Enqueues scripts for the customizer.
    104104     *
    105105     * @since Twenty Twenty-One 1.0
     
    121121
    122122    /**
    123      * Register customizer options.
     123     * Registers customizer options.
    124124     *
    125125     * @since Twenty Twenty-One 1.0
     
    210210
    211211    /**
    212      * Calculate classes for the main <html> element.
     212     * Calculates classes for the main <html> element.
    213213     *
    214214     * @since Twenty Twenty-One 1.0
     
    236236     * @since Twenty Twenty-One 1.0
    237237     *
     238     * @global WP_Screen $current_screen WordPress current screen object.
     239     *
    238240     * @param string $classes The admin body-classes.
    239241     * @return string
     
    262264
    263265    /**
    264      * Determine if we want to print the dark-mode switch or not.
    265      *
    266      * @since Twenty Twenty-One 1.0
     266     * Determines if we want to print the dark-mode switch or not.
     267     *
     268     * @since Twenty Twenty-One 1.0
     269     *
     270     * @global bool $is_IE
    267271     *
    268272     * @return bool
     
    278282
    279283    /**
    280      * Add night/day switch.
     284     * Adds night/day switch.
    281285     *
    282286     * @since Twenty Twenty-One 1.0
     
    293297
    294298    /**
    295      * Print the dark-mode switch HTML.
     299     * Prints the dark-mode switch HTML.
    296300     *
    297301     * Inspired from https://codepen.io/aaroniker/pen/KGpXZo (MIT-licensed)
     
    353357
    354358    /**
    355      * Print the dark-mode switch script.
     359     * Prints the dark-mode switch script.
    356360     *
    357361     * @since Twenty Twenty-One 1.0
  • trunk/src/wp-content/themes/twentytwentyone/functions.php

    r55929 r56118  
    340340
    341341/**
    342  * Register widget area.
     342 * Registers widget area.
    343343 *
    344344 * @since Twenty Twenty-One 1.0
     
    365365
    366366/**
    367  * Set the content width in pixels, based on the theme's design and stylesheet.
     367 * Sets the content width in pixels, based on the theme's design and stylesheet.
    368368 *
    369369 * Priority 0 to make it available to lower priority callbacks.
     
    384384
    385385/**
    386  * Enqueue scripts and styles.
    387  *
    388  * @since Twenty Twenty-One 1.0
     386 * Enqueues scripts and styles.
     387 *
     388 * @since Twenty Twenty-One 1.0
     389 *
     390 * @global bool       $is_IE
     391 * @global WP_Scripts $wp_scripts
    389392 *
    390393 * @return void
     
    463466
    464467/**
    465  * Enqueue block editor script.
     468 * Enqueues block editor script.
    466469 *
    467470 * @since Twenty Twenty-One 1.0
     
    477480
    478481/**
    479  * Fix skip link focus in IE11.
     482 * Fixes skip link focus in IE11.
    480483 *
    481484 * This does not enqueue the script because it is tiny and because it is only for IE11,
     
    505508
    506509/**
    507  * Enqueue non-latin language styles.
     510 * Enqueues non-latin language styles.
    508511 *
    509512 * @since Twenty Twenty-One 1.0
     
    551554
    552555/**
    553  * Enqueue scripts for the customizer preview.
     556 * Enqueues scripts for the customizer preview.
    554557 *
    555558 * @since Twenty Twenty-One 1.0
     
    577580
    578581/**
    579  * Enqueue scripts for the customizer.
     582 * Enqueues scripts for the customizer.
    580583 *
    581584 * @since Twenty Twenty-One 1.0
     
    596599
    597600/**
    598  * Calculate classes for the main <html> element.
     601 * Calculates classes for the main <html> element.
    599602 *
    600603 * @since Twenty Twenty-One 1.0
     
    618621
    619622/**
    620  * Add "is-IE" class to body if the user is on Internet Explorer.
     623 * Adds "is-IE" class to body if the user is on Internet Explorer.
    621624 *
    622625 * @since Twenty Twenty-One 1.0
Note: See TracChangeset for help on using the changeset viewer.