Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 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/tests/phpunit/includes/testcase-ajax.php

    r47041 r47122  
    121121        remove_action( 'admin_init', '_maybe_update_themes' );
    122122
    123         // Register the core actions
     123        // Register the core actions.
    124124        foreach ( array_merge( self::$_core_actions_get, self::$_core_actions_post ) as $action ) {
    125125            if ( function_exists( 'wp_ajax_' . str_replace( '-', '_', $action ) ) ) {
     
    144144        set_current_screen( 'ajax' );
    145145
    146         // Clear logout cookies
     146        // Clear logout cookies.
    147147        add_action( 'clear_auth_cookie', array( $this, 'logout' ) );
    148148
    149         // Suppress warnings from "Cannot modify header information - headers already sent by"
     149        // Suppress warnings from "Cannot modify header information - headers already sent by".
    150150        $this->_error_level = error_reporting();
    151151        error_reporting( $this->_error_level & ~E_WARNING );
    152152
    153         // Make some posts
     153        // Make some posts.
    154154        self::factory()->post->create_many( 5 );
    155155    }
     
    252252    protected function _handleAjax( $action ) {
    253253
    254         // Start output buffering
     254        // Start output buffering.
    255255        ini_set( 'implicit_flush', false );
    256256        ob_start();
    257257
    258         // Build the request
     258        // Build the request.
    259259        $_POST['action'] = $action;
    260260        $_GET['action']  = $action;
    261261        $_REQUEST        = array_merge( $_POST, $_GET );
    262262
    263         // Call the hooks
     263        // Call the hooks.
    264264        do_action( 'admin_init' );
    265265        do_action( 'wp_ajax_' . $_REQUEST['action'], null );
    266266
    267         // Save the output
     267        // Save the output.
    268268        $buffer = ob_get_clean();
    269269        if ( ! empty( $buffer ) ) {
Note: See TracChangeset for help on using the changeset viewer.