Changeset 30155
- Timestamp:
- 11/01/2014 08:19:26 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit.php
r29989 r30155 63 63 64 64 if ( 'delete_all' == $doaction ) { 65 // Prepare for deletion of all posts with a specified post status (i.e. Empty trash). 65 66 $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['post_status']); 66 if ( get_post_status_object($post_status) ) // Check the post status exists first 67 // Validate the post status exists. 68 if ( get_post_status_object( $post_status ) ) { 67 69 $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status ) ); 70 } 68 71 $doaction = 'delete'; 69 72 } elseif ( isset( $_REQUEST['media'] ) ) { -
trunk/src/wp-admin/export.php
r30122 r30155 57 57 ); 58 58 59 // If the 'download' URL parameter is set, a WXR export file is baked and returned. 59 60 if ( isset( $_GET['download'] ) ) { 60 61 $args = array(); -
trunk/src/wp-admin/includes/ajax-actions.php
r30141 r30155 1143 1143 if ( isset($_POST['metakeyselect']) && '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) ) 1144 1144 wp_die( 1 ); 1145 1146 // If the post is an autodraft, save the post as a draft and then 1147 // attempt to save the meta. 1145 1148 if ( $post->post_status == 'auto-draft' ) { 1146 1149 $save_POST = $_POST; // Backup $_POST … … 1487 1490 1488 1491 /** 1489 * Ajax handler for quick edit saving for a post.1492 * Ajax handler for Quick Edit saving a post from a list table. 1490 1493 * 1491 1494 * @since 3.1.0 … … 1618 1621 1619 1622 /** 1620 * Ajax handler for finding posts. 1623 * Ajax handler for querying posts for the Find Posts modal. 1624 * 1625 * @see window.findPosts 1621 1626 * 1622 1627 * @since 3.1.0 … … 2148 2153 2149 2154 /** 2150 * Ajax handler for querying forattachments.2155 * Ajax handler for querying attachments. 2151 2156 * 2152 2157 * @since 3.5.0 … … 2194 2199 2195 2200 /** 2196 * Ajax handler for saving attachment attributes.2201 * Ajax handler for updating attachment attributes. 2197 2202 * 2198 2203 * @since 3.5.0 -
trunk/src/wp-admin/includes/export.php
r29573 r30155 17 17 18 18 /** 19 * Generates the WXR export file for download 19 * Generates the WXR export file for download. 20 20 * 21 21 * @since 2.1.0 22 22 * 23 * @param array $args Filters defining what should be included in the export 23 * @param array $args Filters defining what should be included in the export. 24 24 */ 25 25 function export_wp( $args = array() ) { -
trunk/src/wp-includes/default-filters.php
r30074 r30155 251 251 add_action( 'plugins_loaded', 'wp_maybe_load_embeds', 0 ); 252 252 add_action( 'shutdown', 'wp_ob_end_flush_all', 1 ); 253 // Create a revision whenever a post is updated. 253 254 add_action( 'post_updated', 'wp_save_post_revision', 10, 1 ); 254 255 add_action( 'publish_post', '_publish_post_hook', 5, 1 ); -
trunk/src/wp-includes/post.php
r30122 r30155 1061 1061 1062 1062 /** 1063 * Get a list of all registered post status objects.1063 * Get a list of post statuses. 1064 1064 * 1065 1065 * @since 3.0.0 … … 1069 1069 * @see register_post_status() 1070 1070 * 1071 * @param array|string $args Optional. Array or string of post status arguments . Default array.1072 * @param string $output Optional. The type of output to return. Accepts post status 'names'1073 * 1071 * @param array|string $args Optional. Array or string of post status arguments to compare against 1072 * properties of the global $wp_post_statuses objects. Default empty array. 1073 * @param string $output Optional. The type of output to return, either 'names' or 'objects'. Default 'names'. 1074 1074 * @param string $operator Optional. The logical operation to perform. 'or' means only one element 1075 1075 * from the array needs to match; 'and' means all elements must match. -
trunk/src/wp-includes/revision.php
r30119 r30155 71 71 72 72 /** 73 * Saves an already existing post as a post revision.74 * 75 * Typically used immediately after post updates.76 * Adds a copy of the current post as a revision, so latest revision always matches current post77 * 78 * @since 2.6.0 79 * 80 * @param int$post_id The ID of the post to save as a revision.73 * Creates a revision for the current version of a post. 74 * 75 * Typically used immediately after a post update, as every update is a revision, 76 * and the most recent revision always matches the current post. 77 * 78 * @since 2.6.0 79 * 80 * @param int $post_id The ID of the post to save as a revision. 81 81 * @return mixed Null or 0 if error, new revision ID, if success. 82 82 */ … … 157 157 $return = _wp_put_post_revision( $post ); 158 158 159 // If a limit for the number of revisions to keep has been set, 160 // delete the oldest ones. 159 161 $revisions_to_keep = wp_revisions_to_keep( $post ); 160 162 … … 162 164 return $return; 163 165 164 // all revisions and autosaves165 166 $revisions = wp_get_post_revisions( $post_id, array( 'order' => 'ASC' ) ); 166 167 … … 447 448 /** 448 449 * Determine how many revisions to retain for a given post. 449 * By default, an infinite number of revisions are stored if a post type supports revisions. 450 * 451 * By default, an infinite number of revisions are kept. 452 * 453 * The constant WP_POST_REVISIONS can be set in wp-config to specify the limit 454 * of revisions to keep. 450 455 * 451 456 * @since 3.6.0 452 457 * 453 * @param object $post The post object.458 * @param object $post The post object. 454 459 * @return int The number of revisions to keep. 455 460 */
Note: See TracChangeset
for help on using the changeset viewer.