WP_Filesystem_Base::abspath()publicWP 2.7.0

Returns the path on the remote filesystem of ABSPATH.

Method of the class: WP_Filesystem_Base{}

No Hooks.

Return

String. The location of the remote path.

Usage

$WP_Filesystem_Base = new WP_Filesystem_Base();
$WP_Filesystem_Base->abspath();

Changelog

Since 2.7.0 Introduced.

WP_Filesystem_Base::abspath() code WP 6.5.2

public function abspath() {
	$folder = $this->find_folder( ABSPATH );

	/*
	 * Perhaps the FTP folder is rooted at the WordPress install.
	 * Check for wp-includes folder in root. Could have some false positives, but rare.
	 */
	if ( ! $folder && $this->is_dir( '/' . WPINC ) ) {
		$folder = '/';
	}

	return $folder;
}