function init() {
		$_option = $this->getSlug();
		$_page = $_option;
		$_section = $this->getSlug() . '_section';

		add_settings_section(
			$_section,
			'',
			[ $this, 'display' ],
			$_page
		);

		add_settings_field(
			'email_validation_logs',
			__( 'Email Validation Logs', 'pressbooks' ),
			[ $this, 'renderEmailValidationLogsField' ],
			$_page,
			$_section,
			[
				'0' => __( 'No. Ignore validation errors.', 'pressbooks' ),
				'1' => __( 'Yes.', 'pressbooks' ) . ' ' . __( 'Email me validation error logs on export.', 'pressbooks' ),
			]
		);

		if ( ! \Pressbooks\CustomCss::isCustomCss() ) {
			add_settings_field(
				'theme_lock',
				__( 'Lock Theme', 'pressbooks' ),
				[ $this, 'renderThemeLockField' ],
				$_page,
				$_section,
				[
					__( 'Lock your theme at its current version.', 'pressbooks' ),
				]
			);
		}

		register_setting(
			$_page,
			$_option,
			[ $this, 'sanitize' ]
		);
	}
function init() {
		$_option = $this->getSlug();
		$_page = $_option;
		$_section = $this->getSlug() . '_section';

		add_settings_section(
			$_section,
			'',
			[ $this, 'display' ],
			$_page
		);

		add_settings_field(
			'email_validation_logs',
			__( 'Email Validation Logs', 'pressbooks' ),
			[ $this, 'renderEmailValidationLogsField' ],
			$_page,
			$_section,
			[
				'0' => __( 'No. Ignore validation errors.', 'pressbooks' ),
				'1' => __( 'Yes.', 'pressbooks' ) . ' ' . __( 'Email me validation error logs on export.', 'pressbooks' ),
			]
		);

		if ( ! \Pressbooks\CustomCss::isCustomCss() ) {
			add_settings_field(
				'theme_lock',
				__( 'Lock Theme', 'pressbooks' ),
				[ $this, 'renderThemeLockField' ],
				$_page,
				$_section,
				[
					__( 'Lock your theme at its current version.', 'pressbooks' ),
				]
			);
		}

		register_setting(
			$_page,
			$_option,
			[ $this, 'sanitize' ]
		);
	}
function init ( ) { $ _option = $ this -> getSlug ( ) ; $ _page = $ _option ; $ _section = $ this -> getSlug ( ) . '_section' ; add_settings_section ( $ _section , '' , [ $ this , 'display' ] , $ _page ) ; add_settings_field ( 'email_validation_logs' , __ ( 'Email Validation Logs' , 'pressbooks' ) , [ $ this , 'renderEmailValidationLogsField' ] , $ _page , $ _section , [ '0' => __ ( 'No. Ignore validation errors.' , 'pressbooks' ) , '1' => __ ( 'Yes.' , 'pressbooks' ) . ' ' . __ ( 'Email me validation error logs on export.' , 'pressbooks' ) , ] ) ; if ( ! \ Pressbooks \ CustomCss :: isCustomCss ( ) ) { add_settings_field ( 'theme_lock' , __ ( 'Lock Theme' , 'pressbooks' ) , [ $ this , 'renderThemeLockField' ] , $ _page , $ _section , [ __ ( 'Lock your theme at its current version.' , 'pressbooks' ) , ] ) ; } register_setting ( $ _page , $ _option , [ $ this , 'sanitize' ] ) ; }
Configure the export options page using the settings API.
Configure the export options page using the settings API .