Warning: This method has been deprecated. Use WP_Filesystem_Base::abspath() instead.

WP_Filesystem_Base::get_base_dir() WordPress Method

The WP_Filesystem_Base::get_base_dir() method is used to retrieve the base directory for the WordPress installation. This is useful for finding the path to the wp-config.php file or the WordPress content directory.

WP_Filesystem_Base::get_base_dir( string $base = '.', bool $verbose = false ) #

Locates a folder on the remote filesystem.


Description

Top ↑

See also


Top ↑

Parameters

$base

(string)(Optional) The folder to start searching from.

Default value: '.'

$verbose

(bool)(Optional) True to display debug information.

Default value: false


Top ↑

Return

(string) The location of the remote path.


Top ↑

Source

File: wp-admin/includes/class-wp-filesystem-base.php

	public function get_base_dir( $base = '.', $verbose = false ) {
		_deprecated_function( __FUNCTION__, '2.7.0', 'WP_Filesystem_Base::abspath() or WP_Filesystem_Base::wp_*_dir()' );
		$this->verbose = $verbose;
		return $this->abspath();
	}


Top ↑

Changelog

Changelog
VersionDescription
2.7.0use WP_Filesystem_Base::abspath() or WP_Filesystem*Base::wp**_dir() methods instead.
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.