<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[28355] trunk/src/wp-admin/includes/ajax-actions.php: Add baseline doc blocks for all ajax handlers in ajax-actions.php.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/28355">28355</a></dd>
<dt>Author</dt> <dd>DrewAPicture</dd>
<dt>Date</dt> <dd>2014-05-10 04:59:34 +0000 (Sat, 10 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add baseline doc blocks for all ajax handlers in ajax-actions.php.

Fixes <a href="http://core.trac.wordpress.org/ticket/28200">#28200</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesajaxactionsphp">trunk/src/wp-admin/includes/ajax-actions.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/ajax-actions.php (28354 => 28355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/ajax-actions.php     2014-05-08 18:48:16 UTC (rev 28354)
+++ trunk/src/wp-admin/includes/ajax-actions.php        2014-05-10 04:59:34 UTC (rev 28355)
</span><span class="lines">@@ -11,9 +11,12 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Heartbeat API (experimental)
</del><ins>+ * Ajax handler for the (experimental) Heartbeat API in
+ * the no-privilege context.
</ins><span class="cx">  *
</span><span class="cx">  * Runs when the user is not logged in.
</span><ins>+ *
+ * @since 3.6.0
</ins><span class="cx">  */
</span><span class="cx"> function wp_ajax_nopriv_heartbeat() {
</span><span class="cx">  $response = array();
</span><span class="lines">@@ -67,8 +70,14 @@
</span><span class="cx">  wp_send_json($response);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/*
- * GET-based Ajax handlers.
</del><ins>+//
+// GET-based Ajax handlers.
+//
+
+/**
+ * Ajax handler for fetching a list table.
+ *
+ * @since 3.1.0
</ins><span class="cx">  */
</span><span class="cx"> function wp_ajax_fetch_list() {
</span><span class="cx">  global $wp_list_table;
</span><span class="lines">@@ -87,6 +96,12 @@
</span><span class="cx"> 
</span><span class="cx">  wp_die( 0 );
</span><span class="cx"> }
</span><ins>+
+/**
+ * Ajax handler for tag search.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_ajax_tag_search() {
</span><span class="cx">  global $wpdb;
</span><span class="cx"> 
</span><span class="lines">@@ -120,6 +135,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for compression testing.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_wp_compression_test() {
</span><span class="cx">  if ( !current_user_can( 'manage_options' ) )
</span><span class="cx">          wp_die( -1 );
</span><span class="lines">@@ -165,6 +185,11 @@
</span><span class="cx">  wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for image editor previews.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_imgedit_preview() {
</span><span class="cx">  $post_id = intval($_GET['postid']);
</span><span class="cx">  if ( empty($post_id) || !current_user_can('edit_post', $post_id) )
</span><span class="lines">@@ -179,6 +204,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for oEmbed caching.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_oembed_cache() {
</span><span class="cx">  global $wp_embed;
</span><span class="cx"> 
</span><span class="lines">@@ -186,6 +216,11 @@
</span><span class="cx">  wp_die( $return );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for user autocomplete.
+ *
+ * @since 3.4.0
+ */
</ins><span class="cx"> function wp_ajax_autocomplete_user() {
</span><span class="cx">  if ( ! is_multisite() || ! current_user_can( 'promote_users' ) || wp_is_large_network( 'users' ) )
</span><span class="cx">          wp_die( -1 );
</span><span class="lines">@@ -241,6 +276,11 @@
</span><span class="cx">  wp_die( json_encode( $return ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for dashboard widgets.
+ *
+ * @since 3.4.0
+ */
</ins><span class="cx"> function wp_ajax_dashboard_widgets() {
</span><span class="cx">  require_once ABSPATH . 'wp-admin/includes/dashboard.php';
</span><span class="cx"> 
</span><span class="lines">@@ -257,13 +297,18 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for Customizer preview logged-in status.
+ *
+ * @since 3.4.0
+ */
</ins><span class="cx"> function wp_ajax_logged_in() {
</span><span class="cx">  wp_die( 1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/*
- * Ajax helper.
- */
</del><ins>+//
+// Ajax helpers.
+//
</ins><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Sends back current comment total and new page links if they need to be updated.
</span><span class="lines">@@ -325,10 +370,15 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/*
- * POST-based Ajax handlers.
</del><ins>+//
+// POST-based Ajax handlers.
+//
+
+/**
+ * Ajax handler for adding a hierarchical term.
+ *
+ * @since 3.1.0
</ins><span class="cx">  */
</span><del>-
</del><span class="cx"> function _wp_ajax_add_hierarchical_term() {
</span><span class="cx">  $action = $_POST['action'];
</span><span class="cx">  $taxonomy = get_taxonomy(substr($action, 4));
</span><span class="lines">@@ -408,6 +458,11 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for deleting a comment.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_delete_comment() {
</span><span class="cx">  $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
</span><span class="cx"> 
</span><span class="lines">@@ -451,6 +506,11 @@
</span><span class="cx">  wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for deleting a tag.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_delete_tag() {
</span><span class="cx">  $tag_id = (int) $_POST['tag_ID'];
</span><span class="cx">  check_ajax_referer( "delete-tag_$tag_id" );
</span><span class="lines">@@ -471,6 +531,11 @@
</span><span class="cx">          wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for deleting a link.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_delete_link() {
</span><span class="cx">  $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
</span><span class="cx"> 
</span><span class="lines">@@ -488,6 +553,11 @@
</span><span class="cx">          wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for deleting meta.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_delete_meta() {
</span><span class="cx">  $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
</span><span class="cx"> 
</span><span class="lines">@@ -502,6 +572,13 @@
</span><span class="cx">  wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for deleting a post.
+ *
+ * @since 3.1.0
+ *
+ * @param string $action Action to perform.
+ */
</ins><span class="cx"> function wp_ajax_delete_post( $action ) {
</span><span class="cx">  if ( empty( $action ) )
</span><span class="cx">          $action = 'delete-post';
</span><span class="lines">@@ -520,6 +597,13 @@
</span><span class="cx">          wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for sending a post to the trash.
+ *
+ * @since 3.1.0
+ *
+ * @param string $action Action to perform.
+ */
</ins><span class="cx"> function wp_ajax_trash_post( $action ) {
</span><span class="cx">  if ( empty( $action ) )
</span><span class="cx">          $action = 'trash-post';
</span><span class="lines">@@ -543,6 +627,13 @@
</span><span class="cx">  wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler to restore a post from the trash.
+ *
+ * @since 3.1.0
+ *
+ * @param string $action Action to perform.
+ */
</ins><span class="cx"> function wp_ajax_untrash_post( $action ) {
</span><span class="cx">  if ( empty( $action ) )
</span><span class="cx">          $action = 'untrash-post';
</span><span class="lines">@@ -567,6 +658,11 @@
</span><span class="cx">          wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler to dim a comment.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_dim_comment() {
</span><span class="cx">  $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;
</span><span class="cx"> 
</span><span class="lines">@@ -604,6 +700,13 @@
</span><span class="cx">  wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for deleting a link category.
+ *
+ * @since 3.1.0
+ *
+ * @param string $action Action to perform.
+ */
</ins><span class="cx"> function wp_ajax_add_link_category( $action ) {
</span><span class="cx">  if ( empty( $action ) )
</span><span class="cx">          $action = 'add-link-category';
</span><span class="lines">@@ -634,6 +737,11 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler to add a tag.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_add_tag() {
</span><span class="cx">  global $wp_list_table;
</span><span class="cx"> 
</span><span class="lines">@@ -686,6 +794,11 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for getting a tagcloud.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_get_tagcloud() {
</span><span class="cx">  if ( isset( $_POST['tax'] ) ) {
</span><span class="cx">          $taxonomy = sanitize_key( $_POST['tax'] );
</span><span class="lines">@@ -722,6 +835,13 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for getting comments.
+ *
+ * @since 3.1.0
+ *
+ * @param string $action Action to perform.
+ */
</ins><span class="cx"> function wp_ajax_get_comments( $action ) {
</span><span class="cx">  global $wp_list_table, $post_id;
</span><span class="cx">  if ( empty( $action ) )
</span><span class="lines">@@ -766,6 +886,13 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for replying to a comment.
+ *
+ * @since 3.1.0
+ *
+ * @param string $action Action to perform.
+ */
</ins><span class="cx"> function wp_ajax_replyto_comment( $action ) {
</span><span class="cx">  global $wp_list_table, $wpdb;
</span><span class="cx">  if ( empty( $action ) )
</span><span class="lines">@@ -860,6 +987,11 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for editing a comment.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_edit_comment() {
</span><span class="cx">  global $wp_list_table;
</span><span class="cx"> 
</span><span class="lines">@@ -900,6 +1032,11 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for adding a menu item.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_add_menu_item() {
</span><span class="cx">  check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' );
</span><span class="cx"> 
</span><span class="lines">@@ -972,6 +1109,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for adding meta.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_add_meta() {
</span><span class="cx">  check_ajax_referer( 'add-meta', '_ajax_nonce-add-meta' );
</span><span class="cx">  $c = 0;
</span><span class="lines">@@ -1055,6 +1197,13 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for adding a user.
+ *
+ * @since 3.1.0
+ *
+ * @param string $action Action to perform.
+ */
</ins><span class="cx"> function wp_ajax_add_user( $action ) {
</span><span class="cx">  global $wp_list_table;
</span><span class="cx">  if ( empty( $action ) )
</span><span class="lines">@@ -1090,6 +1239,11 @@
</span><span class="cx">  $x->send();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for closed post boxes.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_closed_postboxes() {
</span><span class="cx">  check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' );
</span><span class="cx">  $closed = isset( $_POST['closed'] ) ? explode( ',', $_POST['closed']) : array();
</span><span class="lines">@@ -1117,6 +1271,11 @@
</span><span class="cx">  wp_die( 1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for hidden columns.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_hidden_columns() {
</span><span class="cx">  check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' );
</span><span class="cx">  $hidden = explode( ',', isset( $_POST['hidden'] ) ? $_POST['hidden'] : '' );
</span><span class="lines">@@ -1134,6 +1293,11 @@
</span><span class="cx">  wp_die( 1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for updating whether to display the welcome panel.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_update_welcome_panel() {
</span><span class="cx">  check_ajax_referer( 'welcome-panel-nonce', 'welcomepanelnonce' );
</span><span class="cx"> 
</span><span class="lines">@@ -1145,6 +1309,11 @@
</span><span class="cx">  wp_die( 1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for retrieving menu meta boxes.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_menu_get_metabox() {
</span><span class="cx">  if ( ! current_user_can( 'edit_theme_options' ) )
</span><span class="cx">          wp_die( -1 );
</span><span class="lines">@@ -1188,6 +1357,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for internal linking.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_wp_link_ajax() {
</span><span class="cx">  check_ajax_referer( 'internal-linking', '_ajax_linking_nonce' );
</span><span class="cx"> 
</span><span class="lines">@@ -1209,6 +1383,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for menu locations save.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_menu_locations_save() {
</span><span class="cx">  if ( ! current_user_can( 'edit_theme_options' ) )
</span><span class="cx">          wp_die( -1 );
</span><span class="lines">@@ -1219,6 +1398,11 @@
</span><span class="cx">  wp_die( 1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for saving the meta box order.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_meta_box_order() {
</span><span class="cx">  check_ajax_referer( 'meta-box-order' );
</span><span class="cx">  $order = isset( $_POST['order'] ) ? (array) $_POST['order'] : false;
</span><span class="lines">@@ -1244,6 +1428,11 @@
</span><span class="cx">  wp_die( 1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for menu quick searching.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_menu_quick_search() {
</span><span class="cx">  if ( ! current_user_can( 'edit_theme_options' ) )
</span><span class="cx">          wp_die( -1 );
</span><span class="lines">@@ -1255,12 +1444,22 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler to retrieve a permalink.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_get_permalink() {
</span><span class="cx">  check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
</span><span class="cx">  $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
</span><span class="cx">  wp_die( add_query_arg( array( 'preview' => 'true' ), get_permalink( $post_id ) ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler to retrieve a sample permalink.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_sample_permalink() {
</span><span class="cx">  check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
</span><span class="cx">  $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
</span><span class="lines">@@ -1269,6 +1468,11 @@
</span><span class="cx">  wp_die( get_sample_permalink_html( $post_id, $title, $slug ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for quick edit saving for a post.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_inline_save() {
</span><span class="cx">  global $wp_list_table;
</span><span class="cx"> 
</span><span class="lines">@@ -1343,6 +1547,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for quick edit saving for a term.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_inline_save_tax() {
</span><span class="cx">  global $wp_list_table;
</span><span class="cx"> 
</span><span class="lines">@@ -1388,6 +1597,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for finding posts.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_find_posts() {
</span><span class="cx">  check_ajax_referer( 'find-posts' );
</span><span class="cx"> 
</span><span class="lines">@@ -1446,6 +1660,11 @@
</span><span class="cx">  wp_send_json_success( $html );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for saving the widgets order.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_widgets_order() {
</span><span class="cx">  check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' );
</span><span class="cx"> 
</span><span class="lines">@@ -1477,6 +1696,11 @@
</span><span class="cx">  wp_die( -1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for saving a widget.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_save_widget() {
</span><span class="cx">  global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates;
</span><span class="cx"> 
</span><span class="lines">@@ -1561,11 +1785,21 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for saving a widget.
+ *
+ * @since 3.9.0
+ */
</ins><span class="cx"> function wp_ajax_update_widget() {
</span><span class="cx">  global $wp_customize;
</span><span class="cx">  $wp_customize->widgets->wp_ajax_update_widget();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for uploading attachments
+ *
+ * @since 3.3.0
+ */
</ins><span class="cx"> function wp_ajax_upload_attachment() {
</span><span class="cx">  check_ajax_referer( 'media-form' );
</span><span class="cx"> 
</span><span class="lines">@@ -1631,6 +1865,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for image editing.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_image_editor() {
</span><span class="cx">  $attachment_id = intval($_POST['postid']);
</span><span class="cx">  if ( empty($attachment_id) || !current_user_can('edit_post', $attachment_id) )
</span><span class="lines">@@ -1658,6 +1897,11 @@
</span><span class="cx">  wp_die();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for setting the featured image.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_set_post_thumbnail() {
</span><span class="cx">  $json = ! empty( $_REQUEST['json'] ); // New-style request
</span><span class="cx"> 
</span><span class="lines">@@ -1689,14 +1933,29 @@
</span><span class="cx">  wp_die( 0 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for date formatting.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_date_format() {
</span><span class="cx">  wp_die( date_i18n( sanitize_option( 'date_format', wp_unslash( $_POST['date'] ) ) ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for time formatting.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_time_format() {
</span><span class="cx">  wp_die( date_i18n( sanitize_option( 'time_format', wp_unslash( $_POST['date'] ) ) ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for saving posts from the fullscreen editor.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_wp_fullscreen_save_post() {
</span><span class="cx">  $post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0;
</span><span class="cx"> 
</span><span class="lines">@@ -1731,6 +1990,11 @@
</span><span class="cx">  wp_send_json_success( array( 'last_edited' => $last_edited ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for removing a post lock.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_wp_remove_post_lock() {
</span><span class="cx">  if ( empty( $_POST['post_ID'] ) || empty( $_POST['active_post_lock'] ) )
</span><span class="cx">          wp_die( 0 );
</span><span class="lines">@@ -1760,6 +2024,11 @@
</span><span class="cx">  wp_die( 1 );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for dismissing a WordPress pointer.
+ *
+ * @since 3.1.0
+ */
</ins><span class="cx"> function wp_ajax_dismiss_wp_pointer() {
</span><span class="cx">  $pointer = $_POST['pointer'];
</span><span class="cx">  if ( $pointer != sanitize_key( $pointer ) )
</span><span class="lines">@@ -1780,7 +2049,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Get an attachment.
</del><ins>+ * Ajax handler for getting an attachment.
</ins><span class="cx">  *
</span><span class="cx">  * @since 3.5.0
</span><span class="cx">  */
</span><span class="lines">@@ -1807,7 +2076,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Query for attachments.
</del><ins>+ * Ajax handler for querying for attachments.
</ins><span class="cx">  *
</span><span class="cx">  * @since 3.5.0
</span><span class="cx">  */
</span><span class="lines">@@ -1846,7 +2115,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Save attachment attributes.
</del><ins>+ * Ajax handler for saving attachment attributes.
</ins><span class="cx">  *
</span><span class="cx">  * @since 3.5.0
</span><span class="cx">  */
</span><span class="lines">@@ -1890,7 +2159,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Save backwards compatible attachment attributes.
</del><ins>+ * Ajax handler for saving backwards compatible attachment attributes.
</ins><span class="cx">  *
</span><span class="cx">  * @since 3.5.0
</span><span class="cx">  */
</span><span class="lines">@@ -1936,6 +2205,11 @@
</span><span class="cx">  wp_send_json_success( $attachment );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for saving the attachment order.
+ *
+ * @since 3.5.0
+ */
</ins><span class="cx"> function wp_ajax_save_attachment_order() {
</span><span class="cx">  if ( ! isset( $_REQUEST['post_id'] ) )
</span><span class="cx">          wp_send_json_error();
</span><span class="lines">@@ -1968,9 +2242,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Ajax handler for sending an attachment to the editor.
+ *
</ins><span class="cx">  * Generates the HTML to send an attachment to the editor.
</span><del>- * Backwards compatible with the media_send_to_editor filter and the chain
- * of filters that follow.
</del><ins>+ * Backwards compatible with the media_send_to_editor filter
+ * and the chain of filters that follow.
</ins><span class="cx">  *
</span><span class="cx">  * @since 3.5.0
</span><span class="cx">  */
</span><span class="lines">@@ -2023,6 +2299,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Ajax handler for sending a link to the editor.
+ *
</ins><span class="cx">  * Generates the HTML to send a non-image embed link to the editor.
</span><span class="cx">  *
</span><span class="cx">  * Backwards compatible with the following filters:
</span><span class="lines">@@ -2064,9 +2342,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Heartbeat API (experimental)
</del><ins>+ * Ajax handler for the (experimental) Heartbeat API.
</ins><span class="cx">  *
</span><span class="cx">  * Runs when the user is logged in.
</span><ins>+ *
+ * @since 3.6.0
</ins><span class="cx">  */
</span><span class="cx"> function wp_ajax_heartbeat() {
</span><span class="cx">  if ( empty( $_POST['_nonce'] ) )
</span><span class="lines">@@ -2129,6 +2409,11 @@
</span><span class="cx">  wp_send_json($response);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Ajax handler for getting revision diffs.
+ *
+ * @since 3.6.0
+ */
</ins><span class="cx"> function wp_ajax_get_revision_diffs() {
</span><span class="cx">  require ABSPATH . 'wp-admin/includes/revision.php';
</span><span class="cx"> 
</span><span class="lines">@@ -2157,9 +2442,10 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Auto-save the selected color scheme for a user's own profile.
</del><ins>+ * Ajax handler for auto-saving the selected color scheme for
+ * a user's own profile.
</ins><span class="cx">  *
</span><del>- * @since  3.8.0
</del><ins>+ * @since 3.8.0
</ins><span class="cx">  */
</span><span class="cx"> function wp_ajax_save_user_color_scheme() {
</span><span class="cx">  global $_wp_admin_css_colors;
</span><span class="lines">@@ -2177,7 +2463,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Get themes from themes_api().
</del><ins>+ * Ajax handler for getting themes from themes_api().
</ins><span class="cx">  *
</span><span class="cx">  * @since 3.9.0
</span><span class="cx">  */
</span></span></pre>
</div>
</div>

</body>
</html>