protected function get_entry_type() {
		if ( $this->entry_type instanceof Papi_Entry_Type ) {
			return $this->entry_type;
		}

		$entry_type_id = papi_get_entry_type_id();

		// If the entry type id is empty try to load
		// the entry type id from `page` query string.
		//
		// Example:
		//   /wp-admin/options-general.php?page=papi/option/site-option-type
		if ( empty( $entry_type_id ) ) {
			$entry_type_id = preg_replace( '/^papi\/\w+\//', '', papi_get_qs( 'page' ) );
		}

		// Use the default entry type id if empty.
		if ( empty( $entry_type_id ) ) {
			$entry_type_id = papi_get_entry_type_id();
		}

		// If no entry type id exists Papi can't setup a entry type.
		if ( empty( $entry_type_id ) ) {
			return false;
		}

		$entry_type = papi_get_entry_type_by_id( $entry_type_id );

		if ( $entry_type instanceof Papi_Entry_Type === false ) {
			return false;
		}

		$this->entry_type = $entry_type;

		return $entry_type;
	}
protected function get_entry_type() {
		if ( $this->entry_type instanceof Papi_Entry_Type ) {
			return $this->entry_type;
		}

		$entry_type_id = papi_get_entry_type_id();

		// If the entry type id is empty try to load
		// the entry type id from `page` query string.
		//
		// Example:
		//   /wp-admin/options-general.php?page=papi/option/site-option-type
		if ( empty( $entry_type_id ) ) {
			$entry_type_id = preg_replace( '/^papi\/\w+\//', '', papi_get_qs( 'page' ) );
		}

		// Use the default entry type id if empty.
		if ( empty( $entry_type_id ) ) {
			$entry_type_id = papi_get_entry_type_id();
		}

		// If no entry type id exists Papi can't setup a entry type.
		if ( empty( $entry_type_id ) ) {
			return false;
		}

		$entry_type = papi_get_entry_type_by_id( $entry_type_id );

		if ( $entry_type instanceof Papi_Entry_Type === false ) {
			return false;
		}

		$this->entry_type = $entry_type;

		return $entry_type;
	}
protected function get_entry_type ( ) { if ( $ this -> entry_type instanceof Papi_Entry_Type ) { return $ this -> entry_type ; } $ entry_type_id = papi_get_entry_type_id ( ) ; // If the entry type id is empty try to load // the entry type id from `page` query string. // // Example: //   /wp-admin/options-general.php?page=papi/option/site-option-type if ( empty ( $ entry_type_id ) ) { $ entry_type_id = preg_replace ( '/^papi\/\w+\//' , '' , papi_get_qs ( 'page' ) ) ; } // Use the default entry type id if empty. if ( empty ( $ entry_type_id ) ) { $ entry_type_id = papi_get_entry_type_id ( ) ; } // If no entry type id exists Papi can't setup a entry type. if ( empty ( $ entry_type_id ) ) { return false ; } $ entry_type = papi_get_entry_type_by_id ( $ entry_type_id ) ; if ( $ entry_type instanceof Papi_Entry_Type === false ) { return false ; } $ this -> entry_type = $ entry_type ; return $ entry_type ; }
Get Entry Type instance.

@return Papi_Entry_Type|false
Get Entry Type instance .