_wp_relative_upload_path

FILTER wp-includes\post.php (ligne 937) github
Filters the relative path to an uploaded file.

Paramètres

Entrée :
$new_path, $path
Sortie :
@param string $new_path Relative path to the file.
@param string $path     Full path to the file.

Utilisation

// Modifier la valeur avec le filtre '_wp_relative_upload_path'
add_filter('_wp_relative_upload_path', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($new_path) {
    // Modifier la valeur
    return $new_path;
}

Actualités

Chargement des actualités...