'Mega_Theme_Block_Comments_Loop' ); parent::__construct( __CLASS__, $args ); add_action( 'wp_enqueue_scripts', array( &$this, 'enqueue' )); } public function settings( $form ) { $form->add_control( 'Mega_Control_Number', array( 'label' => esc_html__( 'Avatar Size (px)', 'awake' ), 'value' => 70, 'name' => 'avatar_size' )); } public function enqueue() { if ( is_singular() && get_option( 'thread_comments' ) && comments_open() ) wp_enqueue_script( 'comment-reply' ); } public function callback() { echo '
' . esc_html__( 'This post is password protected. Enter the password to view any comments or pings.', 'awake' ) . '
'; } else { if ( have_comments() ) { echo ''; comments_number(); echo '
'; if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) && mega_option( 'paginate_above_comms' )) mega_widget( 'Mega_Block_Paginate' ); echo ''; $this->block(); echo '
'; } mega_widget( 'Mega_Block_Comments_Form' ); if ( have_comments() && get_comment_pages_count() > 1 && get_option( 'page_comments' ) && mega_option( 'paginate_below_comms' )) mega_widget( 'Mega_Block_Paginate' ); } echo '