ms_file_constants

函式
ms_file_constants ( No parameters )

ms_file_constants: 這個函式定義了一些與WordPress Multisite使用的檔案系統有關的常量。這些常量包括UPLOADBLOGSDIR常量,它定義了當前站點的上傳目錄,BLOGUPLOADDIR常量定義了當前站點相對於站點根目錄的上傳目錄,以及UPLOADS常量,它定義了上傳目錄的相對路徑。

定義多站點檔案常量。

存在是為了向後相容通過wp-includes/ms-files.php(MU中的wp-content/blogs.php)提供的傳統檔案服務。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function ms_file_constants() {
/**
* Optional support for X-Sendfile header
*
* @since 3.0.0
*/
if ( ! defined( 'WPMU_SENDFILE' ) ) {
define( 'WPMU_SENDFILE', false );
}
/**
* Optional support for X-Accel-Redirect header
*
* @since 3.0.0
*/
if ( ! defined( 'WPMU_ACCEL_REDIRECT' ) ) {
define( 'WPMU_ACCEL_REDIRECT', false );
}
}
function ms_file_constants() { /** * Optional support for X-Sendfile header * * @since 3.0.0 */ if ( ! defined( 'WPMU_SENDFILE' ) ) { define( 'WPMU_SENDFILE', false ); } /** * Optional support for X-Accel-Redirect header * * @since 3.0.0 */ if ( ! defined( 'WPMU_ACCEL_REDIRECT' ) ) { define( 'WPMU_ACCEL_REDIRECT', false ); } }
function ms_file_constants() {
	/**
	 * Optional support for X-Sendfile header
	 *
	 * @since 3.0.0
	 */
	if ( ! defined( 'WPMU_SENDFILE' ) ) {
		define( 'WPMU_SENDFILE', false );
	}

	/**
	 * Optional support for X-Accel-Redirect header
	 *
	 * @since 3.0.0
	 */
	if ( ! defined( 'WPMU_ACCEL_REDIRECT' ) ) {
		define( 'WPMU_ACCEL_REDIRECT', false );
	}
}

常見問題

FAQs
檢視更多 >