Changeset 24388 for trunk/wp-admin/includes/ajax-actions.php
- Timestamp:
- 05/30/2013 09:33:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r24263 r24388 1127 1127 } 1128 1128 1129 function wp_ajax_show_post_format_ui() {1130 if ( empty( $_POST['post_type'] ) )1131 wp_die( 0 );1132 1133 check_ajax_referer( 'show-post-format-ui_' . $_POST['post_type'], 'nonce' );1134 1135 if ( ! $post_type_object = get_post_type_object( $_POST['post_type'] ) )1136 wp_die( 0 );1137 1138 if ( ! current_user_can( $post_type_object->cap->edit_posts ) )1139 wp_die( -1 );1140 1141 update_user_option( get_current_user_id(), 'post_formats_' . $post_type_object->name, empty( $_POST['show'] ) ? 0 : 1 );1142 1143 wp_die( 1 );1144 }1145 1146 1129 function wp_ajax_hidden_columns() { 1147 1130 check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' );
Note: See TracChangeset
for help on using the changeset viewer.