WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/ wp relative upload path

Contents

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