Changeset 41689 for trunk/src/wp-includes/comment.php
- Timestamp:
- 10/02/2017 10:13:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r41686 r41689 1286 1286 * 1287 1287 * @since 1.2.0 1288 * 1289 * @param int $comment_id The comment ID. 1290 */ 1291 do_action( 'delete_comment', $comment->comment_ID ); 1288 * @since 4.9.0 Added the `$comment` parameter. 1289 * 1290 * @param int $comment_id The comment ID. 1291 * @param WP_Comment $comment The comment to be deleted. 1292 */ 1293 do_action( 'delete_comment', $comment->comment_ID, $comment ); 1292 1294 1293 1295 // Move children up a level. … … 1310 1312 * 1311 1313 * @since 2.9.0 1312 * 1313 * @param int $comment_id The comment ID. 1314 */ 1315 do_action( 'deleted_comment', $comment->comment_ID ); 1314 * @since 4.9.0 Added the `$comment` parameter. 1315 * 1316 * @param int $comment_id The comment ID. 1317 * @param WP_Comment $comment The deleted comment. 1318 */ 1319 do_action( 'deleted_comment', $comment->comment_ID, $comment ); 1316 1320 1317 1321 $post_id = $comment->comment_post_ID; … … 1349 1353 * 1350 1354 * @since 2.9.0 1351 * 1352 * @param int $comment_id The comment ID. 1353 */ 1354 do_action( 'trash_comment', $comment->comment_ID ); 1355 * @since 4.9.0 Added the `$comment` parameter. 1356 * 1357 * @param int $comment_id The comment ID. 1358 * @param WP_Comment $comment The comment to be trashed. 1359 */ 1360 do_action( 'trash_comment', $comment->comment_ID, $comment ); 1355 1361 1356 1362 if ( wp_set_comment_status( $comment, 'trash' ) ) { … … 1364 1370 * 1365 1371 * @since 2.9.0 1366 * 1367 * @param int $comment_id The comment ID. 1372 * @since 4.9.0 Added the `$comment` parameter. 1373 * 1374 * @param int $comment_id The comment ID. 1375 * @param WP_Comment $comment The trashed comment. 1368 1376 */ 1369 do_action( 'trashed_comment', $comment->comment_ID );1377 do_action( 'trashed_comment', $comment->comment_ID, $comment ); 1370 1378 return true; 1371 1379 } … … 1392 1400 * 1393 1401 * @since 2.9.0 1394 * 1395 * @param int $comment_id The comment ID. 1396 */ 1397 do_action( 'untrash_comment', $comment->comment_ID ); 1402 * @since 4.9.0 Added the `$comment` parameter. 1403 * 1404 * @param int $comment_id The comment ID. 1405 * @param WP_Comment $comment The comment to be untrashed. 1406 */ 1407 do_action( 'untrash_comment', $comment->comment_ID, $comment ); 1398 1408 1399 1409 $status = (string) get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ); … … 1408 1418 * 1409 1419 * @since 2.9.0 1410 * 1411 * @param int $comment_id The comment ID. 1420 * @since 4.9.0 Added the `$comment` parameter. 1421 * 1422 * @param int $comment_id The comment ID. 1423 * @param WP_Comment $comment The untrashed comment. 1412 1424 */ 1413 do_action( 'untrashed_comment', $comment->comment_ID );1425 do_action( 'untrashed_comment', $comment->comment_ID, $comment ); 1414 1426 return true; 1415 1427 } … … 1436 1448 * 1437 1449 * @since 2.9.0 1438 * 1439 * @param int $comment_id The comment ID. 1440 */ 1441 do_action( 'spam_comment', $comment->comment_ID ); 1450 * @since 4.9.0 Added the `$comment` parameter. 1451 * 1452 * @param int $comment_id The comment ID. 1453 * @param WP_Comment $comment The comment to be marked as spam. 1454 */ 1455 do_action( 'spam_comment', $comment->comment_ID, $comment ); 1442 1456 1443 1457 if ( wp_set_comment_status( $comment, 'spam' ) ) { … … 1450 1464 * 1451 1465 * @since 2.9.0 1452 * 1453 * @param int $comment_id The comment ID. 1466 * @since 4.9.0 Added the `$comment` parameter. 1467 * 1468 * @param int $comment_id The comment ID. 1469 * @param WP_Comment $comment The comment marked as spam. 1454 1470 */ 1455 do_action( 'spammed_comment', $comment->comment_ID );1471 do_action( 'spammed_comment', $comment->comment_ID, $comment ); 1456 1472 return true; 1457 1473 } … … 1478 1494 * 1479 1495 * @since 2.9.0 1480 * 1481 * @param int $comment_id The comment ID. 1482 */ 1483 do_action( 'unspam_comment', $comment->comment_ID ); 1496 * @since 4.9.0 Added the `$comment` parameter. 1497 * 1498 * @param int $comment_id The comment ID. 1499 * @param WP_Comment $comment The comment to be unmarked as spam. 1500 */ 1501 do_action( 'unspam_comment', $comment->comment_ID, $comment ); 1484 1502 1485 1503 $status = (string) get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ); … … 1494 1512 * 1495 1513 * @since 2.9.0 1496 * 1497 * @param int $comment_id The comment ID. 1514 * @since 4.9.0 Added the `$comment` parameter. 1515 * 1516 * @param int $comment_id The comment ID. 1517 * @param WP_Comment $comment The comment unmarked as spam. 1498 1518 */ 1499 do_action( 'unspammed_comment', $comment->comment_ID );1519 do_action( 'unspammed_comment', $comment->comment_ID, $comment ); 1500 1520 return true; 1501 1521 }
Note: See TracChangeset
for help on using the changeset viewer.