Add Settings page data via action hook.

@uses 'github_updater_add_admin_page' action hook

@param string $tab Tab name.
@param string $action Form action.
508514
public function add_admin_page( $tab, $action ) {
		if ( 'github_updater_remote_management' === $tab ) {
			$action = add_query_arg( 'tab', $tab, $action ); ?>
			<form class="settings" method="post" action="<?php esc_attr_e( $action ); ?>">
				<?php
				settings_fields( 'github_updater_remote_management' );
				do_settings_sections( 'github_updater_remote_settings' );
				submit_button();
				?>
			</form>
			<?php
			$reset_api_action = add_query_arg( [ 'github_updater_reset_api_key' => true ], $action );
			?>
			<form class="settings no-sub-tabs" method="post" action="<?php esc_attr_e( $reset_api_action ); ?>">
				<?php submit_button( esc_html__( 'Reset RESTful key', 'github-updater' ) ); ?>
			</form>
			<?php
		}
	}
1280703
public function create_admin_page() {
		$action = is_multisite() ? 'edit.php?action=github-updater' : 'options.php';
		$tab    = isset( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'github_updater_settings';
		$subtab = isset( $_GET['subtab'] ) ? esc_attr( $_GET['subtab'] ) : 'github_updater';
		$logo   = plugins_url( basename( GITHUB_UPDATER_DIR ) . '/assets/GitHub_Updater_logo_small.png' ); ?>
		<div class="wrap github-updater-settings">
			<h1>
				<a href="https://github.com/afragen/github-updater" target="_blank"><img src="<?php esc_attr_e( $logo ); ?>" alt="GitHub Updater logo" /></a><br>
				<?php esc_html_e( 'GitHub Updater', 'github-updater' ); ?>
			</h1>
			<?php $this->options_tabs(); ?>
			<?php $this->admin_page_notices(); ?>
			<?php if ( 'github_updater_settings' === $tab ) : ?>
				<?php $this->options_sub_tabs(); ?>
				<form class="settings" method="post" action="<?php esc_attr_e( $action ); ?>">
					<?php
					settings_fields( 'github_updater' );
					if ( 'github_updater' === $subtab ) {
						do_settings_sections( 'github_updater_install_settings' );
						$this->add_hidden_settings_sections();
					} else {
						do_settings_sections( 'github_updater_' . $subtab . '_install_settings' );
						$this->display_ghu_repos( $subtab );
						$this->add_hidden_settings_sections( $subtab );
					}
					submit_button();
					?>
				</form>
				<?php $refresh_transients = add_query_arg( [ 'github_updater_refresh_transients' => true ], $action ); ?>
				<form class="settings" method="post" action="<?php esc_attr_e( $refresh_transients ); ?>">
					<?php submit_button( esc_html__( 'Refresh Cache', 'github-updater' ), 'primary', 'ghu_refresh_cache' ); ?>
				</form>
			<?php endif; ?>

			<?php
			/**
			 * Action hook to add admin page data to appropriate $tab.
			 *
			 * @since 8.0.0
			 *
			 * @param string $tab    Name of tab.
			 * @param string $action Save action for appropriate WordPress installation.
			 *                       Single site or Multisite.
			 */
			do_action( 'github_updater_add_admin_page', $tab, $action );
			?>
		</div>
		<?php
	}
1020572
function acttab_action($lookahead, $action)
    {
        if ($this->nLookahead === 0) {
            $this->aLookahead = array();
            $this->mxLookahead = $lookahead;
            $this->mnLookahead = $lookahead;
            $this->mnAction = $action;
        } else {
            if ($this->mxLookahead < $lookahead) {
                $this->mxLookahead = $lookahead;
            }
            if ($this->mnLookahead > $lookahead) {
                $this->mnLookahead = $lookahead;
                $this->mnAction = $action;
            }
        }
        $this->aLookahead[$this->nLookahead] = array(
            'lookahead' => $lookahead,
            'action' => $action);
        $this->nLookahead++;
    }
1099054
protected function setLoginMeta($action)
    {
        $label = $this->getModelManager()->getLabel($action . '-title');
        $urlMethod = 'get' . ucfirst($action) . 'URL';
        $this->getView()->Breadcrumbs()
            ->addItem($label, $this->_getUser()->getManager()->$urlMethod());

        $this->getView()->Meta()->prependTitle($label);
    }
247424
private void doUpdateDevelopMode() throws PageException {

	admin.updateMode(getBoolObject("admin", action, "mode"));
	store();
	adminSync.broadcast(attributes, config);
    }
1234810
public function addTab(string $id, array $tab): void
	{
		$this->optionTabs[] = array_merge($tab, ['DIV' => $id]);
	}
394186
private function options_tabs() {
		$current_tab = isset( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'github_updater_settings';
		echo '<nav class="nav-tab-wrapper" aria-label="Secondary menu">';
		foreach ( $this->settings_tabs() as $key => $name ) {
			$active = ( $current_tab === $key ) ? 'nav-tab-active' : '';
			echo '<a class="nav-tab ' . $active . '" href="?page=github-updater&tab=' . $key . '">' . $name . '</a>';
		}
		echo '</nav>';
	}
287238
private function add_hidden_settings_sections( $subtab = [] ) {
		$subtabs   = array_keys( $this->settings_sub_tabs() );
		$hide_tabs = array_diff( $subtabs, (array) $subtab, [ 'github_updater' ] );
		if ( ! empty( $subtab ) ) {
			echo '<div id="github_updater" class="hide-github-updater-settings">';
			do_settings_sections( 'github_updater_install_settings' );
			echo '</div>';
		}
		foreach ( $hide_tabs as $hide_tab ) {
			echo '<div id="' . $hide_tab . '" class="hide-github-updater-settings">';
			do_settings_sections( 'github_updater_' . $hide_tab . '_install_settings' );
			echo '</div>';
		}
	}
1200033
public function setAction($action)
    {
        $this->getTabs()->each(function (TabInterface $tab) use ($action) {
            if ($tab instanceof FormInterface) {
                $tab->setAction($action);
            }
        });

        return $this;
    }
289070
public void add(final AtomicAction action) {
        if (action instanceof Action) {
            Action a = (Action)action;
            peforms.addAll(a.peforms);
            backouts.addAll(a.backouts);
            cleanUps.addAll(a.cleanUps);
        } else {
            add(new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.perform();
                }
            }, new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.backout();
                }
            }, new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.cleanup();
                }
            });
        }
    }
