Make WordPress Core

Changeset 48168


Ignore:
Timestamp:
06/25/2020 12:41:36 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Replace "AJAX" with "Ajax" in DocBlocks and comments, per the spelling glossary.

Props mukesh27, sabernhardt, SergeyBiryukov.
Fixes #50064.

Location:
trunk/src
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/custom-background.js

    r46800 r48168  
    128128                var attachment = frame.state().get('selection').first();
    129129
    130                 // Run an AJAX request to set the background image.
     130                // Run an Ajax request to set the background image.
    131131                $.post( ajaxurl, {
    132132                    action: 'set-background-image',
  • trunk/src/js/_enqueues/admin/inline-edit-post.js

    r48110 r48168  
    386386    /**
    387387     * Saves the changes made in the quick edit window to the post.
    388      * AJAX saving is only for Quick Edit and not for bulk edit.
     388     * Ajax saving is only for Quick Edit and not for bulk edit.
    389389     *
    390390     * @since 2.7.0
  • trunk/src/js/_enqueues/admin/plugin-install.js

    r47122 r48168  
    151151    /*
    152152     * Open the Plugin details modal. The event is delegated to get also the links
    153      * in the plugins search tab, after the AJAX search rebuilds the HTML. It's
     153     * in the plugins search tab, after the Ajax search rebuilds the HTML. It's
    154154     * delegated on the closest ancestor and not on the body to avoid conflicts
    155155     * with other handlers, see Trac ticket #43082.
  • trunk/src/js/_enqueues/admin/post.js

    r47122 r48168  
    3030
    3131        /**
    32          * Fetch comments using AJAX and display them in the box.
     32         * Fetch comments using Ajax and display them in the box.
    3333         *
    3434         * @memberof commentsBox
     
    939939    /**
    940940     * Handle the editing of the post_name. Create the required HTML elements and
    941      * update the changes via AJAX.
     941     * update the changes via Ajax.
    942942     *
    943943     * @global
  • trunk/src/js/_enqueues/admin/tags-box.js

    r47122 r48168  
    285285             * @since 2.9.0
    286286             *
    287              * @param {number|string} r The response message from the AJAX call.
    288              * @param {string} stat The status of the AJAX request.
     287             * @param {number|string} r The response message from the Ajax call.
     288             * @param {string} stat The status of the Ajax request.
    289289             *
    290290             * @return {void}
  • trunk/src/js/_enqueues/deprecated/media-gallery.js

    r47164 r48168  
    2424
    2525            /**
    26              * This AJAX action has been deprecated since 3.5.0, see custom-background.php
     26             * This Ajax action has been deprecated since 3.5.0, see custom-background.php
    2727             */
    2828            jQuery.post(ajaxurl, {
  • trunk/src/js/_enqueues/lib/lists.js

    r48110 r48168  
    295295
    296296    /**
    297      * Adds an item to the list via AJAX.
     297     * Adds an item to the list via Ajax.
    298298     *
    299299     * @param {HTMLElement} element  The DOM element.
     
    397397
    398398    /**
    399      * Delete an item in the list via AJAX.
     399     * Delete an item in the list via Ajax.
    400400     *
    401401     * @param {HTMLElement} element  A DOM element containing item data.
     
    484484
    485485    /**
    486      * Dim an item in the list via AJAX.
     486     * Dim an item in the list via Ajax.
    487487     *
    488488     * @param {HTMLElement} element  A DOM element containing item data.
  • trunk/src/js/_enqueues/lib/nav-menu.js

    r48110 r48168  
    921921
    922922            /*
    923              * Minimum characters for a search. Also avoid a new AJAX search when
     923             * Minimum characters for a search. Also avoid a new Ajax search when
    924924             * the pressed key (e.g. arrows) doesn't change the searched term.
    925925             */
  • trunk/src/js/_enqueues/vendor/plupload/handlers.js

    r47122 r48168  
    149149    jQuery( '.filename.original', item ).replaceWith( jQuery( '.filename.new', item ) );
    150150
    151     // Bind AJAX to the new Delete button.
     151    // Bind Ajax to the new Delete button.
    152152    jQuery( 'a.delete', item ).click( function(){
    153153        // Tell the server to delete it. TODO: Handle exceptions.
     
    167167    });
    168168
    169     // Bind AJAX to the new Undo button.
     169    // Bind Ajax to the new Undo button.
    170170    jQuery( 'a.undo', item ).click( function(){
    171171        // Tell the server to untrash it. TODO: Handle exceptions.
  • trunk/src/js/_enqueues/wp/customize/controls.js

    r47122 r48168  
    44414441        /**
    44424442         * Callback handler for when an attachment is selected in the media modal.
    4443          * Does an additional AJAX request for setting the background context.
     4443         * Does an additional Ajax request for setting the background context.
    44444444         */
    44454445        select: function() {
  • trunk/src/js/_enqueues/wp/customize/models.js

    r47122 r48168  
    1414     *
    1515     * A header image. This is where saves via the Customizer API are
    16      * abstracted away, plus our own AJAX calls to add images to and remove
     16     * abstracted away, plus our own Ajax calls to add images to and remove
    1717     * images from the user's recently uploaded images setting on the server.
    1818     * These calls are made regardless of whether the user actually saves new
  • trunk/src/js/_enqueues/wp/dashboard.js

    r46800 r48168  
    6565
    6666    /**
    67      * Triggers widget updates via AJAX.
     67     * Triggers widget updates via Ajax.
    6868     *
    6969     * @since 2.7.0
     
    104104        if ( el ) {
    105105            el = el.toString();
    106             // If the element is available as AJAX widget, show it.
     106            // If the element is available as Ajax widget, show it.
    107107            if ( $.inArray(el, ajaxWidgets) !== -1 ) {
    108108                // Show element without any delay.
  • trunk/src/js/_enqueues/wp/heartbeat.js

    r47122 r48168  
    6969                originalInterval: 0,
    7070
    71                 // Used to limit the number of AJAX requests.
     71                // Used to limit the number of Ajax requests.
    7272                minimalInterval: 0,
    7373
     
    147147
    148148                /*
    149                  * Used to limit the number of AJAX requests. Overrides all other intervals
     149                 * Used to limit the number of Ajax requests. Overrides all other intervals
    150150                 * if they are shorter. Needed for some hosts that cannot handle frequent requests
    151151                 * and the user may exceed the allocated server CPU time, etc. The minimal interval
  • trunk/src/js/_enqueues/wp/updates.js

    r48092 r48168  
    1212 * @param {object}  wp                                  WP object.
    1313 * @param {object}  settings                            WP Updates settings.
    14  * @param {string}  settings.ajax_nonce                 AJAX nonce.
     14 * @param {string}  settings.ajax_nonce                 Ajax nonce.
    1515 * @param {object=} settings.plugins                    Base names of plugins in their different states.
    1616 * @param {Array}   settings.plugins.all                Base names of all plugins.
     
    15321532     * @private
    15331533     *
    1534      * @param {object} data   AJAX payload.
     1534     * @param {object} data   Ajax payload.
    15351535     * @param {string} action The type of request to perform.
    1536      * @return {object} The AJAX payload with the appropriate callbacks.
     1536     * @return {object} The Ajax payload with the appropriate callbacks.
    15371537     */
    15381538    wp.updates._addCallbacks = function( data, action ) {
     
    17701770
    17711771    /**
    1772      * Validates an AJAX response to ensure it's a proper object.
     1772     * Validates an Ajax response to ensure it's a proper object.
    17731773     *
    17741774     * If the response deems to be invalid, an admin notice is being displayed.
  • trunk/src/js/media/models/attachments.js

    r47122 r48168  
    357357    },
    358358    /**
    359      * A custom AJAX-response parser.
     359     * A custom Ajax-response parser.
    360360     *
    361361     * See trac ticket #24753
  • trunk/src/wp-admin/includes/ajax-actions.php

    r48154 r48168  
    332332
    333333/**
    334  * Handles AJAX requests for community events
     334 * Handles Ajax requests for community events
    335335 *
    336336 * @since 4.8.0
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r48121 r48168  
    179179     * Run the SQL version checks.
    180180     *
    181      * These values are used in later tests, but the part of preparing them is more easily managed early
    182      * in the class for ease of access and discovery.
     181     * These values are used in later tests, but the part of preparing them is more easily managed
     182     * early in the class for ease of access and discovery.
    183183     *
    184184     * @since 5.2.0
     
    213213     * Test if `wp_version_check` is blocked.
    214214     *
    215      * It's possible to block updates with the `wp_version_check` filter, but this can't be checked during an
    216      * AJAX call, as the filter is never introduced then.
    217      *
    218      * This filter overrides a normal page request if it's made by an admin through the AJAX call with the
    219      * right query argument to check for this.
     215     * It's possible to block updates with the `wp_version_check` filter, but this can't be checked
     216     * during an Ajax call, as the filter is never introduced then.
     217     *
     218     * This filter overrides a normal page request if it's made by an admin through the Ajax call
     219     * with the right query argument to check for this.
    220220     *
    221221     * @since 5.2.0
     
    234234     * Tests for WordPress version and outputs it.
    235235     *
    236      * Gives various results depending on what kind of updates are available, if any, to encourage the
    237      * user to install security updates as a priority.
     236     * Gives various results depending on what kind of updates are available, if any, to encourage
     237     * the user to install security updates as a priority.
    238238     *
    239239     * @since 5.2.0
     
    335335     * Test if plugins are outdated, or unnecessary.
    336336     *
    337      * The tests checks if your plugins are up to date, and encourages you to remove any that are not in use.
     337     * The tests checks if your plugins are up to date, and encourages you to remove any
     338     * that are not in use.
    338339     *
    339340     * @since 5.2.0
     
    466467     * Test if themes are outdated, or unnecessary.
    467468     *
    468      * The tests checks if your site has a default theme (to fall back on if there is a need), if your themes
    469      * are up to date and, finally, encourages you to remove any themes that are not needed.
     469     * Сhecks if your site has a default theme (to fall back on if there is a need),
     470     * if your themes are up to date and, finally, encourages you to remove any themes
     471     * that are not needed.
    470472     *
    471473     * @since 5.2.0
     
    14091411     * Test if debug information is enabled.
    14101412     *
    1411      * When WP_DEBUG is enabled, errors and information may be disclosed to site visitors, or it may be
    1412      * logged to a publicly accessible file.
    1413      *
    1414      * Debugging is also frequently left enabled after looking for errors on a site, as site owners do
    1415      * not understand the implications of this.
     1413     * When WP_DEBUG is enabled, errors and information may be disclosed to site visitors,
     1414     * or logged to a publicly accessible file.
     1415     *
     1416     * Debugging is also frequently left enabled after looking for errors on a site,
     1417     * as site owners do not understand the implications of this.
    14161418     *
    14171419     * @since 5.2.0
     
    15901592     * Test if scheduled events run as intended.
    15911593     *
    1592      * If scheduled events are not running, this may indicate something with WP_Cron is not working as intended,
    1593      * or that there are orphaned events hanging around from older code.
     1594     * If scheduled events are not running, this may indicate something with WP_Cron is not working
     1595     * as intended, or that there are orphaned events hanging around from older code.
    15941596     *
    15951597     * @since 5.2.0
     
    16621664     * Test if WordPress can run automated background updates.
    16631665     *
    1664      * Background updates in WordPress are primarily used for minor releases and security updates. It's important
    1665      * to either have these working, or be aware that they are intentionally disabled for whatever reason.
     1666     * Background updates in WordPress are primarily used for minor releases and security updates.
     1667     * It's important to either have these working, or be aware that they are intentionally disabled
     1668     * for whatever reason.
    16661669     *
    16671670     * @since 5.2.0
     
    17351738     * Test if loopbacks work as expected.
    17361739     *
    1737      * A loopback is when WordPress queries itself, for example to start a new WP_Cron instance, or when editing a
    1738      * plugin or theme. This has shown itself to be a recurring issue as code can very easily break this interaction.
     1740     * A loopback is when WordPress queries itself, for example to start a new WP_Cron instance,
     1741     * or when editing a plugin or theme. This has shown itself to be a recurring issue,
     1742     * as code can very easily break this interaction.
    17391743     *
    17401744     * @since 5.2.0
     
    20642068         * @param array $test_type {
    20652069         *     An associative array, where the `$test_type` is either `direct` or
    2066          *     `async`, to declare if the test should run via AJAX calls after page load.
     2070         *     `async`, to declare if the test should run via Ajax calls after page load.
    20672071         *
    20682072         *     @type array $identifier {
     
    20722076         *
    20732077         *         @type string $label A friendly label for your test to identify it by.
    2074          *         @type mixed  $test  A callable to perform a direct test, or a string AJAX action to be called
     2078         *         @type mixed  $test  A callable to perform a direct test, or a string Ajax action to be called
    20752079         *                             to perform an async test.
    20762080         *     }
     
    21492153     * Check if any scheduled tasks have been missed.
    21502154     *
    2151      * Returns a boolean value of `true` if a scheduled task has been missed and ends processing. If the list of
    2152      * crons is an instance of WP_Error, return the instance instead of a boolean value.
     2155     * Returns a boolean value of `true` if a scheduled task has been missed and ends processing.
     2156     *
     2157     * If the list of crons is an instance of WP_Error, return the instance instead of a boolean value.
    21532158     *
    21542159     * @since 5.2.0
     
    21742179     * Check if any scheduled tasks are late.
    21752180     *
    2176      * Returns a boolean value of `true` if a scheduled task is late and ends processing. If the list of
    2177      * crons is an instance of WP_Error, return the instance instead of a boolean value.
     2181     * Returns a boolean value of `true` if a scheduled task is late and ends processing.
     2182     *
     2183     * If the list of crons is an instance of WP_Error, return the instance instead of a boolean value.
    21782184     *
    21792185     * @since 5.3.0
  • trunk/src/wp-admin/includes/template.php

    r48152 r48168  
    537537    <div class="trash-undo-inside">
    538538        <?php
    539         /* translators: %s: Comment author, filled by AJAX. */
     539        /* translators: %s: Comment author, filled by Ajax. */
    540540        printf( __( 'Comment by %s moved to the Trash.' ), '<strong></strong>' );
    541541        ?>
     
    546546    <div class="spam-undo-inside">
    547547        <?php
    548         /* translators: %s: Comment author, filled by AJAX. */
     548        /* translators: %s: Comment author, filled by Ajax. */
    549549        printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' );
    550550        ?>
  • trunk/src/wp-includes/functions.php

    r48126 r48168  
    35763576 */
    35773577function _ajax_wp_die_handler( $message, $title = '', $args = array() ) {
    3578     // Set default 'response' to 200 for AJAX requests.
     3578    // Set default 'response' to 200 for Ajax requests.
    35793579    $args = wp_parse_args(
    35803580        $args,
  • trunk/src/wp-includes/load.php

    r48115 r48168  
    892892    }
    893893
    894     // Protect AJAX actions that could help resolve a fatal error should be available.
     894    // Protect Ajax actions that could help resolve a fatal error should be available.
    895895    if ( is_protected_ajax_action() ) {
    896896        return true;
     
    902902     * This filter is only fired when an endpoint is requested which is not already protected by
    903903     * WordPress core. As such, it exclusively allows providing further protected endpoints in
    904      * addition to the admin backend, login pages and protected AJAX actions.
     904     * addition to the admin backend, login pages and protected Ajax actions.
    905905     *
    906906     * @since 5.2.0
    907907     *
    908      * @param bool $is_protected_endpoint Whether the currently requested endpoint is protected. Default false.
     908     * @param bool $is_protected_endpoint Whether the currently requested endpoint is protected.
     909     *                                    Default false.
    909910     */
    910911    return (bool) apply_filters( 'is_protected_endpoint', false );
     
    912913
    913914/**
    914  * Determines whether we are currently handling an AJAX action that should be protected against WSODs.
     915 * Determines whether we are currently handling an Ajax action that should be protected against WSODs.
    915916 *
    916917 * @since 5.2.0
    917918 *
    918  * @return bool True if the current AJAX action should be protected.
     919 * @return bool True if the current Ajax action should be protected.
    919920 */
    920921function is_protected_ajax_action() {
     
    939940
    940941    /**
    941      * Filters the array of protected AJAX actions.
    942      *
    943      * This filter is only fired when doing AJAX and the AJAX request has an 'action' property.
     942     * Filters the array of protected Ajax actions.
     943     *
     944     * This filter is only fired when doing Ajax and the Ajax request has an 'action' property.
    944945     *
    945946     * @since 5.2.0
    946947     *
    947      * @param string[] $actions_to_protect Array of strings with AJAX actions to protect.
     948     * @param string[] $actions_to_protect Array of strings with Ajax actions to protect.
    948949     */
    949950    $actions_to_protect = (array) apply_filters( 'wp_protected_ajax_actions', $actions_to_protect );
Note: See TracChangeset for help on using the changeset viewer.