WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/ wp relative upload path

Description

Return relative path to an uploaded file.

The path is relative to the current upload dir.

Usage

<?php _wp_relative_upload_path$path ); ?>

Parameters

$path
(string) (required) Full path to the file
Default: None

Return Values

(string) 
relative path on success, unchanged path on failure.

Change Log

Since: 2.9

Source File

_wp_relative_upload_path() is located in wp-includes/post.php