array( 'name' => esc_html__( 'Comments Form', 'mega' ), 'description' => esc_html__( 'Comments Form block', 'mega' )) ); parent::__construct( __CLASS__, $args ); $this->hookCallback(); } public function hookOnce() { add_action( 'comment_form_comments_closed', array( &$this, 'comments_closed' )); } public function comments_closed() { if ( !is_page() ) echo '
' . esc_html__( 'Comments are closed.', 'mega' ) . '
';//added status } public function block() { if ( !isset( $req )) $req = false; $fields = array( 'author' => '', 'email' => '', 'url' => '' ); comment_form( array( 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 'comment_field' => '', 'comment_notes_after' => '', 'cancel_reply_link' => esc_html__( '/ Cancel', 'mega' ), 'label_submit' => esc_html__( 'Submit', 'mega' ) )); } }