Timber\Helper::get_comment_form PHP 메소드

get_comment_form() 공개 정적인 메소드

Gets the comment form for use on a single article page
사용 중단: 0.21.8 use `{{ function('comment_form') }}` instead
public static get_comment_form ( integer $post_id = null, array $args = [] ) : string
$post_id integer which post_id should the form be tied to?
$args array this $args thing is a fucking mess, [fix at some point](http://codex.wordpress.org/Function_Reference/comment_form)
리턴 string
    public static function get_comment_form($post_id = null, $args = array())
    {
        return self::ob_function('comment_form', array($args, $post_id));
    }

Usage Example

예제 #1
0
파일: Post.php 프로젝트: rpkoller/timber
 /**
  *
  * Gets the comment form for use on a single article page
  * @param array   $args this $args thing is a f*****g mess, [fix at some point](http://codex.wordpress.org/Function_Reference/comment_form)
  * @return string of HTML for the form
  */
 public function comment_form($args = array())
 {
     return Helper::get_comment_form($this->ID, $args);
 }