wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
wp_get_comment_status › WordPress Function
Od1.0.0
Przestarzałyn/a
› wp_get_comment_status ( $comment_id )
Parametry: |
|
Powrót: |
|
Zdefiniowane na: |
|
Codex: |
Retrieves the status of a comment by comment ID.
Źródło
function wp_get_comment_status( $comment_id ) { $comment = get_comment( $comment_id ); if ( ! $comment ) { return false; } $approved = $comment->comment_approved; if ( null == $approved ) { return false; } elseif ( '1' == $approved ) { return 'approved'; } elseif ( '0' == $approved ) { return 'unapproved'; } elseif ( 'spam' === $approved ) { return 'spam'; } elseif ( 'trash' === $approved ) { return 'trash'; } else { return false; } }