@@ 508-526 (lines=19) @@ | ||
505 | ) |
|
506 | ); |
|
507 | ||
508 | } else { |
|
509 | ||
510 | $events->register( |
|
511 | "post_publish\\{$slug}" |
|
512 | , 'WordPoints_Hook_Event_Post_Publish' |
|
513 | , array( |
|
514 | 'actions' => array( |
|
515 | 'toggle_on' => "post_publish\\{$slug}", |
|
516 | 'toggle_off' => array( |
|
517 | "post_depublish\\{$slug}", |
|
518 | "post_depublish_delete\\{$slug}", |
|
519 | ), |
|
520 | ), |
|
521 | 'args' => array( |
|
522 | "post\\{$slug}" => 'WordPoints_Hook_Arg', |
|
523 | ), |
|
524 | ) |
|
525 | ); |
|
526 | } |
|
527 | ||
528 | if ( post_type_supports( $slug, 'comments' ) ) { |
|
529 | ||
@@ 528-546 (lines=19) @@ | ||
525 | ); |
|
526 | } |
|
527 | ||
528 | if ( post_type_supports( $slug, 'comments' ) ) { |
|
529 | ||
530 | $events->register( |
|
531 | "comment_leave\\{$slug}" |
|
532 | , 'WordPoints_Hook_Event_Comment_Leave' |
|
533 | , array( |
|
534 | 'actions' => array( |
|
535 | 'toggle_on' => array( |
|
536 | "comment_approve\\{$slug}", |
|
537 | "comment_new\\{$slug}", |
|
538 | ), |
|
539 | 'toggle_off' => "comment_deapprove\\{$slug}", |
|
540 | ), |
|
541 | 'args' => array( |
|
542 | "comment\\{$slug}" => 'WordPoints_Hook_Arg', |
|
543 | ), |
|
544 | ) |
|
545 | ); |
|
546 | } |
|
547 | ||
548 | /** |
|
549 | * Fires when registering the hook events for a post type. |