/var/www/wordpress/wp-admin/includes/admin.php
/var/www/wordpress/wp-admin/includes/bookmark.php
/var/www/wordpress/wp-admin/includes/class-ftp-pure.php
/var/www/wordpress/wp-admin/includes/class-ftp-sockets.php
/var/www/wordpress/wp-admin/includes/class-ftp.php
/var/www/wordpress/wp-admin/includes/class-pclzip.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-base.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-direct.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ftpsockets.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php
/var/www/wordpress/wp-admin/includes/class-wp-importer.php
/var/www/wordpress/wp-admin/includes/class-wp-upgrader.php
/var/www/wordpress/wp-admin/includes/comment.php
/var/www/wordpress/wp-admin/includes/continents-cities.php
/var/www/wordpress/wp-admin/includes/dashboard.php
/var/www/wordpress/wp-admin/includes/deprecated.php
/var/www/wordpress/wp-admin/includes/export.php
/var/www/wordpress/wp-admin/includes/file.php
/var/www/wordpress/wp-admin/includes/image-edit.php
/var/www/wordpress/wp-admin/includes/image.php
/var/www/wordpress/wp-admin/includes/import.php
/var/www/wordpress/wp-admin/includes/manifest.php
/var/www/wordpress/wp-admin/includes/media.php
/var/www/wordpress/wp-admin/includes/meta-boxes.php
/var/www/wordpress/wp-admin/includes/misc.php
/var/www/wordpress/wp-admin/includes/ms-deprecated.php
/var/www/wordpress/wp-admin/includes/ms.php
/var/www/wordpress/wp-admin/includes/nav-menu.php
/var/www/wordpress/wp-admin/includes/plugin-install.php
/var/www/wordpress/wp-admin/includes/plugin.php
/var/www/wordpress/wp-admin/includes/post.php
#CodeDescriptions
1<?php
2/**
3 * WordPress Post Administration API.
4 *
5 * @package WordPress
6 * @subpackage Administration
7 */
8
9/**
10 * Rename $_POST data from form names to DB post columns.
11 *
12 * Manipulates $_POST directly.
13 *
14 * @package WordPress
15 * @since 2.6.0
16 *
17 * @param bool $update Are we updating a pre-existing post?
18 * @param post_data array Array of post data. Defaults to the contents of $_POST.
19 * @return object|bool WP_Error on failure, true on success.
20 */
21function _wp_translate_postdata( $update = false, $post_data = null ) {
22
23 if ( empty($post_data) )
24 $post_data = &$_POST;
25
26 if ( $update )
27 $post_data['ID'] = (int) $post_data['post_ID'];
28 $post_data['post_content'] = isset($post_data['content']) ? $post_data['content'] : '';
29 $post_data['post_excerpt'] = isset($post_data['excerpt']) ? $post_data['excerpt'] : '';
30 $post_data['post_parent'] = isset($post_data['parent_id'])? $post_data['parent_id'] : '';
31 if ( isset($post_data['trackback_url']) )
32 $post_data['to_ping'] = $post_data['trackback_url'];
33
34 if ( !isset($post_data['user_ID']) )
35 $post_data['user_ID'] = $GLOBALS['user_ID'];
36
37 if (!empty ( $post_data['post_author_override'] ) ) {
38 $post_data['post_author'] = (int) $post_data['post_author_override'];
39 } else {
40 if (!empty ( $post_data['post_author'] ) ) {
41 $post_data['post_author'] = (int) $post_data['post_author'];
42 } else {
43 $post_data['post_author'] = (int) $post_data['user_ID'];
44 }
45 }
46
47 $ptype = get_post_type_object( $post_data['post_type'] );
48 if ( isset($post_data['user_ID']) && ($post_data['post_author'] != $post_data['user_ID']) ) {
49 if ( !current_user_can( $ptype->cap->edit_others_posts ) ) {
50 if ( 'page' == $post_data['post_type'] ) {
51 return new WP_Error( 'edit_others_pages', $update ?
52 __( 'You are not allowed to edit pages as this user.' ) :
53 __( 'You are not allowed to create pages as this user.' )
54 );
55 } else {
56 return new WP_Error( 'edit_others_posts', $update ?
57 __( 'You are not allowed to edit posts as this user.' ) :
58 __( 'You are not allowed to post as this user.' )
59 );
60 }
61 }
62 }
63
64 // What to do based on which button they pressed
65 if ( isset($post_data['saveasdraft']) && '' != $post_data['saveasdraft'] )
66 $post_data['post_status'] = 'draft';
67 if ( isset($post_data['saveasprivate']) && '' != $post_data['saveasprivate'] )
68 $post_data['post_status'] = 'private';
69 if ( isset($post_data['publish']) && ( '' != $post_data['publish'] ) && ( !isset($post_data['post_status']) || $post_data['post_status'] != 'private' ) )
70 $post_data['post_status'] = 'publish';
71 if ( isset($post_data['advanced']) && '' != $post_data['advanced'] )
72 $post_data['post_status'] = 'draft';
73 if ( isset($post_data['pending']) && '' != $post_data['pending'] )
74 $post_data['post_status'] = 'pending';
75
76 if ( isset( $post_data['ID'] ) )
77 $post_id = $post_data['ID'];
78 else
79 $post_id = false;
80 $previous_status = $post_id ? get_post_field( 'post_status', $post_id ) : false;
81
82 // Posts 'submitted for approval' present are submitted to $_POST the same as if they were being published.
83 // Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts.
84 if ( isset($post_data['post_status']) && ('publish' == $post_data['post_status'] && !current_user_can( $ptype->cap->publish_posts )) )
85 if ( $previous_status != 'publish' || !current_user_can( 'edit_post', $post_id ) )
86 $post_data['post_status'] = 'pending';
87
88 if ( ! isset($post_data['post_status']) )
89 $post_data['post_status'] = $previous_status;
90
91 if (!isset( $post_data['comment_status'] ))
92 $post_data['comment_status'] = 'closed';
93
94 if (!isset( $post_data['ping_status'] ))
95 $post_data['ping_status'] = 'closed';
96
97 foreach ( array('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
98 if ( !empty( $post_data['hidden_' . $timeunit] ) && $post_data['hidden_' . $timeunit] != $post_data[$timeunit] ) {
99 $post_data['edit_date'] = '1';
100 break;
101 }
102 }
103
104 if ( !empty( $post_data['edit_date'] ) ) {
105 $aa = $post_data['aa'];
106 $mm = $post_data['mm'];
107 $jj = $post_data['jj'];
108 $hh = $post_data['hh'];
109 $mn = $post_data['mn'];
110 $ss = $post_data['ss'];
111 $aa = ($aa <= 0 ) ? date('Y') : $aa;
112 $mm = ($mm <= 0 ) ? date('n') : $mm;
113 $jj = ($jj > 31 ) ? 31 : $jj;
114 $jj = ($jj <= 0 ) ? date('j') : $jj;
115 $hh = ($hh > 23 ) ? $hh -24 : $hh;
116 $mn = ($mn > 59 ) ? $mn -60 : $mn;
117 $ss = ($ss > 59 ) ? $ss -60 : $ss;
118 $post_data['post_date'] = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss );
119 $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
120 }
121
122 return $post_data;
123}
124
125/**
126 * Update an existing post with values provided in $_POST.
127 *
128 * @since unknown
129 *
130 * @param array $post_data Optional.
131 * @return int Post ID.
132 */
133function edit_post( $post_data = null ) {
134
135 if ( empty($post_data) )
136 $post_data = &$_POST;
137
138 $post_ID = (int) $post_data['post_ID'];
139
140 $ptype = get_post_type_object($post_data['post_type']);
141 if ( !current_user_can( $ptype->cap->edit_post, $post_ID ) ) {
142 if ( 'page' == $post_data['post_type'] )
143 wp_die( __('You are not allowed to edit this page.' ));
144 else
145 wp_die( __('You are not allowed to edit this post.' ));
146 }
147
148 // Autosave shouldn't save too soon after a real save
149 if ( 'autosave' == $post_data['action'] ) {
150 $post =& get_post( $post_ID );
151 $now = time();
152 $then = strtotime($post->post_date_gmt . ' +0000');
153 $delta = AUTOSAVE_INTERVAL / 2;
154 if ( ($now - $then) < $delta )
155 return $post_ID;
156 }
157
158 $post_data = _wp_translate_postdata( true, $post_data );
159 if ( 'autosave' != $post_data['action'] && 'auto-draft' == $post_data['post_status'] )
160 $post_data['post_status'] = 'draft';
161 if ( is_wp_error($post_data) )
162 wp_die( $post_data->get_error_message() );
163
164 if ( isset($post_data['visibility']) ) {
165 switch ( $post_data['visibility'] ) {
166 case 'public' :
167 $post_data['post_password'] = '';
168 break;
169 case 'password' :
170 unset( $post_data['sticky'] );
171 break;
172 case 'private' :
173 $post_data['post_status'] = 'private';
174 $post_data['post_password'] = '';
175 unset( $post_data['sticky'] );
176 break;
177 }
178 }
179
180 // Meta Stuff
181 if ( isset($post_data['meta']) && $post_data['meta'] ) {
182 foreach ( $post_data['meta'] as $key => $value )
183 update_meta( $key, $value['key'], $value['value'] );
184 }
185
186 if ( isset($post_data['deletemeta']) && $post_data['deletemeta'] ) {
187 foreach ( $post_data['deletemeta'] as $key => $value )
188 delete_meta( $key );
189 }
190
191 add_meta( $post_ID );
192
193 update_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID );
194
195 wp_update_post( $post_data );
196
197 // Reunite any orphaned attachments with their parent
198 if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) )
199 $draft_ids = array();
200 if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) )
201 _relocate_children( $draft_temp_id, $post_ID );
202
203 // Now that we have an ID we can fix any attachment anchor hrefs
204 _fix_attachment_links( $post_ID );
205
206 wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID );
207
208 if ( current_user_can( 'edit_others_posts' ) ) {
209 if ( !empty($post_data['sticky']) )
210 stick_post($post_ID);
211 else
212 unstick_post($post_ID);
213 }
214
215 return $post_ID;
216}
217
218/**
219 * Process the post data for the bulk editing of posts.
220 *
221 * Updates all bulk edited posts/pages, adding (but not removing) tags and
222 * categories. Skips pages when they would be their own parent or child.
223 *
224 * @since 2.7.0
225 *
226 * @param array $post_data Optional, the array of post data to process if not provided will use $_POST superglobal.
227 * @return array
228 */
229function bulk_edit_posts( $post_data = null ) {
230 global $wpdb;
231
232 if ( empty($post_data) )
233 $post_data = &$_POST;
234
235 if ( isset($post_data['post_type']) )
236 $ptype = get_post_type_object($post_data['post_type']);
237 else
238 $ptype = get_post_type_object('post');
239
240 if ( !current_user_can( $ptype->cap->edit_posts ) ) {
241 if ( 'page' == $ptype->name )
242 wp_die( __('You are not allowed to edit pages.'));
243 else
244 wp_die( __('You are not allowed to edit posts.'));
245 }
246
247 if ( -1 == $post_data['_status'] ) {
248 $post_data['post_status'] = null;
249 unset($post_data['post_status']);
250 } else {
251 $post_data['post_status'] = $post_data['_status'];
252 }
253 unset($post_data['_status']);
254
255 $post_IDs = array_map( 'intval', (array) $post_data['post'] );
256
257 $reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tax_input', 'post_category', 'sticky' );
258 foreach ( $reset as $field ) {
259 if ( isset($post_data[$field]) && ( '' == $post_data[$field] || -1 == $post_data[$field] ) )
260 unset($post_data[$field]);
261 }
262
263 if ( isset($post_data['post_category']) ) {
264 if ( is_array($post_data['post_category']) && ! empty($post_data['post_category']) )
265 $new_cats = array_map( 'absint', $post_data['post_category'] );
266 else
267 unset($post_data['post_category']);
268 }
269
270 $tax_input = array();
271 if ( isset($post_data['tax_input'])) {
272 foreach ( $post_data['tax_input'] as $tax_name => $terms ) {
273 if ( empty($terms) )
274 continue;
275 if ( is_taxonomy_hierarchical( $tax_name ) )
276 $tax_input[$tax_name] = array_map( 'absint', $terms );
277 else {
278 $tax_input[$tax_name] = preg_replace( '/\s*,\s*/', ',', rtrim( trim($terms), ' ,' ) );
279 $tax_input[$tax_name] = explode(',', $tax_input[$tax_name]);
280 }
281 }
282 }
283
284 if ( isset($post_data['post_parent']) && ($parent = (int) $post_data['post_parent']) ) {
285 $pages = $wpdb->get_results("SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'page'");
286 $children = array();
287
288 for ( $i = 0; $i < 50 && $parent > 0; $i++ ) {
289 $children[] = $parent;
290
291 foreach ( $pages as $page ) {
292 if ( $page->ID == $parent ) {
293 $parent = $page->post_parent;
294 break;
295 }
296 }
297 }
298 }
299
300 $updated = $skipped = $locked = array();
301 foreach ( $post_IDs as $post_ID ) {
302 $post_type_object = get_post_type_object( get_post_type( $post_ID ) );
303
304 if ( !isset( $post_type_object ) || ( isset($children) && in_array($post_ID, $children) ) || !current_user_can( $post_type_object->cap->edit_post, $post_ID ) ) {
305 $skipped[] = $post_ID;
306 continue;
307 }
308
309 if ( wp_check_post_lock( $post_ID ) ) {
310 $locked[] = $post_ID;
311 continue;
312 }
313
314 $tax_names = get_object_taxonomies( get_post($post_ID) );
315 foreach ( $tax_names as $tax_name ) {
316 $taxonomy_obj = get_taxonomy($tax_name);
317 if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) )
318 $new_terms = $tax_input[$tax_name];
319 else
320 $new_terms = array();
321
322 if ( $taxonomy_obj->hierarchical )
323 $current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'ids') );
324 else
325 $current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'names') );
326
327 $post_data['tax_input'][$tax_name] = array_merge( $current_terms, $new_terms );
328 }
329
330 if ( isset($new_cats) && in_array( 'category', $tax_names ) ) {
331 $cats = (array) wp_get_post_categories($post_ID);
332 $post_data['post_category'] = array_unique( array_merge($cats, $new_cats) );
333 unset( $post_data['tax_input']['category'] );
334 }
335
336 $post_data['ID'] = $post_ID;
337 $updated[] = wp_update_post( $post_data );
338
339 if ( isset( $post_data['sticky'] ) && current_user_can( 'edit_others_posts' ) ) {
340 if ( 'sticky' == $post_data['sticky'] )
341 stick_post( $post_ID );
342 else
343 unstick_post( $post_ID );
344 }
345
346 }
347
348 return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );
349}
350
351/**
352 * Default post information to use when populating the "Write Post" form.
353 *
354 * @since unknown
355 *
356 *@param string A post type string, defaults to 'post'.
357 * @return object stdClass object containing all the default post data as attributes
358 */
359function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) {
360 global $wpdb;
361
362 $post_title = '';
363 if ( !empty( $_REQUEST['post_title'] ) )
364 $post_title = esc_html( stripslashes( $_REQUEST['post_title'] ));
365
366 $post_content = '';
367 if ( !empty( $_REQUEST['content'] ) )
368 $post_content = esc_html( stripslashes( $_REQUEST['content'] ));
369
370 $post_excerpt = '';
371 if ( !empty( $_REQUEST['excerpt'] ) )
372 $post_excerpt = esc_html( stripslashes( $_REQUEST['excerpt'] ));
373
374 if ( $create_in_db ) {
375 // Cleanup old auto-drafts more than 7 days old
376 $old_posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'auto-draft' AND DATE_SUB( NOW(), INTERVAL 7 DAY ) > post_date" );
377 foreach ( (array) $old_posts as $delete )
378 wp_delete_post( $delete, true ); // Force delete
379 $post_id = wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) );
380 $post = get_post( $post_id );
381 } else {
382 $post->ID = 0;
383 $post->post_author = '';
384 $post->post_date = '';
385 $post->post_date_gmt = '';
386 $post->post_password = '';
387 $post->post_type = $post_type;
388 $post->post_status = 'draft';
389 $post->to_ping = '';
390 $post->pinged = '';
391 $post->comment_status = get_option( 'default_comment_status' );
392 $post->ping_status = get_option( 'default_ping_status' );
393 $post->post_pingback = get_option( 'default_pingback_flag' );
394 $post->post_category = get_option( 'default_category' );
395 $post->page_template = 'default';
396 $post->post_parent = 0;
397 $post->menu_order = 0;
398 }
399
400 $post->post_content = apply_filters( 'default_content', $post_content, $post );
401 $post->post_title = apply_filters( 'default_title', $post_title, $post );
402 $post->post_excerpt = apply_filters( 'default_excerpt', $post_excerpt, $post );
403 $post->post_name = '';
404
405 return $post;
406}
407
408/**
409 * Get the default page information to use.
410 *
411 * @since 2.5.0
412 *
413 * @return object stdClass object containing all the default post data as attributes
414 */
415function get_default_page_to_edit() {
416 $page = get_default_post_to_edit();
417 $page->post_type = 'page';
418 return $page;
419}
420
421/**
422 * Get an existing post and format it for editing.
423 *
424 * @since unknown
425 *
426 * @param unknown_type $id
427 * @return unknown
428 */
429function get_post_to_edit( $id ) {
430
431 $post = get_post( $id, OBJECT, 'edit' );
432
433 if ( $post->post_type == 'page' )
434 $post->page_template = get_post_meta( $id, '_wp_page_template', true );
435
436 return $post;
437}
438
439/**
440 * Determine if a post exists based on title, content, and date
441 *
442 * @since unknown
443 *
444 * @param string $title Post title
445 * @param string $content Optional post content
446 * @param string $date Optional post date
447 * @return int Post ID if post exists, 0 otherwise.
448 */
449function post_exists($title, $content = '', $date = '') {
450 global $wpdb;
451
452 $post_title = stripslashes( sanitize_post_field( 'post_title', $title, 0, 'db' ) );
453 $post_content = stripslashes( sanitize_post_field( 'post_content', $content, 0, 'db' ) );
454 $post_date = stripslashes( sanitize_post_field( 'post_date', $date, 0, 'db' ) );
455
456 $query = "SELECT ID FROM $wpdb->posts WHERE 1=1";
457 $args = array();
458
459 if ( !empty ( $date ) ) {
460 $query .= ' AND post_date = %s';
461 $args[] = $post_date;
462 }
463
464 if ( !empty ( $title ) ) {
465 $query .= ' AND post_title = %s';
466 $args[] = $post_title;
467 }
468
469 if ( !empty ( $content ) ) {
470 $query .= 'AND post_content = %s';
471 $args[] = $post_content;
472 }
473
474 if ( !empty ( $args ) )
475 return $wpdb->get_var( $wpdb->prepare($query, $args) );
476
477 return 0;
478}
479
480/**
481 * Creates a new post from the "Write Post" form using $_POST information.
482 *
483 * @since unknown
484 *
485 * @return unknown
486 */
487function wp_write_post() {
488 global $user_ID;
489
490
491 if ( isset($_POST['post_type']) )
492 $ptype = get_post_type_object($_POST['post_type']);
493 else
494 $ptype = get_post_type_object('post');
495
496 if ( !current_user_can( $ptype->cap->edit_posts ) ) {
497 if ( 'page' == $ptype->name )
498 return new WP_Error( 'edit_pages', __( 'You are not allowed to create pages on this site.' ) );
499 else
500 return new WP_Error( 'edit_posts', __( 'You are not allowed to create posts or drafts on this site.' ) );
501 }
502
503 // Check for autosave collisions
504 // Does this need to be updated? ~ Mark
505 $temp_id = false;
506 if ( isset($_POST['temp_ID']) ) {
507 $temp_id = (int) $_POST['temp_ID'];
508 if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) )
509 $draft_ids = array();
510 foreach ( $draft_ids as $temp => $real )
511 if ( time() + $temp > 86400 ) // 1 day: $temp is equal to -1 * time( then )
512 unset($draft_ids[$temp]);
513
514 if ( isset($draft_ids[$temp_id]) ) { // Edit, don't write
515 $_POST['post_ID'] = $draft_ids[$temp_id];
516 unset($_POST['temp_ID']);
517 update_user_option( $user_ID, 'autosave_draft_ids', $draft_ids );
518 return edit_post();
519 }
520 }
521
522 $translated = _wp_translate_postdata( false );
523 if ( is_wp_error($translated) )
524 return $translated;
525
526 if ( isset($_POST['visibility']) ) {
527 switch ( $_POST['visibility'] ) {
528 case 'public' :
529 $_POST['post_password'] = '';
530 break;
531 case 'password' :
532 unset( $_POST['sticky'] );
533 break;
534 case 'private' :
535 $_POST['post_status'] = 'private';
536 $_POST['post_password'] = '';
537 unset( $_POST['sticky'] );
538 break;
539 }
540 }
541
542 // Create the post.
543 $post_ID = wp_insert_post( $_POST );
544 if ( is_wp_error( $post_ID ) )
545 return $post_ID;
546
547 if ( empty($post_ID) )
548 return 0;
549
550 add_meta( $post_ID );
551
552 add_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID );
553
554 // Reunite any orphaned attachments with their parent
555 // Does this need to be udpated? ~ Mark
556 if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) )
557 $draft_ids = array();
558 if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) )
559 _relocate_children( $draft_temp_id, $post_ID );
560 if ( $temp_id && $temp_id != $draft_temp_id )
561 _relocate_children( $temp_id, $post_ID );
562
563 // Update autosave collision detection
564 if ( $temp_id ) {
565 $draft_ids[$temp_id] = $post_ID;
566 update_user_option( $user_ID, 'autosave_draft_ids', $draft_ids );
567 }
568
569 // Now that we have an ID we can fix any attachment anchor hrefs
570 _fix_attachment_links( $post_ID );
571
572 wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID );
573
574 return $post_ID;
575}
576
577/**
578 * Calls wp_write_post() and handles the errors.
579 *
580 * @since unknown
581 *
582 * @return unknown
583 */
584function write_post() {
585 $result = wp_write_post();
586 if ( is_wp_error( $result ) )
587 wp_die( $result->get_error_message() );
588 else
589 return $result;
590}
591
592//
593// Post Meta
594//
595
596/**
597 * {@internal Missing Short Description}}
598 *
599 * @since unknown
600 *
601 * @param unknown_type $post_ID
602 * @return unknown
603 */
604function add_meta( $post_ID ) {
605 global $wpdb;
606 $post_ID = (int) $post_ID;
607
608 $protected = array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_old_slug', '_wp_page_template' );
609
610 $metakeyselect = isset($_POST['metakeyselect']) ? stripslashes( trim( $_POST['metakeyselect'] ) ) : '';
611 $metakeyinput = isset($_POST['metakeyinput']) ? stripslashes( trim( $_POST['metakeyinput'] ) ) : '';
612 $metavalue = isset($_POST['metavalue']) ? maybe_serialize( stripslashes_deep( $_POST['metavalue'] ) ) : '';
613 if ( is_string($metavalue) )
614 $metavalue = trim( $metavalue );
615
616 if ( ('0' === $metavalue || !empty ( $metavalue ) ) && ((('#NONE#' != $metakeyselect) && !empty ( $metakeyselect) ) || !empty ( $metakeyinput) ) ) {
617 // We have a key/value pair. If both the select and the
618 // input for the key have data, the input takes precedence:
619
620 if ('#NONE#' != $metakeyselect)
621 $metakey = $metakeyselect;
622
623 if ( $metakeyinput)
624 $metakey = $metakeyinput; // default
625
626 if ( in_array($metakey, $protected) )
627 return false;
628
629 wp_cache_delete($post_ID, 'post_meta');
630 $wpdb->insert( $wpdb->postmeta, array( 'post_id' => $post_ID, 'meta_key' => $metakey, 'meta_value' => $metavalue ) );
631 do_action( 'added_postmeta', $wpdb->insert_id, $post_ID, $metakey, $metavalue );
632
633 return $wpdb->insert_id;
634 }
635 return false;
636} // add_meta
637
638/**
639 * {@internal Missing Short Description}}
640 *
641 * @since unknown
642 *
643 * @param unknown_type $mid
644 * @return unknown
645 */
646function delete_meta( $mid ) {
647 global $wpdb;
648 $mid = (int) $mid;
649
650 $post_id = $wpdb->get_var( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_id = %d", $mid) );
651
652 do_action( 'delete_postmeta', $mid );
653 wp_cache_delete($post_id, 'post_meta');
654 $rval = $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id = %d", $mid) );
655 do_action( 'deleted_postmeta', $mid );
656
657 return $rval;
658}
659
660/**
661 * Get a list of previously defined keys.
662 *
663 * @since unknown
664 *
665 * @return unknown
666 */
667function get_meta_keys() {
668 global $wpdb;
669
670 $keys = $wpdb->get_col( "
671 SELECT meta_key
672 FROM $wpdb->postmeta
673 GROUP BY meta_key
674 ORDER BY meta_key" );
675
676 return $keys;
677}
678
679/**
680 * {@internal Missing Short Description}}
681 *
682 * @since unknown
683 *
684 * @param unknown_type $mid
685 * @return unknown
686 */
687function get_post_meta_by_id( $mid ) {
688 global $wpdb;
689 $mid = (int) $mid;
690
691 $meta = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE meta_id = %d", $mid) );
692 if ( is_serialized_string( $meta->meta_value ) )
693 $meta->meta_value = maybe_unserialize( $meta->meta_value );//Possible Control Flow
694 return $meta;
695}
696
697/**
698 * {@internal Missing Short Description}}
699 *
700 * Some postmeta stuff.
701 *
702 * @since unknown
703 *
704 * @param unknown_type $postid
705 * @return unknown
706 */
707function has_meta( $postid ) {
708 global $wpdb;
709
710 return $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value, meta_id, post_id
711 FROM $wpdb->postmeta WHERE post_id = %d
712 ORDER BY meta_key,meta_id", $postid), ARRAY_A );
713
714}
715
716/**
717 * {@internal Missing Short Description}}
718 *
719 * @since unknown
720 *
721 * @param unknown_type $meta_id
722 * @param unknown_type $meta_key Expect Slashed
723 * @param unknown_type $meta_value Expect Slashed
724 * @return unknown
725 */
726function update_meta( $meta_id, $meta_key, $meta_value ) {
727 global $wpdb;
728
729 $protected = array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_old_slug', '_wp_page_template' );
730
731 $meta_key = stripslashes($meta_key);
732
733 if ( in_array($meta_key, $protected) )
734 return false;
735
736 if ( '' === trim( $meta_value ) )
737 return false;
738
739 $post_id = $wpdb->get_var( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_id = %d", $meta_id) );
740
741 $meta_value = maybe_serialize( stripslashes_deep( $meta_value ) );
742 $meta_id = (int) $meta_id;
743
744 $data = compact( 'meta_key', 'meta_value' );
745 $where = compact( 'meta_id' );
746
747 do_action( 'update_postmeta', $meta_id, $post_id, $meta_key, $meta_value );
748 $rval = $wpdb->update( $wpdb->postmeta, $data, $where );
749 wp_cache_delete($post_id, 'post_meta');
750 do_action( 'updated_postmeta', $meta_id, $post_id, $meta_key, $meta_value );
751
752 return $rval;
753}
754
755//
756// Private
757//
758
759/**
760 * Replace hrefs of attachment anchors with up-to-date permalinks.
761 *
762 * @since unknown
763 * @access private
764 *
765 * @param unknown_type $post_ID
766 * @return unknown
767 */
768function _fix_attachment_links( $post_ID ) {
769 global $_fix_attachment_link_id;
770
771 $post = & get_post( $post_ID, ARRAY_A );
772
773 $search = "#<a[^>]+rel=('|\")[^'\"]*attachment[^>]*>#ie";
774
775 // See if we have any rel="attachment" links
776 if ( 0 == preg_match_all( $search, $post['post_content'], $anchor_matches, PREG_PATTERN_ORDER ) )
777 return;
778
779 $i = 0;
780 $search = "#[\s]+rel=(\"|')(.*?)wp-att-(\d+)\\1#i";
781 foreach ( $anchor_matches[0] as $anchor ) {
782 if ( 0 == preg_match( $search, $anchor, $id_matches ) )
783 continue;
784
785 $id = (int) $id_matches[3];
786
787 // While we have the attachment ID, let's adopt any orphans.
788 $attachment = & get_post( $id, ARRAY_A );
789 if ( ! empty( $attachment) && ! is_object( get_post( $attachment['post_parent'] ) ) ) {
790 $attachment['post_parent'] = $post_ID;
791 // Escape data pulled from DB.
792 $attachment = add_magic_quotes( $attachment );
793 wp_update_post( $attachment );
794 }
795
796 $post_search[$i] = $anchor;
797 $_fix_attachment_link_id = $id;
798 $post_replace[$i] = preg_replace_callback( "#href=(\"|')[^'\"]*\\1#", '_fix_attachment_links_replace_cb', $anchor );
799 ++$i;
800 }
801
802 $post['post_content'] = str_replace( $post_search, $post_replace, $post['post_content'] );
803
804 // Escape data pulled from DB.
805 $post = add_magic_quotes( $post);
806
807 return wp_update_post( $post);
808}
809
810function _fix_attachment_links_replace_cb($match) {
811 global $_fix_attachment_link_id;
812 return stripslashes( 'href='.$match[1] ).get_attachment_link( $_fix_attachment_link_id ).stripslashes( $match[1] );
813}
814
815/**
816 * Move child posts to a new parent.
817 *
818 * @since unknown
819 * @access private
820 *
821 * @param unknown_type $old_ID
822 * @param unknown_type $new_ID
823 * @return unknown
824 */
825function _relocate_children( $old_ID, $new_ID ) {
826 global $wpdb;
827 $old_ID = (int) $old_ID;
828 $new_ID = (int) $new_ID;
829
830 $children = $wpdb->get_col( $wpdb->prepare("
831 SELECT post_id
832 FROM $wpdb->postmeta
833 WHERE meta_key = '_wp_attachment_temp_parent'
834 AND meta_value = %d", $old_ID) );
835
836 foreach ( $children as $child_id ) {
837 $wpdb->update($wpdb->posts, array('post_parent' => $new_ID), array('ID' => $child_id) );
838 delete_post_meta($child_id, '_wp_attachment_temp_parent');
839 }
840}
841
842/**
843 * Get all the possible statuses for a post_type
844 *
845 * @since 2.5.0
846 *
847 * @param string $type The post_type you want the statuses for
848 * @return array As array of all the statuses for the supplied post type
849 */
850function get_available_post_statuses($type = 'post') {
851 $stati = wp_count_posts($type);
852
853 return array_keys(get_object_vars($stati));
854}
855
856/**
857 * Run the wp query to fetch the posts for listing on the edit posts page
858 *
859 * @since 2.5.0
860 *
861 * @param array|bool $q Array of query variables to use to build the query or false to use $_GET superglobal.
862 * @return array
863 */
864function wp_edit_posts_query( $q = false ) {
865 if ( false === $q )
866 $q = $_GET;
867 $q['m'] = isset($q['m']) ? (int) $q['m'] : 0;
868 $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
869 $post_stati = get_post_stati();
870
871 if ( isset($q['post_type']) && in_array( $q['post_type'], get_post_types() ) )
872 $post_type = $q['post_type'];
873 else
874 $post_type = 'post';
875
876 $avail_post_stati = get_available_post_statuses($post_type);
877
878 if ( isset($q['post_status']) && in_array( $q['post_status'], $post_stati ) ) {
879 $post_status = $q['post_status'];
880 $perm = 'readable';
881 }
882
883 if ( isset($q['post_status']) && 'pending' === $q['post_status'] ) {
884 $order = 'ASC';
885 $orderby = 'modified';
886 } elseif ( isset($q['post_status']) && 'draft' === $q['post_status'] ) {
887 $order = 'DESC';
888 $orderby = 'modified';
889 } else {
890 $order = 'DESC';
891 $orderby = 'date';
892 }
893
894 $per_page = 'edit_' . $post_type . '_per_page';
895 $posts_per_page = (int) get_user_option( $per_page );
896 if ( empty( $posts_per_page ) || $posts_per_page < 1 )
897 $posts_per_page = 20;
898
899 $posts_per_page = apply_filters( $per_page, $posts_per_page );
900 $posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type );
901
902 $query = compact('post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page');
903
904 // Hierarchical types require special args.
905 if ( is_post_type_hierarchical( $post_type ) ) {
906 $query['orderby'] = 'menu_order title';
907 $query['order'] = 'asc';
908 $query['posts_per_page'] = -1;
909 $query['posts_per_archive_page'] = -1;
910 }
911
912 wp( $query );
913
914 return $avail_post_stati;
915}
916
917/**
918 * Get default post mime types
919 *
920 * @since 2.9.0
921 *
922 * @return array
923 */
924function get_post_mime_types() {
925 $post_mime_types = array( // array( adj, noun )
926 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),
927 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio <span class="count">(%s)</span>', 'Audio <span class="count">(%s)</span>')),
928 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video <span class="count">(%s)</span>', 'Video <span class="count">(%s)</span>')),
929 );
930
931 return apply_filters('post_mime_types', $post_mime_types);
932}
933
934/**
935 * {@internal Missing Short Description}}
936 *
937 * @since unknown
938 *
939 * @param unknown_type $type
940 * @return unknown
941 */
942function get_available_post_mime_types($type = 'attachment') {
943 global $wpdb;
944
945 $types = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type));
946 return $types;
947}
948
949/**
950 * {@internal Missing Short Description}}
951 *
952 * @since unknown
953 *
954 * @param unknown_type $q
955 * @return unknown
956 */
957function wp_edit_attachments_query( $q = false ) {
958 if ( false === $q )
959 $q = $_GET;
960
961 $q['m'] = isset( $q['m'] ) ? (int) $q['m'] : 0;
962 $q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0;
963 $q['post_type'] = 'attachment';
964 $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : 'inherit';
965 $media_per_page = (int) get_user_option( 'upload_per_page' );
966 if ( empty( $media_per_page ) || $media_per_page < 1 )
967 $media_per_page = 20;
968 $q['posts_per_page'] = apply_filters( 'upload_per_page', $media_per_page );
969
970 $post_mime_types = get_post_mime_types();
971 $avail_post_mime_types = get_available_post_mime_types('attachment');
972
973 if ( isset($q['post_mime_type']) && !array_intersect( (array) $q['post_mime_type'], array_keys($post_mime_types) ) )
974 unset($q['post_mime_type']);
975
976 wp($q);
977
978 return array($post_mime_types, $avail_post_mime_types);
979}
980
981/**
982 * {@internal Missing Short Description}}
983 *
984 * @uses get_user_option()
985 * @since unknown
986 *
987 * @param unknown_type $id
988 * @param unknown_type $page
989 * @return unknown
990 */
991function postbox_classes( $id, $page ) {
992 if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id )
993 return '';
994
995 if ( $closed = get_user_option('closedpostboxes_'.$page ) ) {
996 if ( !is_array( $closed ) ) {
997 return '';
998 }
999 return in_array( $id, $closed )? 'closed' : '';
1000 } else {
/var/www/wordpress/wp-admin/includes/schema.php
/var/www/wordpress/wp-admin/includes/taxonomy.php
/var/www/wordpress/wp-admin/includes/template.php
/var/www/wordpress/wp-admin/includes/theme-install.php
/var/www/wordpress/wp-admin/includes/theme.php
/var/www/wordpress/wp-admin/includes/update-core.php
/var/www/wordpress/wp-admin/includes/update.php
/var/www/wordpress/wp-admin/includes/upgrade.php
/var/www/wordpress/wp-admin/includes/user.php
/var/www/wordpress/wp-admin/includes/widgets.php
/var/www/wordpress/wp-admin/js/revisions-js.php
/var/www/wordpress/wp-admin/maint/repair.php
/var/www/wordpress/wp-admin/admin-ajax.php
/var/www/wordpress/wp-admin/admin-footer.php
/var/www/wordpress/wp-admin/admin-functions.php
/var/www/wordpress/wp-admin/admin-header.php
/var/www/wordpress/wp-admin/admin-post.php
/var/www/wordpress/wp-admin/admin.php
/var/www/wordpress/wp-admin/async-upload.php
/var/www/wordpress/wp-admin/comment.php
/var/www/wordpress/wp-admin/custom-background.php
/var/www/wordpress/wp-admin/custom-header.php
/var/www/wordpress/wp-admin/edit-attachment-rows.php
/var/www/wordpress/wp-admin/edit-comments.php
/var/www/wordpress/wp-admin/edit-form-advanced.php
/var/www/wordpress/wp-admin/edit-form-comment.php
/var/www/wordpress/wp-admin/edit-link-categories.php
/var/www/wordpress/wp-admin/edit-link-category-form.php
/var/www/wordpress/wp-admin/edit-link-form.php
/var/www/wordpress/wp-admin/edit-post-rows.php
/var/www/wordpress/wp-admin/edit-tag-form.php
/var/www/wordpress/wp-admin/edit-tags.php
/var/www/wordpress/wp-admin/edit.php
/var/www/wordpress/wp-admin/export.php
/var/www/wordpress/wp-admin/gears-manifest.php
/var/www/wordpress/wp-admin/import.php
/var/www/wordpress/wp-admin/index-extra.php
/var/www/wordpress/wp-admin/index.php
/var/www/wordpress/wp-admin/install-helper.php
/var/www/wordpress/wp-admin/install.php
/var/www/wordpress/wp-admin/link-add.php
/var/www/wordpress/wp-admin/link-category.php
/var/www/wordpress/wp-admin/link-manager.php
/var/www/wordpress/wp-admin/link-parse-opml.php
/var/www/wordpress/wp-admin/link.php
/var/www/wordpress/wp-admin/load-scripts.php
/var/www/wordpress/wp-admin/load-styles.php
/var/www/wordpress/wp-admin/media-new.php
/var/www/wordpress/wp-admin/media-upload.php
/var/www/wordpress/wp-admin/media.php
/var/www/wordpress/wp-admin/menu-header.php
/var/www/wordpress/wp-admin/menu.php
/var/www/wordpress/wp-admin/moderation.php
/var/www/wordpress/wp-admin/ms-admin.php
/var/www/wordpress/wp-admin/ms-delete-site.php
/var/www/wordpress/wp-admin/ms-edit.php
/var/www/wordpress/wp-admin/ms-options.php
/var/www/wordpress/wp-admin/ms-sites.php
/var/www/wordpress/wp-admin/ms-themes.php
/var/www/wordpress/wp-admin/ms-upgrade-network.php
/var/www/wordpress/wp-admin/ms-users.php
/var/www/wordpress/wp-admin/my-sites.php
/var/www/wordpress/wp-admin/nav-menus.php
/var/www/wordpress/wp-admin/network.php
/var/www/wordpress/wp-admin/options-discussion.php
/var/www/wordpress/wp-admin/options-general.php
/var/www/wordpress/wp-admin/options-head.php
/var/www/wordpress/wp-admin/options-media.php
/var/www/wordpress/wp-admin/options-permalink.php
/var/www/wordpress/wp-admin/options-privacy.php
/var/www/wordpress/wp-admin/options-reading.php
/var/www/wordpress/wp-admin/options-writing.php
/var/www/wordpress/wp-admin/options.php
/var/www/wordpress/wp-admin/plugin-editor.php
/var/www/wordpress/wp-admin/plugin-install.php
/var/www/wordpress/wp-admin/plugins.php
/var/www/wordpress/wp-admin/post-new.php
/var/www/wordpress/wp-admin/post.php
/var/www/wordpress/wp-admin/press-this.php
/var/www/wordpress/wp-admin/profile.php
/var/www/wordpress/wp-admin/revision.php
/var/www/wordpress/wp-admin/setup-config.php
/var/www/wordpress/wp-admin/sidebar.php
/var/www/wordpress/wp-admin/theme-editor.php
/var/www/wordpress/wp-admin/theme-install.php
/var/www/wordpress/wp-admin/themes.php
/var/www/wordpress/wp-admin/tools.php
/var/www/wordpress/wp-admin/update-core.php
/var/www/wordpress/wp-admin/update.php
/var/www/wordpress/wp-admin/upgrade-functions.php
/var/www/wordpress/wp-admin/upgrade.php
/var/www/wordpress/wp-admin/upload.php
/var/www/wordpress/wp-admin/user-edit.php
/var/www/wordpress/wp-admin/user-new.php
/var/www/wordpress/wp-admin/users.php
/var/www/wordpress/wp-admin/widgets.php
/var/www/wordpress/wp-content/languages/ru_RU.php
/var/www/wordpress/wp-content/plugins/akismet/akismet.php
/var/www/wordpress/wp-content/plugins/rh/rh.php
/var/www/wordpress/wp-content/plugins/hello.php
/var/www/wordpress/wp-content/plugins/index.php
/var/www/wordpress/wp-content/themes/twentyten/404.php
/var/www/wordpress/wp-content/themes/twentyten/archive.php
/var/www/wordpress/wp-content/themes/twentyten/attachment.php
/var/www/wordpress/wp-content/themes/twentyten/author.php
/var/www/wordpress/wp-content/themes/twentyten/category.php
/var/www/wordpress/wp-content/themes/twentyten/comments.php
/var/www/wordpress/wp-content/themes/twentyten/footer.php
/var/www/wordpress/wp-content/themes/twentyten/functions.php
/var/www/wordpress/wp-content/themes/twentyten/header.php
/var/www/wordpress/wp-content/themes/twentyten/index.php
/var/www/wordpress/wp-content/themes/twentyten/loop.php
/var/www/wordpress/wp-content/themes/twentyten/onecolumn-page.php
/var/www/wordpress/wp-content/themes/twentyten/page.php
/var/www/wordpress/wp-content/themes/twentyten/search.php
/var/www/wordpress/wp-content/themes/twentyten/sidebar-footer.php
/var/www/wordpress/wp-content/themes/twentyten/sidebar.php
/var/www/wordpress/wp-content/themes/twentyten/single.php
/var/www/wordpress/wp-content/themes/twentyten/tag.php
/var/www/wordpress/wp-content/themes/index.php
/var/www/wordpress/wp-content/index.php
/var/www/wordpress/wp-includes/js/tinymce/langs/wp-langs.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/config.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/rpc.php
/var/www/wordpress/wp-includes/js/tinymce/wp-mce-help.php
/var/www/wordpress/wp-includes/js/tinymce/wp-tinymce.php
/var/www/wordpress/wp-includes/pomo/entry.php
/var/www/wordpress/wp-includes/pomo/mo.php
/var/www/wordpress/wp-includes/pomo/po.php
/var/www/wordpress/wp-includes/pomo/streams.php
/var/www/wordpress/wp-includes/pomo/translations.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/native.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/shell.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/string.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/xdiff.php
/var/www/wordpress/wp-includes/Text/Diff/Renderer/inline.php
/var/www/wordpress/wp-includes/Text/Diff/Renderer.php
/var/www/wordpress/wp-includes/Text/Diff.php
/var/www/wordpress/wp-includes/theme-compat/comments-popup.php
/var/www/wordpress/wp-includes/theme-compat/comments.php
/var/www/wordpress/wp-includes/theme-compat/footer.php
/var/www/wordpress/wp-includes/theme-compat/header.php
/var/www/wordpress/wp-includes/theme-compat/sidebar.php
/var/www/wordpress/wp-includes/atomlib.php
/var/www/wordpress/wp-includes/author-template.php
/var/www/wordpress/wp-includes/bookmark-template.php
/var/www/wordpress/wp-includes/bookmark.php
/var/www/wordpress/wp-includes/cache.php
/var/www/wordpress/wp-includes/canonical.php
/var/www/wordpress/wp-includes/capabilities.php
/var/www/wordpress/wp-includes/category-template.php
/var/www/wordpress/wp-includes/category.php
/var/www/wordpress/wp-includes/class-feed.php
/var/www/wordpress/wp-includes/class-http.php
/var/www/wordpress/wp-includes/class-IXR.php
/var/www/wordpress/wp-includes/class-json.php
/var/www/wordpress/wp-includes/class-oembed.php
/var/www/wordpress/wp-includes/class-phpass.php
/var/www/wordpress/wp-includes/class-phpmailer.php
/var/www/wordpress/wp-includes/class-pop3.php
/var/www/wordpress/wp-includes/class-simplepie.php
/var/www/wordpress/wp-includes/class-smtp.php
/var/www/wordpress/wp-includes/class-snoopy.php
/var/www/wordpress/wp-includes/class.wp-dependencies.php
/var/www/wordpress/wp-includes/class.wp-scripts.php
/var/www/wordpress/wp-includes/class.wp-styles.php
/var/www/wordpress/wp-includes/classes.php
/var/www/wordpress/wp-includes/comment-template.php
/var/www/wordpress/wp-includes/comment.php
/var/www/wordpress/wp-includes/compat.php
/var/www/wordpress/wp-includes/cron.php
/var/www/wordpress/wp-includes/default-constants.php
/var/www/wordpress/wp-includes/default-embeds.php
/var/www/wordpress/wp-includes/default-filters.php
/var/www/wordpress/wp-includes/default-widgets.php
/var/www/wordpress/wp-includes/deprecated.php
/var/www/wordpress/wp-includes/feed-atom-comments.php
/var/www/wordpress/wp-includes/feed-atom.php
/var/www/wordpress/wp-includes/feed-rdf.php
/var/www/wordpress/wp-includes/feed-rss.php
/var/www/wordpress/wp-includes/feed-rss2-comments.php
/var/www/wordpress/wp-includes/feed-rss2.php
/var/www/wordpress/wp-includes/feed.php
/var/www/wordpress/wp-includes/formatting.php
/var/www/wordpress/wp-includes/functions.php
/var/www/wordpress/wp-includes/functions.wp-scripts.php
/var/www/wordpress/wp-includes/functions.wp-styles.php
/var/www/wordpress/wp-includes/general-template.php
/var/www/wordpress/wp-includes/http.php
/var/www/wordpress/wp-includes/kses.php
/var/www/wordpress/wp-includes/l10n.php
/var/www/wordpress/wp-includes/link-template.php
/var/www/wordpress/wp-includes/load.php
/var/www/wordpress/wp-includes/locale.php
/var/www/wordpress/wp-includes/media.php
/var/www/wordpress/wp-includes/meta.php
/var/www/wordpress/wp-includes/ms-blogs.php
/var/www/wordpress/wp-includes/ms-default-constants.php
/var/www/wordpress/wp-includes/ms-default-filters.php
/var/www/wordpress/wp-includes/ms-deprecated.php
/var/www/wordpress/wp-includes/ms-files.php
/var/www/wordpress/wp-includes/ms-functions.php
/var/www/wordpress/wp-includes/ms-load.php
/var/www/wordpress/wp-includes/ms-settings.php
/var/www/wordpress/wp-includes/nav-menu-template.php
/var/www/wordpress/wp-includes/nav-menu.php
/var/www/wordpress/wp-includes/pluggable-deprecated.php
/var/www/wordpress/wp-includes/pluggable.php
/var/www/wordpress/wp-includes/plugin.php
/var/www/wordpress/wp-includes/post-template.php
/var/www/wordpress/wp-includes/post-thumbnail-template.php
/var/www/wordpress/wp-includes/post.php
/var/www/wordpress/wp-includes/query.php
/var/www/wordpress/wp-includes/registration-functions.php
/var/www/wordpress/wp-includes/registration.php
/var/www/wordpress/wp-includes/rewrite.php
/var/www/wordpress/wp-includes/rss-functions.php
/var/www/wordpress/wp-includes/rss.php
/var/www/wordpress/wp-includes/script-loader.php
/var/www/wordpress/wp-includes/shortcodes.php
/var/www/wordpress/wp-includes/taxonomy.php
/var/www/wordpress/wp-includes/template-loader.php
/var/www/wordpress/wp-includes/theme.php
/var/www/wordpress/wp-includes/update.php
/var/www/wordpress/wp-includes/user.php
/var/www/wordpress/wp-includes/vars.php
/var/www/wordpress/wp-includes/version.php
/var/www/wordpress/wp-includes/widgets.php
/var/www/wordpress/wp-includes/wp-db.php
/var/www/wordpress/wp-includes/wp-diff.php
/var/www/wordpress/index.php
/var/www/wordpress/wp-activate.php
/var/www/wordpress/wp-app.php
/var/www/wordpress/wp-atom.php
/var/www/wordpress/wp-blog-header.php
/var/www/wordpress/wp-comments-post.php
/var/www/wordpress/wp-commentsrss2.php
/var/www/wordpress/wp-config-sample.php
/var/www/wordpress/wp-cron.php
/var/www/wordpress/wp-feed.php
/var/www/wordpress/wp-links-opml.php
/var/www/wordpress/wp-load.php
/var/www/wordpress/wp-login.php
/var/www/wordpress/wp-mail.php
/var/www/wordpress/wp-pass.php
/var/www/wordpress/wp-rdf.php
/var/www/wordpress/wp-register.php
/var/www/wordpress/wp-rss.php
/var/www/wordpress/wp-rss2.php
/var/www/wordpress/wp-settings.php
/var/www/wordpress/wp-signup.php
/var/www/wordpress/wp-trackback.php
/var/www/wordpress/xmlrpc.php