@@ 475-492 (lines=18) @@ | ||
472 | ) |
|
473 | ); |
|
474 | ||
475 | } else { |
|
476 | ||
477 | $event_slugs[] = "post_publish\\{$slug}"; |
|
478 | ||
479 | $events->register( |
|
480 | "post_publish\\{$slug}" |
|
481 | , 'WordPoints_Hook_Event_Post_Publish' |
|
482 | , array( |
|
483 | 'actions' => array( |
|
484 | 'toggle_on' => 'post_publish', |
|
485 | 'toggle_off' => array( 'post_depublish', 'post_delete' ), |
|
486 | ), |
|
487 | 'args' => array( |
|
488 | "post\\{$slug}" => 'WordPoints_Hook_Arg_Dynamic', |
|
489 | ), |
|
490 | ) |
|
491 | ); |
|
492 | } |
|
493 | ||
494 | if ( post_type_supports( $slug, 'comments' ) ) { |
|
495 | ||
@@ 494-511 (lines=18) @@ | ||
491 | ); |
|
492 | } |
|
493 | ||
494 | if ( post_type_supports( $slug, 'comments' ) ) { |
|
495 | ||
496 | $event_slugs[] = "comment_leave\\{$slug}"; |
|
497 | ||
498 | $events->register( |
|
499 | "comment_leave\\{$slug}" |
|
500 | , 'WordPoints_Hook_Event_Comment_Leave' |
|
501 | , array( |
|
502 | 'actions' => array( |
|
503 | 'toggle_on' => array( 'comment_approve', 'comment_new' ), |
|
504 | 'toggle_off' => 'comment_deapprove', |
|
505 | ), |
|
506 | 'args' => array( |
|
507 | "comment\\{$slug}" => 'WordPoints_Hook_Arg_Dynamic', |
|
508 | ), |
|
509 | ) |
|
510 | ); |
|
511 | } |
|
512 | ||
513 | if ( is_multisite() ) { |
|
514 | foreach ( $event_slugs as $event_slug ) { |