Answer page parent metabox
@return void
760188
public function pageMetaBoxContent()
    {
        global $post;

        $parent = get_post_meta($post->ID, 'customer_feedback_page_reference', true);
        $parent = get_post($parent);

        echo '<p><a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a> (' . get_permalink($parent) . ')</p>';
    }
896605
public function build()
    {
        if (is_null($this->getParent())) {
            // Add a top menu page.
            add_menu_page(
                $this->getTitle(),
                $this->getMenu(),
                $this->getCapability(),
                $this->getSlug(),
                [$this, 'render'],
                $this->getIcon(),
                $this->getPosition()
            );
        } else {
            // Add a submenu page.
            add_submenu_page(
                $this->getParent(),
                $this->getTitle(),
                $this->getMenu(),
                $this->getCapability(),
                $this->getSlug(),
                [$this, 'render']
            );
        }
    }
1008526
public function init()
    {
        parent::init();
		
		if($this->type=='small'){
			Html::addCssClass($this->options, 'small-box');
			if(!empty($this->bgColor)){ // aqua, green, yellow, red, blue, purple, teal, maroon
				Html::addCssClass($this->options, 'bg-'.$this->bgColor);
			}			
			Html::addCssClass($this->bodyOptions, 'inner');
		}
		elseif($this->type=='solid'){
			Html::addCssClass($this->options, 'box box-solid box-'.$this->headerOptions['color']);
			Html::addCssClass($this->headerOptions, 'box-header');			
			Html::addCssClass($this->bodyOptions, 'box-body');
		}
		elseif($this->type=='tiles'){
			Html::addCssClass($this->options, 'box box-solid bg-'.$this->bgColor);
			Html::addCssClass($this->headerOptions, 'box-header');			
			Html::addCssClass($this->bodyOptions, 'box-body');
		}
		else{
			Html::addCssClass($this->options, 'box box-'.$this->headerOptions['color']);
			Html::addCssClass($this->headerOptions, 'box-header');			
			Html::addCssClass($this->bodyOptions, 'box-body');
		}
		
		echo Html::beginTag('div', $this->options);
			if($this->type=='small'){
			
			}
			else{
				echo Html::beginTag('div', ['class'=>$this->headerOptions['class']]);
				echo Html::beginTag('h3', ['class'=>'box-title']);
				echo $this->header;
				echo Html::endTag('h3');
				if($this->type!='tiles'){
					echo Html::beginTag('div', ['class'=>'box-tools pull-'.$this->headerOptions['position']]);
						if(in_array('collapse',$this->headerOptions['button'])){
							?>
							<button class="btn btn-<?php echo $this->headerOptions['color']; ?> btn-sm" data-widget="collapse" data-toggle="tooltip" title="" data-original-title="Collapse"><i class="fa fa-minus"></i></button>
							<?php
						}
						if(in_array('remove',$this->headerOptions['button'])){
							?>
							<button class="btn btn-<?php echo $this->headerOptions['color']; ?> btn-sm" data-widget="remove" data-toggle="tooltip" title="" data-original-title="Remove"><i class="fa fa-times"></i></button>
							<?php
						}
					echo Html::endTag('div');
				}
				echo Html::endTag('div');
			}
			echo Html::beginTag('div', $this->bodyOptions);	
    }
1076316
protected function get_parent_context() : \context {
        global $PAGE;
        if ($this->parentcontext) {
            return $this->parentcontext;
        } else if ($PAGE->context && $PAGE->context instanceof \context_coursecat) {
            return $PAGE->context;
        }
        return \context_system::instance();
    }
935331
public function init()
    {
        parent::init();

        foreach ($this->children as $child) {
            $child->init();
            foreach ($child->getPages() as $page) {
                $this->addPage($page);
            }
        }

        foreach ($this->pages as $page) {
            $page->init();
        }
    }
513241
public function filterParent()
    {
        $value = $this->parent_name;
        $parent = self::findOne(['name' => $value]);
        if ($parent) {
            $id = $this->id;
            $parent_id = $parent->id;
            while ($parent) {
                if ($parent->id == $id) {
                    $this->addError('parent_name', 'Loop detected.');

                    return;
                }
                $parent = $parent->menuParent;
            }
            $this->parent = $parent_id;
        }
    }
1318967
public function parent()
    {
        $p = $this->_parent();
        return $p ? new self($this->doc, $p) : null;
    }
1083123
protected function _init() {
		parent::_init();

		foreach (static::_parents() as $parent) {
			$inherit = get_class_vars($parent);

			if (isset($inherit['_render'])) {
				$this->_render += $inherit['_render'];
			}
			if ($parent === __CLASS__) {
				break;
			}
		}

		$this->request = $this->request ?: $this->_config['request'];
		$this->response = $this->_instance('response', $this->_config['response']);

		if (!$this->request || $this->_render['type']) {
			return;
		}
		if ($this->_render['negotiate']) {
			$this->_render['type'] = $this->request->accepts();
			return;
		}
		$this->_render['type'] = $this->request->get('params:type') ?: 'html';
	}
