Changeset 24092 for trunk/wp-admin/includes/ajax-actions.php
- Timestamp:
- 04/25/2013 07:28:33 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r24019 r24092 1136 1136 } 1137 1137 1138 function wp_ajax_show_post_format_ui() { 1139 error_log( serialize( $_REQUEST ) ); 1140 1141 if ( empty( $_POST['post_type'] ) ) 1142 wp_die( 0 ); 1143 1144 check_ajax_referer( 'show-post-format-ui_' . $_POST['post_type'], 'nonce' ); 1145 1146 if ( ! $post_type_object = get_post_type_object( $_POST['post_type'] ) ) 1147 wp_die( 0 ); 1148 1149 if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) 1150 wp_die( -1 ); 1151 1152 update_user_option( get_current_user_id(), 'post_formats_' . $post_type_object->name, empty( $_POST['show'] ) ? 0 : 1 ); 1153 1154 wp_die( 1 ); 1155 } 1156 1138 1157 function wp_ajax_hidden_columns() { 1139 1158 check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' );
Note: See TracChangeset
for help on using the changeset viewer.