add_section( 'comment_section', array( 'title' => esc_html__( 'Comments', 'omega' ), 'priority' => 121, 'capability' => 'edit_theme_options' ) ); /* Add the 'custom_comment' setting. */ $wp_customize->add_setting( "page_comment", array( 'default' => false, 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', //'sanitize_js_callback' => 'omega_customize_sanitize', //'transport' => 'postMessage', ) ); /* Add the checkbox control for the 'custom_comment' setting. */ $wp_customize->add_control( new Omega_Customize_Control_Checkbox( $wp_customize, 'page_comment', array( 'label' => esc_html__( 'Enable comments on pages ', 'omega' ), 'section' => 'comment_section', 'settings' => 'page_comment', 'extra' => esc_html__( 'This option will enable comments on pages. Comments can also be disabled per page basis when creating/editing pages.', 'omega' ) ) ) ); }