Admin_Settings_General::utility_get_general_page_link( string $selected_tab = '' )

Returns the link of the general tab subtab


Parameters Parameters

$selected_tab

(Optional) The ID of the subtab

Default value: ''


Top ↑

Return Return

(string) The URL


Source Source

File: src/core/admin/admin-settings/tabs/general.php

	public static function utility_get_general_page_link( $selected_tab = '' ) {
		// Define the list of URL parameters
		$url_parameters = array(
			'post_type' => 'uo-recipe',
			'page'      => 'uncanny-automator-config',
			'tab'       => 'general',
		);

		// Check if there is a selected tab defined
		if ( ! empty( $selected_tab ) ) {
			$url_parameters['general'] = $selected_tab;
		}

		// Return the URL
		return add_query_arg(
			$url_parameters,
			admin_url( 'edit.php' )
		);
	}