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

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

		add_settings_field(
			'amazon',
			__( 'Amazon URL', 'pressbooks' ),
			[ $this, 'renderAmazonField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'oreilly',
			__( 'O\'Reilly URL', 'pressbooks' ),
			[ $this, 'renderOReillyField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'barnesandnoble',
			__( 'Barnes and Noble URL', 'pressbooks' ),
			[ $this, 'renderBarnesAndNobleField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'kobo',
			__( 'Kobo URL', 'pressbooks' ),
			[ $this, 'renderKoboField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'ibooks',
			__( 'iBooks URL', 'pressbooks' ),
			[ $this, 'renderiBooksField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'otherservice',
			__( 'Other Service URL', 'pressbooks' ),
			[ $this, 'renderOtherServiceField' ],
			$_page,
			$_section
		);

		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(
			'amazon',
			__( 'Amazon URL', 'pressbooks' ),
			[ $this, 'renderAmazonField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'oreilly',
			__( 'O\'Reilly URL', 'pressbooks' ),
			[ $this, 'renderOReillyField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'barnesandnoble',
			__( 'Barnes and Noble URL', 'pressbooks' ),
			[ $this, 'renderBarnesAndNobleField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'kobo',
			__( 'Kobo URL', 'pressbooks' ),
			[ $this, 'renderKoboField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'ibooks',
			__( 'iBooks URL', 'pressbooks' ),
			[ $this, 'renderiBooksField' ],
			$_page,
			$_section
		);

		add_settings_field(
			'otherservice',
			__( 'Other Service URL', 'pressbooks' ),
			[ $this, 'renderOtherServiceField' ],
			$_page,
			$_section
		);

		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 ( 'amazon' , __ ( 'Amazon URL' , 'pressbooks' ) , [ $ this , 'renderAmazonField' ] , $ _page , $ _section ) ; add_settings_field ( 'oreilly' , __ ( 'O\'Reilly URL' , 'pressbooks' ) , [ $ this , 'renderOReillyField' ] , $ _page , $ _section ) ; add_settings_field ( 'barnesandnoble' , __ ( 'Barnes and Noble URL' , 'pressbooks' ) , [ $ this , 'renderBarnesAndNobleField' ] , $ _page , $ _section ) ; add_settings_field ( 'kobo' , __ ( 'Kobo URL' , 'pressbooks' ) , [ $ this , 'renderKoboField' ] , $ _page , $ _section ) ; add_settings_field ( 'ibooks' , __ ( 'iBooks URL' , 'pressbooks' ) , [ $ this , 'renderiBooksField' ] , $ _page , $ _section ) ; add_settings_field ( 'otherservice' , __ ( 'Other Service URL' , 'pressbooks' ) , [ $ this , 'renderOtherServiceField' ] , $ _page , $ _section ) ; register_setting ( $ _page , $ _option , [ $ this , 'sanitize' ] ) ; }
Configure the publish options page using the settings API.
Configure the publish options page using the settings API .