808209
public function load_hooks() {
		add_action( 'admin_init', [ $this, 'remote_management_page_init' ] );
		add_action(
			'github_updater_update_settings',
			function ( $post_data ) {
				$this->save_settings( $post_data );
			}
		);
		add_filter( 'github_updater_add_admin_pages', [ $this, 'extra_admin_pages' ] );
		$this->add_settings_tabs();
	}
1349716
private function settings_sub_tabs() {
		$subtabs = [ 'github_updater' => esc_html__( 'GitHub Updater', 'github-updater' ) ];
		$gits    = $this->get_running_git_servers();
		$gits[]  = in_array( 'gitlabce', $gits, true ) ? 'gitlab' : null;
		$gits    = array_unique( $gits );

		$git_subtab  = [];
		$ghu_subtabs = [];

		/**
		 * Filter subtabs to be able to add subtab from git API class.
		 *
		 * @since 8.0.0
		 *
		 * @param array $ghu_subtabs Array of added subtabs.
		 *
		 * @return array $subtabs Array of subtabs.
		 */
		$ghu_subtabs = apply_filters( 'github_updater_add_settings_subtabs', $ghu_subtabs );

		foreach ( $gits as $git ) {
			if ( array_key_exists( $git, $ghu_subtabs ) ) {
				$git_subtab[ $git ] = $ghu_subtabs[ $git ];
			}
		}
		$subtabs = array_merge( $subtabs, $git_subtab );

		return $subtabs;
	}
172797
private function options_sub_tabs() {
		$current_tab = isset( $_GET['subtab'] ) ? esc_attr( $_GET['subtab'] ) : 'github_updater';
		echo '<nav class="nav-tab-wrapper" aria-label="Tertiary menu">';
		foreach ( $this->settings_sub_tabs() as $key => $name ) {
			$active = ( $current_tab === $key ) ? 'nav-tab-active' : '';
			echo '<a class="nav-tab ' . $active . '" href="?page=github-updater&tab=github_updater_settings&subtab=' . $key . '">' . $name . '</a>';
		}
		echo '</nav>';
	}
1074432
public function page_init() {
		if ( static::is_doing_ajax() ) {
			return;
		}

		register_setting(
			'github_updater',
			'github_updater',
			[ $this, 'sanitize' ]
		);

		$this->ghu_tokens();

		/*
		 * Add basic plugin settings.
		 */
		add_settings_section(
			'github_updater_settings',
			esc_html__( 'GitHub Updater Settings', 'github-updater' ),
			[ $this, 'print_section_ghu_settings' ],
			'github_updater_install_settings'
		);

		add_settings_field(
			'branch_switch',
			null,
			[ $this, 'token_callback_checkbox' ],
			'github_updater_install_settings',
			'github_updater_settings',
			[
				'id'    => 'branch_switch',
				'title' => esc_html__( 'Enable Branch Switching', 'github-updater' ),
			]
		);

		/**
		 * Hook to add Git API settings.
		 *
		 * @since 8.0.0
		 *
		 * @param array $auth_required Array containing authorization needs of git APIs.
		 */
		do_action( 'github_updater_add_settings', static::$auth_required );
	}
1231265
public function addTab(TabInterface $tab, $position = null)
    {
        $identifier = $tab->getIdentifier();
        if (!$identifier || empty($identifier)) {
            $tab->setIdentifier($this->generateIdentifier($tab));
        }

        if (!is_null($position) && is_numeric($position) && $position < count($this->tabs)) {
            array_splice($this->tabs, $position, 0, array($tab));
        } else {
            $this->tabs[] = $tab;
        }

        return $this;
    }
1072326
public function addTabs(array $tabs): void
	{
		foreach ($tabs as $key => $tab) {
			$this->addTab($key, $tab);
		}
	}
517811
public function addTabURL($page, $title = null)
    {
        if (is_null($title)) {
            $title = ucwords(preg_replace('/[_\/\.]+/', ' ', $page));
        }
        $this->tab_template->set(array(
                    'url' => $this->app->url($page, array('cut_page' => 1)),
                    'tab_name' => $title,
                    'tab_id' => basename($page),
                    ));
        $this->template->appendHTML('tabs', $this->tab_template->render());

        return $this;
    }