Changeset 34533 for trunk/src/wp-includes/comment-functions.php
- Timestamp:
- 09/25/2015 04:40:30 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/comment-functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-functions.php
r34524 r34533 1378 1378 * 1379 1379 * @since 2.0.0 1380 * @since 4.4.0 Introduced `$comment_meta` argument. 1380 1381 * 1381 1382 * @global wpdb $wpdb WordPress database abstraction object. … … 1402 1403 * Default empty. 1403 1404 * @type string $comment_type Comment type. Default empty. 1405 * @type array $comment_meta Optional. Array of key/value pairs to be stored in commentmeta for the 1406 * new comment. 1404 1407 * @type int $user_id ID of the user who submitted the comment. Default 0. 1405 1408 * } … … 1439 1442 } 1440 1443 $comment = get_comment( $id ); 1444 1445 // If metadata is provided, store it. 1446 if ( isset( $commentdata['comment_meta'] ) && is_array( $commentdata['comment_meta'] ) ) { 1447 foreach ( $commentdata['comment_meta'] as $meta_key => $meta_value ) { 1448 add_comment_meta( $comment->comment_ID, $meta_key, $meta_value, true ); 1449 } 1450 } 1441 1451 1442 1452 /**
Note: See TracChangeset
for help on using the changeset viewer.