Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-constants.php

    r47088 r47122  
    77
    88/**
    9  * Defines initial WordPress constants
     9 * Defines initial WordPress constants.
    1010 *
    1111 * @see wp_debug_mode()
     
    7070
    7171    if ( ! defined( 'WP_CONTENT_DIR' ) ) {
    72         define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
     72        define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // No trailing slash, full paths only - WP_CONTENT_URL is defined further down.
    7373    }
    7474
     
    7878    }
    7979
    80     // Add define( 'WP_DEBUG_DISPLAY', null ); to wp-config.php use the globally configured setting for
    81     // display_errors and not force errors to be displayed. Use false to force display_errors off.
     80    // Add define( 'WP_DEBUG_DISPLAY', null ); to wp-config.php use the globally configured setting
     81    // for 'display_errors' and not force errors to be displayed. Use false to force 'display_errors' off.
    8282    if ( ! defined( 'WP_DEBUG_DISPLAY' ) ) {
    8383        define( 'WP_DEBUG_DISPLAY', true );
     
    116116    }
    117117
    118     // Constants for features added to WP that should short-circuit their plugin implementations
     118    // Constants for features added to WP that should short-circuit their plugin implementations.
    119119    define( 'WP_FEATURE_BETTER_PASSWORDS', true );
    120120
     
    142142
    143143/**
    144  * Defines plugin directory WordPress constants
    145  *
    146  * Defines must-use plugin directory constants, which may be overridden in the sunrise.php drop-in
     144 * Defines plugin directory WordPress constants.
     145 *
     146 * Defines must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
    147147 *
    148148 * @since 3.0.0
     
    150150function wp_plugin_directory_constants() {
    151151    if ( ! defined( 'WP_CONTENT_URL' ) ) {
    152         define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); // full url - WP_CONTENT_DIR is defined further up
     152        define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); // Full URL - WP_CONTENT_DIR is defined further up.
    153153    }
    154154
     
    159159     */
    160160    if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
    161         define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // full path, no trailing slash
     161        define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // Full path, no trailing slash.
    162162    }
    163163
     
    168168     */
    169169    if ( ! defined( 'WP_PLUGIN_URL' ) ) {
    170         define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash
     170        define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // Full URL, no trailing slash.
    171171    }
    172172
     
    187187     */
    188188    if ( ! defined( 'WPMU_PLUGIN_DIR' ) ) {
    189         define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); // full path, no trailing slash
     189        define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); // Full path, no trailing slash.
    190190    }
    191191
     
    196196     */
    197197    if ( ! defined( 'WPMU_PLUGIN_URL' ) ) {
    198         define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // full url, no trailing slash
     198        define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // Full URL, no trailing slash.
    199199    }
    200200
     
    211211
    212212/**
    213  * Defines cookie related WordPress constants
     213 * Defines cookie-related WordPress constants.
    214214 *
    215215 * Defines constants after multisite is loaded.
     
    219219function wp_cookie_constants() {
    220220    /**
    221      * Used to guarantee unique hash cookies
     221     * Used to guarantee unique hash cookies.
    222222     *
    223223     * @since 1.5.0
     
    345345
    346346/**
    347  * Defines functionality related WordPress constants
     347 * Defines functionality-related WordPress constants.
    348348 *
    349349 * @since 3.0.0
     
    354354     */
    355355    if ( ! defined( 'AUTOSAVE_INTERVAL' ) ) {
    356         define( 'AUTOSAVE_INTERVAL', 60 );
     356        define( 'AUTOSAVE_INTERVAL', MINUTE_IN_SECONDS );
    357357    }
    358358
     
    372372     */
    373373    if ( ! defined( 'WP_CRON_LOCK_TIMEOUT' ) ) {
    374         define( 'WP_CRON_LOCK_TIMEOUT', 60 );  // In seconds
    375     }
    376 }
    377 
    378 /**
    379  * Defines templating related WordPress constants
     374        define( 'WP_CRON_LOCK_TIMEOUT', MINUTE_IN_SECONDS );
     375    }
     376}
     377
     378/**
     379 * Defines templating-related WordPress constants.
    380380 *
    381381 * @since 3.0.0
     
    383383function wp_templating_constants() {
    384384    /**
    385      * Filesystem path to the current active template directory
     385     * Filesystem path to the current active template directory.
    386386     *
    387387     * @since 1.5.0
     
    390390
    391391    /**
    392      * Filesystem path to the current active template stylesheet directory
     392     * Filesystem path to the current active template stylesheet directory.
    393393     *
    394394     * @since 2.1.0
Note: See TracChangeset for help on using the changeset viewer.