~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/admin-ajax.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/**
3
 
 * WordPress AJAX Process Execution.
 
3
 * WordPress Ajax Process Execution
4
4
 *
5
5
 * @package WordPress
6
6
 * @subpackage Administration
9
9
 */
10
10
 
11
11
/**
12
 
 * Executing AJAX process.
 
12
 * Executing Ajax process.
13
13
 *
14
14
 * @since 2.1.0
15
15
 */
62
62
        'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
63
63
        'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
64
64
        'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
65
 
        'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username',
 
65
        'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username', 'delete-plugin',
 
66
        'search-plugins', 'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme',
 
67
        'install-theme', 'get-post-thumbnail-html',
66
68
);
67
69
 
68
70
// Deprecated
79
81
 
80
82
if ( is_user_logged_in() ) {
81
83
        /**
82
 
         * Fires authenticated AJAX actions for logged-in users.
 
84
         * Fires authenticated Ajax actions for logged-in users.
83
85
         *
84
86
         * The dynamic portion of the hook name, `$_REQUEST['action']`,
85
 
         * refers to the name of the AJAX action callback being fired.
 
87
         * refers to the name of the Ajax action callback being fired.
86
88
         *
87
89
         * @since 2.1.0
88
90
         */
89
91
        do_action( 'wp_ajax_' . $_REQUEST['action'] );
90
92
} else {
91
93
        /**
92
 
         * Fires non-authenticated AJAX actions for logged-out users.
 
94
         * Fires non-authenticated Ajax actions for logged-out users.
93
95
         *
94
96
         * The dynamic portion of the hook name, `$_REQUEST['action']`,
95
 
         * refers to the name of the AJAX action callback being fired.
 
97
         * refers to the name of the Ajax action callback being fired.
96
98
         *
97
99
         * @since 2.8.0
98
100
         */