64558
public function meta_box() {

		$pod = $this->cur_pod;

		if ( ! empty( $this->languages ) ) {
			?>
			<p><?php esc_html_e( 'Enable/Disable languages for this Pod', 'pods' ); ?></p>
			<p>
				<small class="description"><?php esc_html_e( 'This overwrites the defaults set in the component admin.', 'pods' ); ?></small>
			</p>
			<div class="pods-field-enable-disable-language">
				<?php
				foreach ( $this->languages as $locale => $lang_data ) {

					if ( ! isset( $pod['options']['enable_i18n'][ $locale ] ) ) {
						// Enabled by default
						$pod['options']['enable_i18n'][ $locale ] = 1;
					}
					?>
					<div class="pods-field-option pods-enable-disable-language" data-locale="<?php echo esc_attr( $locale ); ?>">
						<?php
						echo PodsForm::field(
							'enable_i18n[' . $locale . ']',
							$pod['options']['enable_i18n'][ $locale ],
							'boolean',
							array(
								'boolean_yes_label' => '<code>' . $locale . '</code> ' . $this->create_lang_label( $lang_data ),
								'boolean_no_label'  => '',
							)
						);
						?>
					</div>
					<?php
				}
				?>
			</div>
			<hr>
			<p>
				<button id="toggle_i18n" class="button-secondary"><?php esc_html_e( 'Toggle translation visibility', 'pods' ); ?></button>
			</p>
			<?php
		}//end if
	}
223120
public function setParent(Page $parent)
    {
        if (!$parent->hasMainSection()) {
            throw new InvalidArgumentException('A parent page must be a section');
        }

        if (!$this->hasMainSection() || $this->isRoot()) {
            $this->setSection($parent->getSection());
        } else {
            $this->getSection()->setParent($parent->getSection());
        }
        return $this;
    }
1323906
public function init()
    {
        $children = array();
        foreach ($this->children as $child_widget) {
            $children[] = $this->remove($child_widget);
        }

        $page = new SwatNoteBookPage();
        $page->id = $page->getUniqueId();
        $page_prototype_id = $page->id;

        foreach ($children as $child_widget) {
            $page->add($child_widget);
        }

        $this->add($page);

        parent::init();

        foreach ($this->replicators as $id => $title) {
            $page = $this->getWidget($page_prototype_id, $id);
            $page->title = $title;
        }

        $note_book = new SwatNoteBook($this->id . '_notebook');

        foreach ($this->children as $child_widget) {
            $page = $this->remove($child_widget);
            $note_book->addPage($page);
        }

        $this->add($note_book);
    }
1093564
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' ]
		);
	}
1084921
public function setup() {
		// do parent
		parent::setup();
		if ( ! isset( $this->struct['screen'] ) ) {
			$this->struct['screen'] = ( $this->parent ? $this->parent->slug : null );
		}
	}
634206
public function parent( $only_id = true ) {
		if ( $only_id ) {
			return $this->post->post_parent;
		}
		$class = get_called_class();
		return new $class( $this->post->post_parent );
	}
197353
public function prepare(string $parentSubmitName): void
  {
    parent::prepare($parentSubmitName);

    foreach ($this->controls as $control)
    {
      $control->prepare($this->submitName);
    }
  }
1344841
public function getParent()
    {
        if (!$this->currentFileName || !$this->metas) {
            return null;
        }

        $meta = $this->metas->get($this->currentFileName);

        if (!$meta || !isset($meta['parent'])) {
            return null;
        }

        $parent = $this->metas->get($meta['parent']);

        if (!$parent) {
            return null;
        }

        return $parent;
    }
378709
private function get_parent_link_html()
    {
        global $post;

        if (! empty($post) && $this->parent_page_id == $post->ID) {
            $li_class = $this->args['li_active_class'] . ' ' . $this->args['li_class'];
            $link_class = $this->args['link_active_class'] . ' ' . $this->args['link_class'];
        } else {
            $li_class = $this->args['li_class'];
            $link_class = $this->args['link_class'];
        }

        return \sprintf(
            '<li class="%s">%s<a class="%s" href="%s">%s%s%s</a>%s</li>',
            $li_class,
            $this->args['before_link'],
            $link_class,
            get_the_permalink($this->parent_page_id),
            $this->args['before_text'],
            get_the_title($this->parent_page_id),
            $this->args['after_text'],
            $this->args['after_link']
        );
    }