WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/27/2016 05:42:01 PM (3 years ago)
Author:
ocean90
Message:

Plugins: Move capability checks further up in wp_ajax_update_plugin() and wp_ajax_delete_plugin().

Add tests for both Ajax handlers.

Props Yorick Koster, swissspidy.
Fixes #37490.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase-ajax.php

    r37288 r38168  
    1919    /**
    2020     * Last AJAX response.  This is set via echo -or- wp_die.
    21      * @var type
     21     * @var string
    2222     */
    2323    protected $_last_response = '';
     
    2525    /**
    2626     * List of ajax actions called via POST
    27      * @var type
     27     * @var array
    2828     */
    2929    protected static $_core_actions_get = array(
     
    4040    /**
    4141     * List of ajax actions called via GET
    42      * @var type
     42     * @var array
    4343     */
    4444    protected static $_core_actions_post = array(
     
    5454        'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
    5555        'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
    56         'press-this-add-category', 'crop-image', 'generate-password',
     56        'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username', 'delete-plugin',
     57        'search-plugins', 'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme',
     58        'install-theme', 'get-post-thumbnail-html',
    5759    );
    5860
Note: See TracChangeset for help on using the changeset viewer.