WP_Comment::__construct
Constructor.
Populates properties with object vars.
Метод класса: WP_Comment{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WP_Comment = new WP_Comment(); $WP_Comment->__construct( $comment );
- $comment(WP_Comment) (обязательный)
- Comment object.
Список изменений
| С версии 4.4.0 | Введена. |
Код WP_Comment::__construct() WP Comment:: construct WP 6.9
public function __construct( $comment ) {
foreach ( get_object_vars( $comment ) as $key => $value ) {
$this->$key = $value;
}
}